Optimizing Raspberry Pi Power Consumption | Blues Wireless (2024)

Title image credit @vishnumaiea on Unsplash.

IoT connectivity components can also be power hogs! At Blues Wireless, we offer a System-on-Module providing cellular connectivity that works globally in 137+ countries and only consumes 8uA at rest. Learn more here.

When the Raspberry Pi single-board computer was first announced back in 2012, I doubt few people were considering the utility of a Pi in a truly off-grid setting, especially considering the state of battery technology at the time.

Fast forward to today. While we haven’t exactly made at-home nuclear reactors a thing (yet), we do have access to robust battery and solar tech along with new reasons to deploy Raspberry Pis in edge computing scenarios.

Optimizing Raspberry Pi Power Consumption | Blues Wireless (1)

Why Raspberry Pi?

There are numerous microcontrollers and stripped-down SBCs like the Raspberry Pi Zero that are more energy efficient options than a full Raspberry Pi 4. But that efficiency comes with a cost of its own in terms of a reduction in features and functionality.

Optimizing Raspberry Pi Power Consumption | Blues Wireless (2)

Maybe the question we should be asking is: Why on earth would we want to deploy a Raspberry Pi remotely?

The answer? Normally, you wouldn’t want to!

However, there are some legitimate exceptions to the rule:

CPU Power

If you’re remotely running Machine Learning models that need to be processed in near realtime, the ARM Cortex-A72 CPU running at 1.5GHz is tough to beat. Certain types of TinyML workloads can run in milliseconds on MCUs, but if your project needs to do machine vision work, an SBC is a better fit.

Ease of Expansion

The Pi HAT ecosystem is mature and provides production-ready expansion options for nearly every scenario. Case in point, the Notecard and Notecarrier Pi HAT from Blues Wireless allow for drop-in cellular communications (at a power-sipping 8mA when idle) for scenarios where remote data relaying is a key requirement.

Optimizing Raspberry Pi Power Consumption | Blues Wireless (3)

Python FTW

The Raspberry Pi OS ships with a full Python distribution. While CircuitPython and MicroPython are fine for the vast majority of IoT projects, there are some Python libraries that don’t support those two derivatives.

Power Optimization Tips

The anchor around the neck of the Raspberry Pi is its estimated 600mA active current consumption.

Let’s see how we can trim that down to a manageable value with some simple configuration tweaks.

  • Disable the USB Controller
  • Disable HDMI Output
  • Disable Wi-Fi and Bluetooth
  • Clock Down the CPU
  • Disable Onboard LEDs

Disable the USB Controller

⚡️ Power Saved? Approximately 100mA. ⚡️

If you’re running your Raspberry Pi in a headless configuration, it’s likely you can get away with not powering the onboard USB controller. Note that even if you aren’t using a mouse or keyboard, they are still powered!

To disable the USB controller on your Raspberry Pi, execute the following command:

echo '1-1' |sudo tee /sys/bus/usb/drivers/usb/unbind

And then to re-enable the USB controller when it’s needed again:

echo '1-1' |sudo tee /sys/bus/usb/drivers/usb/bind

After a reboot the USB controller will be enabled automatically.

Disable HDMI Output

⚡️ Power Saved? Approximately 30mA. ⚡️

Again on a headless Pi you, by definition, don’t need to hook up a monitor. If that’s the case, you can also disable the HDMI output.

To disable the HDMI output on your Raspberry Pi, execute the following command:

sudo /opt/vc/bin/tvservice -o

And then to re-enable the HDMI output when you need it back again, use this command:

sudo /opt/vc/bin/tvservice -p

As with disabling the USB controller, HDMI output is enabled after a reboot.

Disable Wi-Fi and Bluetooth

⚡️ Power Saved? Approximately 40mA. ⚡️

If your solution isn’t using Wi-Fi or Bluetooth, you can likely disable them.

If you disable HDMI, USB, and Wi-Fi at the same time you’ll have trouble interfacing with your Pi!

To disable Wi-Fi and Bluetooth, open /boot/config.txt, add these parameters, and reboot:

[all]
dtoverlay=disable-wifi
dtoverlay=disable-bt

To re-enable Wi-Fi and Bluetooth (or just one of them), simply remove the parameter(s) from the file and reboot.

Clock Down the CPU

⚡️ Power Saved? Varies! ⚡️

If you don’t require the full power of the Raspberry Pi CPU (which is overkill for many remote monitoring situations anyway), you might save a few mA by “underclocking” the CPU.

For example, to set the CPU clock speed to a maximum of 900MHz, you could update /boot/config.txt and change the following parameters:

[all]
arm_freq=900
arm_freq_max=900

You can also play around with the core_freq_min, over_voltage, over_voltage_min, and many other parameters that are well documented in the Raspberry Pi overclocking options.

Please note that you may not see power savings in certain scenarios. For example, if you have a process that runs longer at a slower clock speed, versus shorter at a faster clock speed, you’re not going to see a net change in power consumption.

Disable Onboard LEDs

⚡️ Power Saved? Approximately 10mA. ⚡️

We can disable the onboard LEDs on the Pi by again editing the /boot/config.txt file, adding the following, and rebooting:

[pi4]
# Disable the PWR LED
dtparam=pwr_led_trigger=none
dtparam=pwr_led_activelow=off
# Disable the Activity LED
dtparam=act_led_trigger=none
dtparam=act_led_activelow=off
# Disable ethernet port LEDs
dtparam=eth_led0=4
dtparam=eth_led1=4

Please note that these configurations are specific to the Raspberry Pi 4 Model B!

Making Changes Permanent (or Resetting to Default)

Any changes made to your /boot/config.txt file will persist after a reboot. If you’d like to issue the USB, HDMI, Wi-Fi, and Bluetooth disabling commands upon boot, edit your .bashrc file and add those commands.

Likewise, deleting the changes you made to /boot/config.txt and rebooting will reset your Raspberry Pi back to its default state.

Supplemental Power

Maybe the most obvious tip of them all for remote deployments is to source additional power from the sun. By adding a reasonably-sized solar array to your Raspberry Pi, you can significantly extend battery life (even, in theory, making it a sustainable solution in full sun environments!).

Using the PiJuice HAT is an easy way to add a solar array to your Raspberry Pi. It also provides mechanisms for graceful shutdowns (and boot ups) at pre-defined battery charge levels.

You can see a PiJuice used in this Hackster project: Solar-Powered Crypto Mining with Raspberry Pi.

Optimizing Raspberry Pi Power Consumption | Blues Wireless (4)

Alternatively, you can use a USB power bank with pass-through charging. This allows the power bank to power the Pi, and a solar array to charge the battery at the same time.

This arrangement was put to the test in the another Hackster project: Remote Birding with TensorFlow Lite and Raspberry Pi.

Power-Optimized Cellular for the Raspberry Pi

Remote monitoring solutions are often outside the range of traditional network communication options like Wi-Fi. This is one reason why Blues Wireless created the developer-friendly Notecard to provide cost-effective cellular for IoT solutions.

Optimizing Raspberry Pi Power Consumption | Blues Wireless (5)

The Notecard is a tiny 30mm x 35mm SoM and ships ready to embed in a project via its M.2 connector. To make prototyping easier, Blues Wireless also provides a series of expansion boards (called Notecarriers).

The Notecarrier-Pi acts as a host HAT for the Notecard. It provides an interface between the Raspberry Pi and the Notecard. With pass-through headers, it fits right in with whatever other Pi HATs you are using (like the PiJuice HAT pictured above!).

The beauty of the Notecard can be boiled down to:

  1. 🧑‍💻 The simplicity of the API (JSON in and JSON out).
  2. 🤝 The agnostic nature of full SBC and MCU compatibility.
  3. 💰 The pricing ($49 for 10 years and 500MB of data).
  4. 🔐 The baked-in security model with encrypted traffic traveling through VPN tunnels.
  5. ⚡️ The power-sipping 8mA when idle.

Learn more about how the Notecard makes a perfect companion to your power-optimized Raspberry Pi by browsing the documentation or grabbing your own Raspberry Pi Starter Kit. ⚡️

Share on:

Optimizing Raspberry Pi Power Consumption | Blues Wireless (2024)

FAQs

How to reduce power consumption on a Raspberry Pi? ›

8 Ways to Save Power in Your Raspberry Pi Projects
  1. Run a Headless Setup. ...
  2. Remove Unneeded Peripherals. ...
  3. Disable the USB and HDMI Ports. ...
  4. Disconnect the Power Supply When Not in Use. ...
  5. Slow Down the Processor. ...
  6. Disable the Onboard LEDs. ...
  7. Optimize Your Code. ...
  8. Use a Pi Zero or Pico Instead.
Jun 22, 2023

What is the power consumption of a Raspberry Pi? ›

Typical power requirements
ProductRecommended PSU current capacityTypical bare-board active current consumption
Raspberry Pi 1 Model A+700mA180mA
Raspberry Pi 1 Model B+1.8A330mA
Raspberry Pi 2 Model B1.8A350mA
Raspberry Pi 3 Model B2.5A400mA
10 more rows

What is the most energy efficient Raspberry Pi? ›

But by combining four cores tightly with on-chip memory, the Raspberry Pi Zero 2 W is definitely the most energy-efficient Pi.

How do you optimize a Raspberry Pi? ›

Get ready for some awesome performance!
  • Connect a Reliable Power Supply. One thing you need to make sure with any Raspberry Pi setup is that you're using a reliable power supply. ...
  • Employ a Lightweight Operating System. ...
  • Ditch the Bloatware. ...
  • Disable JavaScript. ...
  • Run From USB/HDD. ...
  • Take It Easy, Don't Push Your Pi.
Aug 20, 2018

How to reduce Raspberry Pi 5 4 standby power consumption? ›

Reducing Raspberry Pi 5 Power Consumption
  1. Open a Terminal and run this command. This will open a nano text editor where we can make changes to the EEPROM. ...
  2. Scroll down and change the following line. POWER_OFF_ON_HALT=0 Change to POWER_OFF_ON_HALT=1.
  3. Press CTRL + X, Y and then ENTER to save and exit.
Dec 5, 2023

What is the maximum current consumption of Raspberry Pi 4? ›

Re: Pi 4B Maximum Current

claims power consumption under load (likely not stress) is 7.6 watts or 1.52A.

Are Raspberry Pis power efficient? ›

The high usage figure is reasonable for a Raspberry Pi 2 Model B, or an original Raspberry Pi model B. The model A+ and Pi Zero consume the least power. Even at relatively high electricity prices you are looking at < $0.02 per day of running the box.

How to view Raspberry Pi power consumption? ›

One reliable way to accurately measure the wattage being drawn by the Raspberry Pi would be with a USB multimeter (sometimes called USB voltmeter or USB ammeter).

Is it bad to run a Raspberry Pi 24 7? ›

Yes, it is completely normal to run a Pi 24/7. Even for years at a time. They use so little power that its not worth turning them off when not in use. I have 4 Pi's running all the time.

Is there anything better than a Raspberry Pi? ›

The Banana Pi BPI-M4 and M5 are powerful Raspberry Pi alternatives developed by SinoVoip. The BPI-M4 offers similar performance to the Raspberry Pi but includes more ports, including HDMI, and built-in support for Android and Linux.

Which is more efficient Raspberry Pi or Arduino? ›

In summary, Arduino has a simpler software environment that is well-suited for basic control of inputs and outputs, while Raspberry Pi has a more powerful and versatile operating system that provides greater functionality for complex projects.

What is optimal Raspberry Pi temperature? ›

Monitoring Clock Frequency, Voltage and Temperature

According to Raspberry Pi Documentation, the official operating CPU temperature limit is 85°C.

Which Raspberry Pi is the fastest? ›

Raspberry Pi 5 is faster and more powerful than prior-generation Raspberry Pis, and like most general-purpose computers, it will perform best with active cooling. The Raspberry Pi Case for Raspberry Pi 5, with its integrated fan, is one way to provide this.

Why is Raspberry Pi so hard to get right now? ›

The global chip & semiconductor shortage fueled it. The COVID-19 pandemic brought about virus outbreaks, resulting in reduced working opportunities, labor challenges, and even geopolitical uncertainties like the US-China chip war, all of these above kickstarted the chip & semiconductor shortage.

How do I lower my power supply usage? ›

To do this, adjust the power plan under Windows. Right-click on the Start menu icon and select Power Options. Under Energy Saving Mode you can set the period of time after which the PC switches to energy-saving mode. You can also adjust the advanced power settings to optimize system performance and power consumption.

What is alternative power for Raspberry Pi? ›

If you can't or prefer not to power your Raspberry Pi from the mains, a compatible power bank will be the next best option. A power bank will especially come in handy for portable or always-on projects. The power back doesn't have to supply exactly 3A.

Is it safe to leave a Raspberry Pi plugged in? ›

It won't hurt your Pi to leave power connected after it has shut down. You can also briefly connect pin 5 on P1 (the GPIO connector) to any ground pin (like pin 6) to wake the Pi from the Shutdown state.

How to reduce power consumption in Linux? ›

Enabling the wireless power-saving option can significantly reduce power consumption while the system is connected to Wi-Fi and Bluetooth. This command automatically reduces power consumption when the USB devices are attached but not used by the system.

Top Articles
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 6235

Rating: 4.4 / 5 (45 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.