Arduino + Safety

By telleropnul, October 30, 2016

Electrical safety considerations

This article is a strong warning to not open or manipulate any mains powered electrical equipment.  Do NOT interface an Arduino board with any mains power cabling, components, etc.

This document provides some basic guidelines how to make electronics equipment electrically safe.  If anything I hope you will learn something from this.

Disclaimer: I do not assume, and hereby claim, any liability to any party for any loss or damage, direct or consequential, caused by errors in those guidelines.

The safety requirements refer mainly to the 230V mains voltage and European electrical safety requirements.

Equipment must be designed and built so that it does not cause danger to the operator or the environment in the normal operation or in case of equipment damage. Especially take care of the shielding against electrical shocks, high temperatures, explosion and fire.

There are two classes of insulation:

  • Class I: single insulation which requires three core mains cable with earth
  • Class II: double insulation which requires no earth

Class I characteristics

  • Insulation between mains and every touchable part must withstand flashover voltage of 2120V
  • The distance between mains voltage carrying parts and touchable parts must be at least 3 mm
  • All touchable conducting parts must be properly earthed

Class II characteristics

  • Insulation between mains and every touchable part must withstand flashover voltage of 4240V
  • The distance between mains voltage carrying parts and touchable parts must be at least 6 mm

If you are designing electronics product you should aim for making your products class II.

Practical considerations on building safe equipment

  • All the parts in the equipment which carry dangerous voltage must be protected so that nobody can touch them. It must be impossible to expose any dangerous voltage carrying parts other than using tools to open the equipment.
  • Keep the distance between mains carrying parts and other parts as large as possible.
  • The distance between mains carrying parts and other parts must not be in any case less than what is required.
  • Try to make the mains carrying parts as compact as possible.
  • Use approved parts for mains carrying parts of the circuit (mains entry, fuse holder and switch)
  • If you do not use an integrated entry, use strain relief on the mains cable entry point. You must also provide some mechanical protection between the mains cable and the equipment case.
  • The wires from the mains cable must not be directly soldered to the circuit board.
  • The grounding wire must be connected so that it will be disconnected last if for some reason the strain relief in the mains cable gets loose.
  • All wires inside equipment which carry mains voltage must use wire approved for this kind of application.
  • Use preferably double-pole mains switch in all your circuits. Single pole mains switch is allowed only on equipment that is powered by transformers with isolated primary and secondary windings.
  • Fuses and mains interference suppressors are not needed to be switched off.
  • Use only the approved color coded wires for carrying the mains voltage. The green/yellow colored wire can be only used as grounding wire.


  • Generally all equipment needs a fuse.
  • Short-circuit proof transformers do not need a primary fuse.
  • Use only approved fuse holders.
  • It is advisable (though not mandatory) to precede the mains switch with a fuse.
  • Every fuse must have a label stating the it’s rating and type.
  • The rating of a slow fuse should not be greater than 1.25 times the normal operating current of the equipment.
  • Every equipment must have a label stating the identity of the equipment, the mains voltage and mains frequency.  If the equipment works only on AC power then there must be a symbol stating that. It is a good practice to put also the equipment mains current and/or power rating in that label.
  • In case of failure the equipment should not be a danger to the user.
  • Temperature of touchable parts must not be so high that they can cause injury or create a fire risk.

The fuse is to prevent overheating or fire hazard in case of a short. The protection for user is not by fuses, instead the ground bonding for the class 1 and double/reinforced insulation for class II would be to ensure the protection of user against electrical shock.

Mechanical construction

  • Mechanical construction of the equipment must be sturdy to withstand the equipment operating conditions.
  • Repeatedly dropping the equipment onto a hard surface from height of 50 mm must not cause damage.
  • Greater impacts must not loosen the mains transformer, electrolytic capacitors and other important components.


  • Do not use dubious or flammable materials.
  • Do not use material which emit poisonous gasses.
  • The case must be made of such material that does not burn by itself.

Special details on building Class II equipment

  • Use mains cable with moulded plug.
  • Use good strain relief on mains cable.
  • Use an approved mains on/off switch which does not have a metal lever.
  • Push wires through the eyelets and solder.
  • Use insulating sleeves to provide extra protection.
  • The distance between transformer and other parts must be at least 6 mm.
  • Use wire with insulation of 4 mm or more and core diameter of at least 0.75 mm.
  • The circuit board must be secured firmly.
  • Use preferably insulating plastic case.
  • The equipment label must have the indication that the equipment is double insulated (two squares symbol).