Powering multiple LEDs via IC

AnalogKid

Joined Aug 1, 2013
12,126
Yes. It is called a constant current source (or sink). Typical configurations are 1-transistor, 2-transistor, and opamp.

Look into the 3915. It has a pseudo-logarithmic response, and will either partly linearize the exponential R-C ramp, or make it worse. Been too many years since I used one.

ak
 

Thread Starter

lotsofhobbies

Joined Feb 5, 2017
11
Look into the 3915. It has a pseudo-logarithmic response, and will either partly linearize the exponential R-C ramp, or make it worse. Been too many years since I used one.
ak
Thanks. Had a look. I think the logarithmic scale will make it worse- exaggerating the differences at low voltage (where V already going up quickly) and attenuating it at high V when V increments are already small. Appreciate the suggestion though.
 

Thread Starter

lotsofhobbies

Joined Feb 5, 2017
11
For constant current I use a LM334, micro A to 10 mA. Use one for charge, one for discharge.
Thanks. Haven't got to shop for the op amp yet but did test circuit with straight capacitor and got that working. As an alternative i think i could set the hi lo scale of the lm3914 to use the middle section if the capacitor charge curve which approximates a straight line. Key for me is consistent total time and reasonable indication of increments. Cheers
 

Thread Starter

lotsofhobbies

Joined Feb 5, 2017
11
For constant current I use a LM334, micro A to 10 mA. Use one for charge, one for discharge.
I wasn't able to get the LM334 at my local shop but instead got a LM4558 which I think is similar. I'm using it as per the attached schematic where R(load) will eventually be my capacitor but for now is just a resistor that I have been swapping for various values as a trial. I figure I want a charging current of 0.06mA (see below) so need R(sense) = Vcc/I(sense) = 6V/6e-4A = 100k ohms.

**The thing I am missing is how to calculate R(compensation). It seems to need to be a large value otherwise I don't get the current expected. I have used 100k ohms (same as R(sense)) and that seems to work although it also works if I just don't connect that pin at all. What should I actually use for R(compensation)?
Constant_Current_Source.jpg

Trialling different values of R(load) I get:
100k ohms --> 0.049mA
10k ohms --> 0.045 mA
2.2k ohms --> 0.034 mA
1k ohms --> 0.025mA

So it seems it doesn't completely hold the current constant but presumably more than it would if the load was just directly connected.
**Is this what I should expect?

The current value I think I need is based on the time I want to charge the capacitor in, say 500s - so 5T = 500; T=100 = R.C and my capacitor is 1mF so R needs to be 100k ohms. If my battery is 6V then I figure the current I need into the capacitor is from V=I.R, I = 6V/100e3 = 0.06mA. Does this make sense? I guess the T=RC doesn't really apply once I'm applying constant current - the current I've calculated must be the current entering the capacity right at the start before it has built up any charge or resistance so I guess the time to charge with constant current will be less than 500s. I'll be able to get there by trial and error but would be good to understand the theory a bit as well.

Thanks so much for all the help!
 

AnalogKid

Joined Aug 1, 2013
12,126
Rcomp should equal the DC impedance seen by the other opamp input. The idea is to balance the input currents of the two inputs to minimize an error term caused by unequal input currents.

ak
 
Top