8 Ways to Save Power in Your Raspberry Pi Projects (2024)

Although the Raspberry Pi is a very power-efficient computer, there are specific scenarios where you may want to drive power consumption even lower. One of these is if you are using a power bank or an uninterruptible power supply (UPS) to supply electricity to your Raspberry Pi. Decreased power consumption can also be useful if you are running an always-on project, and you need to keep your energy bill as low as possible.

Understanding the Raspberry Pi's Power Consumption

Thanks to its ARM-based architecture, the Raspberry Pi is a very low-power device. The Raspberry Pi 4 uses 2.7W while idle, according to tests by Jeff Geerling. In comparison, the most efficient x86 computer will consume 10W to 25W, significantly more than what the Raspberry Pi uses operating under 400% CPU load, 6.4W.

This all serves to drive home the point that the Raspberry Pi is already not making a significant impact on your energy bill, at least compared to your other gadgets and devices. So, further decreasing power consumption on a Raspberry Pi may be a waste of time and effort if your project does not require it.

However, if energy efficiency is crucial to your project, down to the last milliwatt, then the tips described below will be helpful to you.

1. Run a Headless Setup

8 Ways to Save Power in Your Raspberry Pi Projects (1)

A headless setup is a common way of running a Raspberry Pi, and it involves using the Pi without a keyboard, mouse, or display connected. Since not all projects require a display or any of those, a headless setup is a good way to reduce the power consumption of your Raspberry Pi setup.

All you need is a separate computer and an internet connection (either via Wi-Fi or Ethernet). Once SSH is enabled on your Raspberry Pi and both computers are connected to the same network, you are good to go. You can then use a command-line terminal or an SSH client such as PuTTY on your other computer to issue remote commands to the Pi. VNC is another option if you prefer working with a graphical user interface (GUI)

2. Remove Unneeded Peripherals

You don’t have to run your Raspberry Pi headless all the time. Simply disconnecting peripherals when they are not needed will reduce power consumption. Keyboards, mice, and storage devices all consume power, even when not in use.

Wireless devices typically use slightly less power than wired ones. Most USB mice and keyboards use around 0.5W of power per hour, and this figure increases when they’re in use. While this figure might not seem like much, it tends to add up over time.

Another thing to keep in mind is that hard disk drives (HDDs) typically consume much more electricity compared to solid-state drives (SSDs). So, if you are trying to save as much electricity as possible, opt for an SSD or SD card instead. SSDs offer several other advantages over HDDs.

3. Disable the USB and HDMI Ports

8 Ways to Save Power in Your Raspberry Pi Projects (2)

Although unused ports draw a small amount of power, you may want to disable them if you're trying to save as much power as possible. When disabling USB, you should note that you can’t disable ports individually. All the ports get turned off when you disable USB.

Also, turning off the USB controller disables Ethernet, since they share the same data bus on the Raspberry Pi. Disabling USB will save about 100mA.

To disable USB on the Raspberry Pi 3B+ and earlier models, enter the following command in the terminal:

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

To re-enable the controller, simply change the unbind in the last command to bind.

Also, you should disable HDMI if you are running a headless setup. This will save about 25mA, adding up to 125mA in total. To turn off HDMI, run the following command:

sudo /opt/vc/bin/tvservice -o 

To turn it back on, all you need to do is change the -o to -p in the last command.

You should however note that if you follow the steps described above, USB and HDMI will be re-enabled when you reboot the Raspberry Pi. But, you can add the commands to the rc.local file to run them on startup. To learn more, check out our list of three ways to run a Raspberry Pi program at startup.

4. Disconnect the Power Supply When Not in Use

8 Ways to Save Power in Your Raspberry Pi Projects (3)

A common mistake is to leave the Raspberry Pi connected to a power source when it is not in use. Even when shut down, the Raspberry Pi continues to draw power, between 0.1W and 0.15W. Be sure to remove the Raspberry Pi from the power supply when it is not needed.

5. Slow Down the Processor

8 Ways to Save Power in Your Raspberry Pi Projects (4)

Underclocking the Raspberry Pi’s CPU makes it run at a slower clock speed but reduces its power consumption and may be useful for battery-powered, portable projects that don’t involve complex processing. This follows a similar process to overclocking your Raspberry Pi.

Just navigate to the /boot folder, open config.txt, and change the preset clock speed, 1.5GHz for the Raspberry Pi 4. To underclock your Raspberry Pi down to 1GHz, you would add these lines to /boot/config.txt:

arm_freq=1300
arm_freq_max=900M/code>

6. Disable the Onboard LEDs

The Raspberry Pi 4 has four onboard LEDs: two next to the GPIO header and two on the Ethernet port. Disabling them saves around 2mA and is as easy as editing the config.txt file. However, the commands are a bit different, depending on the Raspberry Pi model.

For the Raspberry Pi 4, simply edit the /boot/config.txt file and add the following parameters:

# 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 ACT LEDs
dtparam=eth_led0=4
# Disable ethernet LNK LEDs
dtparam=eth_led1=4

For the Raspberry Pi 3B+, the last few lines to turn off the Ethernet LEDs are a bit different.

# 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 ACT LEDs
dtparam=eth_led0=14
# Disable ethernet LNK LEDs
dtparam=eth_led1=14

7. Optimize Your Code

If you are running programs that you wrote yourself, you should ensure that you avoid certain bad practices that can impact power consumption. You should keep processing to the barest minimum needed to get the job done. Limit loop iterations, simplify operations as much as possible, and prioritize functionality over design in applications.

8. Use a Pi Zero or Pico Instead

8 Ways to Save Power in Your Raspberry Pi Projects (5)

This will most likely result in the most drastic reduction in power consumption. The Raspberry Pi Zero 2 W is the most power-efficient Raspberry Pi, according to Hackaday. It is capable of running faster and completing more tasks per watt of power, compared to other Raspberry Pi models.

The Raspberry Pi Pico is a microcontroller based on the RP2040 chip, and it offers the lowest power consumption of a Raspberry Pi board. The popcorn media player demo described in the Raspberry Pi Pico datasheet (VGA, 4-bit SD card access, and I2S audio) consumes about 0.45W of power. It also has two power-saving modes that decrease power consumption even further.

If your project doesn't require considerable processing power, consider using the Raspberry Pi Pico or Zero instead of the more powerful models.

Limit Power Consumption in Your Raspberry Pi Projects

As mentioned, the Raspberry Pi is already a very power-efficient device and there isn’t a lot you can do to minimize power consumption further. However, in power-critical applications where every milliampere counts, disabling ports and interfaces you don’t need will help you save power and keep your Raspberry Pi on for as long as possible.

If you make too many changes or want to reset your Raspberry Pi to the initial settings, all you have to do is flash a new version of the Raspberry Pi OS on the SD card.

  • DIY
  • Raspberry Pi

Your changes have been saved

Email is sent

Email has already been sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

Manage Your List

Follow

Followed

Follow with Notifications

Follow

Unfollow

Readers like you help support MakeUseOf. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

8 Ways to Save Power in Your Raspberry Pi Projects (2024)
Top Articles
7 Best-Performing Utility Stocks of September 2024 - NerdWallet
Who pays for the transformations on Love Your Garden?
UPS Paketshop: Filialen & Standorte
Minooka Channahon Patch
Kathleen Hixson Leaked
Sound Of Freedom Showtimes Near Governor's Crossing Stadium 14
Dew Acuity
Toyota Campers For Sale Craigslist
Craigslist Cars And Trucks For Sale By Owner Indianapolis
Insidious 5 Showtimes Near Cinemark Tinseltown 290 And Xd
7.2: Introduction to the Endocrine System
Lycoming County Docket Sheets
Canelo Vs Ryder Directv
Lost Pizza Nutrition
Edgar And Herschel Trivia Questions
Cranberry sauce, canned, sweetened, 1 slice (1/2" thick, approx 8 slices per can) - Health Encyclopedia
ATV Blue Book - Values & Used Prices
What to do if your rotary tiller won't start – Oleomac
Notisabelrenu
Superhot Unblocked Games
Washington Poe en Tilly Bradshaw 1 - Brandoffer, M.W. Craven | 9789024594917 | Boeken | bol
Walmart End Table Lamps
Finger Lakes Ny Craigslist
Cashtapp Atm Near Me
"Une héroïne" : les funérailles de Rebecca Cheptegei, athlète olympique immolée par son compagnon | TF1 INFO
R Cwbt
Zack Fairhurst Snapchat
Barber Gym Quantico Hours
Uncovering the Enigmatic Trish Stratus: From Net Worth to Personal Life
Till The End Of The Moon Ep 13 Eng Sub
Puffin Asmr Leak
Craig Woolard Net Worth
Perry Inhofe Mansion
Gyeon Jahee
Hypixel Skyblock Dyes
Craigslist West Seneca
Empire Visionworks The Crossings Clifton Park Photos
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
Skip The Games Grand Rapids Mi
Japanese Big Natural Boobs
Improving curriculum alignment and achieving learning goals by making the curriculum visible | Semantic Scholar
Blackwolf Run Pro Shop
Vintage Stock Edmond Ok
6576771660
Kenwood M-918DAB-H Heim-Audio-Mikrosystem DAB, DAB+, FM 10 W Bluetooth von expert Technomarkt
New Zero Turn Mowers For Sale Near Me
House For Sale On Trulia
SF bay area cars & trucks "chevrolet 50" - craigslist
Cars & Trucks near Old Forge, PA - craigslist
Frank 26 Forum
Elizabethtown Mesothelioma Legal Question
Latest Posts
Article information

Author: Lakeisha Bayer VM

Last Updated:

Views: 5574

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Lakeisha Bayer VM

Birthday: 1997-10-17

Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

Phone: +3571527672278

Job: Manufacturing Agent

Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.