BUILD WITH A MICROCONTROLLER

Make a light glow.

Then make it your favourite colour.

A Pico, an LED strip and three wires. Your USB cable powers the board and the lights. Build with an adult who can help prepare the board and check the connections, then choose a colour and make it yours.

A WORKSHOP IN PROGRESS

KajLights is in early testing, with bugs and gaps still to find. Before buying hardware, your helper should check the firmware catalogue: if there is no suitable download, setting up a board currently needs developer tools.

1 / GET READY TO MAKE SOMETHING

Gather the parts.

USB powers the board and lights. The Pico sends colour instructions to the first pixel, which passes data along the strip.

For your adult helper: buying and preparing the board

Use Raspberry Pi’s retailer finder and choose the exact model. A Pico W and Pico 2 W need different firmware. For alternatives, use the hardware guide and that model’s pinout.

Prepare this before the activity. Follow Set up a device if a suitable approved build is available. Otherwise, the Pico 2 W developer guide requires a local build environment. For a Pico 2 W UF2, hold BOOTSEL while connecting USB and copy the file to the RP2350 drive. Experimental installs may erase earlier work.

In the LightVM editor, connect over USB and open Configuration. Set up a WS2812B output on GP16 with the actual pixel count and the strip’s colour order (commonly GRB). Set a brightness limit to suit your USB source and strip. Save it and try a steady colour. Desktop Chrome or Edge supports the browser USB tools; use a data-capable cable.

Choose 5 V RGB pixels, not RGBW or a non-addressable strip. Check the available USB power and the rating of the cable and connections, allowing for both Pico and LEDs. A moving pattern and all LEDs at full-white brightness can need very different amounts of power. Keep full-white tests within that budget; the brightness setting is not an electrical current limiter. Use the power upgrade when the project needs more than USB can supply.

2 / THREE WIRES, THEN USB

Connect the Pico straight to the lights.

Leave USB unplugged while you connect the wires. Use the input end of the strip: its arrows point away from the Pico.

  1. VBUS → 5V: power for the lights.
  2. GND → GND: the return path for power.
  3. GP16 → DIN: the colour instructions (“data in”).

Check the three wires with your helper, then plug the Pico into your computer. One USB cable powers the whole build.

Computer connects to Pico 2 W by USB. Three wires connect the Pico to the LED strip: VBUS to 5 V, GND to GND, and GP16 directly to DIN. USB supplies the power for both board and strip.
The USB build: red is power from VBUS, grey is ground and teal is data. Purple is the USB cable. This shows connections, not physical pin positions. Open the quick diagram at full size ↗

Power makes it shine. Data chooses the colour.

Trace the power path from USB through VBUS to the strip. Now trace the data path from GP16 to DIN. When you choose a new colour, the Pico changes the data it sends.

Helper’s wiring check: finding the right pins

On a Pico 2 W, VBUS is physical pin 40, GP16 is pin 21, and GND is available at several pins, including pin 23. Check the official Pico 2 W pin diagram: GP16 is a signal name, not physical pin 16. Keep the data lead short.

Quick Pico 2 W connections
FromTo
Pico VBUSLED strip 5 V input.
Pico GNDLED strip GND.
Pico GP16First LED DIN, directly.
Pico Micro-USBComputer, for power and data.

Use VBUS for the LED power wire, not VSYS or 3V3. VBUS takes power directly from USB; VSYS is after a diode that drops some voltage. The LEDs do not draw their power through the Pico’s 3.3 V regulator. VBUS still shares the USB source’s power budget. Unplug USB before changing wires, and check for loose connections or shorts.

3 / MAKE IT YOURS

Pick a colour. Make it glow.

Once your helper has prepared and connected the board:

  1. Open the lighting editor. In Python’s Examples… menu, choose color.py.
  2. Choose your connected LED output and press Preview on device. Your lights should show one steady colour.
  3. Open Preview settings & inputs, then What controls this animation?. Click the colour swatch, pick a new colour and preview again. Can you make your favourite colour?

You made a computer change something in the real world. Now give it another job.

Keep what you made

Use Save locally before closing the editor. This keeps your editable work on your computer. Your helper can deploy the animation and configure a device preset and startup behaviour when you want the board to keep running it. The workspace guide explains those controls.

WHAT WILL YOU MAKE IT DO?

Give your lights a job.

Invent a signal

Choose one colour for “come in” and another for “busy”. Tell someone what they mean, then see if they can read your signal.

You have used colour to carry a message. Both people need to agree what the colours mean.

Make it move

Open Learn with lights → Remember movement. Make a dot travel along the strip, then try reversing its direction.

The program remembers the dot’s position and changes it for each picture. What would make it move twice as fast?

Find the computer

Run an animation on the board, then close the browser tab while leaving USB plugged in. Predict whether the lights will stop.

The board has its own processor and memory. Once running there, the animation can continue without instructions from the browser.

EXPLORE POWER

Give the lights their own power.

For a larger or brighter project, you can power the LEDs from a separate 5 V supply. The Pico still decides what the lights do; the new supply provides their power. Your helper can choose a supply to suit the project.

This circuit also adds a capacitor at the strip’s power input. It stores a small amount of energy to help when the lights change brightness suddenly.

Unplug all power first. Remove the VBUS-to-strip wire. The new supply powers the lights instead; keep the Pico on USB. Join the grounds, but never join the new supply’s +5 V to VBUS.

Power upgrade: computer powers Pico by USB; GP16 still goes directly to LED DIN. A separate 5 V supply powers the LEDs, with a capacitor across their power input. All grounds join. The VBUS-to-LED wire is removed.
The colour instructions take the same route. Only the power wiring changes. Open the power diagram at full size ↗

Can the same strip need different amounts of power?

Predict which needs more: one dot travelling along the strip, or every light glowing together. Try both within the brightness your helper has checked. You changed the program — and changed what the circuit needs.

Helper’s power upgrade: parts and connections

Choose a ready-made enclosed, regulated 5 V DC supply and wiring rated for the intended LED load, including full white if that will be used. Fit a 500–1000 µF capacitor rated at least 6.3 V across the strip’s power input unless already provided: positive to 5 V, negative (striped side) to GND. It helps with brief power changes; it cannot make an undersized supply powerful enough.

  1. Disconnect USB and the new supply. Remove the VBUS-to-LED power wire.
  2. Connect supply +5 V to LED 5 V. Connect supply − / GND, LED GND and Pico GND together.
  3. Keep GP16 connected to DIN. Add the capacitor across LED power with the correct polarity.
  4. Check the connections. Turn on LED power before connecting Pico USB; disconnect USB before switching LED power off.

Keep the external +5 V off the Pico’s power and GPIO pins in this setup. Plan suitable connectors, wire sizes and protection; do not send a long strip’s current through breadboard contacts. Longer strips may need power at more than one point. The Adafruit power guide explains how to size and distribute power.

EXPLORE THE DATA SIGNAL

How does a pixel read the signal?

The Pico sends a rapid sequence of electrical pulses. Each pixel reads its colour from that sequence and passes the remaining data to the next pixel. The voltage and timing of the pulses let it distinguish the bits that make up the message.

Our first build connects the Pico directly to the strip. If a signal is misread, a light may show the wrong colour or flash. The experiments below explore how wiring and extra components can help it arrive clearly.

Why can a 3.3 V Pico talk to 5 V lights?

A pixel recognises a voltage above a certain threshold as “high”. Many pixels recognise the Pico’s 3.3 V signal, even when powered at 5 V. A level shifter raises that signal for pixels that need a higher voltage. Adafruit explores why direct drive often works.

Why can a long strip work, but a long lead cause trouble?

Each WS2812B pixel reshapes the outgoing data for the next one. The Pico has to reach the first pixel, rather than drive every pixel input at once. So a long strip is different from a long wire between Pico and first pixel. More pixels still need more power, and sending a complete frame takes longer.

Spot the difference: draw 30 closely spaced pixels. Now draw one pixel a long way from the Pico. Which drawing has the longer first data lead? The Worldsemi WS2812B datasheet describes the signal being reshaped at each pixel.

Want the numbers? An optional challenge with your helper

An older WS2812B datasheet specifies a high input of at least 0.7 × the LED supply voltage. At 5 V, that is 3.5 V. A nominal 3.3 V output is 0.2 V below that guaranteed level, even if a particular strip works. Other revisions and compatible LEDs have different limits: read the sheet for your actual parts.

The gap between a driver’s guaranteed high output and a receiver’s required high input is one part of its noise margin. “It worked when we tried it” is useful evidence; a design margin helps it keep working when conditions change.

WHEN THE RESULT IS UNEXPECTED

Find out what went wrong.

Pick one test. Predict what might happen. Change one thing, then check. Ask your helper before changing the circuit; unplug all power first.

Nothing lights up

Check that data reaches DIN, not DOUT, and that all grounds join. Check GP16, pixel count and the selected output in Configuration. Have your helper check power and the connections. Retry a steady colour at low brightness.

I asked for red and got green

Ask your helper to check the strip’s colour order in Configuration. Many use GRB rather than RGB. Change only that setting and try again. A colour mix-up is a different clue from random flashing.

The lights flicker or flash

Keep the same steady-colour program. Try a shorter data lead and check the ground connection. Then compare at a lower brightness. A brightness-related change is a clue to investigate power and wiring; it is not proof of the cause.

With your helper, compare direct drive with the level-shifter circuit below. Improvement points towards a signal problem, but it does not identify voltage as the only cause. Pulse timing, electrical noise, power dips and software can all be involved.

Helper’s investigation: power, voltage or timing?

Keep a short record: board, LED type, firmware build, pixel count, brightness, lead length and result. Compare one change at a time. Check the LED supply voltage at the strip under load. An oscilloscope at DIN, referenced to the LED’s ground, can reveal voltage levels, ringing and pulse widths. A multimeter cannot show those fast pulses; a logic analyser alone cannot establish the analogue voltage margin.

Compare pulse and reset timing with the actual LED datasheet and firmware output settings. Share the setup, the result and the changes you tried through the LightVM issue tracker.

TRY TWO SIGNAL COMPONENTS

Help the data reach the first pixel.

This version adds a level shifter and a resistor to the data connection. Follow the teal line in the diagram: the colour message takes a new path from the Pico to the first pixel.

Level shifter

Raises the data signal from 3.3 V to about 5 V, making a high pulse easier for a 5 V pixel to recognise.

Data resistor

Reduces sharp signal spikes. Put it close to the first pixel, where the data wire enters the strip.

Power and connections

The separate supply powers the LEDs and level shifter. They share a ground connection with the Pico so the signal voltages have the same reference.

Upgraded circuit: Pico GP16 to 74AHCT125 level-shifter input, its output through a resistor to LED DIN. The 5 V supply powers shifter and LEDs. All grounds join. The capacitor remains across LED power.
The separate-power build, with a level shifter and data resistor added. Compare the teal data path with the earlier diagrams. Open the upgraded diagram at full size ↗
Helper’s upgrade parts and connections

Add a 74AHCT125-based level-shifter module with supply decoupling, suitable for WS2812 signals, and a 330–470 Ω resistor. Check whether your interface already includes the resistor. Keep the separate supply and capacitor from the power upgrade, with VBUS disconnected from the strip.

  1. Unplug both supplies. Replace the direct wire with GP16 → module input → module output → resistor → LED DIN. Put the resistor near the first pixel.
  2. Connect the module’s 5 V supply input to the external 5 V supply and its GND to the shared ground.
  3. Follow the module’s pin diagram. If it exposes active-low OE (output enable), connect it to GND to enable the output; some modules already do this. Follow its instructions for any unused inputs.
  4. Check all connections, then use the same power-up order and the same test pattern. Compare the result.

The TI AHCT125 datasheet specifies a 2 V minimum high input at a 4.5–5.5 V supply. That is why this family can accept a 3.3 V signal and drive a higher output. A similarly named HC part or a slow bidirectional I²C shifter is not automatically a substitute.

For longer or permanent installations, plan the power wiring and connectors for the current, including suitable protection and power injection where needed. Do not put a long strip’s current through breadboard contacts. A level shifter is not a long-distance cable system: shorten the first lead or use a suitable LED data transmitter/receiver for longer cable runs. Start with Adafruit’s wiring guidance and the strip manufacturer’s instructions.

One last challenge: choose one added part. Tell someone what problem it helps with — and one problem it cannot fix.

RECOGNISE WHAT IS IN YOUR HAND

Meet the boards.

The Pico 2 W is our example. The other photos help you recognise supported alternatives; use their own firmware and pin guide. A similar shape does not mean the same wiring. Check the model printed on the board.

Photos are enlarged and not to the same scale. Raspberry Pi and Seeed Studio; image sources and licences.

USB socket

The silver socket connects the board to your computer for power and data. Pico boards use Micro-USB; these XIAO boards use USB-C.

Microcontroller

The processor and memory run the program. On a Pico the main chip is visible; on these XIAO boards it is under the metal shield.

Pads and headers

The rows along the edges connect to other parts. GP16 names a programmable signal; GND is ground. Fitted header pins make these connections easier to plug in.

RECOGNISE THE COMPONENTS

What do the components look like?

Component images: Raspberry Pi Foundation, CC BY 4.0. Sources and licences. These pictures help identify types of parts; the helper’s setup and upgrade notes specify the values to buy.

What will your next light do?

A secret message? A countdown? A signal from another room? Pick an idea, try a small version, and find out what you need to learn next.

More things to try →