DC dimmer circuit

Hello all!

I am trying quickly to throw together a DC dimmer circuit for four two-amp bulbs in an automotive setting. I need to run the PWM at 30kHz to eliminate a horrible humming that these bulbs make. I have put together the following diagram showing all but the potentiometer that will be used as the human interface.

Could one of the experts review my circuit?

Thanks.

Firstly I couldn't find the exact datasheet for the photomos SSR, so I can't find out its switching characteristics,

Secondly why use a IGBT? They drop a few volts, are a rather slow and are normally seen in high voltage switching circuits - a single logic-level MOSFET might be all you need for this application...

Secondly why use a IGBT?

Well I am not really sure why I chose that, maybe "ultrafast" in the name. Will it not work for this? (I already bought it.) :blush:

Typical switching characteristics (Ton, Toff) for a PhotoMOS relay is in the low ms range and so not suitable as a driver in a 30+ kHz PWM circuit. You need a much faster switch.

The other issue with driving a IGBT is that in order to switch it effectively, you need a split supply. That is a a negative Vgs is needed to turn if off.

Your current design is guranteed to lock up and you may as well go back to the drawing board.

Why not do away with the SSR/IGBT combo and use an NPN transistor driving a P-channel mosfet instead? See attached.

When choosing the mosfet, bear in mind that the resistance of a filament bulb when cold is much lower then when it is hot, so the inrush current is correspondingly higher than the steady-state current - about 15x higher, maybe even more.

Running the Nano direct from 13.8v will not harm it, the main thing is to avoid drawing too much current from the +5v rail in order to avoid overheating the regulator.

Your current design is guranteed to lock up and you may as well go back to the drawing board.

Well that shows how much I know! Transistors are still new territory for me.

dc42, thanks for the diagram. I found a IRF5210PbF which has a pulse current rating of -140A which is more than 15x my 8 amp steady current draw.

I have done some forum searching and this thread (http://arduino.cc/forum/index.php/topic,62503.0.html) recommends using a "TC4429" mosfet driver. It has something to do with the mosfet not switching cleanly with a transistor. Would this be better? What do you think?

I thought that a dimmer switch would be a piece of cake to set up. A perfect case of "famous last words".

Thanks.

One difference between a MOSFET and a bipolar transistor is that in the case of the MOSFET you need to pay equal attention to switching it off and switching it on. This requires a push-pull (totem-pole) type driver. In a PWM control circuit, we want MOSFET turn on and turn off times to be as fast as possible (say 50ns). For low power, low frequency applications this is less of an issue, but for high power, high frequency applications this is an absolute requirement as otherwise your MOSFET will turn into a heater.

Anything controlled through a photo-sensitive switch (such as a PhotoMOS SSR) is likely to be too slow for a PWM high power circuit and so a direct drive circuit is preferred. You can build a driver circuit yourself from two BJT’s or two small MOSFET’s (Google “MOSFET driver”). Buying a packaged driver, such as the TC4429, however make good sense.

Generally we want to avoid using our logic supply to drive power MOSFET’s - since the high power bursts required for efficient switching generate supply noise that may require additional circuitry and filtering. A standard MOSFET is preferred as they typically require less power for switching than their logic level cousins. Also you want a N-channel MOSFET (lower Rds-on than P) and wire it to switch the low side (the ground path) of your load.

Pokey:
dc42, thanks for the diagram. I found a IRF5210PbF which has a pulse current rating of -140A which is more than 15x my 8 amp steady current draw.

OK, that mosfet has Rds(on) = 0.06 ohms maximum, so at a steady 8A it will dissipate 8 * 8 * 0.06 = 3.84W. Well within its rating, but it will need a heatsink. The actual dissipation will be higher than this because of switching losses. A mosfet with lower Rds(on) would be better. As Benf says, it is easier to get N-channel mosfets with low Rds(on), but that means using a low-side switch. Alternatively, you can use two or three mosfets in parallel.

Pokey:
I have done some forum searching and this thread (http://arduino.cc/forum/index.php/topic,62503.0.html) recommends using a "TC4429" mosfet driver. It has something to do with the mosfet not switching cleanly with a transistor. Would this be better? What do you think?

Given that you will be using a PWM frequency above the audible range, yes. The circuit I gave can be improved to provide active pullup by adding another NPN transistor and a diode, however using a TC4429 (inverting) driver to drive a P-channel mosfet, or a TC4420 (non-inverting) driver with an N-channel mosfet is simpler. I suggest connecting a pulldown resistor between the input and ground to ensure that the mosfet is off while the Arduino is starting up.

Thank you BenF and dc42! Your careful and clear explanations are very enlightening and helpful.

I need to keep the mosfet on the high side of the circuit. This is a retrofit, and I do not have access to the low side. I have a hefty heat sink that I pulled from a UPS on which I intend to mount the mosfet.

I have revised my diagram to reflect the changes suggested:

That circuit isn't quite right. Between the TC4429 output and the mosfet gate, use a single series resistor (I suggest 47 ohms) instead of the 2 resistors you have in that diagram. You could omit the resistor entirely, but then you would need to pay very close attention to circuit layout. Connect a decoupling capacitor of at least 0.1uF between the Vcc and ground pins of the TC4429. Keep the wiring between the Vcc pin and the source terminal of the mosfet short.

On the input side, connect the TC4429 input direct to Arduino D10, but also connect a 10K resistor between D10 and ground.

The 1k resistor can be reduced, indeed, but the 10k resistor is sensible - it stops the MOSFET gate floating when the Arduino is powered down.

MarkT:
The 1k resistor can be reduced, indeed, but the 10k resistor is sensible - it stops the MOSFET gate floating when the Arduino is powered down.

If you are referring to the 10K resistor on the mosfet gate, it isn't needed, because the mosfet is driven from the TC4429, not the Arduino. Where you need the 10K pulldown is on the output of the Arduino, because the TC4429 has a mosfet input.

The 1K resistor MUST be reduced, after all the whole point of using a mosfet driver is to get increased gate drive to reduce the mosfet turn on and turn off times. With 1K, I estimate the turn on/turn off times will be in the region of 20 us.

MOSFET turn on (and off) time is determined by drive current (Ig) and MOSFET gate charge (Qg). Based on datasheet specifications for IRF5210, we can calculate drive current required for a target Ton (50ns) as follows:

Ig = Qg / Ton = 180nC / 50ns = 3.6A

Assuming a nominal voltage of 13.7, this dictates a total gate resistance as low as 3.8 ohm (13.7V / 3.6A). Output resistance for the TC4429 is specified as 2.5 Ohm and so the gate resistor should be 1.4 Ohm (3.8 – 2.5).

To get to 80ns (as quoted in the datasheet) and using TC4429/IRF5210, Rg should be 3.7 Ohm.

Another useful calculation is to check if a heat sink is required. With a load of 8A, the MOSFET will drop about 3.84W (8A * 8A * 0.06 Ohm). Max wattage for a TO-220 package is about 1W and so a heat sink will be required.

Why did you choose a target time of 50ns? We're not talking about switching at several MHz here, just a few tens of kHz.

I have ordered the parts—they should be here in a few days.

I will use a heatsink, connect the 10k pulldown to the TC4429 input, and use a resistor value below 50 ohms in between the TC4429 and the mosfet.

In theory, if I did pull the gate of a p-channel mosfet to ground, would that not turn it on rather than off?

I am doing my best to grasp all of these details but sometimes my head hertz! :smiley:

I will report back when the whole thing is installed.

Thanks everyone.

Pokey:
In theory, if I did pull the gate of a p-channel mosfet to ground, would that not turn it on rather than off?

If the gate of the P-channel mosfet is grounded while the source it at +12v, then that would turn the mosfet on. However, a pulldown resistor on the gate will not drive it to ground in that circuit, because the output resistance of the TC4429 is much less than 10K.

dc42:
Why did you choose a target time of 50ns? We're not talking about switching at several MHz here, just a few tens of kHz.

There is no qualified reason to design for less than optimal performance other than cost/size (power, drive circuit) and so any PWM design irrespective of base frequency should aim at minimizing switch time. The practicality of this is typically limited downwards to somewhere in the 20ns-60ns range for any given MOSFET. I suggested 50ns as a target in a previous post and 80ns is what is used for characterization in the datasheet.

Other than that it seems as if the dimmer is shaping up nicely.

Well I FINALLY had a chance to get this circuit together. :astonished:

Life is what happens to you when you are trying to work on electronics projects... :slight_smile:

The circuit is now set up as in the attached diagram. However something is not quite right. For testing, I am running the circuit on 11.9 volts. When D10 is high the output from the TC4429 reads 11.65 volts on my multimeter and 11.9 when D10 is low. Obviously, that is not enough to turn the IRF5210 on.

May I once again appeal to the experts for some advice?

Thank you for your patience.

You have drawn the mosfet the wrong way round, however if you have wired it up according to the S G D labels in your schematic then you have wired it correctly.

You haven't shown the pin numbers you used for the connections to the TC4429. Check these connections, in particular make sure you have connected both ground pins and both Vdd pins (the datasheet says this is required for proper operation of the device).

Hello dc42!

Well, I have quintuple checked the connections multiple times. (My brain has involuntarily been going over every little detail for hours)

I wired the IR5210 according to the datasheet where pins 1, 2, and 3, are G, D, and S, respectively. (See attached)

WRT the TC4429, I have all the pins connected except for 3 which is supposed to be left unconnected. The chip is mounted upside down on my circuit (again see attached), so the pin numbering is clockwise from the top-right.

Even now my gut feeling is that something is "misconnected," but I can't see anything wrong.

Screen Shot 2012-07-17 at 09.16.10.png