My First Switch Mode Power Supply Blows Itself Up - Page 1
Forum section: electronics / beginners

author: tsharp
author_rank: Newbie
timestamp: June 12, 2023, 06:55:55 pm
content: Hello all,I designed my first SMPS for a project to deliver 420mA of 11.6V from 5V USB. The output is just driving LEDs so it should be a pretty constant load. When I got my assembled boards I plugged on of them in. It drew 1.2A at 4.8V which is a little more than I was expecting (The MT3608 boost converter chip I'm using claims ~92% efficiency boosting 5V->12V at this loadhttps://www.olimex.com/Products/Breadboarding/BB-PWR-3608/resources/MT3608.pdf). After about 10 minutes the diode let out the blue smoke.The diode is a 1N5819WS which has a 40V rating and 1A of continuous current at 600mV forward voltage. I've included an image of the relevant part of the schematic below as well as the pcb layout.My inclination is that my diode is not specced for high enough current and that I need to resize it. I'm not exactly sure where I went wrong in my calculations though. I know that due to the switching nature there will be times when the current is over 420mA but I didn't expect that it would be so far above that it would blow the diode.Part of it may be that my duty cycle is only 60% so maybe It is delivering about 1A or more for a portion of each cycle.Any help on this matter would be greatly appreciated.Tsharp

author: AnalogTodd
author_rank: Regular Contributor
timestamp: June 12, 2023, 08:44:31 pm
content: There are a few things here that might be of concern. First is that your design is all MLCC's for input and output. From the USB wiring and connector to the input capacitor, this is a very high Q circuit that will want to ring and oscillate. Next, you have a 10uH inductor, but don't have any info on it. What is the saturation current of the inductor? You should be able to calculate the ripple current that you get through your inductor and keep it away from saturation. You're also pushing a fair bit of current depending on which USB version you are running; there may be some concern with voltage drops in the USB wires and whether or not most USB circuits can provide the level you need. From there, you're also running 22uF ceramic capacitors that look like they are 0805 case size. I would be willing to hazard a guess that those capacitors are not giving you 22uF of capacitance at 11.6V and stability is questionable. You're probably lucky if you have 4.7uF effective capacitance at the output.As someone who has played with things like these before, to understand what is happening you will want a good oscilloscope and current probe. You'll have to lift one end of the inductor and add a small bit of wire to clamp on the current probe. Then start looking at all your nodes and the associated waveforms.

author: tsharp
author_rank: Newbie
timestamp: June 12, 2023, 09:16:43 pm
content: Thanks,1. On the topic of the MLCCs they're 25V rated 0805. I agree that they probably are derated, part of the reason I went with them is because the datasheet specifically calls for ceramics.2. The inductor is thishttps://jlcpcb.com/partdetail/Tdk-TFM322512ALMA100MTAA/C2047632which has a saturation current of 1.6A. I was using this TI guide to help select an inductorhttps://www.ti.com/lit/an/slva797/slva797.pdf.My calculated Inductor max DC current was 1.08. I chose a 10uH inductor based on an expected current ripple of about 30%, which yielded 8-9uH. If the inductor was entering saturation do you think that would cause voltage spikes which could kill the diode? When I calculate my the peak current on my inductor according to that TI guide I get 425mA which is well below the saturation current.3. USB, I'm pretty sure it's fine given the right supply. I'm confident in the abilities of my cables and ports to supply that much.4. Would you recommend that I get rid of the VCC copper pours and replace with traces of the requisite size? My understanding was that a power pour could help increase input capacitance.

author: AnalogTodd
author_rank: Regular Contributor
timestamp: June 13, 2023, 02:32:01 pm
content: Quote from: tsharp on June 12, 2023, 09:16:43 pmThere's an issue with using small MLCC capacitors here. Derating is using parts at a level below the absolute maximum. The issue isn't derating, it's the voltage coefficient that capacitors like this have. You may, quite literally, only have somewhere between 2.2uF and 4.7uF effective capacitance because of how bad the voltage coefficients on these capacitors can be. If you search through the forums, you'll find a number of places people talk about this, it has become very well known. That gives you a lot more ripple on the output and potential instability. If a circuit is unstable, all bets are off for it operating at the correct voltages and currents. Using ceramics isn't necessarily an issue, but having the wrong value (especially on a circuit like this where loop compensation is internal) can make circuits operate erratically.Quote from: tsharp on June 12, 2023, 09:16:43 pmWhat would kill the diode is one of two things: either reverse voltage avalanching it regularly or too much current flowing regularly in the forward direction. The diode should be able to handle 1A continuous which should be reasonable, but if your circuit is unstable and not operating how it should be you could be running things a lot different than expected. If the inductor entered saturation, the current through it spikes up sharply as the inductance drops off and now you get a large spike of current through your diode when the switch turns off. Too much current in the forward direction, yes that can kill the diode.Quote from: tsharp on June 12, 2023, 09:16:43 pmAgain, the concern isn't just being able to handle the current without failing. One concern is that long wires are inductive--do a simulation sometime of a 0.36uH inductor and 4.7uF capacitor with some milliohms of ESR and put a step on the input. It rings like crazy, it's a high Q circuit. Next, if you have enough parasitic resistance, it'll stabilize out quickly, but resistance in the USB cable means you get lower voltage at the input of your switcher and require higher currents from the supply in order to meet the load requirements. That causes the voltage to drop further, requiring more current, a positive feedback situation.Quote from: tsharp on June 12, 2023, 09:16:43 pmI don't think your layout is a major issue here. A bad layout will decrease efficiency and increase EMI, but it's hard to get one bad enough to cause circuit failure unless traces are too small.Overall, get a scope on one of these and look at the different nodes in your circuit to see what is happening. That's the only way you will find the true failure mechanism. The data sheet that goes with the part you used is so minimal that it can be hard to know what is happening. How important is output capacitance for loop stability? How does changing inductance affect stability as well? You have no idea of loop gain and phase for the circuit and no information to even simulate what it might be.

author: tsharp
author_rank: Newbie
timestamp: June 13, 2023, 03:45:07 pm
content: Thanks for responding,I think from this I'm going to take a few steps to.1. Measure the behavior of different parts of the circuit, starting with the input and output voltage ripple and moving in towards the switching node. I'll be comparing some of those with the behavior of a SPICE simulation I have of a similar boost converter. I'm a little limited in my scoping ability as I currently only have a first gen analog discovery, but I'm sure if I'm clever I'll be able to get the info I need.2. When I eventually end up redesigning I'll add additional bulk capacitance in the form of aluminum electrolytics for the input and output, I think it's probably a good idea to keep some ceramics for high frequency response, but I'll probably go to a couple 10uF smaller package guys on the input and output.3. Making sure I include enough current headroom when selecting inductors and diodes to keep well away from derating and saturation.Do you have any recommended resources for learning more about smps? Should I spin up a board I can easily swap stuff out on with easy probing points? Is there good media that I could consume? Articles? Books?

author: Jim from Chicago
author_rank: Regular Contributor
timestamp: June 13, 2023, 09:48:22 pm
content: Can you post a schematic of the load? If you have LEDs in parallel they can behave strangely and counterintuitively. In certain cases the current doesn't split between them as you would expect. One LED can hog most of the current and you can get a type of runaway effect that ends up increasing current until something fails. Not sure if this is your issue, but it may be something to consider.

author: Wolfram
author_rank: Frequent Contributor
timestamp: June 13, 2023, 10:10:55 pm
content: A failure after 10 minutes sounds thermally related. How are your thermals looking after running for a while? Dissipating a good quarter watt in a SOD323 is going to lead to some temperature rise unless it's solidly soldered to large copper planes on each terminal, which is likely what they did for the datasheet ratings. On top of local ambient temperature rise from dissipation of the diode and nearby components, you might be getting into unsafe territory as far as junction temperature goes. And then reverse leakage runaway will pile on and make the situation even worse. I'd go for a bigger diode package in this application, or at least better heatsinking of the diode to begin with.If you have a thermal camera, this would be easy to check. If not, you can try swapping in a bigger diode or blow some air across it and see if it lasts then. Or you could try to run it at increased ambient temperature and see if it fails earlier. That would at least give some indication that this is the right direction to investigate.

author: tsharp
author_rank: Newbie
timestamp: June 13, 2023, 10:18:27 pm
content: Quote from: Jim from Chicago on June 13, 2023, 09:48:22 pmIt is 14 strings of 5-6 leds going into 30mA constant current drivers. So the runaway effect shouldn't be an issue.

author: tsharp
author_rank: Newbie
timestamp: June 13, 2023, 10:21:08 pm
content: Quote from: Wolfram on June 13, 2023, 10:10:55 pmThat is a good point. I don't have a thermal camera. but it definitely gets toasty. The whole board has a ground plane on the back to try to deal with a little bit of the thermals, but it was noticeably hotter under that circuitry. I also noticed that if I conducted some of the heat away with my hand on the back of the board I could get the overall current to decrease a good 10th of a watt.

author: tsharp
author_rank: Newbie
timestamp: June 13, 2023, 10:23:17 pm
content: I think what I might actually do now is desolder a bunch of the led strings and then gradually add them back until I get a failure. Then I can establish how much current it can really handle relative to my design

author: Wolfram
author_rank: Frequent Contributor
timestamp: June 13, 2023, 10:35:12 pm
content: As a point of reference, thishttps://www.diodes.com/assets/Datasheets/SDM2U20SD3.pdfpart in the same package gives some 400 k/w Rth_ja for the minimal suggested footprint, which is not too far from your situation. This gives you a 100 degree internal temperature rise on top of the circuit board temperature, and that's not even counting the dissipation from reverse leakage which can become significant at higher temperatures.

author: MrAl
author_rank: Super Contributor
timestamp: June 14, 2023, 01:16:17 pm
content: Hello there,I would have to agree that the board area may not be large enough for that diode. Surface mount parts that handle power have to have a minimum copper area to be able to dissipate the rated power level, and if you dont have that, you effectively have a little die trying to dissipate a huge amount of power.Power dissipation is related almost directly to surface area, so you need enough surface area to dissipate a given amount of power. With lower than necessary surface area, you can not dissipate the power the component needs in order to meet the specification and that means it will only operate normally up to a lower spec like lower current.Now if you used a through hole part this probably would not happen, but even with through hole parts sometimes you have to insure that there is enough lead length between the body and the PC board so that it can dissipate the heat in part through the lead surface area.Your options now seem to be either try a through hole part if you have the room, or increase surface area on the board, or see if you can find a very small heat sink to glue on the top of the diode but without shorting any leads. You have to use glue made for this though which is highly conductive thermally, although some high temperature epoxies will also work if you keep the glue layer very very thin.There is a slight chance that if you solder another diode of the same type in parallel it may work or use a higher rated diode. With a higher rated diode though it is hard to be sure if it will work with the limited surface area.Reliability is in part due to temperature, so you want to keep the temperature of the diode as low as you possibly can, whatever you decide to try. This means if it works for an hour that doesn't mean it will work for a year, but a 24 hour life test run is a pretty good test as long as the ambient temperature is typical of where the device will actually have to reside when being used normally.

author: schmitt trigger
author_rank: Super Contributor
timestamp: June 14, 2023, 02:15:41 pm
content: I also believe that you are running into thermal runaway issues. It could be related to a number of issues discussed previously.But again, without seeing the waveforms, it is only a guess.When you actually use a scope to view the waveforms, avoid the rookie mistake of using a long ground lead. It becomes an antenna and picks up all sorts of hash. Rather use a short pigtail grounding pin, like shown in the photo. Many scope probes include it as an accessory. But you can roll your own if necessary.