Powering a Raspberry Pi with Solar (Beginner Guide)
How to run a Raspberry Pi on solar power. Covers panel sizing, battery selection, charge controllers, and a complete wiring guide with real power measurements.
- 1 What Is an Off-Grid Homelab? (And Why You'd Want One)
- 2 Raspberry Pi vs Mini PC for Your Homelab — Power, Performance & Cost
- 3 Powering a Raspberry Pi with Solar (Beginner Guide)
- 4 Build a Portable Raspberry Pi Server
- 5 Solar Powered Home Server — Run 24/7 Off-Grid
- 6 Power Budget for Off-Grid Raspberry Pi Projects
Introduction
A Raspberry Pi draws so little power that a small solar panel and battery can keep it running 24/7. This guide covers exactly what you need, how to wire it, and real-world power measurements.
How Much Power Does a Pi Use?
Measured with a USB power meter:
| Model | Idle | Light Load | Max |
|---|---|---|---|
| Pi 3B+ | 1.9W | 2.8W | 5.1W |
| Pi 4 (2 GB) | 2.7W | 3.4W | 6.4W |
| Pi 4 (4 GB) | 3.0W | 4.1W | 7.6W |
| Pi 5 | 3.2W | 5.0W | 12W |
For a Pi 4 running Docker services, plan for 4–5W average.
What You Need
| Component | Recommendation | Cost |
|---|---|---|
| Solar panel | 30W (12V) rigid or foldable | ~$30 |
| Battery | 12V 20Ah LiFePO4 | ~$60 |
| Charge controller | PWM 10A (e.g., EPever) | ~$15 |
| Buck converter | 12V → 5V 3A USB-C | ~$8 |
| Cables | MC4 connectors, USB-C | ~$10 |
Total: ~$120 for a complete solar Pi setup.
Step 1 — Size Your Battery
The math is simple:
Runtime (hours) = Battery capacity (Wh) / Power draw (W)
A 12V 20Ah battery = 240 Wh.
At 5W average draw: 240 / 5 = 48 hours of runtime without any sun.
With a 30W panel getting 4–5 hours of good sun per day, you generate 120–150 Wh — more than enough to cover the 120 Wh daily draw.
Step 2 — Wire the Solar Panel to the Charge Controller
Connect MC4 cables from the panel to the charge controller's solar input. Polarity matters — red to positive, black to negative.
Step 3 — Connect the Battery
Wire the battery to the charge controller's battery terminals. The controller prevents overcharging and deep discharge.
Step 4 — Add the Buck Converter
The buck converter steps 12V down to 5V USB-C for the Pi. Connect it to the load output of the charge controller (or directly to the battery terminals).
Step 5 — Power On
Plug the USB-C cable into your Pi. It should boot normally.
Choosing LiFePO4 vs Lead-Acid
LiFePO4 (lithium iron phosphate) is the clear winner for off-grid computing:
- 2000+ charge cycles (vs 300–500 for lead-acid)
- Lighter weight
- Flat voltage curve (stable power)
- Safe chemistry (no thermal runaway risk)
- More usable capacity (you can safely use 80–90% vs 50% for lead-acid)
The higher upfront cost pays for itself quickly.
Real-World Test Results
We ran a Pi 4 with Docker (Pi-hole, WireGuard, Nextcloud) on a 20Ah LiFePO4 battery with a 30W panel:
- Average draw: 4.8W
- Sunny day (6h sun): Battery full by 2pm, stayed at 100% rest of day
- Cloudy day (2h sun): Battery dropped to 78%, recovered next day
- 3 days overcast: Battery dropped to 41%, never shut down
The system ran continuously for the entire 7-day test period.
Tips
- Mount the panel facing south (northern hemisphere) at a 30–45° angle
- Keep cables short to minimize voltage drop
- A small inline fuse (5A) between battery and buck converter is good practice
- Monitor battery voltage: 13.4V = full, 12.0V = time to conserve, 10.8V = shut down
Summary
Running a Raspberry Pi on solar is practical, affordable, and surprisingly reliable. With a $120 setup, you get a server that runs indefinitely on sunshine alone.