# Constant current circuit with transistors/MOSFETs design comparison

There are a few designs out there for constant current devices, but most of them use a certain chip. I was looking for a way to build my own constant current supply from parts that I have available. The aim is to control a RGB LED with 10W (10-12V,350mA).

As I have next to none experience in electronics (last lecture ~7 years back), I wanted to run two different designs by you guys.

The first is one I have taken straight from here

And the second one I found was this one here. It is interesting as I have a Darlington driver around. I slightly modified the circuit in a way that R1 is not connected to the main power supply (compare Fig.6 in the linked document) but gets controlled by an Arduino PWM port.

Would this be possible or do I need more parts for the PWM support?

How do you think those two circuits compare?

Ps: The part numbers are just put in by CircuitLab, so please do not pay too much attention to them. I most definitely will use different parts and will consult their data sheets beforehand.

EDIT

After some time I have now actually built the circuit one (with the MOSFET). I also added a Low-pass filter to connected an audio signal. Together with an Arduino as a driver for the RGB LEDs the light pulsates to the beat of the music.

• I built the constant current driver circuit from above three times for R,G and B
• The input is connected to three PWM pins of an Arduino
• Based on a Tutorial by Jeremy Blum, I built a simple low-pass filter with 2 op-amps, a few resistors and caps and a trim pot.
• One can now connect audio which is split into a singal for the speaker and an input for the op-amp. The op-amps amplify the signal which then goes to an Arduino analog pin input
• With some code running on the Arduino I can now trigger the light based on the analog input
• I added a voltage regulator (LM7809) to step down from 12V to 9V for the Arduino. This is not really needed, but I had one and wanted to try it :)

I had some fun building this and now want to put it into a lamp and do some more coding...

• In both cases, R1=100K is excessively high. For the MOSFET, which has gate capacitance probably on the order of 1 nF, this gives you a time constant of 100 us, which means that it will switch very slowly. For the Darlington, it means you only have about 32 uA of base drive. Even if your Darlington has an overall current gain of 10,000 (unlikely), this only gets you 320 mA of collector current. – Dave Tweed Jan 21 '13 at 15:11
• I have taken the 100K resistor value from the first link that I posted. The Arduino pin is 5V and 20mA max., I think. The TIP110 NPN Darlington used in the second circuit has a current gain of 2500. Does this mean my supplied current needs to be 350mA/2500=0.14mA? This would give me a resistor value of (5-0.7)V/0.14mA~ 30k Ohm. Does this sound more reasonable? – Martin H Jan 21 '13 at 15:47
• No, not really. First of all, the base voltage of the Darlington is going to be on the order of 1.8-2.1 V, which is 3 V_be drops, not just one. Secondly, there's nothing wrong with overdriving it by a factor of 10. Most of the excess current will be shunted by Q1, which is good, because you don't want that transistor operating on the hairy edge of conduction. That would make your base current 1.4 mA, and the base resistor should be about (5V - 2.1V) / 1.4mA = 2100 ohms. If you use 2200 ohms, 5%, that should be fine. – Dave Tweed Jan 21 '13 at 15:53
• @DaveTweed not sure the slowness is really a problem in the MOSFET case. 100ns is pretty fast for any sort of LED flashing, and since this circuit is designed to operate M1 in the active region anyway, it's not as if switching it slowly introduces more switching losses. – Phil Frost Jan 21 '13 at 16:13
• @PhilFrost: Where did you get 100 ns? In any case, the point of the circuit is to allow the PWM to modify the duty cycle of the current which is being regulated by the two transistors. If the MOSFET can't turn fully on or fully off fast enough to follow the PWM weveform, it simply won't work. 100 ns would be a good value for the time constant, but that would imply a 100-ohm gate resistor, and the current would overload the Arduino's output pin. In order to limit the peak current to 20 mA, the gate resistor would have to be 250 ohms, giving a time constant of 250 ns. – Dave Tweed Jan 21 '13 at 17:00

However, if your goal is 350 mA in the LED, then R2 needs to be $0.6V / 350mA = 1.71\Omega$. You might want to use a 1/2W resistor too, since you are pushing your luck with a 1/4W: $0.6V \cdot 350mA = 0.21W$. Be sure the transistor you select for Q2/Q3 or M1 can handle the power it must dissipate as well, which will be 12V, minus the 0.6V in R2, minus the forward voltage of your LED, multiplied by 350mA.