Hacker News new | past | comments | ask | show | jobs | submit login
My new PSU burns out – I fix it, and torture it by cracking water (sig7.se)
184 points by todsacerdoti 12 months ago | hide | past | favorite | 90 comments



Some advice to the designer of this PSU:

1. It's not bad! Really, it's not. You're obviously a thoughtful designer who knows at least a little bit. Unfortunately, you're kind of in the uncanny valley... this is better than rank amateur stuff but that gets it judged by professional standards, and it's not there by those measures.

2. Schematic pages are free. Really. They are. Use them. Put the power path on one sheet, the feedback on other, the digital on a third, the setpoint on a fourth, display on a fifth. Whatever. You get the idea. Do not just cram it all in on one. And put comments on each block saying what it's supposed to be, what else you could do (especially substitute parts), why you picked that approach, what happens if it goes wrong, et cetera. Most senior engineers don't do this. I do, and everyone always comments on how great it is when they review my work. You have some of this... (the range notes are nice!)... but go all in on this. You won't regret it.

3. Learn to decouple. 0.1uF 0805s are not the right way to do it, though they probably worked here. Look at https://www.eevblog.com/forum/projects/location-and-value-of... and similar posts.

4. Mark out mains explicitly on your schematics. It should be super easy to see what is mains and what is not. This schematic is pretty good here, but this is important enough that I have to state it explicitly.

5. You have high voltage MLCCs in this design. How much capacitance are they really good for?


> How much capacitance are they really good for?

Just to stress this, voltage derating is important as it can be significant. Your 10uF capacitor might effectively be just 3uF, or worse, just due to DC voltage across it.

Some resources:

https://www.digikey.com/Site/Global/Layouts/DownloadPdf.ashx...

https://fscdn.rohm.com/en/products/databook/applinote/ic/pow...


> Apparently, the 8-mil (0.2 mm) clearance between VIN+ and ground was simply not enough to keep the 40-or-so volts apart.

I don't exactly have the creepage tables memorized but that immediately jumped out at me! It's just too optimistic. Especially since it seemed not to have been covered in soldermask (although that may also have blown off?). There are all sorts of possibilities for bits of loose metal (solder whiskers, cut TH lead fragments etc) to turn up there and ruin your day.

Mains PSUs often have slots in critical locations to deal with creepage. Can't creep across an empty space.


"Cant creep across empty space " No, but it can arc, which now explains perfectly why my motherboard failed, and threw an arc across the battery and sent out a jet of flame. I kept it around to show people what could never happen - does. Now long lost.


Wait, how small are the distances inside a supercapacitor?


Small

Air is like 50V per mil. Cheap plastic is like double that?

If the voltage of a given supercapacitor isn't high, then air could work fine I suppose. At least on those two dimensions, I haven't considered anything else.

Air will have less creep than most (all?) materials, but worse voltage limits.


Glass immediately comes to mind as having less creep. If you go back to the Faraday, Hertz, Tesla et al days when they were arcing kilovolts across their labs you’ll often see them using glass insulators. Some ceramics and Teflon too.


My recollection is that glass has drastically higher dialetric constant than air, but more creep (still very little creep, but more than the ~0 of air).

If you're arcing kilvolts, you want that higher dialectric constant, and probably don't care about small amounts of creep. If you're building a supercapacitor, that equation might be different because the voltages can be quite small.

I've been out of EE for a long time though, so maybe I'm misremembering things here.


This is indeed one limiting factor of supercapacitor design: the dielectric needs to be as thin as possible to increase capacitance, but not so thin that the working voltage of the capacitor exceeds the breakdown voltage of the dielectric's insulating ability.


> 2.5A primary side fuse (integrated into the AC inlet) did not melt

This is a current-limited power-supply right? Test your fuse! Would not be the first time a fuse-shaped wire is sold[1]

[1]: https://youtu.be/B90_SNNbcoU?si=HwDCRvz7E-aCR1rQ&t=431


There’s a special place in hell for people who sell fuse-shaped wires.


Some weeks ago I also relied on a 1A Quick-Blow fuse to safeguard my project from accidentally blowing up. However, while tuning the parameters for the 10 Amp 5-60V Buck Boost converter (which was only loaded output-wise for 5W at the moment) I got a thermal runaway at one of the mosfets, which instantly vaporized the FET and the FR4 below it. While my error was that the Input PSU was still set to 250W, that fuse was completely okay afterwards. Don't rely on fuses alone. They suck.


Fuses are just not that great. Quickblow fuses cannot keep up with quickblow MOSFETs. All they can do is limit the size of the fire in your enclosure.


Specifically, fuses (I mean actual fuses) have specific specs and MOSFETS have different specific specs. There is nothing wrong with using fuses if you understand and pay attention to that spec. Indeed a "quickblow" fuse will not protect you from everything you can think of - just some things - just because it's "quickblow".


Thermal fuses (which is what pretty much everyone here is talking about) will blow in seconds for “quick blow”. (There’s a chart for overload vs time, but it’s still slow).

If you want protection you can use electrical fuses/load switches that turn off in microseconds (which still might not save the fet but should at least save the pcb)


The author appears to be in Europe so that's 240V @ 2.5A, or 600W of power.

Even legit fuses can vary quite unpredictably: https://www.youtube.com/watch?v=WG11rVcMOnY


The transformer secondary was maxing out at 4A, 36V. The primary current will be much lower, probably about (40V/240V)*4A, ie about 0.67A.


it’s likely the track was weaker than the fuse - and you have long blow/slow blow fuses

electricity is lazy it takes the easiest path


How do you test a fuse?


Get a set of visually-similar fuses that claim to be the same rating. (Visually because you need the shape to be the same). When testing a few to destruction, record the temperature of the fusing element and resistance and power over time. Also measure the temperature at operating current.

Now the fuse you want to have the utmost trust in, test it at at half the time it should fail for a given i^2t. The temperature, resistance, and power curve should match the ones you tested destructively. The temperature at operating current should also be similar. If so, you can expect it to fail the way your destructively-tested fuses did.

Now, if you trust the metal composition and fusing element shape, a simple resistance meter will tell you if two fuses will behave the same.


How do i measure the temperature of a fuse?


Thermography should work?


So I need a lab to test my Amazon products.

I have a lab. What do 99% of consumers do? This is why the grift works.


99% of consumers aren't designing a power supply, at least.


You can destructively test samples out of a box of them. But even then the proper current profile that a fuse is supposed to accept or block is far from obvious or intuitive. Reading the spec helps. And then you still have the problem of supplying an acceptable sequence to get a correct result as you desired.

Another option is to experimentally send through various current profiles so that you - more intuitively - get a better understanding of whether your thinking of what you want to protect from, might actually happen.


> But even then the proper current profile that a fuse is supposed to accept or block is far from obvious or intuitive. Reading the spec helps.

Right. This. Even if you shove the standards in front of their faces, most engineers don't know what fuses really do (prevent fires) or what they don't (save circuit boards) or how fast it happens (not very). Asking your typical engineer to test a fuse lot is not going to give a useful result.

This is why there are so very many safety agency marks on fuses and why even the Chinese often skip the BS and just pay for name brand fuses.


I would use a variable power supply, amp meter and some sacrificial fuses. Slowly turn up the voltage while watching amps on the circuit until it blows? Or simply apply the rated amps (with current controlled power supply) to verify if/when the fuse blows.

I have a multiple-fuse assortment kit that was a great (too good?) deal from AliExpress. Now I'm thinking I need to do some of those tests myself to verify their rating.


You could... whoah, wait a second... isn't this one of the few places where that interview question of "determine the durability of N objects by dropping them from different floors in a building in a minimum of attempts" may actually be relevant?


Terminally.


I admire your optimism that all the fuses will behave similarly.


For a hobby project like this, I don't think you need utmost certainty.

And if you're building aircraft, why are you shopping on Aliexpress?


Not utmost, but if I put one in my car, it matters if one burns at 2A and the other at 4A.


Right? The best you can do it test a sampling of fuse from a batch, to there failure point, which destroys the fuse.


destructively


Diagram of the bare circuit board. So you can see the overhead view of the run from VIN to Q5 that blew.

https://tomscii.sig7.se/images/linear-dual-lab-psu/pcb-front...

Edit: I'm not the writer of the article...


Here's a good list of resources for calculating clearances. I usually go by IPC-2221 Table 6.1. I find that all of these are rather conservative compared to what I get from hi-pot testing, but YMMV.

https://www.smps.us/pcbtracespacing.html


Cool article! Where did you learn PSU design? Are you "classically" trained or self taught?

edit: The article on the design of the PSU is also great: https://tomscii.sig7.se/2024/04/300W-Linear-DualTracking-Lab...


Author is fairly early on in the self-taught stage from this sentence:

"(I really need to start digging into chapter 5 of The Art of Electronics, which is about achieving precision in electronic circuits)."

The author is aware of their learning-by-doing process, which is pedagogically great, but does mean they have to slog through finding things out the hard way.

"I really need to ditch the TL074"

- yes, it's from 1979. You'd also benefit from moving away from complicated analogue arithmetic and just buying a better ADC; remember that "losing half the range" is only one bit! You can buy some more bits at the bit store! (well, up to about 24, but then things have already got hairy in the analogue front end at that point)

The word "bandwidth" does not appear in this article, which means the author has not yet encountered control theory and is therefore not aware of a whole range of possible ways for a PSU to suck.

They would benefit from reading App Note 47. In fact, anyone working with op-amps would benefit from reading App Note 47, from the late great Jim Williams. https://www.analog.com/media/en/technical-documentation/appl...


This is excellent.

"Like all engineering endeavors, high speed circuits can only work if negotiated compromises with nature are arranged. Ignorance of, or contempt for, physical law is a direct route to frustration. Mother Nature laughs at dilettantism and crushes arrogance without even knowing she did it."


Your comment is solid in terms of how deep any field goes... and is also a good motivation for me to not bother with DIY power supplies :)

(Don't worry I anyway wasn't planning to mess with mains voltages, only 12-24V)


Power supplies are really interesting in that regard, because they're both (1) one of the best ways to learn as a beginner or intermediate beginner and (2) one of the worst value/$ ways to learn. There are so many decent power supplies out there to buy that I think building your own is not really the right choice, unless you see yourself doing more offline power or even high-power (audio?) amplifiers in the future.


> high-power (audio?) amplifiers

Coincidentally I am interested in that field in the future. Though I'm fairly sure that there are good quality existing designs on github/diyaudio.com, so I likely don't need to design one myself. Would you have any other suggestions for this topic/field?


> Would you have any other suggestions for this topic/field?

Acquire a scope as soon as possible. Doesn't have to be good, expensive, or even digital, but without one you literally cannot see what you are doing. You can emulate this with PC interfaces, but it's so much more convenient as a separate bench instrument.

Decide how much of a traditionalist you are. Class D has overwhelmingly won in terms of sound quality, convenience and efficiency, but if you want to build a valve amp and warm your hands around the glow, that's a very pleasant hobby.


Thanks a lot! I definitely plan to get an oscilloscope when I start building. In terms of classes I'm still not sure, but I'll likely go for a multi-channel/amp setup with DSP, perhaps some frequencies Class A & some D. I'll probably first experiment and listen to see what I like when I get started.


Depends on the objective. In some cases, slapping together a few components is fine and straightforward. In particular if you pay attention to how other people are using them - perhaps pay attention to the provided standard schematic and layout in the spec or application note - and if you are well within the expected use for these components. Notice magazine articles. Use several sources. Something might still go wrong, but then you might also buy the wrong widget from the wrong seller...

If you are deliberately striving to push the limits one way or the other, then yeah, you will run into the exact reasons nobody else did it.


> You can buy some more bits at the bit store! (well, up to about 24...

Most of the world really can not. It can only get up to 16, and that's with shady suppliers thanks to China ignoring international law.


I happen to work at the "more bits" store: https://cirrus.com/products/cs5302p/

(ok, "32 bits" and "126db" aren't quite the same, but those who need to know understand the difference and why the extra bits are still useful)


What is this meant to mean? There are plenty of 24- (and more) bit DACs available to ship world-wide on Digi-Key, Mouser etc...

There are some US export controls on DACs that have high bit-rates and high output rates (mostly over 3500 MSPS) which is far in excess of what you'd need for most things. And US export controls aren't 'international law'...


Note that the PSU is not really a tracking one as it can providde different positive and negative voltages in CC mode. True tracking bipolar PSUs do not do that (which is the point why they exist, otherwise you could just connect two PSUs in series).


The ground plane is copper-poured in that area.


Please don't use stainless steel or other chromium-containing alloys as an anode for DIY electrochemistry!

It will contaminate your solution with hexavalent chromium as it corrodes.


2oz copper plus fat track, multiple via stitches, huge ground planes as well as isolation between the sampling and power delivery parts of the boards. There’s a lot of design that goes into a simple power supply PCB. Check out an Agilent supply for detail :)


Lab power supplies have always been a staple project but most just aren't very good (which is fine). This one certainly has many of the staple ingredients: TL072 op amps, slow current limit, large output capacitance (look at C3||R22 x hFe(Q4) x hFe(Q5), there's probably additional capacitance directly on the outputs that I'm overlooking in the schematic), CC/CV cross-over saturates the other regulator and thermal design. Besides poor response, these are usually unstable with various loads, there's often a loss of regulation when switching on or off, they don't survive a dead short or a sustained load (especially the "not quite dead short" case is problematic for designs like this without current fold-back [1]). Most blow up when you do the file test.

Those are all good things though. You're going to find these issues when using the PSU and try to fix them. A really good lab PSU is, like you say, a surprisingly tricky thing to engineer. Some major compromises as well. There's a reason why a great many of them have used the circuit invented at HP some time in the late 60s (which in itself makes a number of compromises).

[1] f.e. the suggested TIP35C: Ptot = 125 W, which is already less than the >150 W you need to dissipate when the supply is shorted. But also heed the conditions: Ptot is at Tcase = 25°C. Does a small heatsink keep Tcase at 25 °C while dissipating 125 W?


Yup. The killer on these things is usually actually feedback phase shift. Sometimes the output load can have a complex reactance which turns the supply into a convenient power amplified oscillator. Fat output capacitor solves most of these problems but sometimes that has its own problems (old HP supplies had nice barrier strips so you can deal with them yourself :). Obvious trade off is step response there etc but your load should be properly decoupled anyway.

Lots of problems on power dissipation there as well as you state. The HP/Agilent designs tend to use an SCR pre-regulator which reduces Pd on the pass transistor considerably. But of course the principal cost in these things now is shipping and profit margin so it works out cheaper to cost cut even more and shift a small heatsink with a loud ass fan on it that does your ears in. Grr. (this is one of my many reasons for disliking Keysight)

The old HP designs are very robust. I've owned a few. Almost impossible to blow up, even the big ones. I actually had a Harrison one built in 1967 that was still working unrepaired and unmodified until I sold it recently.

Bob Pease did an interesting "zero output capacitance" supply article a couple of decades back. That was surprisingly stable.


I think you mean Keysight these days


No I mean Agilent. The stuff since keysight rebrand is mostly garbage.


Care to expand? I have some gripes with them myself, but I haven't demanded enough of their stuff to find technical issues yet. My problems are of the "oscilloscope is pestering me about windows updates" and "service manuals suck" variety.


Lack of service information, poor treatment of customers compared to HP/Agilent (try getting anything fixed without a service contract now), design shortcuts (U8002A is a buggy piece of shit), absolutely nightmare trying to order parts which at least in the UK means someone random calls you from Spain and asks for your credit card details and you may or may not get the parts. Oh and the whole fact that half the gear seems to turn into a brick fairly quickly compared to older models.

I will always look elsewhere now. If you have to throw something away every 2 years, might as well buy some Chinese junk instead (Siglent / Rigol etc). Aim-TTi are still good though - the last bastion of stuff that isn't shite.


Too true


Enameled wire completely submerged in water makes for a fantastic electrical load.

I’ve sunk 40 amps at 30VDC into a plastic tub filled with water for hours.

When the water gets hot, put fresh water in. For long term testing, trickle cold water in and let the hot water rise to the top and spill out.

DO NOT let the enamel on the wire burn off, or you will put some very nasty stuff into the air. Keep it completely submerged.

It is amazing how much energy it takes to heat up a volume of water. (This is also why it scares the shit out of me when I read about ocean temperatures rising and I think about how much water is in the oceans.)


Sunlight puts in a serious amount of energy. Roughly 1000 W/m2 at sea level as a global average according to https://en.m.wikipedia.org/wiki/Solar_irradiance


Yes and CO2 keeps that energy here, and the ocean absorbs a lot of that heat.

If you’re trying to say that the sun is responsible for rising ocean temperatures, I’d like you to consider how long the sun and the oceans have been around, and I ask you why they haven’t boiled away, yet.

The sun is not responsible for the recent dramatic increase in ocean temperatures. That’s on us (humanity).


Less at high latitudes, due to the angle. But if you build a solar power plant there (I have), you might be surprised to learn the electrical output is nearly as large as at the equator.

Of course that assumes angled panels, so the space taken is larger.


when they say the ocean temperature rises 1 degree, they should really put it in terms of joules it would take to do that, which is a really big number, rather than 1 degree, because people read more into bigger numbers.


And if you really want to scare people, convert it into Mt of TNT.


Did some quick napkin maths, and the energy required to raise sea temperatures one degree requires the energy of 1 368 000 gigatons of TNT equivalent. In comparison, Tsar Bomba is estimated 50–58 megatons of TNT, so you'd need quite a lot of these to produce the same effect.

According to NOAA, there's 1.335×10^9 km^3 of water in the oceans. This amounts to 1.335×10^21 liters, and with the density of sea water of 1.025kg/L, 1.368×10^21 kg.

The heat capacity of water is 4182 J/(kg×K) around room temperature. This means that when the temperature of oceans raise one degree (Celsius/Kelvin), the energy needed is (1.368×10^21 × 4182) J = 5.722544×10^24 J.

One gigaton of TNT equivalent releases 4.184×10^18 J of energy, and dividing the above result with this, you get the amount of gigatons required.


> 1 368 000 gigatons of TNT

that sounds a helluva lot worse than 1 degree


You could go with enough energy to drive an f150 around the equator 69720537774 times at 24 miles per gallon


No one knows what a Joule is though. “1 Watt Second” is not a familiar term for most people.


convert it into Hiroshima's then.


As lambdanana calculated above, it's enough Hiroshimas that it wraps back around to being a number the human brain cannot comprehend.


Surplus power resistors are great for this. Less likely to open immediately in a cooling glitch. (And yes, submerged too). It's really unfortunate electronics surplus stores are extinct around here.


PTC heating elements might be the safest, they'll just draw less current if they get too hot


The damage to the top of the wire terminal blocks suggest a lot of force was applied with a screwdriver to tighten them - straight onto the PCB near the breakage. I wonder if physical stress was also a factor.


... Did he really crack water in that box, letting gaseous oxygen and hydrogen mix exactly in the ratio of 1:2 in a closed container?

I mean, it's good he choose a less caustic electrolyte, but the potential explosion in itself is not fun.


He seems to have an unhealthy tolerance for disasters. I’m sure he could convince himself that was perfectly fine given zero sparks, but wow.


The pressure vessel is a tupperware... the lid would harmlessly blow off. As long as you're more than a foot away when that happens, you're fine.


It looks like the gas collects in the pet bottle and the reaction stops when the bottle is full.


And then you have a bottle of what is colloquially termed “bang-gas”, which is happy to release all the gathered energy in a joyous millisecond detonation.


It looks like you have a bottle of oxygen and one of hydrogen.


And they happen to be the same bottle.


If you carefully look at the picture, you'll see two bottles surrounding the whisks and the text says "a pair of PET bottles".


I'm not sure pressure would ever stop electrolysis (short of fusion interrupting things), but I do know that it's sometimes performed industrially in excess of 10,000 psi and there's no way that container is getting anywhere near there before opening one way or another.


The electrodes lose contact with the solution if enough gas is collected.


Ah, I didn't zoom in enough to see the bottles around the whisks.


haven't made a pcb in a long time but when i did, used Altium & there were design rule checks for everything; but, none for creepage. Interesting, thanks for sharing.


Interesting. A quick search says there is now a creepage rule, but its not enabled by default: https://www.altium.com/documentation/altium-designer/pcb-ele...

I wonder why that is.


Because it doesn't work quite right. It's also extremely slow. Extremely. Even by Altium DRC standards.

Source: tried to do HV design with it around two years back.


I was disappointed that there wasn't a picture of the repair, but an insulated wire would have been plenty indeed.

I've let the magic smoke out of several MOSFET devices in a QRP SSB Transceiver kit, and had jumper wires all over the place. The electrons are too dumb to know if it's an insulated wire, or a PCB trace, as long as the layout is good.

One thing this does enlighten me about is why physical air gaps are built into so many PSU PCB's between the high and low voltage sides, with often only a transformer crossing the gap.


PCB design is a science unto itself. Nice write-up.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: