I recently got a Raspberry Pi Zero 2 W.
I’m hoping to set up a circuit (with attached solar panel and battery) to activate at regular intervals to preform a servo motor movement. I’m not sure how often I can make the activation, as I don’t know the power draw of the board or movement, or how fast the solar panel will charge the battery. I hoping there is a way to measure the power draw of the board and attached circuit, along with the battery level, over an extended time frame and in an automated manner. Is this possible?
Thanks for your time.
Edit: Addional info:
- This would be likely a one off characterization.
- I would like time series data over several days or longer.
Certain BMS (battery management system) circuits track the power draw and remaining charge, that could be an option?
I often just look at the battery voltage, if it’s below some limit then it goes right back to sleep to save power, it’s quick and dirty, but you loose out on a lot of the battery capacity (battery voltage only roughly correlates to remaining charge)
Are you talking about just characterizing one unit one time? How long is “extended?” Do you want time series data or just an average?
For a very simple setup, I’ve used current measurement on a DMM in average mode for ~30 minute durations before.
Thanks for your thoughts. For your questions:
- Yes, this would be likely a one off characterization.
- I would like time series data over several days or longer.
A couple suggestions then:
- I have a LabJack that I use for things like this. I’d put a sense resistor on the high side, tie that into one of the differential inputs, set up the (admittedly awful) software, and boom I’d have battery voltage and current over time. But that’s several hundred dollars.
- Instead of that, you can homebrew a pretty similar thing.
- Either use your Pi or a separate Arduino to read voltages. Store it in a file or send it to a host PC over serial every [1-3600] seconds
- You could get a module like this one to capture everything digitally
- Or you could do it the analog way
- Probe battery voltage with an appropriate resistor divider
- Probe current with an INA169 or similar
- If you are using a BMS, that could give you net power flows in/out of the battery. But you won’t know from that alone whether your solar setup is functioning well or your power draw is low (for example)
- For battery state of charge, you could worry about coulomb counting and fancy algorithms. I’d just use voltage. But know battery capacity is not linear with voltage (refer to charge/discharge curves).
- For full understanding of inflow/outflow, you’d want a current monitor at both the solar cell side and the load side of the battery.

