Power Systems: Batteries, Regulators and LiPo Safety
Pick the right battery, step voltage down to 5 V and handle lithium batteries without drama.
Mobile robots, drones and field sensors live or die by their power system. Understand cells, capacity and regulators and you will stop seeing random reboots.
LiPo batteries can catch fire if punctured, overcharged or shorted. Charge in a LiPo bag, keep a clear area and never charge overnight.
Video tutorial

Video by iVue Robotics, embedded from YouTube. The written steps below are our own and match the parts list.
Mission steps
Cells and 'S' count
A lithium cell is 3.7 V nominal and 4.2 V full. 2S means two in series (7.4 V), 4S four in series (14.8 V).
Capacity and runtime
mAh is the fuel tank. Use the Battery Runtime calculator: usable mAh ÷ average draw = hours.
Regulate to 5 V
A UBEC or buck converter turns battery voltage into a clean 5 V for the Pi. Pick one rated at least 3 A for a Pi 4/5.
Charge correctly
Use a balance charger on a fire-safe surface, never unattended. Store LiPos around 3.8 V per cell.
Retire bad packs
Puffed, dented or hot batteries are done. Discharge and recycle them at a battery drop-off.
Questions
Can I run a Pi from a power bank?
Yes for light loads. Choose a USB-C PD bank that can supply 5 V at 3 A or more; a Pi 5 under load may warn about limited USB current.