Getting Started with the PowerBlock

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

  1. Attach a toggle or momentary power switch
  2. Optionally, attach a status LED
  3. Mount the PowerBlock on the Raspberry Pi
  4. Install the PowerBlock driver
Powerblock with Button and Status LED (not included)

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:

  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 Power Switch IC
PowerBlock USB C Connector

3. Mount the PowerBlock

To attach the PowerBloc, mount locking posts first. Then attach The PowerBlock such that its 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.

Powerblock with Button and Status LED (not included)

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.