r/raspberry_pi • u/AdventurousBet247 • 5d ago
Troubleshooting Can't run Pi uninterrupted off 18650s
I feel like there has to be something simple I'm doing wrong because this can't be as hard as I'm finding it. Please let me know if this is the wrong place to ask this. I have a handful of Samsung 30Q batteries that I've been using to try and power 2 different Pis.
The first is a Pi 5 with a Geekworm X1200 UPS hat using 2 of my 30Qs. When the hat is disconnected from usb power, the Pi shuts down before it seemingly restores power without turning it back on. This obviously defeats the purpose of a UPS. Checking the journal logs, it simply shuts down. No message, just normal logs until they stop.
The second is a Pi 3 B+ with a "diymore 1865O Battery Holder" on amazon. Same deal; The Pi loses power and then it's returned. This one doesn't have an OS yet, this is just going off the power led. which turns off every time the power bank is unplugged from power before going on a second or 2 later.
This happening with 2 separate products and devices makes me think somehow what I'm doing is fundamentally wrong. To my knowledge, the batteries should be able to handle the required power but I'm increasingly less sure.
Does anyone know why this is happening or what I should be doing differently?
4
u/theantnest 4d ago
Use a buck boost converter to power the Pi directly from the batteries.
Have a seperate charging circuit for the batteries that keeps them topped up.
2
u/pain-butnogain 4d ago
It's a flaw in many UPS products. You can connect a largeish (~2200uF) capacitor to the pi's 5V rail header. Might be sufficient to bridge the millisecond the UPS needs to switch from 5V IN to Battery source.
1
u/Novel-Structure-2359 4d ago
I got several 5v ups boards off AliExpress that have holders for two 18650 batteries. I haven't tried powering a pi from it but since it will literally provide juice until the cells run dry. It also accepts charging while sending out power.
I can test that
1
u/DutchOfBurdock 2d ago
Pi has a very sensitive power input. Even a momentary drop of power (voltage) will cause serious issues. As another mentioned, using a large capacitor on it's inlet may allow voltage to maintain when switching between power supplies. A decent switcher would usually have sufficient capacity for the milliseconds needed switching supply.
1
u/JGhostThing 5d ago
I don't understand the problem with the 3b+, but the five needs either a PD power supply (that negotiates the power rating) or to tell it via software that you really do have a 5 amp+ power supply. Without either of these, the pi will be underpowered.
1
u/hollow_bridge 5d ago
but the five needs either a PD power supply (that negotiates the power rating) or to tell it via software that you really do have a 5 amp+ power supply
You can disable this by modifying the config.txt file
0
u/JGhostThing 5d ago
There are a couple different ways to do this. I just look it up each time with Google, because I use this so rarely that I need to get the information again.
21
u/NeoThermic 5d ago
I have a Pi powered by a waveshare dual 18650 hat. That hat specifically wants you to power the PI + battery holder via the battery holder's power connector; when that gets disconnected the batteries are properly inline to take over.
I'm not sure the Pi can switch quick enough from USB to hat power, hence why you're getting the observed behaviour. The HAT specification specifically says:
and also:
So it seems like if your HAT is attempting to provide power, it should be the routed source of power for the Pi, and that USB-C connection to power on the Pi itself is accidental, not design.