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 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$ green LED

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 resistor equation to make it look like a line in the slope-intercept form,

$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}$.

Now we set the diode current equal to the resistor current,

$\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 find an approximate answer with a graphical solution.

Graphical solution

Let’s go back to the two equations,

$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 equations on the same graph and find where they cross. At the intersection the current in the resistor is the same as the current in the diode.

LED diode curve with 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 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.

Jargon: Whenever you have a resistor with its upper terminal connected to a fixed voltage it produces a line with this distinctive negative slope. This line has the nickname load line. It’s the green line in the graphical solution. The other place load lines come up when we study transistors.

Tell me more about the LED 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$ is $1$. It's 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 a fudge factor to get the math to fit the real world.

Concept check

Explore the load line. Answer these question using both the load line equation and the graphical solution.

problem 1
Where does the load line cross the current axis?

$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 load line crosses the $i$ axis, $27.5\,\text{mA}$.

problem 2
Where does the load line cross the voltage axis?

$v = $ ______ $\text V$

show answer

The $v$-axis corresponds to $i=0$. Use the equation for the load line and solve for $v_\text D$,

$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 to see where the load line crosses the voltage axis, $3.3\,\text V$.

problem 3
Does the point where the load line crosses the current axis depend on the value of $\text R$?

yes / no

show answer

The general form of the 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, the value of $\text R$ changes the point where the load line touches the $i$-axis. Higher resistance moves the crossing point down. Lower resistance moves it up.

problem 4
Does the point where the load line crosses the voltage axis depend on the value of $\text R$?

yes / no

show answer

The general form of the 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, $\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 load line tip upward, making it steeper. If we reduce the resistor from $200\,\Omega$ down to $100\,\Omega$ and plot a new load line we get this solution,

Brighter load line plot

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 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 it through: Is no resistor a good idea or a bad idea?

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

show answer

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

load line plot with a 0 resistor

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 need to include a resistor to limit the current.

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.