Help understanding cheap USB power supply - Page 1
Forum section: electronics / beginners

author: waspinator
author_rank: Contributor
timestamp: April 12, 2016, 03:28:21 am
content: I bought a very cheap 5V USB powder adapter to take apart and try to see how you can build one for ~$1US. Also to start learning about AC to DC power conversion with a practical example.There are very few parts, and I'd like to try to understand what each of them do. I'm pretty lost, so any help would be appreciated.D1:D2:D3:D4: Rectifying diodeC1:C2:C3:C4: Rectifying capacitorR1:R2:R3: Current limiting resistor for LED (any other role?)Q1:IC:Transformer: Step down AC to AC?In most diagrams I see a bridge with 4 diodes either before or after the transformer. Does this circuit not use one? Is the transformer stepping down AC and then just rectifying it with a single diode and capacitor? What is the IC doing? It doesn't seem connected to anything on the DC side. Is the squiggle on the PCB near the AC input a fuse? Would using this for its intended purpose be a death wish?I took a picture of both sides and made an overlay to more easily see how things are connected.My attempt at drawing a schematic based on the board. My transistor, transformer, and IC are likely not correct.Thanks

author: fubar.gr
author_rank: Unknown
timestamp: April 12, 2016, 04:06:49 am
content: IC looks like an optocoupler, which is typical in SMPS for sampling the output voltage while at the same time keeping the low voltage side isolated from the mains.But as you already noted, one side looks shorted, while the other side is floating. That's weird. It's not how an opto should be connected.

author: Paul Moir
author_rank: Frequent Contributor
timestamp: April 12, 2016, 04:30:51 am
content: First, there are two types of these kind of step down power supplies. One where the 50-60Hz AC from the outlet is fed directly into the transformer, and then the AC is rectified to DC using diodes and a filter capacitor on the low voltage end. This used to be the most common way of doing it since it's very simple. However the problem is that the transformer needs to be very large to pump much energy across from the primary to secondary at only 50Hz. Being large also makes it expensive.The second type is called a "Switch Mode Power Supply" or "SMPS", of which your $1 power supply is an example. In this case we take the AC from the plug, go right ahead and convert it to DC in the usual way with diodes and a capacitor. Next you chop it up into "AC" again, but very quickly this time. You normally want to do this over 20KHz to prevent making audible noise. Then you can run it through a very small transformer for isolation and voltage ratio. On the other side of the transformer you rectify it again into DC.One neat thing about this setup is that you can regulate the voltage by "talking back" to the high voltage side and telling the chop pulses to be on longer or shorter, providing more or less power at the output. The communication is done by the IC you've identified, which is in fact an optocoupler. The brighter the LED in the optocoupler shines at it's receiver, the shorter the pulse to the transformer gets on the high voltage side.On your rather unfortunate example, they've put the optocoupler in but haven't bothered hooking up the LED side. They also shorted out the receiver. Why is anyone's guess. Maybe they don't work. Maybe they thought they looked good. Maybe someone told them they should have one in there, so they did.Answering the bit about the rectification diodes: yes normally you see a full bridge rectifier used here. This converts the 50Hz sine wave to 100Hz humps, which means your filter capacitor can be much smaller for a given load to connect the humps. In your pathetic example, they've used a single diode (D1) which will produce 50Hz humps separated by 1/60th of a second of nothing, which would normally need a large filter capacitor (C1) to connect the peaks. By they didn't bother with a large filter capacitor either.Incidentally, since the rectification on the low voltage side happens at a very high frequency, some special consideration has to be given to the diode (D4) and capacitor (C4). The diode has to turn on & off very fast, so normally a high speed schottky diode is used here. Also since C4 sees a lot of duty being charged up and down a lot, the internal resistance (ESR) of the capacitor needs to be low since that would go right into heat. And heat inside an electrolytic capacitor does no one any good.

author: Seekonk
author_rank: Super Contributor
timestamp: April 12, 2016, 09:09:13 am
content: Close, but no cigar. The transistor is a switcher IC. The "base" is the on off control pin and power for the electronics. The 2.2M resistor charges up the capacitor so there is enough voltage to bump the oscillator. The second primary winding provides the power to keep running. The opto shunts this power to turn it off when the output gets too high. This is a wham bam regulator. Pulse widths are always the same and it form a pseudo PWM. The LED side of the opto normally is a zener and resistor in series with the opto LED. Go back and have a second look.

author: Gyro
author_rank: Super Contributor
timestamp: April 12, 2016, 09:31:29 am
content: Sadly, this isn't a very good example to study.As Paul indicated, the purpose of the optocoupler is to provide feedback of the secondary side voltage so that the primary side circuit can regulate it. Unfortunately in this case it is a deliberate Fake - put there to fool inspectors about its quality.The creepage and clearance distances between primary and secondary side (underneath the transformer footprint) are not adequate for safety.Yes, the 'squiggle' near the input is intended to be some kind of fuse, but it will not work. In fact the greater length of track (compared to a very thin straight track) in a small area is much more likely to set the PCB on fire!By all means study it, but as an example of the bad things people do (edit: or rather, the things bad people do!), nothing is as it seems. I definitely wouldn't recommend that you try to use it. If there are such obvious signs of deception on the PCB, you have no idea about the hidden insulation quality inside the transformer.If at all possible, I would report the seller for selling life threatening products.

author: Ian.M
author_rank: Super Contributor
timestamp: April 12, 2016, 10:22:33 am
content: I'd wait on declaring Q1 to be a chopper IC rather than a transistor. What part number is it marked with?It looks suspiciously like a single transistor blocking oscillator. D2 and D3 are obviously different, and it would make a lot more sense if D2 is a Zener. In that case, the aux/feedback winding would develop a voltage on C3 depending on the load, and the Zener would increasingly shunt the base drive as the output voltage rises, providing crude regulation.The optocoupler is an obvious fake - its wired to do nothing and may not even contain any silicon. The only reason its there is to fool uninformed bulk buyers, who may confuse this board with one that has better regulation due to opto-coupled feedback from the secondary side.Clearances are a bit skinny for safety - the track under the transformer to the negative side of the output filter cap has no business being there. If the cap was moved to between the LED and the USB connector, it would vastly improve it *ASS*U*ME*ing the transformer has adequate clearances, creepage distance and insulation. The area round the input diode is also very suspect. The clearance from L to N is clearly inadequate, and the pcb track 'fuse' is a joke - its far too short and too close to the N track to clear a fault reliably.Next thing to do, would be to power it via anisolating transformerand scope the various signals, with and without a resistive load of 10R (for a nominal 500mA load). Unless you have a x100 high voltage probe, *DO* *NOT* attempt to scope the Q1 collector waveform.*DO* *NOT* trust it to charge any device with a value greater than $1 or any device with exposed metal parts.

author: amyk
author_rank: Super Contributor
timestamp: April 12, 2016, 10:48:15 am
content: The separation between the primary and secondary is actually quite good for $1... there are far worse designs out there:http://www.lygte-info.dk/info/usbPowerSupplyTest%20UK.htmlOne of the ones on that page is similar to yours in that it has no optocoupler, and the output is quite unregulated indeed.If you want to experiment with this, you don't even need to connect it to the mains or use AC - some of them will start with as little as 12V DC on the input.All these suboptimal designs make me wonder how they were arrived at, because it's not hard to have decent creepage distances and sufficient regulation. Maybe someone should create one good but still cheap design, and encourage every manufacturer in China to copy it...

author: ion
author_rank: Regular Contributor
timestamp: April 12, 2016, 10:50:43 am
content: I don't know a lot about SMPS design, but what you have there is clearly junk! Be very careful if you do plug it in - the quality of the transformer might match that of the rest of the board:

author: fubar.gr
author_rank: Unknown
timestamp: April 12, 2016, 06:08:56 pm
content: I tore down a similar el-cheapo USB chargerThe PCB has the footprint for the opto, but it is not populated. And there's the same thin trace fuse

author: Paul Moir
author_rank: Frequent Contributor
timestamp: April 12, 2016, 09:04:25 pm
content: Looks like on yours though the optional fuse trace isn't used. In fact, that might even be a fusible resistor on the N (facepalm) terminal.Dial-A-Quality!

author: Gyro
author_rank: Super Contributor
timestamp: April 12, 2016, 09:16:44 pm
content: I'm beginning to feel that there's a perfect storm of these dodgy supplies raining down on us!How on earth are we going to survive into the next decade?

author: waspinator
author_rank: Contributor
timestamp: April 13, 2016, 12:23:01 am
content: The TO-92 package seems to be a transistor with marking 13001 S 8DThe IC seems to be empty inside, but I may not know what I'm looking for.

author: Ian.M
author_rank: Super Contributor
timestamp: April 13, 2016, 01:08:35 am
content: The transistor is probably aMJE13001equivalent.If the optocoupler was genuine, there would be a semiconductor die bonded in each large dimple in the lead frame, facing each other through the translucent insulation, and each die would have a wire-bond to the other lead on the same side of the package. Did you do any electrical tests before breaking it open?

author: rolycat
author_rank: Super Contributor
timestamp: April 13, 2016, 01:20:58 am
content: The approach to designing these things reminds me of Colin Furze creating a jet engine using a scrapyard turbocharger and some toilet accessories, 'engineered' with an angle grinder and held together with duct tape.Like his engine they are stupidly dangerous (okay, notquiteas dangerous) and a hideous bodge, but it's kind of amazing that they work at all.

author: sleemanj
author_rank: Super Contributor
timestamp: April 13, 2016, 01:34:56 am
content: Clive did a reverse engineering of a less-fake power supply which goes into detail on the method of operation.https://youtu.be/v_66r9wRa-U?t=13m19s

author: tooki
author_rank: Super Contributor
timestamp: April 14, 2016, 09:30:31 am
content: Quote from: Paul Moir on April 12, 2016, 09:04:25 pmSince these things use non-polarized plugs, the labeling of line and neutral is completely arbitrary and meaningless.

author: SeanB
author_rank: Super Contributor
timestamp: April 14, 2016, 07:18:49 pm
content: Fake optocoupler, and the transistor and most of the components appear to be recycled components, possibly even tested as to functionality ( though I would suspect that step is an omitted optional extra on the part, cheaper to sell a looks like part untested in a bag than to use a meter to find those that actually work) before assembly, or more likely as a final QC test - plug in and no bang, light on - QC PLASSED.