Add an external power LED to a Raspberry Pi

Posted by Stephen Eddy on

This short guide will take you through the steps required to add an external power led to your Raspberry Pi B+, 2 or 3.  This might be required for use in a custom case, such as our Commodore 64 case (link). 

1.   What you will need

In order to add an external power LED to your Raspberry Pi, you will need all of the following:

  • Raspberry Pi model B+, 2 or 3 with 40-pin GPIO header
  • 5V Red LED
  • 330 Ohm resistor
  • Jumper wires with female connectors
  • Soldering Iron
  • Solder
  • Wire-strippers and cutters

If you don’t wish to buy the parts and solder the cables for this project, we sell pre-made LED’s with integrated resistor and wires in our WebShop that are ready to just plug in and work with no soldering required.

2.   Wiring up your LED 

Follow the diagram below to wire up your LED.  You need to take the following steps:

  • Cut the red and black jumper wires to the desired lengths
  • Strip about 5mm of shielding off each of the jumper wires
  • Solder the red jumper wire to the anode (+) of the LED (longer lead)
  • Solder the black jumper wire to one side of the resistor (any)
  • Solder the other side of the resistor to the cathode (-) of the LED

 Raspberry Pi LED wiring

3.   Connecting the LED to you Raspberry Pi

The easiest place to connect the power LED to your Raspberry Pi is via the GPIO serial port connectors on the 40 pin header.  These are shown in the following diagram with the black and red connections marked.

Pi GPIO connections for LED 

The wires are connected as follows:

  • Pin 6 – GND – Black jumper wire
  • Pin 8 – UART_TXD0 – Red jumper wire

4.   Enabling the Serial UART to turn on the LED

Earlier Raspberry Pi distributions had the Serial UART port enabled by default.  More recent Raspbian distributions have the pin disabled by default, so you will need to edit a config file on the Pi to re-enable it.

The file you need to edit is called /boot/config.txt and is accessible on your Pi SD card.  The easiest was to edit this file is to put the Pi SD  card into your desktop computer and edit the file using the free Notepad++ (Windows) or Atom (Mac) application.  Do not edit this file in the standard Windows Notepad or Mac TextEdit applications or it mess up file encodings that will prevent it from working.

If the Pi is booted on your network and accessible, you could also edit this file directly on your Pi using the nano text editor via SSH.  This option is beyond the scope of this article.

 You need to add the following line to the end of your /boot/config.txt file:

 enable_uart=1

 Now save the file, eject the SD card and insert it back into your Pi.

5.   All Done

You should now be all done.  Once the config file has been edited and placed back into your Pi, just power on the Pi as usual and the new power LED should light a few seconds after your Pi starts to boot.

Enjoy!.


Share this post



← Older Post