Getting Started with the PowerBlock
The Hardware and software setup of the PowerBlock is done in only a few steps. You find all necessary information for making your project run wit the PowerBlock on this page.
Getting Started at a Glance
- Attach a toggle or momentary power switch
- Optionally, attach a status LED
- Mount the PowerBlock on the Raspberry Pi
- Install the PowerBlock driver
1. Attach a toggle or momentary button
To turn the Raspberry Pi on and off with the PowerBlock you need to attach a button to the two pins labeled with “switch”.
You can use a toggle or a momentary button. The type of button is detected automatically by the PowerBlock.
2. Optionally, attach a 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:
- Off: The LED is simply off.
- Booting: The LED slowly fades in and out.
- On: The LED constantly stays on.
- Shutting down: The LED fades in and out twice as fast as during boot up.
3. Mount the PowerBlock
To attach the PowerBlock, mount locking posts first. Then attach the PowerBlock such that it’s first 12 GPIO pins align with the 2×6 pins header of the PowerBlock.
4. Attach a Power Supply
You need to connect your USB-C cable only to the PowerBlock – and not to the Raspberry Pi directly. Alternatively to the USB-C connector you could also use the 5V and GND input pins for power supply.
5. Install the PowerBlock driver
To run the quick installation, you just need to call this one line from the Raspbian console:
wget -O - https://raw.githubusercontent.com/petrockblog/PowerBlock/master/install.sh | sudo bash
To uninstall the service you can simply call sudo ./uninstall.sh
from within the PowerBlock
directory.
More information can be found on the driver’s website.
And that’s it
The PowerBlock should do its job now.
Information about configuration possibilities, logging, and custom shutdown scripts can be found on the driver’s page.
You can also find further information in our forum.