Here is the power supply that came with a cheap MP3 player. It is a power supply that takes in 230V mains power and outputs 5V at USB connector. What is wrong with this power supply?
Let’s start with the electromechanical design. The mains connection pins that can be folded in and out at a nice feature, but the mechanical construction of them feels like they can break down quite easily. But the worse it that it can’t be used in many European countries. The pins are so short that they don’t make any contact with the mains power when you try to plug this to Schuko mains outlet. Let’s take a look what is inside.
In this picture things look pretty normal. There are quite normal looking components. The PC111 optocoupler between the mains and low voltage side seem to be with specifications up to the job. The transformer looks quite small, but if it is well built it could be up to it’s job. Other components are less critical on electrical safety (more to do with the correct operation and fire safety). But turn on the other side to see the details of circuit board design.
Now I see something to worry about! Take a look at the separation between mains carrying parts and low voltage side: There is less than one millimeter between them (I measured shorted distances to be in 0.5-0.7 mm range). This is not how to build a safe power supply. The creepage distance between the mains voltage and low voltage side should be considerably more for the power supply to be safe. I could not get this arch over with 1 kV from insulation resistance meter, but most probably this kind of design can’t handle much more than this because the typical voltage breakdown in air is approximately 1100 V/mm. Clearly this is not safe to use product!
This kind of power supply should be designed to be double insulated, which means that the insulation between mains and low voltage sides should withstand several kilovolts of voltage. This kind of less than one millimeter creepage distance is clearly not enough for this. Inadequate insulation strength and too small creepage distances seems to be the most common reasons by USB chargers are recalled by Finnish safety authority Tukes. So this kind of bad design seems to be too common.
The typical creepage distance on the circuit board for Reinforced/Double insulation would be 6.4 mm and it should withstand 5000 V RMS (1 min). This 6.4 mm Reinforced/Double insulation creepage is for 300V, Material Group III and Pollution degree 2.
IEC60950-1 MAINS Creepage Requirements for 250V voltage for pollution degree 2 (EN60950, laboratories, office) would be 2.6 mm (material I) 3.6 mm (material II) or 5.0 mm (material III). Most commonly used circuit board materials usually fall in class II and III. The greater the creepage distance, the higher the external safety protection.
According to those standard expect to see in properly designed mains power supply at least 4-5 mm distance between mains side and low voltage side (or well insulating conformal coating). The typical voltage breakdown in air is approximately 1100 V/mm, a 4 mm creepage rate component (not including the internal barrier’s isolation) will break (arc) down at approximately 4400 V.
As an example here is inside view of another mains power supply (one charger that gives out 5V).
This designs looks better designed. There is clear several millimeters of creepage distance between the mains side and low voltage output side. This looks OK. The critical components between mains and low voltage side in this power supply are the transformer, optoisolator and two capacitors in series (they are rated for 2 kV). They look OK for the given task. This is how to build the circuit board for mains power supply.