PWM dimmer for LED strips - EMI and inductive kickback concerns - Page 1
Forum section: electronics / beginners

author: coolkitty
author_rank: Newbie
timestamp: August 05, 2025, 04:45:21 pm
content: I am designing a custom LED strip dimmer based on the RP2040 microcontroller with the following requirements:Output current up to 5A per channel at 24V, two channels.High PWM frequency and resolution for gamma correction and flicker mitigation (either 16bit @ ~1.9kHz, 14bit @ ~7.6kHz or 12bit @ ~30.5kHz). These options are derived from the 125MHz system clock. I will test and determine the best trade-off, but the minimum pulse width will be 8ns in all cases.LED strips connected via cables up to 5m in length.Here’s the schematic:I’ve chosen the50N06MOSFET and theUCC27517gate driver, which can source/sink up to 4A at 12V. The 12V rail is derived from 24V using a 78L12 linear regulator with 330nF input and 100nF output decoupling capacitors.Is a linear regulator suitable for providing gate voltage in this configuration?Would it be better to add a series resistor on the gate driver’s input for protection? I have a bunch of extra 6.8k resistors on hand for example.The microcontroller is mounted on a daughterboard with castellated holes and soldered to the main board; it is powered by a K7805 buck converter from the same 24V supply. There’s aSMBJ26ATVS diode and 47 µF electrolytic capacitor across 24V and ground.The board also interfaces with mains voltage forbutton sensing via an optocoupler. A 1nF Y1-class capacitor is placed between neutral and ground.My primary concerns are:EMI due to sharp switching edgesInductive kickback from long LED strip wiringGround bounceAny insight is appreciated. Thank you

author: PGPG
author_rank: Frequent Contributor
timestamp: August 05, 2025, 05:46:33 pm
content: Quote from: coolkitty on August 05, 2025, 04:45:21 pm12V supply frequently means 13.8V so 24V can mean 27.6VQuote from: coolkitty on August 05, 2025, 04:45:21 pmI think that at 5m connection cable some mA can be too much from EMC (CE) point of view.May be the output obtained by PWM should be strongly LC filtered before going into cable.

author: coolkitty
author_rank: Newbie
timestamp: August 06, 2025, 06:22:44 pm
content: Quote from: PGPG on August 05, 2025, 05:46:33 pmIn my case I'm sure it's an accurate 24V max. I'm likely going to use a MeanWell LRS-150-24.Quote from: PGPG on August 05, 2025, 05:46:33 pmWon't an LC filter just smooth out the PWM?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 06, 2025, 07:14:29 pm
content: I'd use a much higher gate resistor to slow the on/off times to reduce noise.

author: coolkitty
author_rank: Newbie
timestamp: August 06, 2025, 07:54:03 pm
content: Quote from: mikeselectricstuff on August 06, 2025, 07:14:29 pmWouldn't this defeat the whole purpose of achieving high resolution and no flicker?At low duty cycles the gate won't charge sufficiently within each PWM step if the switching is slowed down too much.Approximating the time needed to charge the gate as Qg*R/Vgs, it will be ~420nS with say a 100Ω gate resistor. (Qg=50nC from the datasheet)With PWM steps of 8nS, this means the initial ~50 duty steps would result in the MOSFET remaining effectively off. It would lead to a loss of resolution at the lower end of the duty cycle range and losses in the MOSFET.Maybe my requirements are a bit overkill now, but I'd want at the very least 12bit at 2kHz, which is still a very small 122nS minimum pulse width.

author: Zero999
author_rank: Super Contributor
timestamp: August 06, 2025, 08:29:04 pm
content: Quote from: coolkitty on August 06, 2025, 07:54:03 pmAll true, but the faster the MOSFET is switched, the more EMI inductive voltage spikes it will generate. Everything is a compromise.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 06, 2025, 08:35:24 pm
content: The answer to resolution is to use dithered PWM - you don't try to get 125ns or whatever resolution - you do a coarse PWM ( maybe 8 bits) at the fundamental PWM frequency, then spread the finer control over multiple cycles, extending certain cycles by one step.e.g. say your basic PWM step is 1uS with 8 bit control, so 256uS cycle.If you want a 12-bit value of 0x808 , then you do alternate cycles of 0x80 and 0x81. If you want 0x804, you do 0x80,0x80,0x81 etc. so your avarage over the 16 cycles gives you the extra 4 bits.This is extremely easy to implement - you just add your fractional part to an accumulator every cycle, and add 1 to your PWM value when there is a carry.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 06, 2025, 10:33:34 pm
content: Quote from: coolkitty on August 06, 2025, 06:22:44 pmI don't understand question/problem.To reduce EMI emission you need to smooth out PWM.

author: Zero999
author_rank: Super Contributor
timestamp: August 07, 2025, 07:29:24 am
content: Quote from: coolkitty on August 06, 2025, 07:54:03 pmTo be picky, seconds should be lowercase, not uppercase s. Capital S is for siemens, a unit of conductance.To expand further on my previous point. If you want a minimum pulse width of 122ns, then the rise/fall times should be around a tenth of that, at 12.2ns, which has a frequency component of:F = 0.35/tr = 0.35/12.2*10-9= 27MHz.The wavelength isλ = c/F = 299792458/28.7*106= 10.5mYour LED strings are 5m, which is over1/4λ so it will emit lots of electromagnetic radiation, causing interference to the point where it might break the law. Then there are the problems of high voltage transients due to reflections.

author: coolkitty
author_rank: Newbie
timestamp: August 07, 2025, 10:18:19 am
content: Quote from: mikeselectricstuff on August 06, 2025, 08:35:24 pmYes, this is a great idea! Actually I've used this approach in the past to increase the dynamic range of WS2812B, though I had since overlooked it. Technically 16 bits are needed to achieve true 8 bit dynamic range with gamma=2.Quote from: Zero999 on August 06, 2025, 08:29:04 pmYep engineering is all about compromises. I've played with the numbers a bit and settled on this:Minimum pulse width of 1µs and a rise/fall time of approximately 140ns, achieved with a 33Ω gate resistor. Is this still too fast?8 bit base PWM at 3.9 kHz with 4 bits of dithering. In the worst-case scenario (minimum non-zero duty cycle) the effective frequency drops to 3900/24= 244Hz. This is acceptable despite being quite low.Beyond this, increasing resolution would further reduce the effective frequency at low intensities, introducing visible flicker. For example, a 14 bit resolution would yield an effective frequency of approximately 60Hz at the lowest duty levels, which is definitely way too low.How does this look? Are there any additional electrical improvements worth considering for this circuit?

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 07, 2025, 10:22:16 am
content: Quote from: coolkitty on August 07, 2025, 10:18:19 amIn practice 12 bits are usually enough for any situation, unless you also need wide range global dimming.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: August 07, 2025, 10:23:15 am
content: Quote from: coolkitty on August 07, 2025, 10:18:19 amIf it's only your fine-adjust ripple at 60Hz that will work fine & not be noticeable