10 February 2017
pin 17 low indefinitely without damage to the LED or
Arduino? How many LEDs can the Arduino power like this
Ray Marston’s excellent article “PRACTICAL LED
INDICATOR AND FLASHER CIRCUITS” that was included
in a recent Nuts & Volts content newsletter explains that
other colors of LEDs have lower forward voltages (Vf).
Will these survive the same treatment? The article also
mentions that LEDs will only resist a limited reverse voltage.
I’m pretty sure the “off” LEDs in the cube see a reversed
five volts during the cycle. Does this not load the Arduino?
What are the limits of this behavior?
If this is okay, why do we bother with current-limiting
resistors in other circuits?
near Aberdeen, Scotland, UK
AWell Mike, I think that you and your friendly expert mostly guessed the right answer. I had to dive into the Atmel 328 datasheet — a representative example of one of the
processors used on Arduino boards — to see what the
digital pins look like electrically.
First, let me state that current limiting is important
for LEDs. These devices act like diodes in most respects,
except that their forward voltage is generally higher than
signal or rectifier diodes, and they have a low reverse
breakdown voltage. They also have a somewhat ‘mushy’ V-I
curve, so the current comes on more slowly with voltage.
Too much current through these devices will cause the die
to heat and eventually destroy the device.
Laser diodes typically take much more current,
meaning there is much more power dissipated. Note that
some of that power escapes the device as light, but most
of it is just heat. Some LEDs and laser diodes have built-in heatsinks and heat conduction pads for
keeping the die cool. We really want to keep
that die as cool as we can.
Getting back to the Arduino, I’ve
reproduced part of the equivalent circuit for
an Arduino digital pin in Figure 5. What you
can see is that while the part of the circuit
that is the output driver does not have a
limiting resistor, the pull-up portion does. The
equivalent resistance of that pull-up circuit is
about 25K ohms. Even if there are no resistors
at all, the current is limited by the ability of
FETs in the driver to source and sink current.
However, the resistor in the pull-up circuit
(from the FET source / drain to the pin) makes
that more deterministic and significantly limits
Looking at the Arduino spec, the specified output
current per I/O pin is 20 mA. No doubt that’s the driver’s
limit. That’s enough to light up an LED to a reasonable
brightness, but not enough to damage it. Since the drivers
are current-limited (most transistors look like current
sources when they’re not saturated), the voltage across the
LED will rise until the driver cannot supply more current.
The voltage will then settle there, roughly at the LED’s
typical forward voltage.
LEDs with differing forward voltages will not matter
all that much since the driver will be acting as a current
source. The actual voltage across the LED should again
settle to around its forward voltage as the driver current
So, what we see is that we can drive one I/O pin high
and another low to light up a particular LED in a square
matrix. By cycling them rapidly, we can fool the eye into
thinking that they are on steadily. Of course, individuals
have different lower frequencies where they start to see
the flashing. This is called the flicker-fusion rate, and my
personal rate is quite high, meaning that I can often see
this flashing, even when the rate is quite fast.
n FIGURE 4. Doorbell control with oscillator.
n FIGURE 5. Simplified
Atmel / Arduino I/O pin.