Arduino LED Resistor Calculator

The Arduino [1] Input/Output (I/O) pins can be used to control an LED and make it blink. It does this, by turning the output pin on and off.

[ez-toc]

Arduino Resistor Design

The On condition is represented by an analog voltage level of +5V (or +3.3V). It’s turned Off by setting the analog voltage level to 0V.

The Arduino pin cannot be connected directly to an LED. Instead a current limiting series resistor is required.

In this post we explain how to calculate the value of this resistor as that’s a question many people ask. This design for instance, recommends 220 ohm. While another design (shown below) uses 4.7 kOhm.

LED Specification

Let’s begin with the specifications for this LED.

The forward voltage Vf = 1.9 Volt for a forward current I = 10 mA.

The formula for the resistor (using Ohm’s law) is given by

R = (V-Vf)/I

Arduino Resistor Calculator

The calculator below can be used to find the resistor value for the Arduino design.


	

		

For an output voltage of 5V, the resistor is 310 ohm.

As a resistor value is increased, the current through the circuit decreases. The plot shows the effect of this – a reduction in brightness.

Summary

The Arduino resistor value can be calculated using the forward voltage and current specifications of the LED and the voltage on the output pin of the Arduino. In the example presented in this article, the resistor value should be at least 310 ohm.

References

[1] Arduino

[2] Image in the title is by Simon Monk