Raspberry Pi running from Batteries

Read this first http://simon.fearby.com/blog/?p=2202

Parts:
1x Raspberry Pi Model 2B
1x MoPi: Hot-Swap Mobile Power for the Pi (Manual)
1x 12V18AH Sealed Lead Acid Battery from JayCar (Manual)

1x 2 Watt 12 Volt Solar Panels – Amorphous 2 Watt 12 Volt Solar Panels – Amorphous

Read this post to see how my pi is configured and setup.

The Pi is running a public facing website here: http://sipi02.fearby.com

Step 1: Running on battery.

This is my battery and pi on my work bench.

PiBattery01

This is a close up of my Raspberry Pi + WittyPi (RTC and auto startup/shutdown hat) + MoPi (dual power and safe shutdown on low battery hat).

PiBattery02

I am not going to detail how to setup the MoPi but here is the MoPi output from the MoPi configured to be run from Lead Acid batteries.

PiBattery03

The default 6 cell Lead Acid battery profile says there is a low power condition when the battery is at 10.42v and the minimum charge s 9.48v.

Status Screen.

PiBattery04
This is the battery reading I have from the Pi itself.

PiBattery05

After 3 days of 24/7 use (saving an image every minute) and running a web server for the camera the battery has fallen from 12.73v to 12.28v.

Cheap multimeter reading (after 2 days use).

battery_3day

Mopi Reading (after 3 days use)

mopi3day

I will ignore my multimeter and trust the Mopi to decide when to power down the Pi.

mopi3dayb

I would expect the MoPi to shut down the pi when the battery falls another 2,456mv (that may be i n 18~25 days based on current trends (pun intended)).

voltchart1

Step 2:  Have the battery in Standby and top up the battery with Solar.

I have a cheapie “2 Watt 12 Volt Solar Panels – Amorphous 2 Watt 12 Volt Solar Panels – Amorphous”.  I have no idea if this will be enough to charge up the battery during the day? I have no idea about the solar stuff.

solar

Time to ask the experts at http://www.eevblog.com/forum/beginners/raspberry-pi-running-from-batteries-and-solar/

Update 30th March 2016

Ian.M at EEV Blog informed me that the lowest the battery should be discharged to is 10.5v.  I have edited the “/etc/default/simbamond” file to now specify safer low and shutdown power levels.  The “Sinabamond” service is a battery monitoring service (read about it here)

new-limits

If you edit the “/etc/default/simbamond” you may need to run the following command before and after you edit the file

  • sudo service simbamond stop
  • sudo service simbamond restart

Now when the MoPi detects the battery is below the low level the lights flash and broadcast messages appear on the terminal.

new-limits-warning

If the battery gets below the critical it shuts down the pi (safely).

Testing it (letting the battery getting below the critical limit).

new-limits-shutdown

The good think about the MoPi it shuts down the Pi safely and turns off the power (all power).

I must be getting a few low power spikes as the spikes because the Pi seems to be shutting down early.

I adjusted my max, good, low and critical values to 1200 11500 11100 and 11000 to test the levels of where my battery was at and the MoPi flashed to say it was shutting down then decided not to.  I ran a few volt outputs and the voltage detection was dipping.

new-limits-shutdown2

You may want to space your voltages enough to prevent voltage dipping triggering an early shutdown.

Ok this is the voltages that I will set my pi to shutdown at.

new-limits-shutdown3

Recharging the battery.

Ok, time to shutdown the pi and recharge my battery.

cahrger

Building the Prototype box

Installed 12v supply, 5v backbone, master off, RTC  and Dual PSU safe shutdown reset triggers. Next analog/digital sensors (smoke/co2, light, lazers, temp, humidity, pressure, moisture, motor and proximity motion sensor and vibration sensor), speaker and 240v relay for external control. Wifi, SMS and push notification code ready.

I killed a MoPi dual power input Pi board (silly me put the wrong colour shrink wrap protective layer over the top) and when I turned on the power with reverse polarity much blue smoke was released.

The main compartment will we air right with silica bags and protected from the elements with loads of styrofoam. I don’t think I need active cooling (therms electric peltier element).

proto-working