A quick guide to running a solar microcontroller with no battery

Nov 05, 2026 Last reply: 21 hours ago 5 Replies
Jump to replies (5)

Been down this road with a weather station build, so here's what I learned. Yes, the concept works, but the weak spot isn't the panel size, it's the converter. A cheap buck module ussually needs a few volts above its output to regulate properly, and a bare panel drifting in and out of full sun can dip below that fast. When the converter drops out, the microcontroller browns out and reboots in a loop, which looks exactly like a broken board. Add a big capacitor across the input side, think supercapacitor territory, and it rides thru those dips like a tiny battery without the charging circuit headaches.



Second thing people skip: put a voltage divider on a spare analog pin and watch the panel voltage in your code. If it sags below your threshold, delay the risky stuff like writing to flash, and resume when the sun's back. Costs almost nothing and saves your filesystem. Last tip, oversize the panel way more than feels reasonable. My rule ended up being roughly triple what the average math said I needed, since morning and evening output is a fraction of the rating even on a clear day.


Ran a solar-only setup for a couple years on a gate sensor at the end of my driveway, and the brownout loop was exactly my first problem too. Mine turned out to be even dumber though. The cheap converter I used had a trim pot on it and the panel sag was fine, but cold mornings dropped the panel voltage enough that the converter couldn't hold the ESP32 up. Moved to a panel rated well past what I needed and it mostly went away. I also found the micro would brown out before the cap trick kicked in if I powered the radio at the same moment, so I stagger my init code now, radio comes up a second after boot. The divider idea is solid, I do something similar but I watch the voltage rail after the converter instead of the panel side, since that's the number the chip actually cares about. One thing I'd add for anyone doing this on a gate or outdoor box: condensation inside the enclosure killed one of my boards and I blamed solar for weeks before I figured it out.

Been running solar-only on a pond level sensor for about four years now and the thing that bit me wasn't voltage at all, it was shade. One overhanging branch knocked output down way more than I figured a little dappled light would. Trimming that back did more than any converter swap. Other habit I picked up from the old days of flaky mains power: write your code like the lights can go out at any second. Save state early, keep the sketch happy to restart from scratch, and a brownout becomes a non-event instead of a crash.

Gotta push back on the big cap on the input side fixing things though. If the panel voltage actually sags below what the converter needs to run, no amount of capacitance saves you, the cap just delays the reboot by a second or two. Mine would brown out anyway on cloudy afternoons untill I stopped trying to brute force it with caps and lowered the load instead. Dropped the micro to sleep most of the time and the problem basially vanished. A cap only papers over the short dips, it can't conjure watts that aren't there.

Same experiance here with the caps not being a magic fix. I had a soil moisture node that kept rebooting every time a cloud passed and the cap just stretched the outage out. What actually solved it was cutting the duty cycle hard, only waking the board every few minutes and killing the status LED entirely, wich I hadn't realized was pulling a surprising chunk of the budget. After that the converter held regulation even in pretty marginal light. Also second the shade poster on checking the panel at the actual mounting spot, mine measured fine on the bench and then turned out to catch a reflection off a fence for an hour each afternoon.

Update: fair point on the cap only stretching the outage, that matches what I'm seeing now. It rides through short cloud shadows fine but a long overcast stretch still drops the board. Killing the LED and stretching the sleep interval like the soil moisture post suggested made reboots way less frequent though. Question for the pond sensor person: once you cut back that overhanging growth, did the shade stay gone or has it crept back?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required