Cute Solar Power Gauge Brightens The Day

A small gauge showing power generated by a house's solar panels.

What’s the first thing you want after installing solar? All the sunshine you can get, of course. Especially if you did it in the wintertime. And what would be more fun than monitoring your power generation, especially leading up to the equinox, or start of spring? Probably not much, especially if you built a cute solar power gauge like [Ben] did to keep him from obsessively checking his phone.

At the heart of this build is the affordable Seeed Xiao ESP32C3, which controls an equally cost-effective automotive stepper via an L293D H-bridge driver. Then it was just a matter of hooking it into Home Assistant. As power is generated by the solar system, the cute little sun on the gauge rises and shows the kilowattage gained.

Unfortunately there’s no real data sheet for the stepper, so [Ben] opted to use the 5 V from the USB that’s powering the ESP32. However, it seems like this might not be enough power because the gauge appears to drift a bit. To fix this, [Ben] runs the stepper_init script twice a day, which cranks the dials all the way forward then all the way backward before settling on the last known value.

Are you interested in solar? Here’s how you can build a small power system.

5 thoughts on “Cute Solar Power Gauge Brightens The Day

  1. Those steppers do not need an H-bridge. They can be driven directly from microcontroller GPIO pins. Or there is a custom driver chip if you must. In regards to documentation, there is quite a lot out there if you know what to look for. Most of these motors are clones or derivatives of the Switec X25.168. Just follow your nose.

    1. Yup. Even a 3V3 microcontroller is sufficient, as they are intended for low inertia, balanced mechanical load, like an indicator needle.

      THe only advantages to the dedicated controller are current sense for homing and direction pulse control.

      I generally drive them directly, though, and use a 6-value lookup table. Most common problem people have is not reading the docs closely and trying to drive them like a conventional stepper. They will lose synch. They have a six state cycle, not four (or eight, with half steps) like normal steppers.

      1. Ah thanks both! This makes sense. Admittedly I didn’t look beyond the sheet provided on Adafruit which is just a schematic. I’d probably have to write a driver for this to run it from esphome, maybe I’ll look into doing that.

  2. A tenant of mine on a remote property has a small panel connected to an analogue meter that has a semi circle instead of a needle. It has a similar look. I am not sure how useful it is but certainly a much simpler option. He has had it since solar panels were just starting to get used for remote power.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.