LED Lighting Controller
This is a custom controller for LED strip lighting.
Overview
The LED lighting I used for this project only supports a few basic colors and brightnesses with the
out of the box controller. I wanted to add more customizability -- more colors, more choices for
brightness (especially at dim values), ability to fade between colors over time, and ability to
control the two strands independently.
Components
There are two strands of LEDs, powered by a 24V DC power supply. The controller is built on a PCB using a raspberry pi
pico W.
Control Hardware
The LEDs have a separate red, green, and blue component, each of which has its own wire. They also each
have a single +24V wire. I used the 24V supplied by the factory controller, connecting that to the
common anode. I then connect all six of the color wires to the power supply GND using NPN BJT
transistors. By connecting the base of the transistors to output pins of the Pico in PWM mode, I can
precisely control the percieved brightness of each of the RGB channels. The connection on the LEDs to
the factory controller was a standard 1x4 header, so it was easy to directly attach the LEDs to the
PCB. In addition to the controls for the strip lighting, there are also 10 indicator SMD LEDs on
the controller board. Currently eight of these are used to show the last eight bits of the local IP
(the IP is not static). These indicators are directly connected to the digital output pins of the
Pico, with option to either install a resistor in series or short them directly to ground.

Circuit diagram for one strand of the LEDs.
Control Software
The controller runs on mircopython. See the full code
here.
It supports setting the color and brightness using either HSV or RGB mode. It also enables you to
select two colors to fade between repeatedly, and the duration of the fade.
In addition to the webpage, all of the options are also accessible through a simple API, allowing
me to create 'shortcuts' and control the lights with the Siri voice assistant.
Design and Production
I designed the PCB in Kicad 7.0, and had the boards manufactured by JLC PCB.
Demo
Possible Future Additions
These are some additions I am considering requiring extra hardware, and minor revisions to the PCB.
Voltage Divider
The controller currently requires two power sources - the 24V for the LEDs and a 5V USB Mini to
power the Pico. The Pico supports being directly powered by two of its pins.
I would like to look into using a simple voltage splitter to generate the 5V from
the 24V source, so that only the 24V cable is needed.
Audio Response
Adding a microphone to the controller would enable it to change colors or fade in sync with music.
Ambient Light Sensor
Another addition I may make is attaching an ambient light sensor to detect when the room is illuminated
brightly by sunlight or incandescent lighting.