Idioterna's USB charger
A while ago Jure told a story on IRC about how he bought a bag of very cheap Chinese battery chargers with an USB socket. One of them apparently self-destructed with smoke and fire.
Image by Jure Koren
I've seen some interesting posts about such gadgets from Ken Shirriff. After watching tear downs that show how little regard for safety some manufacturers have, I was curious to take a look at one of such specimens myself. So I asked Jure to borrow one.
With the charger disassembled, I was surprised to see a design consisting solely of discrete transistors, bipolar no less. This is rare to see these days, especially for line converters. Typically, I would expect to see a circuit built around one of the many chips on the market intended solely for this purpose.
Note also that the plug isn't soldered to the circuit board. Rather, the prongs are only touching metal connections that have a bit of flexibility in them. I wonder if this is what caused the carnage on Jure's self-destructed charger. Since no components are visibly damaged, an arc could have developed over a bad connection on one of the prongs.
Here is the bottom side of the circuit. I've marked the isolation boundary - the line between the high-voltage primary side of the circuit and the "safe" low voltage secondary side. The separation at the closest point is a millimeter at best.
Here is the specification printed on the casing. Note that the CE has the proportions of the infamous China Export, not the European conformity mark. Such an unsafe design would never pass a conformity test.
Intrigued by transistor-only design, I took the time to draw the full schematic of the circuit.
How does it work?
Diode and the 2.2 μF capacitor on the input form a half-wave rectifier for line voltage.
The topology is a regular flyback converter. In the first half of the cycle the power transistor Q1 is open. The current through its collector and the primary winding of the transformer is rising, storing energy in the ferrite core. Induced voltage over the secondary terminal is negative and D2 is closed.
At one point primary current raises to the point where voltage drop over the 12 Ω resistor is greater than Ube of Q2. Q2 opens and shorts the base current of Q1 to ground. Q1 closes and primary winding current drops abruptly to zero.
The stored magnetic energy induces currents in the secondary and auxiliary windings. D2 opens and the current charges the output capacitor C2. At the same time, auxiliary winding charges C5 and also keeps Q1 closed further - step change in induced voltage on the current pulls base of Q1 negative through C3 and the 560 Ω resistor.
When the core discharges, Q1 obtains the base current again and the cycle repeats.
Output voltage regulation is implemented using Zener diode ZD1. When the diode breaks down, it causes current to flow over the LED in U3. This in turn opens opto-coupler's transistor, which injects current into Q2's base, halting the converter until voltage drops again. In other words, this converter only functions in discontinuous mode.
Function of 500 mΩ resistor on the input is a bit of mystery to me. Typically you would find a fuse or a fusible metal film resistor. From the looks of it however, this is just a regular carbon film resistor. So either it's a case of cargo cult engineering or it's needed because of some subtle effect on the circuit behind it.
There is one safety feature on the circuit: the varistor between the primary and secondary ground. It's there so that any static discharges from the USB connector do not compromise isolation in the transformer. I've seen this safety feature implemented simply as a spark-gap printed on the circuit board, so a varistor is an interesting choice. (Update: as S56A points out in the comments, this is more likely a Y-class capacitor I have misidentified as a varistor).
Guessing from the discontinuous mode of operation, I would guess it doesn't regulate the output voltage very well. Devices that use USB solely for charging a battery probably aren't too sensitive to voltage swings though, so it might fit its intended purpose just fine. I haven't tested it though.
In conclusion, an interesting design. Very simple and built from cheapest possible components. I'm wondering if this was designed from scratch or maybe copied from some obsolete design from back before integrated flyback controllers were available. On the other hand, it's obviously a dangerous toy to leave unattended at home and most likely illegal to sell in the EU.
Na vhodu je verjetno 500 mA pocasna varovalka. Varistor med ground-i si verjetno zamesal s kondenzatorjem proti RFI. Elegantno narejen oscilator z dodatnim tranzistorjem in opticnim spreznikom za kontrolo. Tako se to delalo na zacetku stikalnih usmernikov.