Reverse Calculating the LED forward current / voltage

Thread Starter

Vihaan@123

Joined Oct 7, 2025
220
I have a demo ST nucleo board and there is a series resistor of 510 Ohm, i am trying to find out how it arrived.
1773303207510.png
The resistor value is 510 Ohm. The LED data sheet is everlight_ever-s-a0007433968-1-1685341.pdf
The forward current is
1773303452232.png

1773303486581.png

If i take the above two values and calculate resistance
(3.3V - 2.0V)/25mA = 52 Ohm, it does not match with 510 Ohm, so he may be trying to drive at low currents, is it possible to calculate?
1773303840487.png
One guess if i make for example
(3.3V - 1.9V)/10mA = 140 Ohm but it does not match.
 

Attachments

ericgibbs

Joined Jan 29, 2010
21,390
Hi V123,
Even though an LED is rated at a maximum current of 25mA, it is typical to run them at a lower mA, they are bright enough and prolongs their life.
E

EG 2043.gif
 
Last edited:

WBahn

Joined Mar 31, 2012
32,702
Here's a hint... what is the name of the table that you got the 25 mA figure from?

1773305754616.png

Would you stand under a rope holding up a 1000 lb safe knowing that the rope had an absolute maximum rating of 1000 lb?

What if you also knew that the weight of the safe was only known to within ±100 lb?

Of if you were told that the 1000 lb rating was only valid at 59°F and 20% relative humidity?

A general rule of thumb is to run components at no more than half of their absolute max ratings whenever possible. Exceptions certainly exist in both directions, of course.

There is no need to drive an LED at any higher current than is necessary for it to do its job.

It appears that whomever designed that board decided that about 2.5 mA was sufficient. The real question is whether it actually is sufficient. Does the LED light up well enough for you to easily determine when it is on or off? If so, then it is sufficient.

Now, that 2.5 mA comes from assuming the LED voltage drop is the nominal 2.0 V. That's a starting point, but at those currents it's going to be less (on average).

The graph that they provided (for the typical forward current versus forward voltage at 25°C) shows that the voltage increases from 1.8 V to 2.3 V as the current goes from 0 mA to 50 mA. That means that the LED can be modeled as a 1.8 V constant voltage drop in series with a resistor whose values is approximately.

Rled = (2.3 V - 1.8 V) / 50 mA = 10 Ω

That's small enough compared to the 510 Ω resistor to not matter (it's only ~2% of the current limiting resistor's value). But what could make some difference is the lower Vf at sub-10 mA currents. So let's see what a more details approximation would give us:

I_led = (3.3 V - 1.8 V) / (510 Ω + 10 Ω) = 2.9 mA

So, it still doesn't make a significant difference (though note that it IS a 20% increase in current).
 

MrChips

Joined Oct 2, 2009
34,626
Assuming supply voltage is 3.3 V and LED forward voltage is 1.8 V, running the LED at 3 mA gives,

R = (3.3 V - 1.8 V) / 3 mA = 1.5 V / 3 mA = 500 Ω
510 Ω is a standard value in E24 series.
 

ronsimpson

Joined Oct 7, 2019
4,645
Too many designs run the LEDs at max. current. At night they light up the room. Even in the day they hurt my eyes. You do not need to push 25mA in a LED just to indicate the power is on. Often 1/10 current is enough to be visible in daytime.
 

eetech00

Joined Jun 8, 2013
4,704
I have a demo ST nucleo board and there is a series resistor of 510 Ohm, i am trying to find out how it arrived.
View attachment 364569
The resistor value is 510 Ohm. The LED data sheet is everlight_ever-s-a0007433968-1-1685341.pdf
The forward current is
View attachment 364570

View attachment 364571

If i take the above two values and calculate resistance
(3.3V - 2.0V)/25mA = 52 Ohm, it does not match with 510 Ohm, so he may be trying to drive at low currents, is it possible to calculate?
View attachment 364572
One guess if i make for example
(3.3V - 1.9V)/10mA = 140 Ohm but it does not match.
The specification indicates a Vf of 2.0 to 2.4 at a test current of 20mA.
So you need to estimate the LED forward voltage and forward current values used that results in a current limiting resistor value of 510 ohms. One way to do that is to start by using the middle of the Vf range:

Vfmin=2.0
Vfmax=2.4
Vf = (Vfmin+Vfmax)/2 = (2.0+2.4)/2 = (4.4v)/2 = 2.2v

So let Vf=2.2v

Then calculate approx current limit value:
Vdc= 3.3v
Vf = 2.2v
Vd = Vdc-Vf = 3.3-2.2 = 1.1v
R = 510
If = Vd/R = 1.1/510 = 0.0022 A, or 2.2mA

So the approximate forward current limit is 2.2mA.

I could have also estimated the current by calculating the forward current limit using the min and max values of the specified Led Vf range.
 

WBahn

Joined Mar 31, 2012
32,702
The specification indicates a Vf of 2.0 to 2.4 at a test current of 20mA.
So you need to estimate the LED forward voltage and forward current values used that results in a current limiting resistor value of 510 ohms. One way to do that is to start by using the middle of the Vf range:

Vfmin=2.0
Vfmax=2.4
Vf = (Vfmin+Vfmax)/2 = (2.0+2.4)/2 = (4.4v)/2 = 2.2v
Note that the data sheet doesn't give a Vfmin value. It gives a typical and a maximum value for Vf.

The standard deviation of the forward voltage is pretty narrow about the typical value, being something like 100 mV give or take. There will be very few devices that are half way between the typical and the max value. The max value is essentially a guarantee and it is pretty far out in the tail of the distribution so that manufacturers don't have to discard too many devices. The tail on the lower voltage side of the distribution is pretty sharp, though, due to the device physics. You are unlikely to see many devices that are more than 50 mV to 100 mV below the typical value.

So, in most cases, a design should use the typical value for component calculations, but be capable of accommodating the max value while still functioning adequately. If a design needs more careful scrutiny than that, then it's likely that temperature dependence may also have to be taken into account and also possible that devices will need to be binned.
 

Jon Chandler

Joined Jun 12, 2008
1,560
You do not need to push 25mA in a LED just to indicate the power is on. Often 1/10 current is enough to be visible in daytime.
Back in the ancient days when LEDs were introduced, 20mA gave a pretty meager glow.

Current generation LEDs are quite bright at even low currents. I've had some that are even bright at fractions of a milliamp.

A non-diffused LED at 20mA will leave spots before your eyes!
 

MrAl

Joined Jun 17, 2014
13,667
I have a demo ST nucleo board and there is a series resistor of 510 Ohm, i am trying to find out how it arrived.
View attachment 364569
The resistor value is 510 Ohm. The LED data sheet is everlight_ever-s-a0007433968-1-1685341.pdf
The forward current is
View attachment 364570

View attachment 364571

If i take the above two values and calculate resistance
(3.3V - 2.0V)/25mA = 52 Ohm, it does not match with 510 Ohm, so he may be trying to drive at low currents, is it possible to calculate?
View attachment 364572
One guess if i make for example
(3.3V - 1.9V)/10mA = 140 Ohm but it does not match.
Hello there,

You already know the proper equation I'll just repeat it here for clarity:
(Vcc-vLED)/i=R

So that's the basic expression that we all know and love.
Next, to find out what they were after, we just have to solve for 'i' the current:
(Vcc-vLED)/R=i

Now that we have that, we can see what they wanted as far as current goes.
Since the range of voltages is 1.8v to 2.3v we might want to try both of those first, and possibly the average voltage which is 2.05v (taking the average of 2.3v and 1.8v. Let's do the average first.
The supply is 3.3v, the test LED voltage is 2.05v, and the resistance they used was 510 Ohms. That leads us to:
i=(3.3-2.05)/510
and that gives us close to:
i=2.45ma

and as others have pointed out, that can be pretty good for a modern high brightness LED when used as an indicator. Since Red is usually used for that we might assume that we are just making an indicator lamp, but there are some flashlights that use one or more Red LEDs because they do not bother your night vision (related to how the human eyes work in darkness). If it is for a flashlight and only 2.45ma, then it could be they want a long lasting Red light flashlight rather than a super bright one.

There is a catch here though, and maybe you saw it already.
That is, we used 2.05v for the test voltage and came out with a current of 2.45ma, which is 0.002450 amps. That is 2.45ma, and when we look at the graph and check the voltage for that current, we find the voltage is a little over 1.8 volts, not 2.05 volts. Let's use 1.8245v as the new test voltage.
We calculate 'i' now and we get:
i=2.893ma

so now the current is a little higher. If we check the voltage again we still get a little over 1.8v (1.82893v) so we might stop there.
If we wanted to get a little closer we'd have to convert the graph into an equation for a line. This would be using the general straight-line equation:
y=m*x+b
Solving for m and b, we get:
y=100*x-180

Since the voltage is 'x' and the current is 'y', we might as well rename them:
i=100*v-180
and that's in milliamps so in amps this is:
i=0.1*v-0.18
Now we have something really solid to work with.
Since we have a 3.3v source and 510 Ohm resistance, we can calculate the voltage of the LED again:
v=3.3-(i*510)
and with 'i' as above we end up with:
v=95.1-51*v
and solving for 'v' we get:
v=1.828846

and with that voltage and using the equation for 'i' we get:
i=0.00288 amps which of course is 2.885ma.

Our second estimate above was i=2.893ma, and our final calculation came to 2.885ma, so by doing the familiar simpler calculation two times, we get pretty darn close. If we round, we get i=2.89ma and i=2.89ma, which match exactly.

So in conclusion, if we do the calculation twice we get a very good estimate, and we can check that using the equation for a line from analytic geometry. If the graph is a curve though, we have to resort to a 2nd or 3rd degree equation which involves a lot more work. We can't use the equation for a line unless the curve is either straight or acceptably straight.

You should actually try to reproduce all of this so you get a really good feel for how this all works. And keep in mind that 3ma is pretty good for a high brightness LED used as indicator. If it is an older Red LED though, that might be too low. That means the next graph to look at would be one that gives you an idea of what the brightness is vs forward current.
 

WBahn

Joined Mar 31, 2012
32,702
Hello there,

You already know the proper equation I'll just repeat it here for clarity:
(Vcc-vLED)/i=R

So that's the basic expression that we all know and love.
Next, to find out what they were after, we just have to solve for 'i' the current:
(Vcc-vLED)/R=i

Now that we have that, we can see what they wanted as far as current goes.
Since the range of voltages is 1.8v to 2.3v we might want to try both of those first, and possibly the average voltage which is 2.05v (taking the average of 2.3v and 1.8v. Let's do the average first.
The supply is 3.3v, the test LED voltage is 2.05v, and the resistance they used was 510 Ohms. That leads us to:
i=(3.3-2.05)/510
and that gives us close to:
i=2.45ma

and as others have pointed out, that can be pretty good for a modern high brightness LED when used as an indicator. Since Red is usually used for that we might assume that we are just making an indicator lamp, but there are some flashlights that use one or more Red LEDs because they do not bother your night vision (related to how the human eyes work in darkness). If it is for a flashlight and only 2.45ma, then it could be they want a long lasting Red light flashlight rather than a super bright one.

There is a catch here though, and maybe you saw it already.
That is, we used 2.05v for the test voltage and came out with a current of 2.45ma, which is 0.002450 amps. That is 2.45ma, and when we look at the graph and check the voltage for that current, we find the voltage is a little over 1.8 volts, not 2.05 volts. Let's use 1.8245v as the new test voltage.
We calculate 'i' now and we get:
i=2.893ma

so now the current is a little higher. If we check the voltage again we still get a little over 1.8v (1.82893v) so we might stop there.
If we wanted to get a little closer we'd have to convert the graph into an equation for a line. This would be using the general straight-line equation:
y=m*x+b
Solving for m and b, we get:
y=100*x-180

Since the voltage is 'x' and the current is 'y', we might as well rename them:
i=100*v-180
and that's in milliamps so in amps this is:
i=0.1*v-0.18
Now we have something really solid to work with.
Since we have a 3.3v source and 510 Ohm resistance, we can calculate the voltage of the LED again:
v=3.3-(i*510)
and with 'i' as above we end up with:
v=95.1-51*v
and solving for 'v' we get:
v=1.828846

and with that voltage and using the equation for 'i' we get:
i=0.00288 amps which of course is 2.885ma.

Our second estimate above was i=2.893ma, and our final calculation came to 2.885ma, so by doing the familiar simpler calculation two times, we get pretty darn close. If we round, we get i=2.89ma and i=2.89ma, which match exactly.

So in conclusion, if we do the calculation twice we get a very good estimate, and we can check that using the equation for a line from analytic geometry. If the graph is a curve though, we have to resort to a 2nd or 3rd degree equation which involves a lot more work. We can't use the equation for a line unless the curve is either straight or acceptably straight.

You should actually try to reproduce all of this so you get a really good feel for how this all works. And keep in mind that 3ma is pretty good for a high brightness LED used as indicator. If it is an older Red LED though, that might be too low. That means the next graph to look at would be one that gives you an idea of what the brightness is vs forward current.
What is the point of this? Get a very good estimate of WHAT?

Your result of a voltage to seven sig figs is meaningless!

Change the temperature by just 1°C and the voltage across the LED changes by four orders of magnitude more than the resolution of your estimate.

The resistor is only known to 1% at best, and very likely only to 5%.

The voltage drop of that particular LED relative to the one next to it, even at 2.5 mA and room temperature, can be difference by six orders of magnitude more than the resolution of your estimate.

The slope and intercept that you pulled off the graph only have at best, two sig figs.

The voltage put out by the microcontroller is not going to be 3.300000 V. It, alone, will be different by enough to render the last several digits in your better estimate meaningless. And that's before the output impedance of port is considered. The output of LVCMOS is only spec'ed to be at least 2.4 V under load, though under a light load it is probably within 100 mV to 200 mV of the power rail, which can be anywhere from 3.0 V to 3.6 V and be within spec.

Just because you plug a bunch of low-quality numbers into a calculator and write down the result to seven sig figs does NOT mean that it is somehow a better estimate.

In point of fact, it is possible (though unlikely) that one of these demo boards could have an LED that has an abnormally high, but within spec, LED forward Vf with an abnormally low, but within spec, power supply voltage and end up with no current flowing in the LED. Being able to recognize that possibility is far more important than determining the nominal current under perfect nominal conditions to seven sig figs.

Using reasonable limits on power supply, resistance, and LED parameters, the current can be anywhere from about 1.7 mA to 3.4 mA. That's a factor of two, but the human eye's responsiveness to illumination is poor enough that this is good enough for an indicator light.
 

MrAl

Joined Jun 17, 2014
13,667
What is the point of this? Get a very good estimate of WHAT?

Your result of a voltage to seven sig figs is meaningless!

Change the temperature by just 1°C and the voltage across the LED changes by four orders of magnitude more than the resolution of your estimate.

The resistor is only known to 1% at best, and very likely only to 5%.

The voltage drop of that particular LED relative to the one next to it, even at 2.5 mA and room temperature, can be difference by six orders of magnitude more than the resolution of your estimate.

The slope and intercept that you pulled off the graph only have at best, two sig figs.

The voltage put out by the microcontroller is not going to be 3.300000 V. It, alone, will be different by enough to render the last several digits in your better estimate meaningless. And that's before the output impedance of port is considered. The output of LVCMOS is only spec'ed to be at least 2.4 V under load, though under a light load it is probably within 100 mV to 200 mV of the power rail, which can be anywhere from 3.0 V to 3.6 V and be within spec.

Just because you plug a bunch of low-quality numbers into a calculator and write down the result to seven sig figs does NOT mean that it is somehow a better estimate.

In point of fact, it is possible (though unlikely) that one of these demo boards could have an LED that has an abnormally high, but within spec, LED forward Vf with an abnormally low, but within spec, power supply voltage and end up with no current flowing in the LED. Being able to recognize that possibility is far more important than determining the nominal current under perfect nominal conditions to seven sig figs.

Using reasonable limits on power supply, resistance, and LED parameters, the current can be anywhere from about 1.7 mA to 3.4 mA. That's a factor of two, but the human eye's responsiveness to illumination is poor enough that this is good enough for an indicator light.
Hello again,

I tried to explain it to you before but you did not seem to understand it.

It is so obvious that we can't get resistors that are within 1 millionth of a percent (I don't think under our normal situations) that you should have sought a reason for the extra digits rather than complain (again) that you don't like too many digits. It should create a spark in you that asks the question: why are there extra digits here when we don't need them for creating a practical circuit. Let me put it another way...

When you see something that does not look right you have at least two choices:
1. Reject it entirely.
2. Seek a reason why it is not as you thought it was.

You seem to choose #1 most of the time (not always) and that seems to tell me that you do not trust results that don't seem to match with yours, or you just don't believe in the contradictory results.

All that is perfectly fine I think, but when someone tells you the reason and you still don't want to grasp it, you could open your mind a little more and try to understand it. It's not complicated an I know you are smart enough to understand it, but you don't seem to like it or something.

The reason for extra digits is for greater accuracy IN THE CALCULATION ITSELF. This helps us understand the underlying features as well as compare OUR calculations with someone ELSE's calculations.
If person A gets 1.2345 and person B gets 1.2347, then either one could be slightly off. It could be a resistance that has a subtle effect on the calculation that is not the right value for example. It could be 10k when it is supposed to be 100k or something like that. We might not realize that right away, but when we don't get the same number as the other person then we MIGHT proceed to figure out why, and that COULD lead to an error on either A or B's part. We might then be able to figure out which one is not right.

It seems like common sense to me, and it's not like nobody ever does this even in some practical situations. Why do we find a speed of light of exactly 299,792,458 m/s with absolutely NO error (at least the way I understand it), and why so many digits? That's 9 digits you must be very upset (just kidding) :)
The way I understand it is that it is a defined constant not a measured value. It is also used to set the length for the meter. It also sets the definition of a second I think.

Then there is the number we all know: pi
pi is calculated to TRILLIONS of digits. It's used for various purposes, one being to try to see if there are any repeating patterns in it. It's also used for testing hardware.

The bottom line is that sometimes extra digits make sense, and in most cases it is for mathematical reasons not for actual practical use.
There are practical uses too though although I don't use any for that:
Orbital mechanics, i think 10 digits,
QED, 15 digits so that they can compare with experiments and compare different experiments.

In some mechanics, we could see 30 to 40 digits regularly being used. That helps to keep numerical results accurate and from going nuts.
Then we have hardware verification. If we do the math and find a result out to 30 digits and the hardware cannot produce an accurate result, that may indicate that there is a hardware problem.
Stiff differential equation solving.
Arbitrary precision computation.

I don't think I can list all the uses for this. It's mainly under the subject area of high precision numerical analysis.
What it is NOT: it is not a method for calculating real world values for resistors or other components, unless we want to use it anyway and then round. If the computation involves many steps though, we may be forced to use higher precision.

When it comes to what we might call student vs teacher results, there are all sorts of reasons to use higher precision.
Because numerical analysis can reveal errors of many kinds, if we do use more precision we can detect different things such as:
A small error in a component value,
what math tool was used to calculate the values,
what algorithm was used,
rounding technique, or premature rounding,
possibly whether the student copied the answer from some known source instead of actually calculating it themselves,
probably lots and lots of other uses that I can't think of right now.

I hope this makes sense to you now. If not, do a quick check on the web and find out more about this.
 

MrChips

Joined Oct 2, 2009
34,626
As noted, there is no exact solution to solving the current and voltage on a diode without the parametric equation of the diode. In lieu of that, take two values of diode forward voltage of a red LED, for example, 1.8 V and 2.2 V.

Now perform two calculations:

1. Given a current of 3 mA, calculate the required series resistance.
2. Given a series resistance of 510 Ω, calculate the diode current.

Now compare your results. What is the percentage difference in the result?
 

Jon Chandler

Joined Jun 12, 2008
1,560
@MrAl seems to have a problem with significant digits.

For example, suppose we have a 1 gram weight. How much does it weigh in ounces?

The conversion factor is 0.035274 ounces per gram. Does that make our 1 gram weight equal to 0.035274 ounces? No. We know the accuracy of the gram weight to one significant figure. We don't suddenly know the weight in ounces to 5 significant figures. At best, you might claim the weight equals 0.035 ounces...because you didn't know the 1 gram weight to any better resolution than that.

Carrying excessive significant figures through several calculations doesn't add to the accuracy.


Of course that ignores the question of "does it matter". A few percent change in LED current isn't going to make a significant difference in LED brightness. A change in temperature will probably have a bigger impact.
 

WBahn

Joined Mar 31, 2012
32,702
Hello again,

I tried to explain it to you before but you did not seem to understand it.

It is so obvious that we can't get resistors that are within 1 millionth of a percent (I don't think under our normal situations) that you should have sought a reason for the extra digits rather than complain (again) that you don't like too many digits. It should create a spark in you that asks the question: why are there extra digits here when we don't need them for creating a practical circuit. Let me put it another way...

When you see something that does not look right you have at least two choices:
1. Reject it entirely.
2. Seek a reason why it is not as you thought it was.

You seem to choose #1 most of the time (not always) and that seems to tell me that you do not trust results that don't seem to match with yours, or you just don't believe in the contradictory results.

All that is perfectly fine I think, but when someone tells you the reason and you still don't want to grasp it, you could open your mind a little more and try to understand it. It's not complicated an I know you are smart enough to understand it, but you don't seem to like it or something.

The reason for extra digits is for greater accuracy IN THE CALCULATION ITSELF. This helps us understand the underlying features as well as compare OUR calculations with someone ELSE's calculations.
If person A gets 1.2345 and person B gets 1.2347, then either one could be slightly off. It could be a resistance that has a subtle effect on the calculation that is not the right value for example. It could be 10k when it is supposed to be 100k or something like that. We might not realize that right away, but when we don't get the same number as the other person then we MIGHT proceed to figure out why, and that COULD lead to an error on either A or B's part. We might then be able to figure out which one is not right.

It seems like common sense to me, and it's not like nobody ever does this even in some practical situations. Why do we find a speed of light of exactly 299,792,458 m/s with absolutely NO error (at least the way I understand it), and why so many digits? That's 9 digits you must be very upset (just kidding) :)
The way I understand it is that it is a defined constant not a measured value. It is also used to set the length for the meter. It also sets the definition of a second I think.

Then there is the number we all know: pi
pi is calculated to TRILLIONS of digits. It's used for various purposes, one being to try to see if there are any repeating patterns in it. It's also used for testing hardware.

The bottom line is that sometimes extra digits make sense, and in most cases it is for mathematical reasons not for actual practical use.
There are practical uses too though although I don't use any for that:
Orbital mechanics, i think 10 digits,
QED, 15 digits so that they can compare with experiments and compare different experiments.

In some mechanics, we could see 30 to 40 digits regularly being used. That helps to keep numerical results accurate and from going nuts.
Then we have hardware verification. If we do the math and find a result out to 30 digits and the hardware cannot produce an accurate result, that may indicate that there is a hardware problem.
Stiff differential equation solving.
Arbitrary precision computation.

I don't think I can list all the uses for this. It's mainly under the subject area of high precision numerical analysis.
What it is NOT: it is not a method for calculating real world values for resistors or other components, unless we want to use it anyway and then round. If the computation involves many steps though, we may be forced to use higher precision.

When it comes to what we might call student vs teacher results, there are all sorts of reasons to use higher precision.
Because numerical analysis can reveal errors of many kinds, if we do use more precision we can detect different things such as:
A small error in a component value,
what math tool was used to calculate the values,
what algorithm was used,
rounding technique, or premature rounding,
possibly whether the student copied the answer from some known source instead of actually calculating it themselves,
probably lots and lots of other uses that I can't think of right now.

I hope this makes sense to you now. If not, do a quick check on the web and find out more about this.
While you point out that "sometimes extra digits make sense", you fail to grasp that the corollary to that is that sometimes they don't.

You don't need to report a voltage calculation to seven sig figs for me to spot that you started from a very shaky point. Nor did doing so help you spot it for yourself.

You started with an "average" voltage of 2.05 V for the Vf of the diode.

Why?

Because the graph in the data sheet happened to go from 0 mA to 50 mA?

So you took the average of the voltages at the limits of the graph and somehow concluded that that was the value that was going to give you the best estimate of the Vf of the diode in this circuit????

What would you have used if it had stopped at the 25 mA that was spec'ed as the absolute maximum current?

If that were the case, the top voltage would have been about 2.04 V (or, should I say 2.0377358491 V).

Would you have then used an "average" voltage of 1.92 V (or, some value close to that but with nine or ten digits)?

Think of the implications of this -- it says that the average voltage of this physical device depends on the limits that someone decided to draw a graph over.

Does that make ANY sense to you?
 

MrAl

Joined Jun 17, 2014
13,667
While you point out that "sometimes extra digits make sense", you fail to grasp that the corollary to that is that sometimes they don't.

You don't need to report a voltage calculation to seven sig figs for me to spot that you started from a very shaky point. Nor did doing so help you spot it for yourself.

You started with an "average" voltage of 2.05 V for the Vf of the diode.

Why?

Because the graph in the data sheet happened to go from 0 mA to 50 mA?

So you took the average of the voltages at the limits of the graph and somehow concluded that that was the value that was going to give you the best estimate of the Vf of the diode in this circuit????

What would you have used if it had stopped at the 25 mA that was spec'ed as the absolute maximum current?

If that were the case, the top voltage would have been about 2.04 V (or, should I say 2.0377358491 V).

Would you have then used an "average" voltage of 1.92 V (or, some value close to that but with nine or ten digits)?

Think of the implications of this -- it says that the average voltage of this physical device depends on the limits that someone decided to draw a graph over.

Does that make ANY sense to you?
Hi,

It makes sense to a point, but YOU are forgetting one VERY SIMPLE thing:
If I post a number:
1.2345

and you post a number:
1.235

while your number is not that bad in the practical sense, my number is more versatile:
I can get YOUR number from MINE, but you can't get MY number from YOURS. That immediately means my result subsumes yours. My number is always going to be more correct, while yours is always going to be less correct.
In addition, if you should not have any trouble rounding 1.2345 (my number) to 1.235 (your number).

If you don't get this I guess I can draw a circuit and show a practical example. I should be able to show how 1.2345 works while 1.235 doesn't, or another example.

People do have different opinions on teaching style too. You may not like mine, I may not like yours. That doesn't mean that either one is entirely wrong.

As to your first sentence which I quote here:
[ While you point out that "sometimes extra digits make sense", you fail to grasp that the corollary to that is that sometimes they don't. ]
That's just completely and utterly wrong. I already admitted that in the practical sense as resistor value like 1.234567k is not only not reachable, it's just not available in most places. We might truncate to 1.23k or even 1.2k. I can't count the times I would have truncated that to 1.2k (1200 Ohms) because that's a standard value easy to obtain and I'm sure I already have that value on hand.
Do you actually think I would look through my selection of resistors at home looking for a resistor that is exactly 1.234567k :)

So what this boils down to is that for the math end of it, I like the number 1.234567k better than 1.2k and you like the number 1.2k better than 1.234567k. To make it simpler, I like 1.23k better than 1.2k, but sometimes I have to use 1.2k even when I calculate 1.23k.
If this really is just a difference of opinion, we may have to just drop it and live with each other's viewpoints.

Maybe I'll draw up a circuit to illustrate a practical circuit example.
 

MrAl

Joined Jun 17, 2014
13,667
@MrAl seems to have a problem with significant digits.

For example, suppose we have a 1 gram weight. How much does it weigh in ounces?

The conversion factor is 0.035274 ounces per gram. Does that make our 1 gram weight equal to 0.035274 ounces? No. We know the accuracy of the gram weight to one significant figure. We don't suddenly know the weight in ounces to 5 significant figures. At best, you might claim the weight equals 0.035 ounces...because you didn't know the 1 gram weight to any better resolution than that.

Carrying excessive significant figures through several calculations doesn't add to the accuracy.


Of course that ignores the question of "does it matter". A few percent change in LED current isn't going to make a significant difference in LED brightness. A change in temperature will probably have a bigger impact.
Hi,

Sorry to say but from your reply you seem to be the one having the problem with significant digits.
As to your second paragraph, do you REALLY think that I did not know that? REALLY?? :)
I don't think you do believe that.
But gee, if you do, aren't you making the same supposed mistake now? You just typed:
0.035274
Why on earth would you type a number with that much precision when 0.035 would have been sufficient?
You said 0.035 was sufficient, but you still typed 0.035274, what's up with that?
But ok, it's not really about what you typed is it. It's about the number itself: 0.035274 and why that is even present in this discussion.
The question is, why do they publish a number with such precision if we can always get away with 0.035? Why not just write 0.035 in all the books and all the web pages.

The answer is very simple: We sometimes need more accuracy. That's what I had been saying all along, and there are very good reasons for it.

I'll quote one line from your post:
"Carrying excessive significant figures through several calculations doesn't add to the accuracy."

Now if you read my other posts you will notice that I explained how extra digits can help detect errors of various kinds. Well, in that sentence you don't use extra digits but you are talking about extra digits in the form of significant figures, and that already allows me to detect an error or a problem. That tells me that you don't usually do much with numerical analysis for scientific applications. That's because if you did, you would know immediately that more significant figures are absolutely necessary because of certain errors in calculations over many different calculations or iterations. That's like a given for numerical analysis. In fact, that's one of the ideas that is used to verify that a numerical solution to a differential equation is accurate enough. There the idea is to use an algorithm with order N to get solution S1, then increase the order to N+1 to see if the solution S2 has at least the required number of digits that match S1. So if S1=1.234 and we only need 3 digits, S2 must produce at least 1.23 and if 1.24 comes up, it requires looking into it or increasing the order to N+2. And that's only ONE case of the many.
There are different kinds of numerical errors that can come up when we do a number of calculations. What happens is the errors can start to accumulate. Everybody knows this is always a problem with integrations for one. If you have a tiny error and it adds to the result over many iterations, we end up with a noticeable error, and it can be quite large if the number of calculations is high.
There is a known issue with rounding using the added 0.5 rule. That's when we have 1.2345 and we round it to 1.235 by adding 0.0005 and then truncating the results. Recall that one extra binary digit is required to represent 1/2 decimal. If we wanted to round that, we'd be adding 1 to the last digit. The problem with that is it results in a statistical error. The solution is to abandon the rule of adding 0.5 and instead choosing to add 1 randomly. Since the random numbers have average 0.5 that means we do add 0.5, but only over a large number of calculations. It spreads out the errors that makes the whole calculation more accurate.
It is also known that some algorithms produce a better spread of errors than others. Chebyshev is better for sine functions than Taylors for example. Now if a lot of significant digits was not important, nobody would even know that or care about it.

Maybe look up some stuff on the web on numerical analysis. This is under the category of high precision numerical analysis, and also think about why we would even need that advanced category.
 

WBahn

Joined Mar 31, 2012
32,702
The question is, why do they publish a number with such precision if we can always get away with 0.035? Why not just write 0.035 in all the books and all the web pages.
Published where?

Who has said or implied that we can ALWAYS get away with 0.035?

The answer is very simple: We sometimes need more accuracy. That's what I had been saying all along, and there are very good reasons for it.
Yes. SOMETIMES. But you keep using it when it serves ZERO purpose, which implies that you think that we need it ALL THE TIME.
 

Jon Chandler

Joined Jun 12, 2008
1,560
You can't get more significant digits by multiplying numbers together. In my example, if you have a 1 gram weight – one significant digit – you can only KNOW the accuracy of the weight in ounces to ONE significant digit, no matter how accurate the conversion factor is.

But again, the facts in the matter at hand is a 10 - 20% variation in LED current isn't going to make a bit of difference, especially when the calculations are based on the average value of Vf with no standard deviation given.
 
Top