DIY Sunrise Alarm Clock for $20 (Raspberry Pi + LED Strip)
The Philips Hue Wake-Up Light costs $180. This one costs $20 and it's better — because you built it yourself and you can make it do anything.
In this guide you will wire up a Raspberry Pi Pico W with a WS2812B LED strip and write the firmware using SuperBuilder. No prior hardware experience needed. No Python expertise required. You describe what you want, SuperBuilder generates the code, and you flash it.
Want the complete code without reading the whole guide? Comment SUNRISE on the YouTube video and I'll DM you the link — or drop your email at the bottom of this page.
What You Are Building
A bedside lamp that:
- Wakes you up with a 15-minute sunrise simulation — starts deep red, transitions through orange and yellow to full white
- Connects to WiFi so you can set alarms from your phone
- Runs a tiny web server so any browser on your local network can control it
- Costs under $20 in parts
Parts List (~$18 total)
| Part | Where to buy | Cost |
|---|---|---|
| Raspberry Pi Pico W | Amazon / Adafruit | ~$6 |
| WS2812B LED strip (60 LEDs/m, 0.5m) | Amazon | ~$5 |
| 5V 3A USB-C power supply | Amazon | ~$5 |
| Jumper wires (3 pins) | Any electronics kit | ~$1 |
| Small project box (optional) | Amazon | ~$2 |
The Pico W has built-in WiFi — no extra modules needed. That is the key ingredient that makes this project possible for under $20.
Wiring (5 minutes)
The WS2812B strip needs only 3 connections to the Pico W:
That's it. No resistors, no capacitors, no soldering if you use a strip with a JST connector.
Setting Up SuperBuilder
If you don't have SuperBuilder installed yet:
- Download from superbuilder.ai
- Open it and create a new project — call it
sunrise-alarm - Make sure you have a
main.pyfile open (or ask SuperBuilder to create one)
SuperBuilder runs Claude Code under the hood, which means you can describe hardware logic in plain English and get working MicroPython back.
Step 1: LED Sunrise Simulation
Open a chat in SuperBuilder and paste this prompt:
SuperBuilder will generate something like this:
Test it: flash this to your Pico W using Thonny or mpremote, run sunrise_sequence() in the REPL. You should see the strip slowly wake up.
Step 2: WiFi + Alarm Scheduler
Now tell SuperBuilder:
SuperBuilder will wire together the async web server and alarm loop. The HTML page it generates is basic but functional — any phone on your WiFi can set the alarm by visiting the Pico's IP address.
Step 3: Config File
Create a config.json next to main.py:
SuperBuilder will also handle syncing time via NTP so the Pico knows what time it is after reboot.
Step 4: Flash and Run
- Copy
main.pyandconfig.jsonto the Pico W root using Thonny ormpremote cp - Reboot the Pico (
machine.reset()or unplug/replug) - Open the serial monitor — you will see the WiFi IP address printed
- Visit that IP from your phone browser
- Set an alarm time
That's it. The alarm will trigger tomorrow morning.
Vibe Coding Moments in This Project
If you follow along, you will hit two moments that show why SuperBuilder makes hardware projects accessible:
Moment 1 — the LED math. Interpolating colors and syncing LED count to time elapsed is annoying to write by hand. SuperBuilder generated clean, readable lerp code in one shot.
Moment 2 — async on a microcontroller. Running a web server and checking the alarm time and animating LEDs simultaneously is what uasyncio is for. It's not obvious how to structure this if you've never done async MicroPython. SuperBuilder got it right without you needing to know the library.
This is vibe coding for hardware: you describe the behavior, the AI handles the implementation details.
Going Further
Once you have the base working, here are natural extensions to try with SuperBuilder:
- Sleep sounds — add a small speaker (PAM8403 module, ~$2) and play white noise or rain
- Gradual alarm — instead of a fixed alarm time, make it read your calendar via Google Calendar API
- Telegram control — set alarms by sending a message to a Telegram bot
- Fade-out button — a physical button on GP1 that pauses the sunrise and lets you snooze
- Neurosity integration — if you have a Crown headset, trigger the sunrise based on sleep stage data from the EEG (this is a separate guide)
Get the Complete Code
The code above is the core logic. The full project includes:
- Complete
main.pywith WiFi, NTP sync, async server, and alarm logic config.jsontemplate- Wiring diagram image
- Thonny setup instructions for Windows and Mac
Comment SUNRISE on the YouTube video and I'll DM you the link directly — or drop your email below and I'll send it to your inbox.
FAQ
Do I need to know Python? No. SuperBuilder generates all the code. You just need to be able to copy files to a microcontroller, which Thonny makes point-and-click.
Will this work with a regular Raspberry Pi (not Pico)?
Yes, but you'll write Python instead of MicroPython, and use a different LED library (rpi_ws281x). Tell SuperBuilder you're on a Pi 4 and it will adapt the code.
Can I use a different LED strip? WS2812B (also sold as NeoPixel) is the easiest. SK6812 also works. Avoid APA102 strips for this project — they need an extra clock wire.
My LEDs are flickering. Add a 300–500 ohm resistor between GP0 and DIN. Also make sure the strip's power and the Pico share a common ground.
How do I make it brighter?
Use a 1-meter strip at 60 LEDs/m instead of 0.5m. Scale NUM_LEDS to 60 in the code. Tell SuperBuilder "update for 60 LEDs" and it will adjust.