Let's critique this 12V 2A Wallwart AC adapter design & discuss good practices!! - Page 1
Forum section: electronics / projects

author: bsodmike
author_rank: Regular Contributor
timestamp: June 29, 2021, 07:20:08 am
content: Hi all,I pulled this board from an AC Adapter sold on eBay as 12VDC 2A output. Noticed it gets rather hot whilst running so I pulled it apart. Board.jpg attached has the bottom-side flipped horizontally with the component side for easy tracing.Given how light this unit is, I'm wagering this is a super basic SMPS where the inductor coil is switched at a high frequency.It looks like this board is missing:X2 safety capacitorNTC (or inrush current limiter)Common-mode choke & EMI filtering

author: bsodmike
author_rank: Regular Contributor
timestamp: June 29, 2021, 07:22:47 am
content: One of the 8-pin DIP ICs is barely soldered on correctly.If you can figure out some of the parts better let me know. There might be one coil used as a common-mode choke PIC 1351 sitting in black next to the 400V green cap.

author: TurboTom
author_rank: Super Contributor
timestamp: June 29, 2021, 07:28:40 am
content: Actually, regarding the general design of this SMPS, I've seen worse. There is a fusible resistor that also limits inrush current, a common mode choke, a bridge rectifier (not just a single diode as can sometimes be found), and at least a proper SMPS controller with integrated switch. Moreover, there's proper opto-isolated output voltage feedback so its output should be fairly stable.But as always on these "El-Cheapos", isolation transformer quality is questionable, and fairly obvious, the complete absence of creepage distance between primary and secondary! This latter fact alone would be a no-go for me.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 29, 2021, 09:06:33 am
content: Just your standard TinySwitch or similar, offline regulator circuit. Opto feedback with zener regulation, crude, good enough for 12V; a 5V version would probably need a TL431. There are primary/aux sensing regulators as well, which don't need the opto.Very much standard datasheet circuit, flip through a few datasheets to see what I mean.I would guess the DM and CM noise are pretty bad, the latter particularly in any kind of normal setup i.e. with some impedance to ground on the secondary side, not just a floating load resistor. Yes, partly because of the lack of X2 cap, but also the single Y1 cap and no grounding (there might preferably be a Y1 cap from mains input to DC output, so the CMC can do a better job; by grounding I mean, if this had a 3-terminal cord, the Y1 caps to GND would serve this job, but to the output serves the same purpose in the absence of that). Also likely needs a DM choke at the output, with another filter cap.Yeah, no way in hell that thing got a real UL mark, or anyone else. Trash it for insurance reasons alone?Efficiency might be low due to core losses, cheap windings (undersized wire) or high leakage (the peak clamp snubber doesn't seem to be too onerous, at least); poor regulator chip (TNYs aren't too great to begin with, and if that's a Chinese clone, who knows?), and high ESR of the caps.Yeah, inrush is fusible resistor, cheap lossy solution adequate for low power devices. An NTC would probably be better at this rating; MeanWell modules of the same rating usually have one, for instance.Tim

author: mariush
author_rank: Super Contributor
timestamp: June 29, 2021, 09:24:19 am
content: Yeah, it's not that bad actually.IMHO the worst component in such power supplies is the actual transformer. The windings will be crap, with little to no spacing from the edges to allow insulation tape separate the primary winding from the secondary, with just one or two turns of tape, with secondary wire within millimeters of the primary wires as they come out to the external pinsYou get bridge rectifier, you get a proper switch IC instead of the old single transistor and 431 voltage reference, you get voltage feedback... It even has surface mounted components instead of all through hole design.It's missing the inductor between the two output capacitors ... at least you need one if you want to have a pi filter of some sorts and clean the output.Hate it how they solder the wires on the board, without inserting them through holes ... but I guess when you're on the "production line" having to get a minimum number of these made you don't waste time with squeezing wires through tiny holes or tinning wires.

author: Gyro
author_rank: Super Contributor
timestamp: June 29, 2021, 11:47:43 am
content: The thing that really bugs me about that layout is that they didn'tneedto run that secondary side negative rail track across between the primary and secondary transformer pins, thus compromising the PCB creepage distance below safe limits. They could have just routed the track round the other side of the rectifier pad (It's virtually there anyway!). In fact it would have been better that way because it would hit the reservoir capacitors before the feedback circuitry, thus improving stability and could still have kept close coupling of the Y cap across the transformer. It's just thoughtlessness. Of course the transformer construction could well still have suspect isolation.These guys are still where the South Koreans were 20 odd years ago. When I was specifying OEM PSUs for our consumer products I had to virtually teach the PSU companies how to design safe PSUs. Creepage, clearance, use of appropriately rated X and Y caps, submitting golden transformer samples and documenting detailed stack-ups for safety approvals etc. The early samples from multiple manufacturers were appalling. Hopefully they applied some of the lessons to other (at least European) customers.

author: tunk
author_rank: Super Contributor
timestamp: June 29, 2021, 11:50:36 am
content: And they could easily have increased the separation by moving thetwo 200k resistors and rerouting the negative track on the secondary.

author: TimNJ
author_rank: Super Contributor
timestamp: June 29, 2021, 04:38:15 pm
content: I don't know why this is, but I've found that when the transformer uses green, blue, or red tape, that it is usually built like absolute shit. Primary and secondary basically laying on top of each other, even worse, wires at 90 degree angles which is more prone to cutting through the insulation.I think this is a very sketchy power supply. Crappy clearance/creepage on the PCB shows very little attention to detail or understanding of the usual international safety standards.The overall approach is fine, but the assembly, PCB layout, and presumed sketchy construction of the transformer make it a "no" from me.

author: bdunham7
author_rank: Super Contributor
timestamp: June 29, 2021, 04:53:23 pm
content: It looks like an overall decent design, excepting the PCB track placement issues, that has been thrifted and probably assembled in terrible working conditions. And I've seen examples that were thrifted a lot more than this.What was the cost of the unit?

author: james_s
author_rank: Super Contributor
timestamp: June 29, 2021, 05:17:14 pm
content: I bought a handful of AC adapters like that several years ago. Some of them actually worked pretty well and held up fine, although after opening one up I decided it's better to just pay a few dollars more and get something from a reputable manufacture, even good quality wall warts are not all that expensive. I did have one of the old cheap Chinese ones fail somewhat spectacularly a few months ago, it was powering my Raspberry Pi server which I happened to be logged into at the time. I heard a pop from the other room and my terminal connection died. Investigated and found the power supply to be dead. Opened it up and there was carbon all over and multiple parts had exploded.

author: floobydust
author_rank: Super Contributor
timestamp: June 29, 2021, 07:01:00 pm
content: This wallwart is a killer deal. It could never pass safety approvals.china is using aluminum CCA wire in SMPS transformers which runs much hotter and stresses the transformer's insulation. Never mind the transformer is likely wound wrong- with primary and secondary wires lying on top of each other- the heat melts the insulating tape. How hot does this run near the 2A rating,50W24W out of that tiny transfomer lol.A simple hi-pot test would tell you if the insulation and pcb spacings can meet the minimum.The wirewound resistor used as a fuse? who knows how it does verses arcing and burning things. The "lightbulb fuse" cost is a few pennies.While the pcb is fiberglass instead of phenolic, it is a fail on the creepage and clearances, especially the one trace. Too bad they can't even design a pcb properly, no expertise over there.

author: james_s
author_rank: Super Contributor
timestamp: June 29, 2021, 07:17:43 pm
content: 50W? 2A 12V is only 24W. Otherwise I agree about the inadequacy of the design, I think 1A is far more reasonable for a continuous rating.

author: floobydust
author_rank: Super Contributor
timestamp: June 29, 2021, 07:52:16 pm
content: Fixed. I forgot you divide chinese watts by two not multiply lol.I have a very similar cheapola 12V 2A SMPS and the primary capacitor is smaller 15uF and gets really hot from the ripple current. I was going to upsize it but with no PTC the mains plug-in spark is pretty good.The transformer is much larger though, for a 52kHz SMPS.

author: bsodmike
author_rank: Regular Contributor
timestamp: July 01, 2021, 02:03:56 am
content: This is the culprit:https://www.ebay.co.uk/itm/274419713177?var=574549621854Too much, and I ordered a few too many forgetting it was eBay and not Farnell. I noticed this started to get rather warm once hooked up to my GPSDO, and also thought I'd rip one apart given how it is SUPER light. Absolutely shockingly light, well, we know why rightThanks for all the comments chaps, I have a few more devices I grabbed off eBay to share with you, and theyseemto be designed a bit better.

author: bsodmike
author_rank: Regular Contributor
timestamp: July 01, 2021, 06:19:35 pm
content: Whilst reading up on TinySwitch and various datasheets, I also stumbled on this resourcehttps://circuitdigest.com/electronic-circuits/12v-smps-power-supply-circuit-design-on-pcbwhich shows the "PI Expert" software that helps configure any SMPS design to your liking.Seems the author has covered all bases in terms of the schematic aspect, i.e hey have included a slow-blow fuse, MOV, input CM choke, DM choke on the output. As for their PCB design, there's a whole lot of "isolation" cut-outs.

author: Gyro
author_rank: Super Contributor
timestamp: July 01, 2021, 06:29:54 pm
content: Quote from: bsodmike on July 01, 2021, 02:03:56 amAt least they get a bit of credit for not 'beefing it up' by sticking in a sheet of scrap steel with a bit of double sided tape!That seems to be fairly frequent practice in the cheap brick type adapters.

author: exe
author_rank: Unknown
timestamp: July 01, 2021, 07:12:52 pm
content: I find soldering quite messy, with solder blobs on the board. Is it SMD glue for wave soldering? I didn't know it's still used.

author: mariush
author_rank: Super Contributor
timestamp: July 01, 2021, 08:23:41 pm
content: Quote from: exe on July 01, 2021, 07:12:52 pmThe solder blobs are probably on purpose, as an extra thermal mass and to thicken the traces.On some designs, the components reach temperatures so high that solder starts to drift and form blobs.See video below, from around 12:00

author: exe
author_rank: Unknown
timestamp: July 02, 2021, 10:23:26 am
content: Quote from: mariush on July 01, 2021, 08:23:41 pmI'm talking about solder particles on the board. Although, that soldering around the diode, looks horrible.

author: Jester
author_rank: Frequent Contributor
timestamp: July 02, 2021, 01:26:50 pm
content: I digress.....I would think any ethical engineer would never consider designing or putting a Mains powered device with obvious violations of what is required for a safe product in the public’s hand. Surely with the volume they sell, there must be fires. So how do the “Walmarts” get away with this?

author: TimNJ
author_rank: Super Contributor
timestamp: July 02, 2021, 02:45:47 pm
content: Quote from: Jester on July 02, 2021, 01:26:50 pmI agree that I would never, in good conscience, specify a power supply that is built like the above. That said, I wonder how dangerous these power suppliesreallyare. At this point, there must be millions of shoddy power supplies out in the world, but are people actually getting shocked, or worse? I am really just curious, and I feel it is very difficult to aggregate data on this. I've had at least one power adapter blow up on me. While the internals were completely smoked, the fuse (and/or weakest component in the power path) blew open, disconnecting it from mains.Maybe there are more issues in developing countries with lower incomes, where people may gravitate towards the cheapest, dodgiest solution, out of financial necessity?Regardless, my feeling is that the international safety standards (i.e. IEC 62368-1) is quite conservative with respect to what is actually "needed" to maintain safety in 99.99% of situations. I wouldn't cut it close either if I was writing a safety standard.

author: james_s
author_rank: Super Contributor
timestamp: July 02, 2021, 07:38:38 pm
content: Quote from: Jester on July 02, 2021, 01:26:50 pmVolume. There are simply too many units flowing for it to be feasible to check everything, and if you inspect a few and they're fine, others may have accessories from another batch that are completely different. Also I suspect even the really poorly made stuff never actually catches fire, it just stops working and gets thrown away. Occasionally someone gets electrocuted but that's usually a perfect storm that involves them doing something foolish like using a device while they're sitting in a bath. Most of the time if a defective wall wart results in a person getting a shock, they will not suffer any permanent injury and most will not think to report it.

author: Gyro
author_rank: Super Contributor
timestamp: July 02, 2021, 07:53:33 pm
content: Quote from: Jester on July 02, 2021, 01:26:50 pmThe responsibility for compliance with product safety and EMC regulations lies with the importer, in Europe anyway. The trouble is that many (most?) importers have little or no knowledge in the field - most ebay buyers buying from China included (yep, it's your responsibility to assess whether what you buy from China is safe to put into use) How many are going to open a welded enclosure to see what they are actually buying. If you buy it in a shop in your own country it's a different matter, you are not the importer in that case.I don't think that individual engineers within these manufacturing companies necessarily lack ethics, however many of them lack knowledge and training in safe design in general and of international safety standards in particular.These engineers work for companies which are in stiff competition with each other down to the last cent. They will do anything possible to reduce cost, not necessarily in an honest and scrupulous manner - why else would they use a scrap steel 'quality' enhancement ploy that I mentioned previously. At the end of the day, the management will make such decisions and the poor engineers have to do what they are told!There are many unscrupulous and dishonest importers too. Why else would Customs and Excise in the UK spend vast amounts of their time destroying fake merchandise? Everyone in the chain wants to make money, how honest the links in that chain are determines the safety of what you buy.Legitimate importers / retailers - I'll take Aldi and Lidl as well documented examples, use independent test houses to ensure that the products that the import are safe. They both use the well respected and expensive TÜV-Rheinland to do independent certifications. They have the clout to ensure that the manufacturers stay honest and can't afford the potential damage to their reputations [Edit: I have absolutely no idea what Walmart do, hopefully something similar as it is their legal liability].As far as how safe these products are, there are large numbers of cases of exploding fake phone chargers every year, causing burns, fires, non fatal shocks and fatal electrocutions. Those safety standards are there for a reason and have evolved over the years, based on experience.As I mentioned, if you buy something mains powered on ebay, Aliexpress etc. directly from a seller in China, you are the importer and it's safety is your responsibility. Whether the product comes with some CE or UL marking printed on it is also irrelevant. Comforting thought isn't it!

author: bson
author_rank: Unknown
timestamp: July 02, 2021, 08:41:04 pm
content: Does such a small supply need to limit inrush current? It looks like there's a mains side transformer, so its inductance should cap the current. The 25V 2x470μF are on the secondary side.It could use a fuse on the mains side, and since it doesn't you'd need to provide one in the power inlet IEC socket or inline in the wiring, or such.The transformer and rather large 470μF caps already attenuate EMC leakage, so it might be fine if the mains wires are run through a choke and the board put in a shielded enclosure. A kit supply doesn't need to conform to anything, but I don't see why you couldn't use this to build something conformant. (Why you'd want to use something assembled to such low standards is a different matter entirely.) It's clearly a component, not a consumer product, since it doesn't do anything meaningful by itself.

author: floobydust
author_rank: Super Contributor
timestamp: July 02, 2021, 09:08:59 pm
content: Quote from: bson on July 02, 2021, 08:41:04 pmFirst look for safety- a fuse, a clean PCB without flux and solder balls, decent spacings between hot side and LV output, and a transformer that looks to have good isolation and construction compared to something made in the bowels of guangdong. These things can electrocute people and we continue to let this junk into our countries.This is a SMPS, not a linear power supply.OP's power supply gets some inrush limiting from the series resistor 1R? and CM choke's DC resistance, for the 15uF primary cap. ABS10 bridge rectifier is rated 27-30A half-cycle. Usually I see a 10 ohm PTC for around 22uF up.I have a SMPS with raw (no resistor or PTC) 22uF primary cap and that's a loud spark plugging in at 120V so I expect its bridge rectifier to die some day.Another note, this POS doesn't even have a TL431, just uses a zener so regulation/setpoint would be poor.

author: Kerlin
author_rank: Regular Contributor
timestamp: July 03, 2021, 01:02:50 am
content: Recently an area of problems has been the lead from the supply to the device.They have been melting when there is excess current due to a fault and then causing fires.There is plenty of pictures on the net of fires caused by this and similar problems with USB leads causing fires.A friend who is a local fireman tells me of fires he has attended fires caused by plug packs.So my critique is the leads do not have a temperature rating on them.A thing I have repeated a few times and will repeat agian is that these countries have their own test labs that test to our known international standards.I have worked in those overseas places and worked with those test labs and I say I found them particularly "helpful" to the local manufacturers that I was working for.I have not seen any action is taken about fires caused by these products despite the fires they are causing.Wheres as the regime in my local country is critical of even the slightest problem when dealing with local manufacturers here, killing the local industry.The answer is get it tested over there, its cheaper anyway.Of course the thing is why buy cheap garbage, there is better readily available.The larger consumer communities are already witnessing the down side of supporting this crap.The zener reference is in the IC.

author: bdunham7
author_rank: Super Contributor
timestamp: July 03, 2021, 01:36:47 am
content: Quote from: TimNJ on July 02, 2021, 02:45:47 pmIt's not just power supplies. Self-igniting crap is commonplace these days.https://www.cnn.com/2020/09/10/business/amazonbasics-electronics-fire-safety-invs/index.htmlhttps://www.washingtonpost.com/technology/2021/07/01/tesla-plaid-fire/