Pages: [1] 2 3   Go Down
Author Topic: DC dimmer circuit  (Read 3528 times)
0 Members and 1 Guest are viewing this topic.
California
Offline Offline
Full Member
***
Karma: 0
Posts: 144
One man with the truth is a majority.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* Screen shot 2012-01-27 at 16.46.35.png (92.34 KB, 879x682 - viewed 74 times.)
Logged

0
Online Online
Shannon Member
****
Karma: 200
Posts: 11719
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

[ I won't respond to messages, use the forum please ]

California
Offline Offline
Full Member
***
Karma: 0
Posts: 144
One man with the truth is a majority.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.) smiley-red
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* Scan 73.JPG (61.81 KB, 1653x1165 - viewed 66 times.)
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

California
Offline Offline
Full Member
***
Karma: 0
Posts: 144
One man with the truth is a majority.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

California
Offline Offline
Full Member
***
Karma: 0
Posts: 144
One man with the truth is a majority.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:


* DC-dimmer-circuit2.jpg (47.42 KB, 800x625 - viewed 62 times.)
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Online Online
Shannon Member
****
Karma: 200
Posts: 11719
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

« Last Edit: January 30, 2012, 04:28:43 pm by BenF » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

California
Offline Offline
Full Member
***
Karma: 0
Posts: 144
One man with the truth is a majority.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-grin

I will report back when the whole thing is installed.

Thanks everyone.
Logged

Pages: [1] 2 3   Go Up
Jump to: