Driving an external LED


A light emitting diode (LED) must have its electric current regulated, otherwise it will be damaged. However, the Arduino lacks a current limited output. Instead, we use a resistor to provide current limiting.


The images below are two views of the same circuit. The schematic illustrates the design conceptually, whereas the breadboard layout shows how to implement it.

Fig. 1: Schematic layout for LED circuit.

Fig. 1: Schematic layout for LED circuit.

Fig. 2: Breadboard layout for LED circuit.

Fig. 2: Breadboard layout for LED circuit.

Here, pin 3 (also called digital 3 or D3) is connected to the LED. When D3 is driven high (5 volts), current will flow through the LED and into the ground (GND) pin.

Build this circuit on your breadboard. Note that a LED will not operate if you connect it backwards. Figure out the correct orientation by looking carefully at the LED casing. It is not perfectly round; one side is be flattened off. The flat edge on the case corresponds to the bar in the schematic symbol. Connect the flat edge to the lower voltage side of the circuit.


Adjust your code from the previous lesson so that the blinking sequence is shown on the external LED.

Save your work as lesson3. Each lesson should be saved into a separate file.

Topics for workshop discussion

Why 150 Ω? How to choose the resistance?

This work is licensed under a Creative Commons Attribution 4.0 International License. For comments or corrections, please contact bronson.philippa@jcu.edu.au.