The easiest solution to power Raspberry Pi boards from batteries is to use a USB power bank, and if you want a neater solution, PiJuice HAT board is quite nice, but for something a little cheaper and available right now, Geekworm’s RPi PowerPack kit could be an interesting option with an acrylic enclosure, a battery board with a 3,800 mAh Lithium battery, a fan, three heatsinks, as well as a micro USB to USB cable.
Key features of RPi PowerPack board:
- 3,800 mAh Lithium battery good for around 9 hours on the Raspberry Pi 3.
- Output current – 1.8A
- Output voltage: 5.1V ± 0.1V
- USB – 2x USB output port
- Standard charging current / voltage – 1.0A/5.0V via 1x micro USB port.
- Misc – On/Off switch (The battery still charges in off position)
The kit with the 3,800 mAh battery is sold for $22.43 on DealExtreme.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
So this could work as a UPS?
@onebir
One would hope, but it’s not 100% guaranteed. I’ve seen some power banks take around one second to switch between charging, and running from the battery.
Same kit but with Raspberry Pi 3 board included for $65 -> 8http://www.dx.com/p/raspberry-pi-3-battery-board-case-fan-heatsink-usb-cable-kit-435048?Utm_rid=93072394&Utm_source=affiliate, so that probably means the battery is really part of the board.
@onebir
Nope, no UPS mode possible since for UPS useage knowing battery capacity is a basic requirement and not possible here. You could only try to watch for voltage drops to trigger an emergency shutdown but if the step-up converters on the board always provide 5.1V until battery is empty this won’t work too. If you don’t know you’re running on battery you can not react.
Small ARM server + UPS == Allwinner A20 board 😉
With Olimex A20 Lime2 boards by simply attaching a 3.7V battery you get an UPS solution that also powers a connected 2.5″ SATA disk. And in Armbian we provide many ways to monitor battery use with both legacy and mainline kernel (see eg. this thread here)
Don’t think its inlcuded, it wouldn’t state: Supports Lithium battery up to 3,800mAh
@tkaiser
Ta – any of the Chinese A20 boards work like that? (A lot cheaper, esp shipping where I am.)
@onebir
A list of A20 devices is here http://linux-sunxi.org/Category:A20_Boards
Most of them feature a battery connector or solder pads but the only boards providing step-up converters to also power a connected 2.5″ disk when running on battery are Olimex’ Lime/Lime2 and Lamobo R1 (which has so many design flaws that I wouldn’t recommend it). With a Banana Pi or Pro for example you would’ve to take 5V from the board’s USB ports to get ‘UPS mode’ for a disk (confirmed to work, you find several threads in LeMaker forum)
May or may not help http://raspi-ups.appspot.com/en/index.jsp
@theguyuk
https://m.youtube.com/watch?v=qev1E7bqNjA
@tkaiser @theguyuk
Thanks guys; seems like ATM forgoing SAYA & using a USB HDD + Pi (clone) + power bank is the cheapest/easiest route!
“With Olimex A20 Lime2 boards by simply attaching a 3.7V battery” => beaglebone also integrates a PMIC, which makes it easy to connect a li-po battery https://www.element14.com/community/community/designcenter/single-board-computers/next-gen_beaglebone/blog/2013/08/10/bbb–rechargeable-on-board-battery-system
“The kit is sold for $22.43” => can’t the ~same thing be achieved with a <1$ usb-lipo charger such as http://www.aliexpress.com/item/TP4056-1A-Lipo-Battery-Charging-Board-Charger-Module-lithium-battery-DIY-Mini-USB-Port-Free-shipping/1567407584.html ?
You can just buy a cheap power bank with power “pass-thru” (or build one yourself) and connect a 5-3.3V regulator to the input of the bank (mains). The input can be safely fed to the SBC. A simple script monitors the GPIO pin and sets up a countdown timer to shut down the SBC safely before the bank drains. Simple and reliable.
@theguyuk
Ofc it helps. Simple & Awesome!
@tkaiser
There are different kinds of UPS.
My UPS does not communicate at all with my computer, but when there’s a power failure it does the job, and I can manually turn off the computer. I agree that for server / gateway use, it’s much better for the system to know when it’s running on battery, and when it should automatically turn off and turn on in order to preserve data.
@Theguyuk
Nice trick to use Ethernet to detect power outage. Battery level is obviously estimated, not measured here, so you need to make some tests and assumption to evaluate the battery life.
Is there a way to know the battery level?
@zoobab
If you like making things a internet search gives this. http://raspi.tv/2013/controlled-shutdown-duration-test-of-pi-model-a-with-2-cell-lipo
http://www.makeuseof.com/tag/pi-go-x-ways-powering-raspberry-pi-portable-projects/
Otherwise buy off the shelf☺
@cnxsoft
I think the upsd script does this. There’s sourcecode here – couldn’t figure out which language:
http://raspi-ups.appspot.com/upsd/upsd-1.2.tar.gz
Maybe someone familiar/interested could have a look to see how the script approximates the battery state? Since the link says this is GPL licensed I guess is could be put on Github, forked etc.
@onebir
That’s a C program (you need to look into the src directory). The battery time is set in a configuration file manually.
Do you know where I can find a similar acrylic case (UK or EU would be nice), where I can stack 3 or more Raspberry Pi?
@Ypnose
Same link on DX but for “Form Color” select “Transparent”. It costs $8.20. You can probably have it even cheaper on eBay.
@Ypnose
That one supports 4 Raspberry Pi boards: http://www.ebay.com/itm/4-layer-Transparent-Acrylic-Case-Enclosure-for-Raspberry-Pi-3-2-Model-B-B-/222046839471?hash=item33b305e2af:g:ySkAAOSwvgdW3p8H
@cnxsoft
Ah – thanks. A fixed time seems could be problematic in some cases, eg if power fails repeatedly before the battery can fully recharge…
@onebir
Can’t we find a work around for that like e.g to do checks for uptime (cron) and somehow try to reduce it?
I mean this is a very simple and good idea that guy came up with 🙂
@fossxplorer
Sure – wouldn’t be hard to model battery charge & usage approximately with constants. Then allow a big margin for error. But I don’t know C, so better left to someone who does 🙂
@fossxplorer
Would a software eqvivalent of a egg timer work, where number goes down when Ethernet off but builds up to set top limit when Ethernet on. Crude but would work, just needs adjusting to represent real charge time?
@onebir only just seen your post on posting mine.
@cnxsoft: Thank you for the links!
@cnxsoft
Thank you for the links!
@Theguyuk
Yeah 🙂
Thank you for link
but only charge this battery even if the switch is turned off, I think powerbank is better and sample.
@wtn2002
It’s always charging the battery.
Finally the battery is included -> http://club.dx.com/forums/Forums.dx/threadid.1452723
ODROID boards can also support UPS function using UPS3 kit with 3,000 mAh battery ($49) -> http://www.hardkernel.com/main/products/prdt_info.php?g_code=G146068525665
Same board with battery without enclosure, heatsink, nor fan for $11.93 on Banggood -> http://www.banggood.com/V1_0-Lithium-Battery-Expansion-Board-For-Cellphone-Raspberry-Pi-3-Model-B-Pi-2B-B-p-1059297.html
@zoobab Been wondering the same. Otherwise this isn’t much better than a battery pack.
@Jimm
Review @ http://www.cnx-software.com/2016/07/25/raspberry-pi-club-battery-ups-kit-guide-and-review/.
The board does not have that features, but it might be possible to add an ADC chip to monitor the battery voltage level.