The energy consumption of a Raspberry Pi single-board computer (SBC) is an important consideration for IoT engineers who are looking to develop energy-efficient applications, particularly for battery-powered wireless devices. The growth of these devices have fed a need for energy-efficient devices that can be deployed in a location and left for several years.
Understanding Raspberry Pi power performance
Raspberry Pi computers, especially newer models like the Raspberry Pi 4, are more powerful than ever but also consume more energy compared with earlier versions.The Raspberry Pi 4, for example, typically requires around 2.5W to 5W during normal operation, depending on its workload and attached peripherals. In IoT applications even a few watts can significantly affect battery life.
For battery-powered IoT devices, it’s often beneficial to use lower-powered versions like the Raspberry Pi Zero or Zero W, which typically consume under 1W during operation. However, regardless of the model, the overall optimisation energy consumption is key for increasing the lifespan of the device and reducing operational costs.
Strategies to optimise energy consumption
- Choose the right model
Not all Raspberry Pi models are equal when it comes to energy efficiency. The Raspberry Pi 4, while powerful, may not be necessary for most applications. Instead, opting for a Raspberry Pi Zero or Zero W can lead to reduced energy consumption, especially in projects where intensive processing power isn’t required. The Pi Zero consumes between 100mA and 150mA, compared to the 600mA to 1A needed by the Pi 4.
- Underclocking and voltage regulation
Reducing the clock speed of the Raspberry Pi is one of the most effective ways to lower its energy consumption. Underclocking reduces the CPU’s frequency, thereby decreasing power draw. This can be achieved by modifying the Pi’s configuration file and adjusting the parameter to a lower value.
For example, reducing the CPU frequency from the default 1.5GHz to 1GHz or even lower will lead to significant energy savings, though this may come at the expense of performance. For applications that don’t require high-speed processing, this trade-off can be well worth it.
Additionally, you can also reduce the core voltage of the Raspberry Pi, which directly impacts energy consumption. Lowering the voltage setting through the same configuration file can further extend battery life. However, ensure the voltage reduction is within safe limits to avoid instability.
- Disable unnecessary peripherals
Many peripherals and services running on the Raspberry Pi by default can draw power even when not needed. Disabling these unused features can help conserve energy:
- HDMI: If you’re using the Raspberry Pi in a headless configuration (without a display), the HDMI port doesn’t need to be active
- USB ports: If your IoT system does not require USB peripherals, you can turn off power to the USB ports using a script or configuration change
- LEDs: The activity and power LEDs on the Raspberry Pi also consume a small amount of power. These can be turned off
Disabling these peripherals may only save a few milliwatts, but long-term this can add up.
- Utilise sleep modes and scheduling
One of the most effective ways to reduce power consumption is to put the Raspberry Pi into a low-power sleep mode when it’s not in active use. Unfortunately, the Raspberry Pi does not natively support deep sleep modes like some microcontrollers, but there are workarounds.
One approach is to use an external power management board, such as a programmable sleep module that can cut power to the Pi entirely when it’s not needed, then wake it up periodically for scheduled tasks. These boards can monitor battery voltage and ensure the Pi only runs when absolutely necessary.
Another option is to use the cron scheduler on the Raspberry Pi to perform periodic tasks and then use software to shut down the device between tasks. For example, if your application only needs to send sensor data once every hour, the Pi could power down for 58 minutes, wake up to perform the task, and then power down again.
- Minimise peripheral power draw
Many IoT applications rely on external sensors and modules that are connected to the Raspberry Pi’s GPIO pins. It’s crucial to be mindful of how much power these peripherals consume and to choose low-power alternatives where possible. For example:
- Sensors: Use low-power sensors that enter sleep mode when not actively measuring. Many modern sensors are designed for energy efficiency and consume only a few milliwatts in standby mode
- Network interfaces: Wi-Fi and Bluetooth are common for applications, but they can significantly increase power consumption. If your device doesn’t require continuous connectivity, consider periodically disabling the Wi-Fi interface using software commands to save power
- Displays: If your IoT application includes a display, consider using low-power alternatives like e-ink displays, which only consume power when the display changes
Conclusion
Optimising the energy consumption of Raspberry Pi SBCs yields benefits for applications dependent on the power performance. It also requires a combination of hardware and software strategies to minimise consumption without ultimately compromising functionality. Using the appropriate model, underclocking, using sleep modes, disabling unused peripherals and carefully managed peripheral power draw can lead to the extended lifespan of a battery-powered IoT device.
There’s plenty of other editorial on our sister site, Electronic Specifier! Or you can always join in the conversation by commenting below or visiting our LinkedIn page.