Spin Case - Power Module Setup

Connecting the power module to your Raspberry Pi 

  • Power connection

Connect your original Raspberry Pi power source/micro-USB cable into the back of your Spin Case. Connect the Spin Case's internal micro-USB cable to the Raspberry Pi power port inside your Spin Case.

  • GPIO Leads

The black lead is "OUT" and red lead is "IN"

http://elinux.org/RPi_Low-level_peripherals

Connect each lead to any individual GPIO-labeled pin in the diagram to the right (e.g., GPIO 17, GPIO 23, GPIO 24, but not a ground or power pin. GPIO 0 and 1 should be avoided as well).
The script is setup by default for the black (OUT) lead attached to GPIO 23 and the red (IN) lead attached to GPIO 24. If you would like to use different pins then simply change the pin in the script as explained below.

  • Script Setup

You can use either keyboard input or SSH to install the script for the power module

If you have a keyboard connected to your Pi then you can type the instructions listed below into the command line, there is no need to use SSH. The Pi must have internet access during installation (but not needed after) for setup. To access command line in RaspBMC, go to the power icon and then select exit.

For SSH, I recommend using Putty (www.putty.org) or WinSCP (winscp.net), both free.

To SSH into your Pi, find the Pi's IP address provided by your router and enter it in the SSH client (use port 22). Common log-ins are:

  • RaspBMC/Raspbian
  • user: pi                      password: raspberry
  • OpenELEC
  • user: root                  password: openelec
  • Xbian
  • user: root                  password: raspberry
  • Arch
  • user: root                  password: root

Installing the script

For RaspBMC/Raspbian/Debian distributions (Xbian as well, omit the word sudo), type the following and hit enter after each line:

1. wget http://files.mausberrycircuits.com/setup.sh

2. sudo bash setup.sh

3. sudo reboot

For OpenELEC:

1. wget http://files.mausberrycircuits.com/setupOE.sh

2. bash setupOE.sh

3. reboot

For Arch:

1. wget http://files.mausberrycircuits.com/setupArch.sh

2. bash setupArch.sh

3. reboot

After the Raspberry Pi has fully rebooted, your switch is now ready for use!

 

To use a different GPIO pin:

RaspBMC/Raspbian/Debian:

1. sudo nano /etc/switch.sh

OpenELEC:

1. nano /storage/.config/switch.sh

Arch:

1. nano /etc/switch.sh

At the top of the script you can change "GPIOpin1=23" and "GPIOpin2=24" to the pins of your choice as numbered in the header diagram above.

Pressing the power button on the Spin Case will turn your Pi on. To turn off your Pi, simply press and hold the button for approximately 3 seconds and the illuminated light should fade out. If for some reason you need to perform a hard reset then simply press and hold the button for approximately 5 seconds until power is removed.

For any setup issues or troubleshooting, please e-mail mausberrycircuits@gmail.com