kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Battery for Pi Zero with 3G

Sun Jun 16, 2019 1:24 am

Can anyone recommend a battery for a pi zero, that will be left on for days on end, but won't be doing much. It needs to wait for input via accelerometer and after the input is received, send a signal via a 3G dongle. Ideally it would last up to 5 days but any amount of time >2 Days is probably ok. There is no display, possibly a single LED light but that can be removed. It will be running code in c++ and I am open to anything you may recommend. It just needs to send a signal when it is moved.

W. H. Heydt
Posts: 10889
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery for Pi Zero with 3G

Sun Jun 16, 2019 3:28 pm

A Pi0 is going to draw about 100mA (perhaps less, but work with that). It will be at 5v. So the required power (W) is 0.1A * 5v = 0.5W. To run for 120 hrs. (5 days), it will use 0.5W * 120h = 60Wh. Therefore, you need a battery with more than 60Wh available. Since batteries don't generally put out 5v, you have to allow for voltage conversion losses. Most batteries don't take kindly to being drained absolutely flat, so allow for that. Net result is that I would look for a battery with a capacity 80Wh to 120Wh, depending on type and voltage conversion efficiency.

User avatar
Imperf3kt
Posts: 2775
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery for Pi Zero with 3G

Sun Jun 16, 2019 10:10 pm

For the length of time you need, a lead acid battery such as a yard battery or a car battery would work. A 12v to 5v DC-DC convertor will be required.
55:55:44:44:4C
52:4C:52:42:41

PhatFil
Posts: 1368
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Battery for Pi Zero with 3G

Sun Jun 16, 2019 10:34 pm

to use a smaller battery you could consider using a smaller simpler dev board with a deep sleep and nominal draw that can wake on a gpio input to control power to the pi-0.

that way you can on receiving input power up the pi, connect a 2nd gpio from the dev board to the pi so it can signal when its done so power can be cut off again, and as soon as the pi starts up send your 3g message and immediately execute a shutdown.

User avatar
rpdom
Posts: 15208
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Battery for Pi Zero with 3G

Sun Jun 16, 2019 11:43 pm

Imperf3kt wrote:
Sun Jun 16, 2019 10:10 pm
For the length of time you need, a lead acid battery such as a yard battery or a car battery would work. A 12v to 5v DC-DC convertor will be required.
Car batteries aren't great for this sort of thing. They don't like being discharged below about 50% capacity. A "Leisure" battery, as used in boats and caravans would be better as they are designed for deep discharge.

W. H. Heydt
Posts: 10889
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery for Pi Zero with 3G

Sun Jun 16, 2019 11:51 pm

rpdom wrote:
Sun Jun 16, 2019 11:43 pm
Imperf3kt wrote:
Sun Jun 16, 2019 10:10 pm
For the length of time you need, a lead acid battery such as a yard battery or a car battery would work. A 12v to 5v DC-DC convertor will be required.
Car batteries aren't great for this sort of thing. They don't like being discharged below about 50% capacity. A "Leisure" battery, as used in boats and caravans would be better as they are designed for deep discharge.
Also known as a marine battery or a deep cycle battery.

Another--possible--alternative for the OP would be a battery plus solar cell recharge bank.

What all of this comes down to is that the energy density of nearly all batteries is not all that great and it takes far more battery than most novices realize to run anything for an extended period of time.

User avatar
Imperf3kt
Posts: 2775
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery for Pi Zero with 3G

Mon Jun 17, 2019 12:10 am

rpdom wrote:
Sun Jun 16, 2019 11:43 pm
Imperf3kt wrote:
Sun Jun 16, 2019 10:10 pm
For the length of time you need, a lead acid battery such as a yard battery or a car battery would work. A 12v to 5v DC-DC convertor will be required.
Car batteries aren't great for this sort of thing. They don't like being discharged below about 50% capacity. A "Leisure" battery, as used in boats and caravans would be better as they are designed for deep discharge.
Of course, and a standard car battery has a capacity of around 500 wh, nearly five times the required amount as approximated by W. H. Heydt, more than enough charge left before damaging the cells.

One could even add a solar trickle charger to keep topping the battery up as it is drained to slow it down.
55:55:44:44:4C
52:4C:52:42:41

kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Re: Battery for Pi Zero with 3G

Tue Jun 18, 2019 11:07 pm

W. H. Heydt wrote:
Sun Jun 16, 2019 3:28 pm
A Pi0 is going to draw about 100mA (perhaps less, but work with that). It will be at 5v. So the required power (W) is 0.1A * 5v = 0.5W. To run for 120 hrs. (5 days), it will use 0.5W * 120h = 60Wh. Therefore, you need a battery with more than 60Wh available. Since batteries don't generally put out 5v, you have to allow for voltage conversion losses. Most batteries don't take kindly to being drained absolutely flat, so allow for that. Net result is that I would look for a battery with a capacity 80Wh to 120Wh, depending on type and voltage conversion efficiency.
Ok, so I looked into it, and 5 days is ideal, but seeing that that is a little bit high, especially when I would like to keep a low budget, I think I could do with 50Wh, I know most batteries aren't 5V, but what about a consumer battery for cell phone charging? I found a 10,000 mAh battery that should last for a while. I also saw that I might be able to reduce power with iwconfig somehow (still ordering parts). I found viewtopic.php?p=894500]this which says something about cutting off power to the USB, but I thought that was impossible? They said it worked but it doesn't work for me, just curious, why?

W. H. Heydt
Posts: 10889
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery for Pi Zero with 3G

Wed Jun 19, 2019 12:20 am

kyleisnot wrote:
Tue Jun 18, 2019 11:07 pm
W. H. Heydt wrote:
Sun Jun 16, 2019 3:28 pm
A Pi0 is going to draw about 100mA (perhaps less, but work with that). It will be at 5v. So the required power (W) is 0.1A * 5v = 0.5W. To run for 120 hrs. (5 days), it will use 0.5W * 120h = 60Wh. Therefore, you need a battery with more than 60Wh available. Since batteries don't generally put out 5v, you have to allow for voltage conversion losses. Most batteries don't take kindly to being drained absolutely flat, so allow for that. Net result is that I would look for a battery with a capacity 80Wh to 120Wh, depending on type and voltage conversion efficiency.
Ok, so I looked into it, and 5 days is ideal, but seeing that that is a little bit high, especially when I would like to keep a low budget, I think I could do with 50Wh, I know most batteries aren't 5V, but what about a consumer battery for cell phone charging? I found a 10,000 mAh battery that should last for a while. I also saw that I might be able to reduce power with iwconfig somehow (still ordering parts). I found viewtopic.php?p=894500]this which says something about cutting off power to the USB, but I thought that was impossible? They said it worked but it doesn't work for me, just curious, why?
That's a "powerbank". I routinely use them for powering a Pi0W with a 3.5" LCD (total power requirement is about 200mA). The one I use for that is 4Ah and it will run for 12 to 14 hours. So your 10Ah ought to be for about 30 to 40 hours, or perhaps more, depending on actual power requirements.

That 10Ah is at 3.7v (the Li Ion cell voltage), so the total energy is 37Wh.

Perhaps if you posted what you're actually trying to do, we could be better advice.

kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Re: Battery for Pi Zero with 3G

Wed Jun 19, 2019 1:10 am

W. H. Heydt wrote:
Wed Jun 19, 2019 12:20 am
kyleisnot wrote:
Tue Jun 18, 2019 11:07 pm
W. H. Heydt wrote:
Sun Jun 16, 2019 3:28 pm
A Pi0 is going to draw about 100mA (perhaps less, but work with that). It will be at 5v. So the required power (W) is 0.1A * 5v = 0.5W. To run for 120 hrs. (5 days), it will use 0.5W * 120h = 60Wh. Therefore, you need a battery with more than 60Wh available. Since batteries don't generally put out 5v, you have to allow for voltage conversion losses. Most batteries don't take kindly to being drained absolutely flat, so allow for that. Net result is that I would look for a battery with a capacity 80Wh to 120Wh, depending on type and voltage conversion efficiency.
Ok, so I looked into it, and 5 days is ideal, but seeing that that is a little bit high, especially when I would like to keep a low budget, I think I could do with 50Wh, I know most batteries aren't 5V, but what about a consumer battery for cell phone charging? I found a 10,000 mAh battery that should last for a while. I also saw that I might be able to reduce power with iwconfig somehow (still ordering parts). I found viewtopic.php?p=894500]this which says something about cutting off power to the USB, but I thought that was impossible? They said it worked but it doesn't work for me, just curious, why?
That's a "powerbank". I routinely use them for powering a Pi0W with a 3.5" LCD (total power requirement is about 200mA). The one I use for that is 4Ah and it will run for 12 to 14 hours. So your 10Ah ought to be for about 30 to 40 hours, or perhaps more, depending on actual power requirements.

That 10Ah is at 3.7v (the Li Ion cell voltage), so the total energy is 37Wh.

Perhaps if you posted what you're actually trying to do, we could be better advice.
Oh sorry, I thought I had.

It's a notification system for an animal trap. I plan to put this all in weatherproof casing. There is an accelerometer in the casing with the pi, battery, and 3G dongle. It will be attached to the trap by a small rope, which will yank the unit when set off (I am doing it this way because the trap is very fast, designed to break the animal's neck quickly and painlessly. After the accelerometer returns whatever value I determine is the trap going off, it will send a notification, either directly to the phone via sms or to an AWS server. I had the thing about the power because I wanted to turn off the 3G dongle.

W. H. Heydt
Posts: 10889
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery for Pi Zero with 3G

Wed Jun 19, 2019 3:04 am

kyleisnot wrote:
Wed Jun 19, 2019 1:10 am
I am doing it this way because the trap is very fast, designed to break the animal's neck quickly and painlessly.
Not everyone will want to assist you in building a lethal trap. Have you considered using a live trap so that you can avoid killing animals you don't want to kill?

drgeoff
Posts: 9813
Joined: Wed Jan 25, 2012 6:39 pm

Re: Battery for Pi Zero with 3G

Wed Jun 19, 2019 10:17 am

On a Zero the 5 volt pin of the power input micro-USB socket is directly connected by PCB trace to the 5 volt pin of the data micro-USB socket. If you want to remove power to a dongle you need additional hardware.

kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Re: Battery for Pi Zero with 3G

Wed Jun 19, 2019 9:30 pm

W. H. Heydt wrote:
Wed Jun 19, 2019 3:04 am
kyleisnot wrote:
Wed Jun 19, 2019 1:10 am
I am doing it this way because the trap is very fast, designed to break the animal's neck quickly and painlessly.
Not everyone will want to assist you in building a lethal trap. Have you considered using a live trap so that you can avoid killing animals you don't want to kill?
Not my choice, it's for a friend/client. It breaks it quickly and painlessly, they also use live traps but how they use traps isn't my business. I'm trying to prevent them from rotting in the sun for 3 days though.

kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Re: Battery for Pi Zero with 3G

Wed Jun 19, 2019 9:31 pm

drgeoff wrote:
Wed Jun 19, 2019 10:17 am
On a Zero the 5 volt pin of the power input micro-USB socket is directly connected by PCB trace to the 5 volt pin of the data micro-USB socket. If you want to remove power to a dongle you need additional hardware.
That's what I thought, and I was ready to accept that. I was confused by that thread though because they seemed to be doing the impossible.

kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 12:35 am

W. H. Heydt wrote:
Sun Jun 16, 2019 3:28 pm
A Pi0 is going to draw about 100mA (perhaps less, but work with that). It will be at 5v. So the required power (W) is 0.1A * 5v = 0.5W. To run for 120 hrs. (5 days), it will use 0.5W * 120h = 60Wh. Therefore, you need a battery with more than 60Wh available. Since batteries don't generally put out 5v, you have to allow for voltage conversion losses. Most batteries don't take kindly to being drained absolutely flat, so allow for that. Net result is that I would look for a battery with a capacity 80Wh to 120Wh, depending on type and voltage conversion efficiency.
So I have a stupid question, if I bought these batteries (link below), which are 10000 mah each, how do I allow for conversion losses? The pi should have relatively low energy consumption, but I need them to last at least a couple days. Assuming its a bit less than 100mA, but also that the battery is a bit less than 60Wh, (50Wh), that should last at least a little over 4 days. How much would be lost with conversion? Will these batteries work? If not I'm thinking about a cell phone battery pack (the ones for recharging phones), but if you have any better ideas for a battery, I'm still looking. Also if you happen to know of a good, cheap 3G dongle. I think I'll try one of those sketchy Huawei ones.
https://www.amazon.com/EBL-10000mAh-Rec ... B01M4LLBC5

EDIT: Im an idiot, forgot the link
Last edited by kyleisnot on Sat Jun 22, 2019 2:15 am, edited 1 time in total.

User avatar
Imperf3kt
Posts: 2775
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 1:32 am

Conversion losses depend on the regulator (either included or supplied by you)

It could be 30%, or it could be as low as 4%

General advise is to allow 20% for conversion losses, meaning your 10000mAh battery with step-up regulator will provide around 8000mAh at 5v
55:55:44:44:4C
52:4C:52:42:41

W. H. Heydt
Posts: 10889
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 1:46 am

Imperf3kt wrote:
Sat Jun 22, 2019 1:32 am
Conversion losses depend on the regulator (either included or supplied by you)

It could be 30%, or it could be as low as 4%

General advise is to allow 20% for conversion losses, meaning your 10000mAh battery with step-up regulator will provide around 8000mAh at 5v
You've forgotten that powerbank Ah ratings are (unless *explicitly* stated) invariably at 3.7v. So 10Ah at 3.7v is 37Wh. 80% of that is (roughly) 30Wh. The equivalent at 5v is 6Ah.

User avatar
Imperf3kt
Posts: 2775
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 1:50 am

Ah, so I did.
Thanks for clarifying.
55:55:44:44:4C
52:4C:52:42:41

kyleisnot
Posts: 7
Joined: Fri Jun 14, 2019 2:59 am

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 2:14 am

W. H. Heydt wrote:
Sat Jun 22, 2019 1:46 am
Imperf3kt wrote:
Sat Jun 22, 2019 1:32 am
Conversion losses depend on the regulator (either included or supplied by you)

It could be 30%, or it could be as low as 4%

General advise is to allow 20% for conversion losses, meaning your 10000mAh battery with step-up regulator will provide around 8000mAh at 5v
You've forgotten that powerbank Ah ratings are (unless *explicitly* stated) invariably at 3.7v. So 10Ah at 3.7v is 37Wh. 80% of that is (roughly) 30Wh. The equivalent at 5v is 6Ah.
Do you happen to have any ideas for the battery? I've seen people plug the pi directly into the 3.7V powerbank, is that possible? If so will that have a problem with a 3g Dongle?

User avatar
Imperf3kt
Posts: 2775
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 2:21 am

Those 3.7v powerbanks have a 5 volt step up regulator inside them, thats how they can run 5v devices (or charge your phone, as they're typically designed to do)
Its also where the conversion loss comes in.

It might be possible to run a headless Pi 0 directly from a 3.7v li-ion or li-po battery, some people had success with it years ago, but its not recommended and is only advisable for specific situations where you know exactly what doing so does.
Its inadvisable for an inexperienced person to use anything except a properly regulated 5v supply.


So to answer the question directly, a "powerbank" designed to charge your mobile phone or power USB devices, may power a Pi provided it can handle the current draw the Pi wants, and the USB cable you are using is decent quality and doesn't cause too much voltage drop.
55:55:44:44:4C
52:4C:52:42:41

W. H. Heydt
Posts: 10889
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Battery for Pi Zero with 3G

Sat Jun 22, 2019 5:16 am

kyleisnot wrote:
Sat Jun 22, 2019 2:14 am
Do you happen to have any ideas for the battery? I've seen people plug the pi directly into the 3.7V powerbank, is that possible? If so will that have a problem with a 3g Dongle?
The powerbanks put out 5v through, as already noted, a step up regulator. In order to determine if the powerbank will work, you need to test the current load for your setup and then select a powerbank that is rated to deliver *at* *least* the worst case current requirement for your project.

The data I gave above, computing the actual capacity in terms of 5v output, showing that a "10000mAh" (aka 10Ah) is really more like 6Ah at 5v, shows that the 10Ah figure is for *marketing* purposes. I.e. the companies that sell them lie. They want you think you can get 50Wh out of a 10Ah powerbank, when the reality is closer to 30Ah. That's why I show the math. I want people to learn to understand what they're actually buying and not be fooled by advertising hype.

Return to “General discussion”