Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Raspberry Pi Pico LED Light Controller

This project is based around a custom PCB created for a Raspberry Pi Pico. This was designed as a project for the The MagPi magazine


The PCB is designed for 5V to 12V LED lights, with appropriate power supply. It can be used for camping, model railway lighting or COB style LED strips. If used with a Pico W (wireless version) then the microcontroller can act as a web server allowing the lights to be turned on and off over a network.

The circuit is intentionally simple using THT components as ths is intended for educational purposes, although can be (and is) used as a complete project. Please note that there is no authentication included and the only security to prevent others from controlling the lights is your WiFi security.

Pico Lights vs Pico Lights Plus

The Pico Lights PCB and the Pico Lights Plus PCB are closely related. They were actually designed together, although I made different decisions for the two boards. The plus version is the one I intended to create, however it was too complex for the magazine tutorial I was writing at the time, which is why I created a simplified version. I then expanded the circuit to create the one called Pico Lights plus.

The main difference between the boards are the additional LEDs, connectors and some additional voltage dividers on the plus board. See further down this page for more details about the Pico Lights Plus.

Schematic diagram - Pico Lights

Electronic Schematic Diagram Raspberry Pi pico lighting controller for 5V to 12V LED lights

Click the image for a larger version.

PCB - Pico Lights PCB

Raspberry Pi Pico Lights controller PCB 3D image

Bill of Materials - Pico Lights

This is the list of components needed for the project. This is often known as a Bill of Materials, or BOM. An example supplier is provided for each component, but can be purchased from a variety of different suppliers.

Raspberry Pi Pico W1 The Pi Hut - Raspberry Pi Pico W
470Ω resistors3¼ WattThe Pi Hut - 470Ω resistors
1N5817 schottky diode1Similar schottky diodes can be usedCPC 1N5817
PCB Switches112mm squareThe Pi Hut PCB Switches
PCB screw terminals5Different sizes can be used for inputs vs outputsPCB screw terminals
IRLB8721 MOSFET3Alternative: IRL520The Pi Hut MOSFETS
12V LED light strip3Alternative: Model railway lightingAmazon UK - 12V LED light bar
12V power supply1Minimum 2ACPC 12V 5A power supply
2.1mm jack to screw terminal1 The Pi Hut DC 2.1mm to screw terminal
DC-DC boot buck converter1Ensure a 5V for powering a PicoThe Pi Hut 5V buck-boost converter
Dual male header pins1Cut down to 3x2The Pi Hut 40-pin male headers
20-pin female header pins for Pico2Or cut-down larger stripsEbay 20pin female headers
20-pin male header pins for Pico2Or cut-down larger stripsThe Pi Hut male headers
Alternative 5V LED lights
5V LED COB light strip3Alternative to 12V lightsThe Pi Hut 5V COB LED light strip
5V power supply1Alternative power supply for 5V lightsThe Pi Hut 5V 4A power supply

You will also need some wires and solder.

If using a battery or a different power supply without over current and short circuit protection then it is strongly advised that an inline fuse is used.

Raspberry Pi Pico LED Lights Control Plus!

The Pico Lights Plus is an expanded version of the light controller. Featuring extra breakout ports for sensors and other inputs and a NeoPixel (RGB LED) status. It also includes a PCB mounted fuse for additional protection.

It is mostly compatible with the earlier version, but there are a few changes to the wiring, including the ordering of the outputs and the additional status LED.

Schematic diagram - Pico Lights Plus

Electronic Schematic Diagram Raspberry Pi pico lighting controller for 5V to 12V LED lights

Click the image for a larger version.

The LED outputs are controlled by GPIO pins 18, 19 and 20. These control a MOSFET which can switch a high load. The MOSFET used in the diagram is the IRLB8721PBF, but could also use other N-channel power MOSFETS. For example this would also work with an IRL520N or an IRLB8721. The choice of MOSFET is mainly down to availability, but check the datasheet for your preferred MOSFET to see that it is within the appropriate voltage and current limits.

The corresponding LED outputs are on GPIO 10, 11 and 12. You need to ensure that any code that is used to control the LED outputs also activates these LED outputs.

The NeoPixel (WS281x RGB LED) is connected to GPIO2. There is no buffer between the Pico and the NeoPixel. This is outside of the design spec for the NeoPixel, but should not be a problem with the NeoPixel being so close to the Pico. This may become a problem if you have a long wire between the PCB and the NeoPixel data in pin, but should work in most situations.

There are three potential divider configurations connected to the three analog inputs. These can be used with variable resistors such as light dependant resistors paired with a fixed resistor.

PCB - Pico Lights Plus

The PCB is designed for flexibility rather than size. Whilst it is fairly big, for most uses of the board that is not an issue: for use with camping light automation then the enclosure needs to be large enough for the buttons and for model railway use it can be hidden under the base board. It is instead designed for maximum flexibility (with lots of headers for external components) and to make testing easier with onboard buttons and status LEDs. This also makes it good for educational purposes.

Raspberry Pi Pico Lights controller PCB 3D image

Camping lights with Pico Lights Plus

The camping lights includes a custom designed enclosure, created in FreeCAD.

The enclosure is not designed to be waterproof, but does use waterproof connectors so that the lights can be mounted in a tent or somewhere that is open to the elements. The lid is held in place using screws and knurled nuts which are sunk into the enclosure using heat.

The waterproof light connectors use different connectors depending upon where they cannect. I used Pro Elec connectso which are rated as IP68. These are shown in the diagram below:

Pico Lights Plus - LED camping lights with connector information

  • PELR0121 - inline socket - power supply to control box
  • PELR0142 - panel mount plug - input to control box
  • PERL0149 - panel mount socket - output from control box
  • PELR0114 - inline plug - connection to LED lights

There is also an extension lead which uses:

  • PELR0114 - inline plug - connect to control box output
  • PELR0135 - inline socket - connect to LED light

For some of the connectors with small wires (eg. to the LED lights) then I did add a grommit inside the connector to help clamp on the wire. This was 3D printed using TPU flexible filament.

More information

To see future updates please:
Subscribe to the PenguinTutor YouTube Channel
Follow @penguintutor on Twitter

Previous Pong Video Game
Pong Video Game
Next Pico LED Reaction Game
Pico LED Reaction Game