“PowerBlock” – The safe power button  for the Raspberry Pi

soft power button PowerBlock
The PowerBlock is a soft power button add-on board for the Raspberry Pi. It allows safe shut down and allows you to conveniently turn on and turn off the power to the Raspberry Pi with a toggle or a momentary button.

Instead of just cutting the supply voltage with the risk of data loss the PowerBlock ensures a safe shutdown without the risk of any data losses that could occur otherwise.

Furthermore, an LED that you can optionally attach to the Powerblock indicates the power status at all times.

PowerBlock in Action – Demo Video

For privacy reasons YouTube needs your permission to be loaded. For more details, please see our Privacy Policy.
I Accept

 Features and Technical Specifications

  • Supports toggle and momentary switches
  • Automatic detection of switch type
  • Smooth power status indication via optional external LED
  • Micro USB connector for power supply
  • 2×6 pin header for mounting on the Pi
  • USB-A break out pins for optional USB-A power out connector
  • Software daemon for clean shutdowns
  • Optional pin outs for arbitrary 5V power supply
  • Optional DC Barrel Jack
  • No soldering required
  • Input Voltage: 5V
  • Output Voltage: 5V
  • Continuous Current @ 25°C: maximum 3.7 A
  • MOSFET Static On-Resistance: 0.065 Ω

Any toggle or momentary button can be connected to the PowerBlock. The type of switch is automatically detected. The power status of the Raspberry Pi can be indicated via an optional status LED.

You can order the PowerBlock here:

What our customers say

Works great! I have no clue with linux, managed it with your 1 line install.
I’d recommend to everyone.

Will Laughlan ,

Very neat little add on that “does exactly what it says on the tin”. Well made and sits nicely, was very easy to implement and get working.

Would recommend this product and was a smooth and easy transaction.


I bought the PowerBlock for part of my project i was building a Super Nintendo Pi. The product arrived swiftly, was easy to setup and works great, just what i needed. Would recommend.


 Further Details

The PowerBlock provides a Raspberry Pi power switch functionality. Why is it useful? The Raspberry Pi comes without a power switch. As soon as you plug the micro USB cable into the RPi, it turns on. If you want to shutdown the Raspberry Pi, you need to call a shutdown command to bring the system into a state in which you can safely remove the USB cable again. If you just pull out the micro USB cable the file system of the RPi might become corrupted and you risk losing data.

Here, the PowerBlock comes into play. It is stacked onto the GPIO header of the Raspberry Pi and provides a USB connector itself, a connector for a power button to control the power supply of the Raspberry Pi, and a connector for an optional LED to indicate whether the Raspberry Pi is off, booting, running, or shutting down. A micro controller on the PowerBlock board manages the power supply  and monitors the button state as well as the state of the Raspberry Pi. The driver ensures that a safe shutdown is initiated when you switch to “off”.  This also means that you do not need to plug and unplug the USB cable from the Raspberry anymore if you want to completely and safely turn it off.

 Hardware Interface of the PowerBlock

Mechanically Compatible with Raspberry Pi Models A, B, and Zero

The dimensions exactly match the mounting holes of the Raspberry Pi and can be mounted to the Raspberry Pi models A, B, and Zero.

Mechanically Compatible with Raspberry Pi Models A, B, and Zero

2x6 pin female header as connector to the Raspberry Pi

This header makes use of pins 1 to 12 of the GPIO header. The PCB is kept as small as possible so that you can easily access all other pins that are not used by the PowerBlock.

2x6 pin female header as connector to the Raspberry Pi

Soft power button PowerBlock Connector for RPi

Micro USB Connector for the power supply

The PowerBlock has a USB Micro connector.

Micro USB Connector for the power supply

Soft power button PowerBlock

Pin Out for a toggle or a momentary Switch

To control the power state of the Raspberry Pi the PowerBlock provides an interface for attaching a toggle or a momentary switch. The on-board microcontroller monitors the state of that switch as well as the one of the Raspberry.

Pin Out for a toggle or a momentary Switch

PowerBlock Pin Outs for Power Switch and Status LED

Pin Out for Status LED

The PowerBlock indicates the power state of the Raspberry Pi an optional 5V status LED. It can be attached to the two dedicated pins. These possible states can be “off”, “booting”, “on”, and “shutdown”. The different states are indicated with easy-to-distinguish static and pulsing patterns.

Pin Out for Status LED

Soft power button PowerBlock

Signal breakouts for input voltage, output voltage, and control signals

There are individual pin outs for the 5V input and output voltages, as well as for the control signals S1 (pin 12), and S2 (pin 11).

Signal breakouts for input voltage, output voltage, and control signals

PowerBlock Signal Break Outs

In-Service Programmer (ISP) pin-out for ATtiny

The PowerBlock makes use of an ATtiny85 microcontroller. You can access the microcontroller with the ISP header to reprogram it with whatever functionality you like.

In-Service Programmer (ISP) pin-out for ATtiny

PowerBlock in-service programmer interface

 Getting Started with the PowerBlock – Hardware and Software Setup of the Soft Power Button

PowerBlock with Attached Power Switch
To turn the Raspberry Pi on and off with the PowerBlock you need to attach a toggle switch to the two button pins on the PowerBlock. How does the PowerBlock work then? Technically speaking, the microcontroller on the PowerBlock looks, if the two pins of the switch are connected or not. If they are connected, a GPIO pin of the microcontroller on the PowerBlock is pulled to GND and interpreted accordingly.

  • It is important that you use a toggle switch and not a momentary button with the PowerBlock. Otherwise the Raspberry Pi will be turned off again right after booting.
  • If you do not want to use the power switch functionality you can disable this in the configuration file /etc/PowerBlockconfig.cfg by setting “powerswitch”: false.
  • The power switch circuitry of the PowerBlock leads to a tiny voltage drop and we made the experience that a good quality power supply and a good quality USB cable are mandatory for a working setup. If unsure, we can recommend the official Raspberry Pi Power Supply.
PowerBlock with Attached Status LED
The PowerBlock has pin outs for an optional status LED that indicates the power state of the Raspberry Pi. You can directly attach an LED to the pins that are marked with “LED”. You need to pay attention to the polarity of the LED: The LED pins are marked with “+” and “-” for that.

The LED will blink in four different patterns that depend on the power state of the Raspberry Pi:

  1. Off: The LED is simply off.
  2. Booting: The LED slowly fades in and out.
  3. On: The LED constantly stays on.
  4. Shutting down: The LED fades in and out twice as fast as during boot up.
PowerBlock with attached micro USB cable
You need to connect your micro USB cable only to the PowerBlock – and not to the Raspberry Pi directly. Alternatively to the micro USB connector you could also use the 5V and GND input pins for power supply.

For the software installation please follow the instructions from the driver website.


 Related Posts

Tutorial: A Power Switch for LibreELEC

In the following we will learn how to add a power switch for LibreELEC running on a Raspberry Pi. We will use a PowerBlock to not only add a power button, but also a [...]

  • PowerBlockling

Tiny Power Button for Raspberry Pi

Are you looking for a tiny power button solution for your Raspberry Pi that provides safe shutdowns? You only want a small button to turn off and on your Raspberry Pi without the need [...]

  • Emteria

PowerBlock: A Safe Power Button for Emteria.OS

If you are looking for a power button solution for your Emteria.OS project that makes use of a Raspberry Pi then look no further: The PowerBlock now supports Emteria.OS. Emteria.OS describes itself [...]

  • PowerBlock RPi 4 compatible

Our Boards Compatibility with the Raspberry Pi 4

The Raspberry Pi 4 was recently released. This post is about our boards and their compatibility with the Raspberry Pi 4. Are our extension boards like the PowerBlock or the ControlBlock compatible with it? The [...]