LED forward voltage drop questions - Page 1
Forum section: electronics / beginners

author: jbs
author_rank: Contributor
timestamp: March 28, 2020, 02:24:50 pm
content: Hello community,I have an Arduino UNO with a (measured) output voltage of 5,072 V.I wanted to build a simple circuit with a resistor and a LED and to prove some theory by practice. I failed. Here's how :My theoretical thoughts were the following:Calculate the forward voltage drop of the LED using my Fluke 87V multimeter : V_f = 1,858 VCalculate then the voltage across the resistor (circuit is in series) : V_R = 5,072 - 1,858 = 3,214 VFinally, assuming that I wanted a current of 14,6 mA through the LED, calculate the resistance of the resistor using Ohm's Law : 220,14 OhmWith this finding I took a 220 Ohm resistor (red-red-brown-gold) and built the circuit. The resistor has a measured resistance of 217 Ohm btw.However, when I measured the different voltages and current, I was surprised to find that all my values were off. Here are the measurements:V_source = 5,059 V as opposed to 5,072 VV_LED = 2,11 V as opposed to 1,858 VV_R = 2,947 V as opposed to 3,214 VI = 13,47 mA as opposed to my 14,6 mA that I wanted as a givenSo my questions are, why the differences and how could I have solved this in theory so that the measurements would have matched my calculations ?Thanks,Joël

author: oPossum
author_rank: Super Contributor
timestamp: March 28, 2020, 02:31:32 pm
content: Vf of the LED goes up with current. Your Fluke meter used a small current to measure Vf. The circuit you built has higher current, so higher Vf.

author: mariush
author_rank: Super Contributor
timestamp: March 28, 2020, 05:52:42 pm
content: The forward voltage of the LED will also vary with the temperature of the led.As the led warms up its forward voltage will change a bit.The wires also have some resistance.... if you're using any wires. Of course, probably less than 0.1 ohm resistance in any wires which won't affect measurements much.

author: fourfathom
author_rank: Super Contributor
timestamp: March 28, 2020, 05:56:46 pm
content: And, the arduino digital output will drop slightly below it's open-circuit value when under load.

author: atmfjstc
author_rank: Regular Contributor
timestamp: March 28, 2020, 07:03:54 pm
content: The lesson here is that practice differs from theory. Real-world components and circuits are more complicated than theory would suggest, so you should never expect your measurements to perfectly match calculations. You can make your model more complicated, so as to take into account more and more factors, but you'll never get 100% accuracy.As a corollary, a well designed general-purpose circuit should never rely on some current, voltage, capacitance etc. having this or that exact value. All values in a circuit change within a certain tolerance, due to all sorts of reasons: manufacturing variations, temperature, runtime, stray capacitance, aging, etc., and variations of +-10% and even more are not at all uncommon.In your situation, getting 13.5mA vs 14.6mA is well within expected variation. It's doubtful you'd even be able to notice any difference in the LED's illumination.P.S. wait till you start using batteries and discover that a "1.5V" alkaline is nowhere near an ideal 1.5V voltage source in practice

author: jbs
author_rank: Contributor
timestamp: March 28, 2020, 07:29:23 pm
content: Thank you all for your much appreciated replies. It makes sense now.

author: jbs
author_rank: Contributor
timestamp: March 28, 2020, 07:31:14 pm
content: Quote from: fourfathom on March 28, 2020, 05:56:46 pmThanks. Can you explain why, please?

author: jbs
author_rank: Contributor
timestamp: March 28, 2020, 07:35:26 pm
content: Quote from: atmfjstc on March 28, 2020, 07:03:54 pmThanks, much obliged. I was afraid the truth would be something like that. So in most cases it's trial & error...

author: Zero999
author_rank: Super Contributor
timestamp: March 28, 2020, 08:38:50 pm
content: Quote from: jbs on March 28, 2020, 07:31:14 pmThe Arduino's output will have its own internal resistance, which will drop a voltage, when current is drawn from it. It will form a potential divider with whatever load resistance is connected to it.

author: fourfathom
author_rank: Super Contributor
timestamp: March 28, 2020, 09:49:57 pm
content: Quote from: Zero999 on March 28, 2020, 08:38:50 pmYep. This holds true for just about any voltage or logic-level source, it's not Arduino-specific. They all have some internal resistance. Power supplies shouldn't exhibit this voltage sag (appreciably) because they use feedback to compensate for the internal resistance.

author: Siwastaja
author_rank: Super Contributor
timestamp: March 29, 2020, 01:28:16 pm
content: The IO pin hasapproximately10 to 50 ohms of series resistance, depending largely on the chip, unit, and temperature.Diode forward voltage vs. current is not a constant; it's a (nearly) logarithmic function, which can beapproximatedas a constant, but this approximation is indeed crude. Compared to the linear function of a resistor, the logarithm surely looks like a constant! The exact curve is in the datasheet.Additionally, unit-to-unit variation in Vf of LEDs is large. You ruled this out by measuring the particular unit, but if you do a design, you need to verify that the extremes given in the datasheet are OK for you.Increasing LED temperaturelowersthe Vf, causing more current to flow, causing even more heating.All of this means, you can't regulate the LED current accurately by the voltage source + series resistor approach. The more voltage you drop over the resistor, the more accurate it gets, but if you need any kind of accurate current, you should use some kind of constant current driver circuit, there are many options for that.For simple indication purposes, just design the LED current to be considerably less than the maximum rating, so that variations from the ideal won't cause damage. Modern high-intensity LEDs can be seen well, even in bright conditions, at 5 mA, and they can handle usually 30mA, so you have a lot of leeway.You can do the worst case analysis if you want, for example:1) The Arduino board's 5V regulator likely has some +/- 4% worst case tolerance, so Vsupply may be up to 5.0 + 4%;2) Your 220ohm series resistor might have 5% tolerance, so it may be 220 ohm - 5%;3) Look up the minimum possible Vf from the LED datasheet. Note that this is likely given at junction temperature of 25 degC or something like that!4) Calculate the LED current in these conditions;5) Calculate LED power dissipation P = Vf * I6) Calculate LED junction temperature: Tj = Tambient + P * Rthj-a (from the LED datasheet)7) Calculate the Vf at that temperature: look up if the datasheet lists the thermal coefficient V/degC8) Iteratively go back to step 5. If the numbers change significantly, you may have a thermal runaway.

author: fourfathom
author_rank: Super Contributor
timestamp: March 29, 2020, 03:03:00 pm
content: Or, if it's just an indicator LED, Assuming a 5V drive level, and a 1.8V LED (all approximate, nominal), and a target 5mA LED current, your resistor will be (5.0 - 1./ .005 = 640 Ohms. Use anything from 470 Ohms to 680 Ohms and it's going to be fine. It might actually be brighter than you like, so increase the resistor value to taste. Note that the voltage tolerances, driver output resistance, temperature coefficients, etc, are fairly inconsequential in their effect. The LED current may vary by a few mA, but so what?If you have a 3.3V logic level (or lower), and higher-voltage LEDS, or you are driving high-power LEDs, then things get a bit more sensitive and probably require more precision in your design.