I'm building a battery powered device with a pi zero. The battery is a 3.7v LiPo w/ 2000mAh.
I want to be able to safely shutdown and restart the pi using a single switch or button. (preferably button because I'm using adafruit's pitft which has 4 buttons built in)
It's no problem to bind one of those buttons to run
sudo halt, but my questions are these:
- Is the power usage low enough that the battery would last for around a week halted?
- In this thread, one user posted:
I did some measurings with the Zero.
When attaching power without card inserted the board first draws 27mA and
then after a couple of seconds it goes up to 56mA (waiting for usb boot?)
When holding board in reset by shorting the RUN pins it draws only 2.7-3mA(!)
When fully booted into raspbian lite with hdmi on it draws 99mA
after running 'tvservice -o' it draws 79mA
after sudo poweroff it draws 22mA
So, why does holding the reset decrease the power usage more than halting, and is this a safe/better way to leave my system?
- Is there a "proper" way to do this that I'm missing? I've seen elaborate builds for safe power buttons, but they all seem rather gimmicky.