Class 5 · Backplate and mount¶
Everything works on the bench. Today it becomes one object on the wall: a disc behind the clock, standing off the wall on spacers, with the strip around its back edge shining onto the wall. The ESP32, the DS3231 and the supply wiring move onto the back of the plate, and the whole thing runs from one plug.
By the end of class
The clock lamp hangs on the wall from one plug, the clock runs, and the halo lights the wall behind it.
New parts today¶
| Part | What it's for |
|---|---|
| Backplate disc (plywood or acrylic) | Holds the clock in front and the electronics behind |
| Spacers, 2–4 cm | Hold the plate off the wall so the light can spread |
| Hanging hook | Holds it on the wall |
| USB-C lead (pigtail) | 5 V from the supply to the clock |
Plan it first¶
Sketch the back of the plate before you cut or drill anything. On the sketch:
- The disc. Bigger than the clock, so the halo shows around it. Start from the ring's outside diameter you measured in Class 1; add a few centimetres all round.
- The strip. Around the back edge, LEDs facing the wall (or facing out from the edge, angled back). Measure the disc's circumference (π × diameter) and work out how many LEDs fit at 60 per metre. That's your new
NUM_LEDS. The strip can only be cut at the marked cut lines. - The spacers. 2–4 cm. Further from the wall spreads the light wider and softer; closer makes a tighter, brighter ring. Try both by holding the plate against the wall with the strip on before you commit.
- The boards. ESP32, DS3231 and level shifter near the centre, where the clock hides them. Leave the ESP32's USB port reachable, so you can still upload.
- The wires. Where the plug comes in, where the USB-C lead goes to the clock, and how the cable leaves the wall.
Build it¶
Moving from USB power to the supply means the ESP32 is now powered through its 5V (VIN) pin. The DevKit's regulator turns that into 3.3 V.
| From | To |
|---|---|
| Supply + | Strip 5 V (the strip's own lead) |
| Supply − | Strip GND (the strip's own lead) |
| 1000 µF | Across the supply terminals, stripe (−) to − |
| Supply + | ESP32 5V / VIN pin |
| Supply − | ESP32 GND |
| Supply + / − | USB-C lead to the clock's RP2040-Zero |
| Supply + / − | 74AHCT125 pins 14 / 7 |
| ESP32 GPIO 25 | 74AHCT125 pin 2 → pin 3 → 330 Ω → strip DIN |
| ESP32 GPIO 21 / 22 | DS3231 SDA / SCL (VCC to 3V3) |
The level shifter's unused pins stay as in Class 2 (OE pins 4, 10, 13 to 5 V; inputs 5, 9, 12 to GND).
Check the labels before you connect
Look at your DevKit for the pin marked 5V or VIN. Do not connect the supply to the 3V3 pin: 5 V there destroys the board. For the USB-C lead, use the multimeter to find which wire is + and which is −; don't trust the colours until you've checked.
Laptop and supply at the same time
Unplug the supply's wire to the ESP32's 5V pin before you plug the laptop's USB cable in to upload, and plug it back after. Keep the grounds connected. That way two supplies never fight over the same 5 V line.
- Move the level shifter, resistor and DS3231 from the breadboard to a small perfboard (ask Dr. Alvear which one), soldered. A breadboard on a wall works loose.
- Wire the supply connections with thick enough wire: the strip's own power leads are a good guide. Jumper wires are not for amps.
- Stick the strip around the edge and glue down its end. Bring the power and data wires in at the start of the strip.
- Fix the boards to the back with screws, standoffs or double-sided foam tape. Nothing should be able to touch a metal hook or screw.
- Tie the wires down along the back with cable ties or clips. No loose loops that can catch.
- Mount the clock on the front so its base and the USB-C lead are hidden.
- Fit the spacers and the hanging hook. Check it hangs straight before the electronics go in for good.
Mission 1 · Plan and cut
Make the sketch, show it to Dr. Alvear, then cut and drill the plate. Set NUM_LEDS for your edge and re-check your power budget with the new number.
Done when
The plate is cut, the clock sits on the front, the plate hangs straight on the wall with the spacers, and your build log has the sketch and the new budget.
Mission 2 · One plug
Move all the electronics onto the back, wired to the one supply. Plug it in and run the lamp with no laptop connected.
Done when
From one plug, with no laptop: the clock ticks, the strip lights the wall, and your phone opens the settings page. Check with the multimeter that the 5 V line is still above 4.75 V with the strip at MAX_BRIGHTNESS.
Mission 3 · It survives on the wall
Hang it. Set a test sunrise a few minutes ahead from your phone and watch the full schedule cycle on the wall. Then set the real schedule and leave it running overnight if you can.
Done when
The test sunrise runs on the wall at the time you set, and nothing is warm to the touch after 10 minutes at full brightness (supply, wires, the strip's first LEDs).
If you finish early¶
- Put a small switch or button on the side that turns the light on or off by hand. (
INPUT_PULLUPand yourwasPressedpattern from earlier in the year.) - Hide the power cable along the wall with a cable cover.
- Try a diffuser: tape paper or frosted plastic over the strip and compare the halo with and without it.
Sign-off with Dr. Alvear
- Wiring checked: supply on 5V/VIN (not 3V3), capacitor polarity, no loose wires
- Runs from one plug with no laptop
- Hangs straight; test sunrise works on the wall
- Build log updated (photo + two sentences)