A Sun and Moon Play Peek-a-Boo in Ben Krejci's Home Assistant-Linked Solar Power Gauge

Powered by an Espressif ESP32-C3, this ESPHome-based 3D-printed readout provides a screen-free way to monitor solar generation.

Software engineer Ben Krejci was looking for a way to track a solar generation system's output that didn't involve staring at yet another screen — so built a 3D-printed physical gauge instead.

:My wife and I got solar this winter and my excitement about our power generation grows with our proximity to the equinox. To keep me from obsessively checking my phone, I build this esp32-powered dial to put on a shelf in our living room. It shows the current kW [kilowatt] output for our solar system with a cute rising sun and some numbers."

The gauge itself is 3D printed, with a cut-out in its housing showing an inner disc marked with a sun and a growing bar from 0kW to 10kW. Should the gauge be displaying the 0kW mark, a crescent moon peeks out from the other side — while the sun, understandably, disappears.

Inside the housing is a Seeed Studio XIAO ESP32C3 development board connected to an Adafruit stepper gauge via an L293D H-bridge driver, with the ESPHome firmware connecting to a Home Assistant system to retrieve the solar generator's output. "The stepper gauge does not have a real datasheet nor specify a voltage, so to keep things simple I'm just using the 5v from the USB powering the [Espressif] ESP32 board," Krejci notes.

"I suspect this is not quite high enough," Krejci continues, "because over time, the gauge seems to drift due to skipped steps. I played around with stepper speed, but it always seems to have this problem. My fix is to run the 'stepper_init' script twice a day, which just turns the dial all the way forward and then all the way backward before going back to the last known value. (I've seen my dashboard gauge cluster dials do this when I start my car)."

Full details on the project are available on Krejci's blog, with configuration code on GitHub and 3D print files on Thangs under an unspecified license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles