I Accidentally Built a Firecracker - Page 1
Forum section: electronics / projects

author: Nogtail
author_rank: Regular Contributor
timestamp: June 30, 2025, 06:58:30 am
content: I'm working on a compact 25V LED dimmer designed to handle up to 10A. Space is already tight in the current prototype, so component choices are a bit constrained.Below are the relevant sections of the schematic. I haven't included the PWM control section, but it's just a typical microcontroller and gate driver setup. The gate is driven quite fast (around 40ns rise time) to reduce switching losses.I'm using screw terminals for the input and output. As an additional design constraint, I don't want it to fail if it is connected with the wrong polarity, or if power is connected to the output instead of input.My current prototype works quite well. The only problem is that it occasionally explodes when connected to a live power supply, leaving a large crater in the voltage regulator. The regulator I'm using is rated for an input voltage of 35V, which should give plenty of headroom above the 24V supply. After connecting my scope to the input, I was seeing voltage spikes of over 200V on the input when hot plugging. It looks like I greatly underestimated the inductance of a couple of metres of wire.To address this, I'm planning to add a 26V TVS diode on the input. I'll also swap the regulator for a 45V tolerant version since the clamping voltage of the TVS is around 43V. To avoid the TVS going thermonuclear if it fails short, I'll add a PTC fuse on the input. This combo might also provide some degree of overvoltage protection. Does this look like it would do the trick? Is there a better option that I haven't considered?While LED strips aren't highly inductive, I'm still worried about voltage spikes on the MOSFET drain - especially with long cable runs. Driving 3A of LED strips at 12V, I'm seeing large spikes when the MOSFET switches. The yellow trace shows the input voltage and the green trace shows the MOSFET drain voltage. The spike gets clipped by the MOSFET's avalanche mode, which works, but it's not rated for repetitive avalanche, so I'm not sure how long it would last avalanching 10k times per second. It doesn't noticeably heat up from switching or avalanche.An obvious fix would be to add a flyback diode across the output, but this could result in a loud bang if someone were to hook up the power supply to the output, which I'd rather avoid.Another option is putting a bidirectional TVS diode across the MOSFET, but I'm struggling to find one that is rated for repetitive operation. From simulation, it looks like it could dissipate several watts, which is a bit much for my form factor.I've also looked at RCD snubber networks. Simulations look promising, but squeezing in another 3 components will be tricky, and it looks like I still might be dealing with a couple of watts of power dissipation in the resistor.Is there another technique I should consider? I'd love to hear if anyone has dealt with something similar.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 30, 2025, 07:56:08 am
content: PWM or not, LEDs still need current limiting. In the schematic there is no current limiting mechanism.Is there any current limiting resistor in the LED string, or somewhere else? If not, the LEDs won't last.

author: shapirus
author_rank: Super Contributor
timestamp: June 30, 2025, 08:39:11 am
content: Quote from: Nogtail on June 30, 2025, 06:58:30 amThis may be relevant:Ceramic Input Capacitors Can Cause Overvoltage Transients(but the 200V transient seems to be really high -- are you sure that the 24V PSU is good and it's definitely not the source of that voltage?)

author: Whales
author_rank: Super Contributor
timestamp: June 30, 2025, 08:44:31 am
content: The input spike's size is based off a combo of your input L (cable), input C and input series R.Way too much detail on wikipedia, but in summary you can fix the problem in a number of ways:* Reduce L* Reduce C* Increase R* TVS voltage clamp (as you're doing -- this is perfectly legit).Going the resistance route is probably easiest. If your 10uF input cap is ceramic then it's going to have an awesomely low ESR of perhaps 10milliohms (at some frequencies). An old fashioned electrolytic cap will have something in the realm of 10ohms of ESR at a 10uF size, ie 1000x bigger. If there is no space (or you don't want one of those) then putting a 10ohm resistor in series with the ceramic would get you the same benefits.On that note, what is the part number for your voltage regulator? A mostly not noticed (but very important) detail is whether or not it can tolerate large high quality capacitors (low ESR) on its output. Many linear regs were designed in an era where big ceramics were not common, if the datasheet does not explicitly say "stable with 1uF ceramic" or shows a circuit diagram with a big ceramic then you have to assume it will not be happy. EDIT: Same fix as above, electrolytic or put resistor in series with cap to raise its ESR -- it's counter intuitive but this will lead to less noise/ripple on the output for affected regulators.

author: tooki
author_rank: Super Contributor
timestamp: June 30, 2025, 08:49:23 am
content: Quote from: RoGeorge on June 30, 2025, 07:56:08 amThe post mentions using standard 12V LED strips. Those always have built-in resistors. (There do exist LED strips intended for constant-current operation, but they’re mostly sold to professional lighting installers.)

author: tooki
author_rank: Super Contributor
timestamp: June 30, 2025, 08:53:48 am
content: Quote from: Nogtail on June 30, 2025, 06:58:30 amWhales summed up the options nicely.I’ve encountered this problem with little DC-DC converter modules that use ceramic input caps. An easy fix is to add an electrolytic input cap in parallel. This is what I’ve done so far.

author: Hydron
author_rank: Super Contributor
timestamp: June 30, 2025, 09:25:58 am
content: +1 to the above. This is one of those things that typically you learn through dead silicon rather than at school sadly! Definitely read the LT app note someone linked.

author: hans
author_rank: Super Contributor
timestamp: June 30, 2025, 09:32:19 am
content: The diode + cap is basically a nice peak detector. The LDO is the virtual resistance to drain the held voltage. Normally hot-plugging a LC circuit like that swings up to 2x Vin, but I guess the diode help it go much higher.Limiting ESR (tantulum or add R in series) can help. Or a large alu bulk capacitor so the LDO still has a low inductance cap closeby, while for hot plugging the majority of the current will be sinked and dampened by a less than ideal capacitor.What could also help is increasing the quiescent current of the device. Some regulators need a minimum load to remain stable. But I doubt its enough though (in rush current can easily peak several Amps, which means a 5mA power LED won't do much)

author: Nogtail
author_rank: Regular Contributor
timestamp: June 30, 2025, 09:45:20 am
content: Quote from: RoGeorge on June 30, 2025, 07:56:08 amIt's designed for LED tape and other situations where the device it's powering has inbuilt current limiting.Quote from: shapirus on June 30, 2025, 08:39:11 amThat seems to be exactly what I'm experiencing, thanks for the link! When I blew up the first one I thought it was the power supply, but it seems to just be a combination of the power supply having a decent amount of output capacitance along with a low ESR input capacitor on my dimmer.Quote from: Whales on June 30, 2025, 08:44:31 amI don't have a lot of control over L other than advising that people use short cables. The new regulator I plan on using doesn't require as much capacitance to be stable, so I can lower C to perhaps 2.2uF. The PTC fuse will have 1-2 ohms of resistance, so that should also help. I'd love to add a small series resister but I'm already struggling to fit everything on the board. I'll also have the TVS for if everything else fails.Quote from: Whales on June 30, 2025, 08:44:31 amGood catch! I used a HT7550-1 clone which doesn't mention anything about capacitor type in the datasheet, so I'd imagine it's designed for higher ESR capacitors. The output seems stable (until it goes pop!) but I'm only drawing a few milliamps from it - perhaps it's less stable at higher loads? The new regulator I plan on using explicitly says it is compatible with low ESR ceramic capacitors.Do you have any insight into protecting the output MOSFET?

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 30, 2025, 09:57:01 am
content: Why do people draw these horrible schematics with all those silly boxes around trivial schematic sections?Drawing a wire from the input connector to the voltage regulator would have been more direct, clearer and quicker to draw.Drawing all those boxes is a maintenance nightmare. Have you ever kept track on how often you redrew those boxes?Those boxes also do not add any sort of meaning to the schematic. They do nothing that a bit of whitespace can not do better.

author: BennoG
author_rank: Frequent Contributor
timestamp: June 30, 2025, 11:01:01 am
content: Quote from: tooki on June 30, 2025, 08:53:48 amI encountered the same a couple of years back and my solution was the same as yours. (and I put a 1 ohm resistor in series with the 10u ceramic cap)Benno

author: Siwastaja
author_rank: Super Contributor
timestamp: June 30, 2025, 04:14:08 pm
content: Quote from: shapirus on June 30, 2025, 08:39:11 amThis is a good appnote, and Table 3 confirms my observation: a good old simple electrolytic capacitor is the best damper. I prefer it over TVS; but you can of course use both. TVS does not dampen, just clamp.My rule of thumb is to use C_electrolytic approx 5x the capacitance of C_MLCC. Slap in 47 - 100 uF electrolytic - the cheapest high-ESR one does fine - and the problem is likely to go away, with nearly no overshoot. Try it.

author: Terry Bites
author_rank: Super Contributor
timestamp: June 30, 2025, 05:03:41 pm
content: That'll teach you not to buy one!

author: wraper
author_rank: Unknown
timestamp: June 30, 2025, 05:11:45 pm
content: Quote from: tooki on June 30, 2025, 08:49:23 amYes, however built-in resistance is way low to run them from PWMed 24V. If OP wants them to run them from 24V, he should connect two pieces of identical length in series.

author: Andreas
author_rank: Super Contributor
timestamp: June 30, 2025, 06:19:23 pm
content: Quote from: Nogtail on June 30, 2025, 06:58:30 amFor the typical 78xx regulators only the 24V regulator can handle the 35V.The lower voltages are rated at lower values (and also derated by output current).Sometimes a minimum load is required.with best regardsAndreas