Solar Power and the Raspberry Pi
I have been asked several times in the last few days to put up some more information about the Project Curacao Solar Panel design. More results here (1), here (2) and here (3).
When I designed the solar power system for Project Curacao, I had to do a lot of work in terms of sizing the system. This box was designed for use down in the tropics (12 degrees) and in quite a sunny climate. My best estimates (using a Raspberry Pi Model A to reduce power) was that I could run the Pi about 14 hours a day. Here’s the block diagram for the system. Note I measure everything and record the data.
I wanted to know exactly what was going on in terms of current moving around in the system.
I use RasPiConnect to display this data remotely from Project Curacao (now located 3500 miles away from me).
In the above RasPiConnect screen shot, you can see that I’m getting about 2.18W (455ma) from my solar cells, and I’m charging the battery at about 50ma. The rest is going to run the Pi and the losses in the power conversion and charging circuitry. Note that those losses are extensive. It was cloudy in Curacao during this week.
One of the problems I encountered was that the Pi needed to be shutdown and rebooted at certain times because you don’t always have enough power to run the Pi all day and all night. I found that the Pi did not recover well from a low voltage condition with this charging and battery circuitry and so I needed to add an Arduino based battery watchdog to manage the Pi. I suspect the Pi tries to start up, pulls more current, dropping the voltage below what it can run at and stops again. Probably this cycle will eventually destroy the SD card so it’s not a good thing. Solved with the battery watchdog.
With the angle of the solar cells at 90 degrees, we don’t always generate enough power to run the Arduino forever. It doesn’t do power shutdowns well, either. I am going to add a hardware watchdog timer to turn the power on and off to the Arduino when it dies. Note in the above RasPiConnect screen, the Arduino is having a good week, getting more power than it is consuming, hence the battery voltage is moving up. The difference between the two weeks (early and later) is the angle of the box to the sun.
Angle to the Sun
Angle to the sun is very important. The difference between 12 degrees (pointed at the sun) and 90 degrees (flat on such in this picture) is about 50%. At this time of year the maximum energy flux on the panels over a 24 hour period from the sun will be when the panels are pointed straight at the sun when it crosses the meridian about noon. That’s pretty much straight overhead at 12 degrees latitude at this time of year. With the camera
pointed at the ocean the box is about 15-20 degrees from vertical the flux will be (sin x)*flux (max), where x is the angle (angle(max)-angle(box)), certainly less than half of what it gets if pointed straight up. We tried putting a mirror up to help, but it made little difference.
Conclusion
Measure everything. Figure out the dynamic behavior of your solar power system. I used INA219 high side current sensors to detect the voltage and current at each point. It helped me tremendously in designing the system and designing the power management software. My planned September 2014 upgrades are here.
How much more efficient would a 7-10Ah 12V lead acid battery with a + 30-50W solar charger be using a DC-DC 12->5V converter to power the Pi?
Kyle,
I would guess you would pick up maybe 10%. I do a 6V to ~3.7 V conversion and then a boost to 5V for the Pi/Arduino. Looking at my data on Project Curacao (I measure all the currents and voltages), that fits. Put your money in an efficient 12V to 5V converter.
John
Always after power saving…I’m sticking a Pi in a forest, to take env. measurements and pictures of squirrels. Yeps. Love ’em!
Couple of obvious problems, but it’s the power I am concerned about.
Elected to use Gel lead-acid, ‘cos of cost* (I’m unemployed, and finance this outta that meagre pittance!), so following Julian Ilett’s Auridno MPPT videos with bad – er, bated breath.
Anyway found an arduino library called “Narcolepsy”.
MAybe worth a shuftie.
*Absolutely fortunate to be given 3x 5W panels – 12V – Oh, MAMA.
Forgot to mention. I’m in Northern Finland – 65 degrees north. So, Sleepy Pi will have to come to the rescue if the ‘Kaamos’ happens.
Need bigger batteries. Never has the expression “Make hay while the sun shines” had more relevance to me as now…
Regards,
Andy Crofts.
Andy,
In the Arduino BatteryWatchdog power control subsystem, I use a library called Sleep_n0m1. https://github.com/n0m1/Sleep_n0m1
I run through my control logic and then go to sleep for 5 seconds.
// check for alarms
checkForAlarms();
if (nextState == currentState)
{
// sleep
delay(1000);
sleep.pwrDownMode();
sleep.sleepDelay(sleepTime);
setTime(readRTCreliably());
}
currentState = nextState;
Best luck at 65 degrees north! 12 degrees north is tough enough.
John Shovic