# Calculating LED current using ohms law

I've got a 4 digit green 7 segment display (technically 5, it's from a microwave and the "5th" digit is the function lights on the top and bottom). I don't have a datasheet for it. It's common cathode, the first 2 and last 2 cathodes control the digits and the middle controls the function lights. I'd like to figure out an ideal driving current so I can drive it from an Arduino safely. If I assume that each segment takes, say, 10mA, then if that segment on all "5" digits is lit, then the arduino is sourcing 50mA of current through a single pin, more than the recommended max of 40mA. Rather than just settle for no more than 8mA for a total of no more than 40mA, I'd like to actually do some math. I'm driving the display with a buck regulator set to 2.2V for testing

Now, my multimeter sucks. It's one of those free pieces of crap from harbor freight. I like it because it's free and I can abuse (and break) it without really caring because I can get another, but I hate it because it's SO inconsistent with small measurements. It has a 20mA, 200mA and 10A current setting. If I set it to the 10A setting, the maximum resolution it has is tens of mA, and it goes between .01 and .02A. If I change it to the 200mA setting, it says 5.6mA, and on the 20mA setting it says 4.8mA. This is frustrating, so I tried reading the current by converting it to a voltage across a resistor. I used a 100 ohm / .1% resistor, put it in series and connected the black lead from the DMM to ground and the red lead between the LED and the resistor, and read the voltage in millivolts. I got 130mV. So, ohms law: $$\frac{.130mV}{100Ω} = .0013mA$$ ...1.3mA?! I can understand the crappy multimeter being bad at measuring current, but it's usually spot on with voltages, which it why I did it like this. I can't understand getting that many different measurements though.

So, my question is two-fold. First, did I do the ohm's law measurements right, or was there something I missed? Second, given that I don't have a constant current LED driver, nor do I have a way of making one right now, how would you recommend I accurately measure the current of these LEDs? I will be driving it from the arduino directly, so I'll be using resistors. And please, be nice. I don't have a lot of money for things, which is why I have a crappy free multimeter instead of a better, more expensive one.

• Sounds about right. A green LED takes almost 2,2V to start emitting. I don't know what series resistance you used but it presumably limited the current to about 6mA with no multimeter, 5.6mA with the low resistance used on the 200mA range, and 4.8mA with the extra resistance of the 20mA shunt. Drop 0.13 more volts across that 100R resistor and you practically turned the LED off altogether. In future, set the V regulator to about 3V so you can drop 0.8V across a resistor (100 ohms would give about 8 mA) That will swamp the small resistance of the meter to get the same reading from all 3 tests. – Brian Drummond Oct 8 '16 at 23:36
• Then you can use one meter to measure the current shunt resistors on the other. Looks like your meter is OK, you were just caught out by the non-linear I-V relationship of the LED. – Brian Drummond Oct 8 '16 at 23:40
• 5mA per LED sounds ok for mid brightness.. 20mA scale probably adds too much shunt R in series and reduces your current 12% in one case – Tony Stewart Sunnyskyguy EE75 Oct 8 '16 at 23:50
• @EMFields How am I being a judge? I posted a question with all the relevant information I could figure out for myself and the details of what I'd done to try to figure out the answer for myself, and asked for help. Literally the only reason I added that bit to the end is because in another question I asked, when I mentioned that I'd salvaged something and said "what would you do" someone snarkily replied "I'd throw it back in the trash". I wanted to avoid the "buy better stuff" responses. Not everyone can. – HaLo2FrEeEk Oct 8 '16 at 23:57
• @EMFields I also didn't "blame my tools for my own foibles" whatever that means. The meter sucks, there's a reason it's \$6 or free with a coupon. I've literally used 3 different ones to take the same measurement from the same circuit and gotten a different result from each of them. Also, if you'll recall, I said please be nice. I wasn't a jerk about it. There's nothing rude about asking people to be nice (or just consider the fact that not everyone can afford better tools). It is rude, however, to chastise someone who's trying to learn for simply asking people to be considerate. – HaLo2FrEeEk Oct 9 '16 at 0:02

I'm driving the display with a buck regulator set to 2.2V for testing

Don't do that. An LED is not like a resistor. Once over a certain threshold voltage the current increases rapidly, so small changes in supply voltage and/or circuit resistance will cause a large change in LED current. The graph below shows some examples of LED current vs voltage. Here you can see that increasing the red LED's voltage from 1.7V to 1.85V (a mere 9% increase) caused a ten-fold (1000%) increase in current draw!

You should set the power supply to a higher voltage, and limit the current with a resistor in series. The resistor drops the voltage difference between the power supply and the LED, resulting in a current flow according to Ohm's Law, I = V / R (where V is Vsupply - Vled).

For this calculation You can assume that a red LED drops a constant voltage of ~1.9V, orange/yellow ~2V and green ~2.1V (which isn't quite true since the voltage does increase at higher current, but close enough for most purposes). If you want greater accuracy then you will need to measure the voltage drop of your LEDs at different currents.

Your multimeter may suck, but you shouldn't blame it for showing different current readings on different ranges. Most meters read current by measuring the voltage across a low value shunt resistance. If the voltage required for a full scale reading is the same (eg. 100mV) then the shunt resistance value must must be higher on the lower ranges. Since your circuit is very sensitive to series resistance, even the small resistance of your meter shunt is enough to change the current.

When you inserted a 100Ω resistor and measured the voltage across it, you effectively added a large value shunt resistance. The current then dropped very low due to the small difference between the power supply voltage and voltage drop of the LED. The answer to this problem is to keep the large value resistor in the circuit, and raise the supply voltage until you get a reasonable current draw.

• Thank you for this, it was very informative. A few questions, if I might. Assuming 2.1V for a green LED and a 5V supply (Arduino), to get, say, 10mA on the LED I'd need a (5 - 2.1) / .01 = 290Ω resistor, right? After reading around I plan to multiplex the display so I won't be sourcing more current than the Arduino can handle at any given time. I don't really want to assume 2.1V though, is there any way to accurately determine an LEDs Vf through measurement? – HaLo2FrEeEk Oct 9 '16 at 1:36
• This is kinda why I get confused. I know that a constant current source is supposed to be used for driving LEDs, but I don't have one. An LED has this Vf value. For a 20mA blue LED it's around 3.3V, but if you drive it with a 20mA constant current source it's only using 2.9V (according to this circuit simulator). How is that possible? – HaLo2FrEeEk Oct 9 '16 at 1:58
• A circuit simulator is only as accurate as its models. 'Around' 3.3V could be 2.9V for a particular LED at that current - or not, depending on the individual LED. Accurately determining an LED's forward drop is easy - measure it! With 290 Ohms the current should be no more than 10mA (probably a bit less due to internal resistance of the Arduino's output driver). But a few mA less is nothing to worry about. The advantage of the resistor is that it maintains a relatively constant current by 'swamping out' small variations in LED voltage drop and other resistances in the circuit. – Bruce Abbott Oct 9 '16 at 2:23
• Ok, I kinda get it now. I used the math from this answer (and the values for If vs Vf from a datasheet for another green 4-digit 7-segment display) to determine that the internal resistance is 20Ω, and so the intrinsic voltage is actually 1.8V, which is why even though the Vf is typically 2.2V for these LEDs, at 20mA they're only dropping 1.8V. Conveniently, that's also what I saw before in another simulation. Perfect world, I know, but it's helped me to understand, as have you. Thank you! – HaLo2FrEeEk Oct 9 '16 at 2:46