8
\$\begingroup\$

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 enter image description 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? enter image description here

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 :)

enter image description here

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

\$\endgroup\$
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – Dave Tweed Jan 21 '13 at 15:11
  • \$\begingroup\$ 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? \$\endgroup\$ – Martin H Jan 21 '13 at 15:47
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – Dave Tweed Jan 21 '13 at 15:53
  • \$\begingroup\$ @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. \$\endgroup\$ – Phil Frost Jan 21 '13 at 16:13
  • 1
    \$\begingroup\$ @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. \$\endgroup\$ – Dave Tweed Jan 21 '13 at 17:00
7
\$\begingroup\$

The two are really the same, functionally. Both work by regulating the voltage over R2 to about 0.6V, what it takes to forward-bias the base-emitter junction of Q1. If the voltage over R2 increases beyond this, Q1 begins to pull down the gate/base of the other transistor. But it can't do this too much, else there is no current in R2, and nothing to forward-bias the base-emitter of Q1. Thus, the circuit achieves equilibrium.

The idea is then that since the LED and R2 are in series, their current is equal. If you can make 60mA in R2.

This is only approximately true, of course, because R2 and the LED aren't exactly in series. In both cases, errors are introduced by the base currents of either transistor. Fortunately, the current gains are very high, so these errors are negligible. I doubt there is any practical difference between the circuits, so selecting based on what you have on hand sounds good to me.

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.

\$\endgroup\$
  • \$\begingroup\$ You are right about the resistor values. I wasn't paying attention. I am aware of the resistor power calculations \$\endgroup\$ – Martin H Jan 21 '13 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.