The Solar Pi Platter is a battery-power expansion board for the Raspberry Pi Zero. It is designed to be flexible enough for a lot of applications from solar-powered remote sensing to built-in UPS functionality for small file servers. Although yet to be proven, the idea is for the board to sit under the Zero and connect using 4 pogo-pins to the test pads. This preserves the 40-pin expansion header for traditional Pi HATs. I also included 4 pads to allow connection to a USB cable on this rev of the board in case the pogo-pin idea problematic. While I designed this board for my own ideas and for some projects that other members of my local makerspace are interested in, I decided to enter it into the HAD/Adafruit Pi-Zero contest to see if other people might be interested in it. It's a little bit of a funny project because it will cost a lot more than the Pi (especially in low volumes). That's why I jokingly refer to it as an expansion board that can run linux for $5 more.
TI bq24210 Li-Ion charger supporting both high- and low-impedance power sources. Configured for a max 750 mA charge current to external battery. Support for an optional external thermistor (103AT-4 type) attached to the battery.
PIC16F1459 PMIC/RTC. Inexpensive micro-controller that supports a USB interface so the board can appear like a CDC-class serial port to the Pi. External 32 kHz crystal to support a very simple RTC (seconds since some point) and alarm-clock functionality to be able to wake the board up at a specific time. External power button to manually turn the board on (and off). Charge status, low-battery detection (and shut-down after warning), USB power fault detection. Two analog input pins and 2 PWM output pins for simple IO functions without requiring further connection to the Pi. The analog inputs can be referenced to an internal voltage reference or the PIC VDD. I hope the PWM outputs will be support both servo-motor control as well as traditional PWM output.
TI tps61232 boost converter. Supplies up to 2 A @ 5volts for use by the rest of the system (USB/ethernet, Pi, Pi HAT and any attached USB devices). Note that you'll require beefy enough wiring from the battery to support this at full power output since you will be drawing 3+ A from the battery at lower battery voltages.
LAN9514 USB Hub/Ethernet controller. Not-so inexpensive controller that I picked because I figured it was compatible with the Pi and supported both USB and ethernet. I'm assuming it can run without an external EEPROM but I brought the signals out just in case.
NCP382 USB power switches. Each USB connector has a separate power control allowing code running on the Pi to turn-on and off USB devices to save power. One connector has both outputs of the NCP382 ganged together for a nominal maximum output current of 2A. The other connectors are each connected to one NCP382 output for a max of 1 A current (this is the rated max of the NCP382 before it current limits - I imagine useful maximum current is somewhat lower).
4 Mill-Max pogo-pins making contact with the Pi PP1, PP6, PP22 and PP23 test points for power and data to the Pi. The board is connected to the Pi using 0.25" nylon stand-offs.
3-pin 0.1" spaced header and 2-pin JST connector with reverse polarity protection for a single cell Li-Ion battery (for example 2000 mA devices sold by Adafruit and Sparkfun or 18650 type). A solder jumper (J1) that is removed when an external thermistor is used.
5.5x2.1 mm barrel connector 6-volt Solar Panel input with reverse polarity protection designed for typical 6-9 watt panels that can be found online (7-volt max open circuit voltage)
Micro-B USB connector for 500-1000mA USB charger
3 Type-A USB connectors for USB expansion. The high-current USB connector is spaced 25 mm from the next USB connector to allow "fat" USB devices like cellular modems.
13-pin 0.1" spaced header (along the "top" of the board) for an MagJack ethernet connector break-out board (like the Sparkfun BOB-13021). Two solder jumpers (J3, J4) that can be added to allow the LEDs on the MagJack to operate (at the expense of slightly more power consumption).
16-pin 0.1" spaced header (located under the Pi's expansion header) for user-signals including the analog inputs, PWM outputs and various voltages used on the board. I imagine using right-angle headers to get access. The PWM outputs are slightly separated to allow easy connection of 3-wire servo-motors (data, +5, ground).
Currently I am hoping to implement the following functionality on the PIC. It may be tricky because I want to see if it's possible using the free compiler.
Simple ASCII character command set sent/received through a CDC-class serial port. Along the idea of "A0<CR>" to get the analog voltage on analog input 0 or "P1=120<CR>" to set a PWM value. Other commands to control the board power, USB port power, set/read the RTC and alarm, set/read EEPROM values.
This is a project I've wanted to do for a long time and finally found some time. Calin Crisan's motioneyeos is a complete Linux distribution that turns SBCs like the Raspberry Pi Zero into complete web cams. *AND* it's extensible.
The Pi Platter's USB UPS functionality is perfect for making a webcam that has built-in battery backup. Pan/Tilt servos and an on-screen power status display can easily be added by including the talkpp utility program and five simple bash scripts in a motioneyeos system.
Complete instructions can be found on the github if anyone wants to make their own.
Just a note about a fun project with the Pi Platter that might be of interest to others. A simple script uses the features of the Pi Platter to make a stand-alone time-lapse camera. The script runs from /etc/rc.local, gets the time from the Pi Platter's RTC, takes a picture and then sets a wakeup alarm for five minutes in the future and then shuts down the Pi and powers-down to conserve power. A switch connected to one of the Pi Platter's analog inputs can be used to disable the time-lapse photography system and allow the Pi to boot to a command prompt for off-loading pictures.
A complete write-up including OS configuration and the script can be found at my website.
The script also collects battery and charging data and during the week I ran this in the Colorado summer, a 4400 mAh battery was kept completely charged, even on overcast and rainy days using a 9W 6v panel.
Despite a shipping mishap with the production test fixture PCB (sent to Brazil during a strike there), we were able to fulfill the kickstarter campaign on schedule with boards shipped to backers in December. Next up is to find a distribution channel to sell, at least, the remainder of our production run of boards. If there is ongoing interest then we can make another production run.
I also added a set of software utilities (the talkpp utility to communicate with the board and the ppd daemon), example code and documentation to a github repository (in the project description).
The second revision of the Pi Platter PCB is almost done. Hopefully the only additions will be various test points, if necessary, for the manufacturing test fixture. The main changes were the addition of the USB UPS bypass functionality and changing to use a stacked USB connector so the area around the PI Zero's HDMI connector was free of interference. I also slightly improved heat sinking for various parts and tightened up the high-speed signal layout as well as making sure the ground plane was improved in a few areas.
I am currently thinking the manufacturing test will be essentially a functional one, connecting to all IO ports (and any necessary other test points) and then under control of a computer we'll test the power subsystems and enumerate the USB bus and make sure we can communicate with all downstream devices. I don't think we will end up building huge volumes of this board so perhaps it's ok if the test is a little labor intensive (e.g. manually plugging in USB cables, etc.).
One of the configurations I tested during debugging of the original prototype of the board was a Western Digital hard drive connected to the board along with a WiFi dongle and keyboard/mouse powered by a USB charger. The average current consumption (even when the battery was fully charged and at its highest output voltage) was above the maximum 750 mA that the charging circuit could provide which meant that the battery was slowly discharged. So there was no way to use the Pi Platter as a battery backed file server (or other HDD-based application). I thought briefly about trying to find a different charger (750 mA is near the bq24210's upper limit). The problem is that to support our maximum load of 2 A it'd have to be at least a 2 A charger which would increase cost as well as possibly limit the battery selection since 2 A could be too much for smaller batteries. So I decided to add a bypass circuit that would power the system directly from the USB charger and from the battery through the boost converter for solar applications or when the USB power failed. This meant a couple of new control signals to the PMIC that was currently out of spare signals. One thing I had been contemplating already was making one of the USB ports "always powered" instead of switched to prevent a case where the user could make it not possible to access their Pi to make change. This freed up one signal. I decided to remove the Power Good status signal from the bq24210 for the other since it didn't seem all that helpful.
The critical timing for the UPS functionality is switching from a failing USB Charger voltage to power from the Boost Converter without the +5V rail falling below 4.5 volts. There are 3 parts to the timing, a falling USB voltage to some threshold that indicates it's no longer good, the time for the micro-controller to detect and act on that signal and the time for the boost converter to start up. Switching from battery power to USB power isn't as critical because we can leave the boost converter running for a tiny bit while validating the USB voltage and switching the bypass back on. The USB Charger voltage is fed through a resistor divider into a comparator on the micro. The output of that is routed as the highest priority interrupt so the boost converter can be switched on by an ISR and then power-fail validation, state management, etc can be done in the main code. Voltage falling below around 4.7 volts to boost converter enable is less than a micro-second. It then takes a few milliseconds for the boost converter to start up which can be covered by bulk capacitance on the board.
The bypass is comprised of two back-to-back P-channel MOSFETs to prevent current from flowing in the wrong direction depending on the various use cases (USB power but no system power, USB power and system power, no USB power but system power). I ended up having to add a N-channel MOSFET switch for gate control since the micro may be running at a lower voltage and can't keep the P-channel transistors entirely off (Gate = high-side voltage for off).
I think I will add a green/red LED to the next revision of the board because one thing that became obvious when testing the original prototypes is that we didn't always know when power was on or off (the green LED on the Pi is extinguished when the system shuts down).
Here's a video where I not only forgot which was the P-channel FET but that I was using 2 of them (in my defense it was at the end of a long, long day shooting video for the kickstarter campaign and I wanted to go home).
I've done quite a bit of testing using both a dynamic load (Arachnid Labs ReLoad Pro) and real systems including with both the WD314 HDD and a 1 TB HDD. Interestingly the small voltage drop when the USB power is disconnected caused the 1 TB HDD to retract it's heads. We heard a click whenever we disconnected USB power but the system kept working. I guess it saw the slight voltage dip as an impending power fail as well.
I built this remote control car as a demo of the Pi Platter after I found an old Sparkfun two-wheel base at my makerspace, Solid State Depot. I hacked the base so it would accept 4 control signals (Direction and PWM speed for each motor) and added a simple boost converter (battery -> 8.5VDC) to give the motors enough oomph. The Pi Platter PWM outputs are configured for 48 kHz output to control motor speed and two GPIO pins from the Pi Zero control motor direction. A Sharp IR distance sensor that I also found at SSD and Adafruit analog current monitor to measure battery current are connected to the Pi Platter analog inputs. A USB web cam, WiFi dongle and LED lamp connect to the USB ports. The ability to turn on and off individual ports is used to switch on and off the LED "headlamp".
I'm using mjpg-streamer to get relatively low latency video for display on my laptop. A custom c program provides a socket for the computer to connect for control. It's super simple with small packets (command packets to the Pi and telemetry packets back to the computer when requested). I wrote a xojo program for the Mac to display the video, telemetry and provide control. I also hacked an ancient analog joystick, adding a arduino leonardo to read the pots and create a serial stream for control. It was interesting to pick the a reasonable algorithm to convert X-Y joystick control into 2-wheel control.
Not shown on the picture above is the Adafruit inductive charger strapped onto the bottom of the car for charging (it's output connects to the Pi Platter USB input).
Here it is in action.
Eventually I'd like add an IMU so the car can understand where it is (and to make motor control much easier) and integrate opencv so it can read some signs telling it where to go. Probably will be better, also, to put this on a new base.
I'm happy to share the code or whatever to anyone who is interested. Eventually I'll document this here or on my website.
Here are my measurements for the new V1.3 Pi Zero power and USB test pads. I'd love it if anyone else could verify or correct. I also think I made a small error with the vertical dimension for PP22 and PP23 (although we never saw a problem with the original 5 prototype boards).
Board is up and running with a significant amount of testing done. Still need to do full load testing and some signal quality analysis as well as fully test the firmware but it has run in a variety of configurations. So far the only additional change is to add a 22 uF cap.