This simple diode circuit shows how a load resistor controls the light output of an LED (light-emitting diode). We use a graphical technique to solve a challenging non-linear equation.

Written by Willy McAllister.


Contents


Where we’re headed

  • A diode circuit is best solved using a graphical method.
  • We introduce the concept of a load line, generated by the resistor connected to the diode.

Light-emitting diode circuit

Let’s build a circuit with a green light-emitting diode (LED).

LED and resistor circuit $\quad$

We begin with the usual analytical approach, but it gets very hard very soon.

The unknowns are $\blueD i$ and the diode voltage, $\goldD{v_\text{D}}$. (We don’t care as much about $\goldD{v_{\text R}}$, the voltage across the resistor.) Everything shares the same current, so let’s write equations for current.

The diode current $i$ in terms of $v_{\text D}$ comes from the diode equation,

$i = \text I_\text S \left ( e^{\,v_{\text D}/26\text{mV}} -1 \right )$

Ohm’s Law for the resistor is,

$i = \dfrac{v_\text{R}}{120\,\Omega}$

Let’s modify this a little to get $i$ in terms of $v_{\text D}$ instead of $v_{\text R}$.

Can you express $v_{\text R}$ in terms of $v_{\text D}$?

show answer

Using KVL around the loop, we know $v_{\text R} = 3.3\,\text V - v_{\text{D}}$, so the resistor current becomes,

$i = \dfrac{3.3\,\text V - v_{\text{D}}}{120\,\Omega}$

I’ll rearrange the equation to make it look like a line in the slope-intercept form. (The reason will be revealed in a moment.)

$i = -\dfrac{1}{120\,\Omega}\,v_{\text D} + \dfrac{3.3\,\text V}{120\,\Omega}$

$i = -\dfrac{1}{120\,\Omega}\,v_{\text D} + 27.5\,\text{mA}$

The $i$-intercept is $27.5\,\text{mA}$. The slope of the line is $-\dfrac{1}{120}$.

When resistor has its upper terminal connected to a fixed voltage it produces a line with this distinctive negative slope. This line has the nickname load line. Load lines also come up when we study transistors.

Now we set the two equations equal to get one equation in one unknown, $v_{\text D}$,

$\text I_\text S \left ( e^{\,v_{\text D}/26\text{mV}} -1 \right ) = -\dfrac{1}{120}\,v_{\text D} + 27.5$

This non-linear equation is hard to solve. You will probably never be asked to find an analytical solution when the diode equation is involved. The usual approach with diodes is to go for an approximate answer with a graphical solution.

Graphical solution

Let’s go back to the two equations with two unknowns, $i$ and $v_\text D$,

$i = \text I_\text S \left ( e^{\,v_{\text D}/26\text{mV}} -1 \right )$

$i = -\dfrac{1}{120\,\Omega}\,v_{\text D} + 27.5\,\text{mA}$

We can try to solve these two equations analytically, but it’s a pain in the neck. Instead, it’s okay to be practical about it and go for an approximate answer using graphical methods. What you do is plot the two functions on the same graph and find where they cross. At the point of intersection, the current in the resistor is the same as the current in the diode.

LED diode curve with resistor load line

Graphical solution to the resistor-LED circuit. The blue line is a plot of the diode equation for an LED. The green line is a plot of the resistor "load line" equation. The red point where the two graphs intersect is where the current in the diode and resistor are the same.

We get a fairly accurate answer by reading the intersection point from the graph,

$v_{\text D} = 1.7\,\text V \qquad i = 13\,\text{mA}$

Reading the graph is usually all the accuracy you need. $13\,\text{mA}$ will turn on the LED.

Tell me more about this LED diode curve

LED's are made of elements on either side of Si in the periodic table. For example, one way to make a red LED is with Gallium Arsenide Phosphide (GaAsP). With these alternate materials, the forward voltage of an LED diode is different (higher) than silicon's $0.65\,\text V$ forward voltage.

The diode equation gets a small tweak to allow the equation to achieve a better fit to real LED's. As shown here, a new factor $\text N$ appears in the exponent.

$i = \text I_\text S \left ( e^{\,qv/\text N k\text T} -1 \right )$

For silicon, $\text N = 1$. $\text N$ falls between $1$ and $2$ for other materials. $\text N > 1$ causes the LED curve to move the right relative to silicon. For the LED diode graphed here, $\text I_\text S = 2.38\times 10^{-18}\text A$ and $\text N = 1.85$. This results in a forward voltage of about $1.7\,\text V$.

$\text N$ has the fancy name emission coefficient. It basically acts as a fudge factor to get the math to fit the real world.

Concept check

problem 1
What is the current when the diode voltage $v_\text D$ is $0$?

$i = $ ______ $\,\text{mA}$

show answer

In the equation of the load line, let $v_\text D = 0$ and solve for $i$.

$i = -\dfrac{1}{120\,\Omega}\,0 + 27.5\,\text{mA} = 27.5\,\text{mA}$

Or just look at the graph and see where the resistor line crosses the $i$ axis: $27.5\,\text{mA}$.

problem 2
What is the voltage when the resistor load line touches the $v$-axis?

$v = $ ______ $\text V$

show answer

You can use the equation of the resistor load line: Let $i=0$ and solve for $v$.

$0 = -\dfrac{1}{120\,\Omega}\,v_{\text D} + 27.5\,\text{mA}$

$v_{\text D} = 27.5\,\text{mA}\cdot 120\,\Omega = 3.3\,\text V$

Or, look at the graph to see where the resistor load line crosses the voltage axis: $v = 3.3\,\text V$.

problem 3
Does the $i$-axis intercept of the resistor load line depend on the value of $\text R$?

Yes or No.

show answer

The general form of the resistor load line is,

$i = -\dfrac{1}{\text R}\,v_{\text D} + \dfrac{\text V_{\text{BAT}}}{\text R}$

The load line touches the $i$-axis at $v_{\text D} = 0$,

$i = -\dfrac{1}{\text R}\,0 + \dfrac{\text V_{\text{BAT}}}{\text R} = \dfrac{\text V_{\text{BAT}}}{\text R}$

So, yes, if the value of $\text R$ changes the point where the load line touches the $i$-axis will move up or down.

problem 4
Does the $v$-axis intercept of the resistor load line depend on the value of $\text R$?

Yes or No.

show answer

The general form of the resistor load line is,

$i = -\dfrac{1}{\text R}\,v_{\text D} + \dfrac{\text V_{\text{BAT}}}{\text R}$

The load line touches the $v_{\text D}$-axis at $i = 0$,

$0 = -\dfrac{1}{\text R}\,v_{\text D} + \dfrac{\text V_{\text{BAT}}}{\text R}$

$0 = -v_{\text D} + \text V_{\text{BAT}}$

$v_{\text D} = \text V_{\text{BAT}}$

So, no, the value of $\text R$ has no effect on where the load line touches the $v$-axis. It crosses the $v$-axis at $\text V_{\text{BAT}}$ for any value of $\text R$.

Brighter

Suppose you build this circuit and the LED is not bright enough. The brightness goes up if you increase the current.

How might you do that?
Try changing something about the circuit to increase brightness.
Then sketch a new graphical solution.

brighter LED

One way to get more diode current is to reduce the series resistance. Lower resistance makes the resistor load line steeper. If we reduce the resistor from $200\,\Omega$ down to $100\,\Omega$ and replot the load line, we get a new solution,

Reducing the resistor to $100\,\Omega$ tips the load line up and raises the $i$-axis intercept up to $3.3\,\text V / 100\,\Omega = 33\,\text{mA}$. At the point where the two graphs intersect the LED current increases from $13\,\text{mA}$ to a bit more than $15\,\text{mA}$, making it brighter. The voltage on the diode increases, too, but only by a little bit.

You could also see what happens if you increase the supply voltage. The resistor line moves in a different way when the voltage is adjusted. Go ahead give that a try on your own.

Why have a resistor?

Suppose we want maximum brightness and the simplest circuit. How about leaving out the resistor altogether?

Think this through: Is this a good idea or a bad idea?

Hint: Imagine what happens to the resistor load line as the resistor transitions gradually from $100\,\Omega$ to $0\,\Omega$.

show answer

If we make the resistor smaller and smaller, the resistor load line gets steeper and steeper. The bottom of the load line is anchored at the power supply value, $3.3\,\text V$, and the intersection with the diode curve goes up and up and up. When the resistor value becomes $0\,\Omega$ the load line is vertical.

When $\text R = 0\,\Omega$, the load line points straight up and does not intersect the diode curve until way way up there at some very high current. Two things can happen at this point. The diode burns out from the excess heat, or, assuming the diode survives this abuse, the battery runs down in just a little while.

It turns out to be a bad idea to leave out the resistor. You always want to put a resistor in there to limit the current and "absorb" the difference in voltage between the diode's forward voltage and the power supply.

Summary

We demonstrated a graphical solution for a diode circuit. In general, graphical methods are a good way to approach circuits with non-linear elements.

LED diodes are used as indicator lights in all kinds of applications. You should put a small resistor in series with the LED to take up the excess voltage beyond what’s needed by the LED to light up.