Professional Documents
Culture Documents
Raspberry Pi Zero 2 Battery Runtimes, Optimization, and Setup - PiCockpit - Monitor and Control Your Raspberry Pi - Free For Up To 5 Pis!
Raspberry Pi Zero 2 Battery Runtimes, Optimization, and Setup - PiCockpit - Monitor and Control Your Raspberry Pi - Free For Up To 5 Pis!
com/raspberry-pi/raspberry-pi-zero-2-battery/
If you want a more customizable solution, consider getting the PowerBoost 1000 Basic which will allow you to step up voltages from 1.8V which means
you can use 2x NiMH batteries or one lithium battery to power your Raspberry Pi Zero 2 W.
• Retro gaming emulation: Retroflag GPi case or a custom build with a 7” screen
• IoT/automation devices that are far from a power outlet (weather sensor, pollution detector, animal cameras,
plant watering devices, pet feeders)
1 of 7 09/11/2023 20:11
Raspberry Pi Zero 2 battery runtimes, optimization, and setup | PiCockpit | Monitor... https://picockpit.com/raspberry-pi/raspberry-pi-zero-2-battery/
After installation, you need to start and run the service by running:
then
Since we’re trying to establish how long of a battery runtime we can expect, it’s important to ensure uptimed’s config files allow much shorter logging
intervals than what’s default.
By default, uptimed only writes to the logs every hour, and will not record any records shorter than one hour.
In order to change this, you need to change the config file. By default
In Terminal, run:
By default, both variables are set to one hour (either 3600 seconds or 1h). By setting them to 60 seconds, we can log the battery’s runtime down to the
minute.
Idle Runtime
2 of 7 09/11/2023 20:11
Raspberry Pi Zero 2 battery runtimes, optimization, and setup | PiCockpit | Monitor... https://picockpit.com/raspberry-pi/raspberry-pi-zero-2-battery/
I ran a 5000mA power bank on the Raspberry Pi Zero 2W with no attachments and on the Raspberry Pi OS (2021-10-31). Everything is default.
This represents the best-case battery life that you would get out of a default Raspberry Pi Zero 2 W.
Stress Runtime
In reality, you’re likely to have certain attachments to it such as HDMI or something on the GPIO. So, the next test will be a better way to find out what’s the
worst-case scenario.
The –cpu-method fft and -cpu 4 were used based on a conclusion on the Raspberry Pi forum, which found that it drew one of the higher loads
I immediately noticed the CPU utilization shooting up to 100% upon executing this command.
Optimizations
You can further reduce power consumption by turning off various components of the Raspberry Pi Zero 2 W.
3 of 7 09/11/2023 20:11
Raspberry Pi Zero 2 battery runtimes, optimization, and setup | PiCockpit | Monitor... https://picockpit.com/raspberry-pi/raspberry-pi-zero-2-battery/
Before
You can save 5mA by turning off the LED. Here’s how.
If you just want to run it once, you need to run this command in terminal:
However, if you want the LED to be permanently turned off at reboot, then open up your terminal and type in:
sudo crontab -e
Once you’re in the file, scroll all the way to the bottom and type in these lines:
After your next and subsequent reboots, your Pi Zero 2 W’s green LED will stay lit until it boots the OS up, whereby it’ll be turned off.
To make this command run on reboot, open up your terminal and type in
sudo crontab -e
Once you reboot, you should see that your WiFi is disabled at startup.
4 of 7 09/11/2023 20:11
Raspberry Pi Zero 2 battery runtimes, optimization, and setup | PiCockpit | Monitor... https://picockpit.com/raspberry-pi/raspberry-pi-zero-2-battery/
After
Or perhaps you plan to run your Raspberry Pi Zero 2 W in headless mode. That’s also another reason to disable HDMI.
The contradictory thing here is that I had to enable WiFi, hence incurring power drain, in order to disable HDMI so that I could control my Pi Zero 2 via SSH.
So, choose your battles.
sudo raspi-config
Then, go to
Now that this is done, you can go ahead and disable your HDMI by running the command:
5 of 7 09/11/2023 20:11
Raspberry Pi Zero 2 battery runtimes, optimization, and setup | PiCockpit | Monitor... https://picockpit.com/raspberry-pi/raspberry-pi-zero-2-battery/
Disable cores
While all of the tips above reduce idle power consumption, you can also limit the maximum power consumption by disabling cores.
Type in in the first line and save the file by pressing CTRL + X and saving by pressing Y.
Then, reboot.
Upon reboot, you can check if your modification worked by running in terminal.
If you see “Off-line CPU(s) list: 1-3”, then it worked and you’re running on one core.
If you want to learn more about what you can do with your Raspberry Pi Zero 2, check out this article.
← Raspberry Pi Zero 2 W WiFi chipset, speeds & monitor mode 10 curious Raspberry Pi Pico facts →
Leave a Comment
Comment
Name (required)
6 of 7 09/11/2023 20:11
Raspberry Pi Zero 2 battery runtimes, optimization, and setup | PiCockpit | Monitor... https://picockpit.com/raspberry-pi/raspberry-pi-zero-2-battery/
Website
Save my name, email, and website in this browser for the next time I comment.
Submit Comment
Your email will be used to send you the PiCockpit Newsletter only. You can unsubscribe anytime. For more details, review our privacy policy and our mailer service's
privacy policy.
SUBSCRIBE
The Best Raspberry Pi Projects of October Paragon Project: Raspberry Pi Fractal Art
2023 By Adam | October 30, 2023
By Adam | November 2, 2023
7 of 7 09/11/2023 20:11