Resistor LED Driving Example

I have a white long-lead LED with the following specifications

ParameterValueDescription
$V_F$3.0-3.2 VForward Voltage
$T$8000k-10000kColor Temperature
$I_F$20mAForward Current

I would like to drive it from a 5V source. Therefore I need to calculate the limiting resistor value. The forward voltage of the LED is around 3 Volts, so that means that I need to drop 2V across the resistor. As the series arrangement has a constant current running through the circuit, I can use the forward current of the LED for the calculation

$$
\begin{matrix}
V=IR\\
2V=(0.02A)(R)\\
R=\frac{2V}{0.02A}\\
R=100\Omega
\end{matrix}$$
Then we can see what the power dissipated in the resistor is to determine what power rating we need.

$$
\begin{matrix}
P=I^2R\\
P=0.02^2*100\\
P=0.004*100\\
P=40 mW
\end{matrix}
$$

A 250mW resistor will have a safety factor of 6.25. We want at least a safety factor of 2, so there should be no problem using a 1/4W 100 ohm resistor in this circuit. When we set it up on the breadboard it should look something like this.

Now lets set the power supply to 5v and 80 mA just to be safe.

Now when we turn the power supply on, the LED turns on

We can see from the power supply that the circuit is pulling around 16 mA, which is less than we predicted.

Next we can measure the voltage drop across both the resistor and the LED. Across the LED we measure 3.03V.

And across the resistor we measure a drop of 1.951V.

Shunt vs Series LED Driver