Thursday, September 27, 2012

Dimming a 12V LED strip with a mosfet and PWM, part 2

In a previous post I looked at PWM dimming a 12V LED strip. Time to revisit this with some new insights. So I saw bad ringing at turn-off of the mosfet. According to K the noise is caused by the capacitance of the Drain-Source of the power mosfet in combination with the inductance of the load. This makes sense as I already figured out that changing the load influenced the ringing.

Let's do a proper "snubber". (Not "shunt" as I called it last time).

I'm re-measuring with the gate voltage on the yellow channel and the drain voltage on the blue channel of the scope. Notice that the blue channel has a 5V per division scale and the yellow one 1V per division.

no snubber
 Without snubber that looks absolutely horrible.

Second lets add a 100nF capacitor from drain to VCC like I did in the previous post.

"snubber" cap to VCC

That is with a "snubber" cap to VCC, which arguably is not really a snubber at all.

Finally, lets really add the snubber over the Drain and Source of the mosfet, which means Drain to ground as the Source is directly connected to ground.

snubber cap across drain-source
That looks nice!
There is still some high frequency noise (~20Mhz) but it has a very low amplitude.

Let's go back to the initial situation, is it really a problem? I guess with the mosfet I'm using (IRF540), not really. It has a Drain Source breakdown voltage of 100V, and the largest peak I notice is 40V. On the other hand that might just go past the breakdown voltage of the LEDs on the LED strip and that is not a good thing either.

A curious thing is that in the non-snubbed circuit the drain voltage goes all the way up to almost 12V and in the snubbed circuit it only goes up to 5V. It looks like the LED strip in combination with the snubber acts as some kind of impedance divider.
If  I change the snubber from 100nF to 1uF (10x larger) the peak voltage on the Drain drops to 4V. Changing it to 50nF raises the peak voltage to 6V.

Something to ponder about...

Post a Comment