If you need to run a Raspberry Pi 5 off-grid or through extended outages, the direct answer is this: a 24-hour runtime requires a 3S (11.1V nominal) 18650 lithium-ion pack rated for at least 40Ah, paired with a high-efficiency 12V-to-5V synchronous buck converter or a dedicated UPS HAT.
Powering a single-board computer (SBC) from raw cells is not as simple as wiring a USB cable to a battery holder. The Pi 5 demands a strict 5.0V to 5.2V at up to 5A (25W peak). Drop below 4.8V under load, and the board will brownout, corrupting your microSD card or SSD. This guide walks through the exact system architecture, sizing math, and cell configurations required to build a stable raspi battery pack without triggering thermal events or voltage sags.
System Architecture: Source to Load
Before cutting wire, you must define the power path. A proper DC battery system for a Raspberry Pi follows this block sequence:
- Source: 3S 18650 Lithium-Ion battery pack (11.1V nominal, 12.6V fully charged).
- Protection: 40A Smart BMS (Battery Management System) with low-temperature charge cutoff and cell balancing.
- Power Management: 12V-to-5V DC-DC Synchronous Buck Converter (rated for 5A+ continuous) OR a Pi-specific UPS HAT (e.g., Geekworm X1202).
- Load: Raspberry Pi 5 (via USB-C PD or 5V/GND GPIO pins).
Sizing Math: Energy, Peukert, and Efficiency
Let’s size the pack for a realistic edge-computing or IoT gateway scenario: a Pi 5 with an NVMe SSD and a USB Wi-Fi dongle drawing an average of 15W (3A at 5V) continuously for 24 hours.
- Base Energy Requirement: 15W × 24h = 360Wh.
- DC-DC Converter Efficiency: Assume 85% for a quality synchronous buck module. 360Wh / 0.85 = 423Wh required from the cells.
- Depth of Discharge (DoD): To maximize cycle life, we limit Li-ion DoD to 80%. 423Wh / 0.80 = 528Wh total pack capacity.
Chemistry and Configuration Matrix
The table below compares how different battery chemistries and voltages handle this 528Wh requirement. Note how voltage sag and Peukert’s law alter the real-world cell count.
| Chemistry / Config | Nominal Voltage | Target Capacity (Ah) | Usable Energy @ 80% DoD | Peukert / Sag Derating | Physical Cell Count |
|---|---|---|---|---|---|
| 12V SLA (Sealed Lead-Acid) | 12.0V | 65Ah | 624Wh | High (k=1.3). Loses ~20% capacity at 3A draw. | 1 large 65Ah block (20kg) |
| 3S Li-ion (18650) | 11.1V | 47.5Ah | 422Wh (Requires 528Wh gross) | Low (k=1.05). Minimal loss at 0.5C draw. | 3S14P (42 cells, ~1.9kg) |
| 4S LiFePO4 (Cylindrical) | 12.8V | 41.2Ah | 527Wh (Can use 90% DoD safely) | Negligible. Flat discharge curve. | 4S12P (48 cells, ~4.5kg) |
| 2S Li-ion (18650) | 7.4V | 71.3Ah | 422Wh (Requires 528Wh gross) | Moderate. Higher current draw increases I²R heating. | 2S21P (42 cells, high current stress) |
The Verdict: The 3S Li-ion (18650) configuration is the sweet spot for a raspi battery pack. It keeps the current draw on the DC-DC converter reasonable (around 4A from the battery to deliver 3A at 5V) while avoiding the massive weight and Peukert penalties of lead-acid. Peukert’s law dictates that as discharge current increases, the effective capacity of a battery decreases. While Li-ion is largely immune to the severe Peukert effects seen in SLA batteries, high C-rates still cause voltage sag, which triggers the BMS low-voltage cutoff prematurely.
Series vs. Parallel: Consequences for V and Ah
When building the 3S14P pack (using high-capacity cells like the Molicel P35B or Samsung 35E at 3.5Ah each), you must understand how wiring topology affects the output.
- Series (S): Wiring cells positive-to-negative adds their voltages while maintaining the same Ah capacity. Three 3.7V cells in series yield 11.1V nominal (12.6V max). Consequence: Higher voltage means lower current for the same wattage, reducing I²R (heat) losses in your wires and BMS MOSFETs.
- Parallel (P): Wiring cells positive-to-positive adds their Ah capacity while maintaining the same voltage. Fourteen 3.5Ah cells in parallel yield 49Ah. Consequence: Increases total energy storage and divides the current load across multiple cells, keeping individual cell stress low.
Charge and Discharge Limits (C-Rates)
Every cell has a safe operating area defined by its C-rate (a multiple of its capacity). For a 3.5Ah 18650 cell:
- Continuous Discharge Limit: Standard high-capacity cells are rated for 1C to 2C. We derate to 0.5C (1.75A per cell) for longevity and thermal stability. In a 14P configuration, 14 × 1.75A = 24.5A max pack discharge—far exceeding the ~4A our Pi 5 will actually pull.
- Charge Limit: Standard CC/CV charging should be limited to 0.5C (1.75A per cell). A 14P pack should be charged at no more than 24A, though a 5A to 10A bench charger is ideal to prevent overheating the BMS balance wires.
Sizing the Charger and DC-DC Power Module
With the 3S14P pack (49Ah / 543Wh) assembled, we must size the power management hardware. Since we established that an AC inverter is the wrong tool for a pure DC load, we size the DC-DC charger and buck converter instead.
1. The DC-DC Buck Converter (Discharge Path)
The Pi 5 requires 5V at 5A (25W peak). Assuming an 85% efficient buck converter, the input draw from the 11.1V pack will be roughly 2.6A during peak loads.
- Module Selection: Do not use cheap linear regulators (like the LM7805); they will dissipate massive heat and trigger thermal shutdown. Use a synchronous buck converter rated for at least 8A continuous output (e.g., a DROK 12V-to-5V 8A module or an RECOM R-78E5.0-0.3 switching regulator). The 8A rating provides a 60% safety margin over the Pi’s 5A peak, ensuring the module runs cool without needing active fan cooling.
- Wiring: Use 14 AWG silicone wire from the BMS to the buck converter, and 18 AWG from the converter to the Pi’s USB-C or GPIO 5V pins. Add a 1000µF low-ESR capacitor across the 5V output to absorb microsecond transient spikes when the Pi’s CPU cores spin up.
2. The Charger (Charge Path)
To recharge a 543Wh 3S pack, you need a dedicated 3S Li-ion CC/CV charger.
- Sizing: A 12.6V 5A AC-to-DC power supply will recharge the pack from 20% to 100% in roughly 8 hours (5A × 8h = 40Ah). This represents a 0.1C charge rate, which is exceptionally gentle on the cells and maximizes their cycle life.
- Solar Integration: If charging via solar, use an MPPT charge controller configured for a 3S Li-ion profile (12.6V absorption, 11.1V low-voltage disconnect). A 100W solar panel yielding ~5A in peak sun will maintain the pack indefinitely for outdoor IoT deployments.
Alternative: The UPS HAT Route
If building a raw 18650 pack feels too complex, you can use a commercial UPS HAT like the Geekworm X1202 or the official Pi power ecosystems. These boards integrate the BMS, DC-DC conversion, and 5V output into a single PCB that mounts directly to the Pi’s GPIO header. They typically use 18650 cells in a 2S or 3S configuration. While more expensive per Wh than a DIY pack, they handle the I2C communication required to tell the Pi to execute a safe software shutdown when the battery hits 10%, preventing SD card corruption.
Final Verification and Testing
Before connecting your Raspberry Pi, perform these bench tests:
- Open Circuit Voltage: Measure the BMS output. It should read between 11.1V and 12.6V.
- Buck Converter Calibration: Power the buck converter with the battery pack. Use a multimeter to measure the output terminals. Adjust the onboard trim potentiometer until the output reads exactly 5.15V. This compensates for the ~0.1V voltage drop across the USB-C cable or GPIO traces under load.
- Load Testing: Connect a 5A dummy load to the buck converter for 10 minutes. Verify the output does not drop below 4.9V and that the inductor on the converter is not too hot to touch.
By respecting the DC-DC efficiency curves, honoring Li-ion C-rates, and avoiding the massive losses of AC inverters, your raspi battery pack will deliver reliable, multi-day uptime for your most critical edge-computing projects.






