Calculating current through LEDs... unconventional situation...

johnmobley

New Member
I am very familiar with calculating resistor values and finding current through an LED under normal conditions. However, I have a circuit I am working on that appears to be out of the normal... Here is my situation, I have groups of 4 LEDs in series (Warm White at 3.0V) attached to 12V. Under normal circumstances a resistor would just not be necessary. When testing the circuit in the area it is going to be installed, I found that the LEDs were to bright for the area. I then added a 1.2K resistor in series with the LEDs.

This is where I am now getting confused. I am trying to calculate the current through this circuit and am failing miserably. I am sure I am missing something simple...

So here is what I have tried...

Standard formula for calculation of resistance for LED (modified to calculate current)
(12-12)/1200 = 0, I know that there is current so that is not right...

Knowing that all 12V are being used across the resistor and LEDs, I tried Ohms Law next
12/1200 = .01 A or 10mA

Here is where it gets really confusing for me, when I hook up my meter and measure the actual current through the circuit I find that it is only pulling 1mA. Interestingly enough all of my calculations for the other parts of the circuit are off the same amount, for example:

1 custom 7-segment LED completely lit up 140mA (calculated), 14mA (actual)
All 6 custom 7-segment LEDs completely lit up 840mA (caculated), 84mA (actual)

So long story short, I know my actual current pull but I would like to better understand how to properly calculate current in these uncommon situations. Any help would be appreciated.
 

rq3

Senior Member
I am very familiar with calculating resistor values and finding current through an LED under normal conditions. However, I have a circuit I am working on that appears to be out of the normal... Here is my situation, I have groups of 4 LEDs in series (Warm White at 3.0V) attached to 12V. Under normal circumstances a resistor would just not be necessary. When testing the circuit in the area it is going to be installed, I found that the LEDs were to bright for the area. I then added a 1.2K resistor in series with the LEDs.

This is where I am now getting confused. I am trying to calculate the current through this circuit and am failing miserably. I am sure I am missing something simple...

So here is what I have tried...

Standard formula for calculation of resistance for LED (modified to calculate current)
(12-12)/1200 = 0, I know that there is current so that is not right...

Knowing that all 12V are being used across the resistor and LEDs, I tried Ohms Law next
12/1200 = .01 A or 10mA

Here is where it gets really confusing for me, when I hook up my meter and measure the actual current through the circuit I find that it is only pulling 1mA. Interestingly enough all of my calculations for the other parts of the circuit are off the same amount, for example:

1 custom 7-segment LED completely lit up 140mA (calculated), 14mA (actual)
All 6 custom 7-segment LEDs completely lit up 840mA (caculated), 84mA (actual)

So long story short, I know my actual current pull but I would like to better understand how to properly calculate current in these uncommon situations. Any help would be appreciated.
You are assuming that an LED is a resistor, with a constant current flowing for a given voltage drop. It is a diode, with an exponential current flow with any increase in voltage. Either you have a 10:1 error in your measurement (VERY LIKELY), or your calculations are treating the LEDs as resistors. Given the exact 10 to 1 ratio you state, I would expect you have a measurement error.
 

premelec

Senior Member
Assuming you have DC rather than any PWM or such you can't go wrong with Ohm's law and a millivoltmeter - put a 10 ohm resistor in series with whatever and measure the voltage across that resistor and calculate the current... I=E/R... Note that common current meters have internal resistance which is often unknown - and often pretty high at low current ranges...
 

SteveDee

Senior Member
Yes, Ohms law is the way to analyse your circuit. As your circuit has a low effective resistance, only use your meter to measure Voltage (don't try to break the circuit and measure current).

Measure the voltage across your series resistor. The current through each LED is approximately = measured Voltage/resistance value.

The individual diode voltage may vary from diode to diode, as may the brightness. This depends upon how closely the diodes are matched. (see also my post: https://captainbodgit.blogspot.co.uk/2013/11/dont-waste-power-with-leds.html)

PS reading your question again, I'd say it is not a good idea to put 4 LEDs in series on the assumption that 12V is 'just right' for 4 x 3.0V diodes. Diodes are semiconductors, so the current through them may rise very quickly if your nominal 12V supply becomes (say) 12.9V or the average diode volt drop is actually slightly less than 3V. My suggestion would either be to reduce the number of diodes to 3, or change the diode type for one with a Vf less than 3V (may not be possible for a white light), or increase the supply voltage to (say) 15V. Then you can use a series resistor to safely limit diode current.

Basically, its up to you as the designer, to determine the current flow through your chain of LEDs (by using a series resistor) rather than simply leaving it to chance.
 
Last edited:

inglewoodpete

Senior Member
So here is what I have tried...

Standard formula for calculation of resistance for LED (modified to calculate current)
(12-12)/1200 = 0, I know that there is current so that is not right...

Knowing that all 12V are being used across the resistor and LEDs, I tried Ohms Law next
12/1200 = .01 A or 10mA
Incorrect method of measurement. Measure the voltage across the resistor (only the resistor!) and use Ohm's law I=E/R or your measured voltage divided by 1200.
 

eggdweather

Senior Member
Your calculation problems are occurring because the LED's do-not exhibit a fixed resistance because forward voltage varies for a given forward current and there is a so-called voltage knee that occurs around about the 3volt region for your LED's after which current starts to climb quickly for no significant change in forward voltage.

So it's not easy to calculate. This is one of those situations that needs a nominal series resistor to limit current flow to counter supply voltage increases for whatever reason, but at normal forward currents it would have negligible effect.
diagram.png

Using the graph, an LED's impedance (assuming 20mA) = 2v/20mA = 100R but at 2.4v = 2.4/52mA = 46R Using these example LED's forward voltage is about 2volts when forward current is 20mA, lets say you have 6 LED's (6x2=12v) and now let's vary the supply voltage:

12 / (6 x 100R) = 20mA forward voltage is 2v, and the series resistor = potential-difference/current = 0 / 0.02 = 0R, no resistor needed

Now let's increase supply voltage to 12.5, now the effective forward voltage across each LED rises to 12.5/6 = 2.1v and at 2.1v their forward current = 27mA (resistance lowered) and now the series resistor needed is the potential difference / current flow = (12.5-12) / 0.02 = 25R

Increase the supply voltage further to 13v and the effective forward voltage on each LED is 2.16v and it's forward current demand would be 30mA, now the series resistor needs to be (13-12)/20mA = 50R to keep the LED nominal

In each case you need to decide what the optimal/nominal LED voltage/current should be, in my example that is 2 volts and 20mA, then calculate your series resistance based on these parameters, so I'll switch back to your example:

Assuming Vf = 3 and If = 5mA and assume a supply voltage max of 13v and assume Vf rises to about 3.1 volts maximum, then R series = (13-12.4)/5mA = 180R

In practice, just about any value between 100R-220R would help make the current nominal because as current increases, voltage across the fixed (linear) resistor increases, unlike the LED's where their non-linear resistance falls with increasing voltage.
 

techElder

Well-known member
4 LEDs in series (Warm White at 3.0V) attached to 12V. Under normal circumstances a resistor would just not be necessary.
I don't know any circumstance where I wouldn't add a series resistor to a string of LEDs, but you're in "outlaw" territory there.

Personally, I've come to rely on constant current drivers for strings of LEDs. One LED and one resistor can be easily current adjusted for brightness, but with a string there are extra variables involved. You can add shunt resistors around LEDs to make minor adjustments to LEDs strung together, but that isn't really optimal, because what you change for one LED will change something for another in the series.

I rely on these simple-to-apply devices for constant current: CL2N3-G from Microchip Technology

It doesn't matter where you put them, they'll reliably keep the current in that circuit constant.

Datasheet for CL2N3-G
 

johnmobley

New Member
I would like to thank you all for the responses. Of course, now I feel really stupid. :rolleyes: I knew the answer would be simple and like usual I was just over-complicating things. After looking at the responses, I went back and actually checked the real voltage drops and actually found that the LEDs have an average voltage drop of 2.6V.

Now when I use the standard formula for calculation of resistance for LED (modified to calculate current)
(12-(2.6*4))/1200 = 1.6/1200 = .00133 A or 1.33 mA, which is right within the range that it is actually pulling...

I just assumed that the LED's were 3V just by reading the datasheet. I did not ever actually check the values. Assuming always gets me...

Again thanks for the help!
 

newplumber

Senior Member
@ texasclodhopper you saved the day again thanks for mentioning the CL2N3
makes it a piece of cake to light a LED (of course I don't have them in hand but from the videos I seen)
 

MartinM57

Moderator
An interesting device I've not come across before. About £0.35 each at low volumes from, say, Farnell.

Note that speed reading the data sheet might make you assume that it will work with a 5v supply...
Code:
Parameter         Symbol Min Typ Max Units Conditions
Operating voltage VA-B   5.0  -   90   V    ---
..but look more carefully
...VA-B is the voltage across the device, not the supply voltage
...so the supply voltage needed is at least 5V + the sum of all the LED's Vf voltages to get the 20mA constant current
...which is why the YouTube video posted a couple of days ago shows it on the cusp of operating at a 5v supply value (the fact that it works at all is because the device under test is operating outside of the spec - he says it might be because he is using a blue LED, but that is not the fundamental issue)

With a regulated supply above 5 + the sum of all the LED's Vf voltages, the device is no better than a resistor (except that you don't have to calculate the resistor :)) and a lot more expensive.

But it will have uses when wanting to drive LEDs with unknown(above a certain value)/unregulated/variable supply voltages.
 

techElder

Well-known member
With a regulated supply above 5 + the sum of all the LED's Vf voltages, the device is no better than a resistor (except that you don't have to calculate the resistor ) and a lot more expensive.
Martin, that's sort of a negative way to look at any constant current (CC) device, but you are correct.

One wouldn't apply a CC device to supply a single small "pilot lamp" type LED. However, higher power LEDs most likely need more than a 5 volt supply.

CC devices would normally be operated on the raw power (perhaps lightly filtered) that supplies the voltage regulator for the digital circuits. CC means constant intensity in the LED visible output.

"Horses for courses" as would be said by some with a racehorse vernacular.

PS. I use the CC devices a lot for a linear charge profile on a timing capacitor. Creates a nice ramp.
 

newplumber

Senior Member
@Martinm57 the video (might be the same you seen)
https://www.youtube.com/watch?v=1me5dTmDUms
shows the led brightness drop before voltage going below 5 volts like at 5.5 vdc so its interesting to think if I used this CL2N3 expecting
full brightness of a LED while using a typical phone charger 5vdc then it would seem very unlikely the LED would
be full brightness ...when I have them in hand I will test then out ( of course using a unreliable multi meter)


@ JimPerry yes I noticed the same thing first time I seen ebay prices way higher then mouser
must be expensive to clone :)
 
Last edited:

MartinM57

Moderator
Yes, it's that video.

As post #11 above:

- the device is out of spec when run at a 5v supply voltage, so all bets are off how bright the LED will be. If it lights at all, it's because the device is better than the minimum spec, and while that's typically the case for most devices, you've no come back to anyone e.g. if the brightness is different for different devices for the same or different LEDs

- the device could be a bad design choice for a 5v phone charger, but it could actually be a reasonable choice for a 5v phone charger as well - if it's a cheapo non-regulated charger then at low currents it could well have an output voltage higher (1 to 2V?) above 5V...but you're still operating extremely close to the limits of the CL2N3 spec

- IMHO (to not upset TCH :)) it would never be a good design choice (for a 5V charger supply) though

Report back when/if you get some - it could be interesting...
 

techElder

Well-known member
I've actually run the supply down to zero with a simple LED circuit. The CC device seems to act like a resistor.
 

techElder

Well-known member
CL6 100mA Constant Current

To further this constant current (CC) LED drive business, check out the CL6 version which is 100mA constant current with around the same supply voltage range.

DATASHEET FOR CL6

I've used this one in an application for a high brightness IR LED flood lamp. I built the lamp with 12 columns of 6 IR LEDs. Each CC sink handled a column of IR LEDs. The supply voltage was appropriate, but rather high and most likely above 12 volts DC. Each CL6 was in a TO-252 package soldered to a copper heatsink (PCB material.) This thing got HOT!

The PICAXE twist is an additional lead on the CL6. The VDD connection can be used to turn the device on / off with a low power switch. The twist is that the VDD connection can also be driven with a PICAXE PWM for variable constant current control. (Of course, there are required parameters to be attended to with the PWM signal, but its there to be used, Martin. :D)

IR_Flood_Texasclodhopper.jpg
 
Last edited:

newplumber

Senior Member
Thats cool Texas I like the schematic as well ... always learning something...
so if I need to light up half of the town with IR light ..i will come back to this page :)
 

newplumber

Senior Member
Report back when/if you get some - it could be interesting...
@ martinm57 ...sorry its been a while since I am reporting back...(glad I don't deliver pizzas) but I tested the CL2N3 with 5vdc using a phone charger which
is pretty close and reading 5.01 and the current was reading 17.8 mill amps ..I did not test it on my variable power supply but will when I get a chance
so of the five CL2N3 I tested with 5vdc every one was pretty close the same... of course my meter is not a fluke and it also could be off but when i tested it (CL2N3)
with a 12vdc power supply it was showing 20.1 mill amps. I did use them to see if it can handle pwm and seemed to do okay
with just simple code like

Code:
#PICAXE 20M2
setfreq m32 

start:
  high b.1 
 pause 2
  low b.1 
 pause 8 
goto start
with different pauses I could control the brightness and I don't know how fast a CL2N3 can be switched on/off but during my test
of all different pauses I didn't notice any problems...of course I didn't hook it to my scope either
but over all I love the CL2N3 because it makes lighting a led a piece of cake.
 

techElder

Well-known member
newplumber, the minimum operating voltage is 5VDC (maximum 90VDC.) Also, the minimum current is 18mA, so your numbers aren't that different.

So, if one uses PWM, I'm not sure why you would need constant current control, but glad it works! :D
 

westaust55

Moderator
A constant current source device that I have used a couple of dozen of is the Fairchild FAN6540.
This is a SMD package in SC70-6 format.

It provides
1. two sources that can be used separately or in parallel
2. 2.5 to 25 mA output selectable/settable using a single resistor
3. A logic level control/enable pin.
4. 6 to 20 V input for CC supply.

Datasheet available here:
http://www.onsemi.com/pub/Collateral/FAN5640-D.pdf?
 

newplumber

Senior Member
So, if one uses PWM, I'm not sure why you would need constant current control, but glad it works!
@ texas ... I'm not sure either...but I did use it on a few test projects just so i can say I went resistorless :)
 

MartinM57

Moderator
Interesting results - thanks.

As previously, the min operating voltage is 5v, but that is VA-B, so you have to "leave" some of the 5v supply for the Vf of the LED, so I still maintain you are operating it out of spec with a 5v supply...
...but if it (still) works, then it works :)
 

techElder

Well-known member
Of course Martin is right. The 5VDC should be read across the CL2's terminals; not the supply voltage.

What is happening from your post #21 is that the CL2 is just acting like a resistor. It hasn't started current limiting at 5VDC supply voltage.
 

newplumber

Senior Member
Good explanation of you both...I did not test the voltage while the CL2 was used
and yes I would believe I am operating out of spec...which is okay because the led brightness has impossible noticeability
from 17.8 to 20 mil amps ...atleast i can not tell and i wear expensive glasses :cool:

Thanks westaust55,texas,your name goes here,... for more options on the current limiting ...I will test them out ...somewhat in spec :)
 
Top