How To Run Your Raspberry Pi Using Solar Power
The great thing aboutRaspberry Pis, compared to Arduinos, is that you don’t have to scour Amazon or your local electronics shop for a high-quality power supply to drive your board. Raspberry Pi offers official power supplies that you can easily buy alongside your single-board computer (SBC) of choice. However,not every Raspberry Pi project is created equal, and while the official power supply is the most convenient power source for your board, it isn’t always the most appropriate one. Sometimes, you need to resort to alternatives, particularly solar panels, for a couple of reasons.
The first and most common one is that your project will be stationed in the wild, away from any power outlets. This is typically the case for wildlife and environment monitoring applications, DIY devices you bring on camping trips (e.g., time lapse camera, portable media center), and even interactive information kiosks in parks. You might also want to use solar panels even when you’re in a place with wall sockets but has unreliable power supply, such as remote and developing locations. But how exactly do you power a Raspberry Pi with a solar panel and what do you need to get started?

What you need to run a Raspberry Pi with solar panels
Powering youroutdoor Raspberry Pi projectswith the sun requires four components. As you might have already guessed, the first hardware you need is a solar panel. On maker sites likeAdafruitandDFRobot, the typical solar panels for DIY electronic projects range from ratings of 5V to 9V and 1W to 10W. Make sure to pick one that’s compatible with the second component, the solar charger module. What this does is regulate the solar panel’s output to prevent overcharging the batteries. You can easily find a host of solar charger modules, such as SparkFun Sunny Buddy, Adafruit Universal Solar Charger, and DFRobot Solar Lipo Charger, on your favorite maker site or on Amazon.
For your third component, you need a battery. This is what powers the Pi. During the day, the panels charge the battery via the solar charger module to ensure your project has enough juice. Solar-powered electronics projects typically use Li-Po or Li-ion batteries, which have a nominal voltage of 3.7V. However, a Pi requires 5V to boot up. So, a DC-DC boost converter is added to the circuit. It’s designed to output a higher DC voltage for your load. There are lots of boost converters available on the market, including the Adafruit PowerBoost 1000, DFRobot DC-DC Boost Module, and SparkFun LiPower Boost Converter. Just ensure the converter you buy is compatible with Li-ion/Li-Po batteries and can output enough current to drive your project.

How to build a solar-powered Raspberry Pi project
Now it’s time for some building. Here’s a quick step-by-step guide on making a solar panel system for your Raspberry Pi project:
What to do before setting up your project outdoors
Before you get your Raspberry Pi project and solar panel system set up in the sun, you may want to consider taking extra steps to prolong the life of your project. This doesn’t only mean extending the runtime of the board but also keeping it safe from the elements.
Choosing less resource-draining components and Pi boards for your solar-powered project is just the first step to achieving a long runtime period. There are also software techniques you can use to lower the power consumption and further lengthen the Pi’s operation. First, turn off any onboard peripherals your project doesn’t need. This includes the HDMI (if you’re not using any display) and the activity and power LEDs (which you probably don’t need to look at). On the Pi Zero, disabling both can save you as much as 35mA as tested by Pi enthusiastJeff Geerling. If you have a Wi-Fi-enabled board, such as the Pi Zero W and Pi Zero 2 W, you can also consider deactivating the Wi-Fi radio, which, according to Geerling, can save you about 10mA.

To make the Pi weather-proof, enclose the project in a weather-proof case. Typical ones you can see online are IP65, meaning they’re protected from dust and low-pressure jets. Make sure that your project’s placement is also taken into account. Keep your electronics away from the sun as much as possible so as not to go over the Pi board’s operating temperature (usually a maximum of 50 degree Celsius).