The What
This is about a controller for the lights in our front yard: Hedge, East Drive, Stairs, West Drive, Globes, and a Spare zone because there's always a next idea. About 24 lamps and roughly 50 W, so the 12 V 10 A supply is loafing along at under half load.
It all lives open on a 12" × 12" board on the garage wall where the zone wires come in. The brains are an ESP32-S3 running ESPHome, each zone gets its own XY-MOS board (a cheap MOSFET switch), and there's a fuse block, a little buck converter for 5 V, a round 1.28" GC9A01 display and a plain rotary knob poking through a plexi cover.
Done and on the wall. Brains bottom left behind the plexi.
The large black wires to the left are those that come in from the garden - I had those put under the driveway when it was paved.
The Why
The old one (V2) was an ESP32 with 4 zones and 4 on/off buttons. Not enough zones once the hedge and globes went in, no dimming by hand, no idea what was on without pulling out my phone, and it had dropped off Home Assistant anyway. I wanted every zone dimmable, one knob for everything, a screen that shows me what's going on, and the whole thing in HA so automations can run the show.
How it went
I ran it in phases and reviewed each one before starting the next. Sounds formal for a garage project. It saved me at least twice.
Bench test first. Before a single wire went on the board I put every lamp type on the bench and dimmed it with PWM. All five types passed, no flicker, no buzz. But the in-ground lights that say 5 W on the box pull about 1 W, and all their visible dimming happens in a tiny window at the very bottom. The VEVOR driveway lights look full brightness by about a quarter power.
Hardware. A quick word about the bench. Any self-respecting electronics DIYer has a messy lab. Often. Mine is no exception, and this project hit peak mess more than once.
12 V goes through the fuses to the XY-MOS boards, and each board switches the minus side of its zone.
Zones share fuses in pairs, but the controller gets the 4th fuse all to itself, so a shorted lamp in the garden never kills the brains. Power runs on real wire, not on my homemade protoboard "manifold", which only carries the signals. And the signal ground and the power minus stay separate until they meet at the supply.
.
Then I powered it up and... black display. Bad solder joint. Later the display died again (different joint), and the knob did nothing at first (loose solder). Reflow first, theorise second.
Firmware. I really like the round TFT displays. Each zone is a bar on the round screen that fills yellow with brightness, with the time and outside temperature in the middle. It started out green with black text, which looked terrible on the real panel, so now it's a black face, white text and faint grey bars.
The knob took four tries. Where it landed: turn to dim the zone under the solid red dot; click and the dot goes hollow so you can move it; stop on a zone for a second and it's yours (the bar blinks once); hold the button to turn it off. After an hour of nobody touching it the screen goes black, and the first twist just wakes it. Version one had double-clicks and timeouts. Clever on paper, annoying in the hand.
Tuning. Here's where the bench test paid off. The Hedge slider now maps into that tiny window (about 0.4 % to 3.5 % power), so 5 % is a steady dim glow instead of nothing. The driveway lights got a curve instead of a straight line, because each step you can see takes about 2.5× more power than the last. Now 50 % looks like 50 %.
Install. Up on the garage wall, Wi-Fi still happy, moved over to my real Home Assistant, sliders on my dashboard, the 11:15 PM "house goes to bed" automation pointed at the new zones, and every trace of V2 deleted.
Concepts worth knowing
Compiling "off-line". I edit the ESPHome config on my Raspberry Pi, where it's all in git, but compile on my Mac and push it over Wi-Fi. Compiling is slow on a Pi and hard on its SD card, and you never do it on the HA box itself. Keep the ESPHome versions matched on both.
PWM dimming, and why the slider lies. PWM is flicking the power on and off really fast, and more "on" time means brighter. But your eye sees brightness, not power, and cheap LED lamps have their own drivers inside, so 50 % power almost never looks like 50 %. Measure, then map the slider.
Low-side switching. The XY-MOS boards switch each zone's minus wire off a 3.3 V signal from the ESP, and hold the zones off while it boots, so the lights don't flash on every restart.
Lessons learned
- Bench-test the actual lamps first. And labels lie (the "5 W" ones are 1 W).
- A dead display is a solder joint until proven otherwise.
- Judge a UI on the real hardware, and keep the controls simple.
- Some problems are fine as a note. After a long power cut the ESP sometimes needs a poke of the reset button. Two capacitors didn't fix it, and power here rarely goes out that long, so it's a known quirk, not a project-stopper.
- Retire the old system the same day, or its automations and dead entities hang around forever.
Parts list
| Part | Qty |
|---|---|
| UICPAL ESP32-S3-N16R8 dev board | 1 |
| XY-MOS MOSFET module (AOD4184) | 6 + 2 spare |
| 12 V 10 A supply, 4-way blade fuse block, 3 A fuses | 1, 1, 4 |
| Mini 560 buck (5 V), GC9A01 round display, raw 5-pin rotary encoder | 1 each |
| Barrier strips (12- and 8-position), protoboard, plexi, 12" × 12" board | on hand / 1 bought |
What's next
Automations, now that the lights are going in: on at sunset, something nice later in the evening, off for the night. And figuring out what goes on that spare zone
Even more Lessons Learned
- I want to drop screw terminals all together and I am going to try a series of WAGO splice connectors - I may even rebuild this version just for that.
- When I tried connecting the globe lights (from a company called Glo) they needed correct polarity and I somehow swapped ± causing a fuse to blow. Well that may have blown the chip on the globe because while it works in bright mode, unlike the second one it does not twinkle. - check polarity carefully.