One of the primary reasons for this “blog” is to help organise myself – maintaining a record. I constantly experiment and reconfigure and try new things and have very very very limited space and resources. It’s hard to partition, to separate and to manage. Especially when I have several inter-dependant things on the go at once with variable viability, and responsibilities to other people depending on my system up-time (email/website) for their business/career.
As I recorded my OpenVPN set-up on a Raspberry Pi2, I decided to make this initial post regarding my approach to UPS. What I want to talk about in this “blog” is IoT, and its already been about 3-weeks since I started setting it up without really doing anything at all on IoT. Suffice to say for now, part of my design philosophy in the restricted spaces at home is to think small. Raspberry Pi’s, Compute Sticks and Arduinos. I want to be distributed where-ever possible and make use of scalable resources e.g. Docker. Yes I want to use the cloud but I also want to be independent of it for scaled-back function, and robust enough to survive brown-outs and black-outs. For modularity and separation of concerns, I want independent efficient set-up and forget UPS solutions for the Raspberry Pi’s, the Compute Sticks and for some Arduinos. Easier said than done!
The VPN/Pi-2 set-up uses battery-mod I made for a UPS:
Here I use an Adafruit PowerBoost 1000 for charging / UPS function
Later I came across RavPower batteries that performed, for a time, excellently as 5V UPS’s (@2A + … great for BayTrail/CherryTrail Compute Sticks) (before the manufacturers changed the way they worked without changing the model number – leaving the model number as RP-PB19, and costing me more than a week of confusion TODO – ARTICLE ON SETTING-UP UBUNTU ON COMPUTE STICK AND ISSUES THAT TURNED-OUT TO BE POWER RELATED RATHER THAN UEFI OR BAD FLASH OR MIS-CONFIG WITH GRUB, LVM, FSACK ETC. I’m working on a work-around for the battery issue (below) TODO – ARTICLE ON UPS WORK-AROUND AND NEED TO COMPLETE BLUNO BLUETOOTH APP:
I talk about some of the issues here: http://tech.scargill.net/ravpower-the-ultimate-pi-ups/ … but inconsistently as I tested and learned … and again: don’t know where my notes are. So I’ll have to test again!
My prototype battery solution is a bit cumbersome but is really just about pushing the on button with a solenoid in a clean way, and measuring what’s going on, and maintaining back-up cells to cope with extended black-outs, thinking also about what happens when everything’s drained and mains power comes back on. I made it off the top of my head (still instinctive since being into electronics in the 90’s … I just “do” without thinking about it much). It uses a DC-DC step-up module to charge those capacitors up to about 30V to drive the 12V solenoid to push the on button. TODO FIND PHOTO OF MEASURING FORCE REQUIRED WITH LUGGAGE SCALES.
Those two long-life 9V batteries only drive the solenoid if the 30V isn’t there. That large FET switches the solenoid with plenty of fly-back diodes. I liberally use diodes where it makes sense … this is an off the top of one’s head solution. The AA’s are trickle-charged (at a safe value for these NiMH cells) and act as a back-up for whatever compute device I use to switch the solenoid and keep an eye on things. (They drive a very efficient 5V step-up device – original link no longer available – it was from Wirelessthings.net).
There’s a low current sensor: https://shop.pimoroni.com/products/sparkfun-low-current-sensor-breakout-acs712 and that, together with voltage readings that change depending on whether this model is itself charging or not, and together with basic on/off state, together reveal enough information about the battery state so that decisions can be made. I’m looking at using the Bluno Beetle but so far have only updated the firmware on it. It’s a great BLE Bluetooth solution – and could tie in as an I2C peripheral for a Pi zero I want to use for power management. I did begin looking at MVVM Cross for an App but it was heavy going and other priorities reared themselves again.
When I get going again with the Bluno, I’ll make a separate article and link to it.