Fast PWM (37kHz) Attiny13a dimmer for 60W led strip.

Hello!

I’m doing a video light project. I need a very fast PWM dimmer because I don’t want to have any stripes on the frame and no sound as well. I thinking about how to connect a transistor to control such a current.

I have a led strip 60W 12V, a power source 120W. I’m thinking about 4 variants found in internet. Please see my schematics and recommend the best solution.

The one with the 10k pull up on the gate will be unutterably slow to turn off, completely no-go for PWM The one with the 1k gate resistor to each of 3 MOSFETs is too slow The one with 150 ohm gate resistor has a hope of working - but is likely to be far too hot, since the switching losses will be large at 37kHz. That FET has a gate charge of 140nC that needs charging and discharging every switch transisition - 150 ohms will not let enough current through to do that.

The one with the push-pull BJT gate driver is mangled, the PNP transistor is drawn upside down. Fix that and change the gate resistor from 100 to 5 or 10 or so and that's likely to work well I think.

Better still get a MIC4422 or similar gate driver chip with lots(several µF) of ceramic decoupling on its rails, that will drive the 30nF effective load that the MOSFET gate presents. You are looking to push and pull current spikes of the magnitude of 0.5A or more for good fast switching in this kind of gate driving circuit.

You don't need more than one MOSFET, that device has an on-resistance of 0.006 ohms.

Thank you MarkT!

I’ve corrected the schematics. I will try this one. But do you thin 5Ohms for these transistors is ok? Their maximum current is 0.8A

Well with a 12V supply to the driver transistors perhaps 10 ohms would be safer. You need good decoupling on the supply to the driver circuit whatever it is, due to these large current pulses, and your LED strip needs lots too.

A wise precaution against over-voltage (due to inductive ringing) on the gate would be a 13V or 15V zener across gate and source right at the MOSFET's terminals.

I don’t know why, but it’s not dimming. It goes from 0 right to 12V with a small turn. I guess it could be because the pull down inverts the signal.

How can I invert PWM on pin 0?

Please don't edit (add to) your original post. That gets confusing quickly. The last diagram with two drive transistors is worse than without. 1) The mosfet gate can't be fully switched to ground (off), because of the ~0.7volt BE drop of Q6. 2) Gate drive voltage (high) is ~0.7volt less than before, because you used an emitter follower (Q5). Voltage on the emitter is always ~0.7volt less than the base (Arduino pin). Leo..

How can I invert PWM on pin 0?

Subtract 255.

Or 1023 from the potvalue potValue = 1023 - analogRead(A0);

Or flip the two outside wires of the pot. Leo..

Wawa: Please don't edit (add to) your original post. That gets confusing quickly. The last diagram with two drive transistors is worse than without. 1) The mosfet gate can't be fully switched to ground (off), because of the ~0.7volt BE drop of Q6. 2) Gate drive voltage (high) is ~0.7volt less than before, because you used an emitter follower (Q5). Voltage on the emitter is always ~0.7volt less than the base (Arduino pin). Leo..

But if I have just one MOSFET, it becomes very hot even with a 0.5A load. Is it possible to make the schematics with two transistors work?

I can see the PWM signal on the base of the MOSFET and not on the drain. I've also measured the voltage on the MOSFET. It changes from 11.4 to 12 and then suddenly goes to 0V.

Because the mosfet you're using needs 10volt at the gate to switch fully on. 5volt (or 4.3volt with the drive transistor) only turns the mosfet partially on. Then the mosfet is not a switch, but a resistor (in linear mode). As you know, resistors (with current through them) get hot.

Another problem is gate charge. If you think a mosfet with a larger current rating is going to run cooler, then you're wrong. Larger mosfets have a larger gate capacitance. They need more gate current to switch. If you're not providing that (several amps in the gate), then they switch slower and stay longer in that linear region. Switching at 37khz adds to the problem. You want to make sure switching is done before the next PWM state change. That could be very short of you use 8-bit PWM @37khz (calculate it). Leo..

But it was the same story with L1404Z, which is a logic one. It also becomes hot. So, I've decided to make a push pull driver. But again it doesn't work.

Tofer: But it was the same story with L1404Z, which is a logic one.

Then it's switching losses (as explained). 37khz switches 74 times more per second then default ~500hz PWM. 74 times more heat if you don't increase gate drive current to compensate. Leo..

But how can I do it? I was thinking the push pull may help.

Also the voltage on the gate varies between 7 and 12V. Shouldn't it be between 12 and 0?

Which diagram, there are four.

If you refer to the single transistor with 10k pull up, then it could be looking more like a sawtooth then a PWM signal with 37khz. And with a single resistor between Attiny and gate, more like a triangle.

Drain of the fet will never be higher than ~6volt, because LEDs act like zeners. Leo..

If you have voltage large enough you could try this:

It is not PWM but linear, but since you have a 12V source for 12V LEDs, it shouldn’t burn much power (maybe less than the fast PWM). With logarithmic pot it should look like linear dimming. I did not build anything like that but I think it should work and is worth try. Ofc you may try to implement something like that in code instead but I think you need to have low voltage drop over the R3 and with noise from the fan you may run out of resolution of the ADC.

EDIT: The MOSFET part number was chosen at random for the symbol. I have no idea if it is suitable for this application.

Well, I've tried this schematics:

|500x155

And it partly works. I have a PWM signal on the gate, but don't have it on the D. Why may it happen?

Do you have an oscilloscope or how do you know that you have a PWM signal on the gate? What does the signal on the gate look like? What voltages does it go to? Is it nice and square or more like a saw-tooth or something completely different?

Here is how it looks like attached.