NOTICE! You can Raspbian images with the Pi-Pan software pre-installed at the bottom of this page.

Required Operating System for Pi-Pan


Pi-Pan works with standard Raspbian distribution.
You can download it here:


Pi-Pan Software and installation

Download appropriate GZ file from following url, and move it on your Raspberry Pi:

http://www.mindsensors.com/largefiles/pi-pan-2017-Stretch.tar.gz (For RPi 3 Model B)

http://www.mindsensors.com/largefiles/pi-pan-2016-Jessie.tar.gz (For RPi 3 Model B)

http://www.mindsensors.com/largefiles/pi-pan-2015-Jessie.tar.gz (For RPI 2 or RPi B+ with 2015 or newer Raspbian Jessie images.)

http://www.mindsensors.com/largefiles/pi-pan-for-2015-wheezy.tar.gz (For RPI 2 or RPi B+ with 2015 or newer Raspbian Wheezy images.)

Alternately, to download on your Raspberry Pi directly, run following command (use the appropriate file-name from the documents above):

wget -O pi-pan.tar.gz http://www.mindsensors.com/largefiles/(file-name)

unzip the file with following command (use the appropriate file name):
tar -zxvf pi-pan.tar.gz

Pi-Pan uses ServoBlaster; For simplicity of installation, a copy of ServoBlaster is included with PiPan software. To install it run following command:
cd pi-pan
sudo ./install-pi-pan.bash

If you find yourself having issues at this point in Raspbian Stretch, you may have to run this command before running the install script:
sudo apt-get -y install python-smbus
Pi Pins for PiPan board

How to Connect Pi-Pan board on your Pi

The Pi-Pan controller board connects on the Pi as in adjacent picture. (On all models of Raspberry Pi, Pin 2 is the corner pin).

How PiPan board fits over the PiNote how the PiPan Board fits on Pi
Servo connector positionBefore you assemble Pi-Pan head assembly

Bring the servos to neutral position. To do that:
  • Attach the controller board on GPIO pins (as in picture above).
  • Attach Servo wires on servo pins. (Connect the wire so the yellow-orange wire is near the white line on the PCB).
    • Tilt servo (top servo) is on S5
    • Pan servo (bottom servo) is on S4
  • Power the Raspberry Pi (Minimum power 5V, 1.2amps)

Now, to bring the servos to neutral position. run following command:
cd pi-pan
python ./neutral_servo.py

Assemble Pi-Pan with instructions from url below:
After you assemble the Pi-Pan assembly

Check that you have connected servo pins correctly.
To check Pan servo, run following command:
python ./check-pan.py

To check Tilt servo, run following command:
python ./check-tilt.py

Try the demo program, run following command:
python ./demo-pi-pan.py
To Use Pi-Light

First pin on Pi-Light connector has a White square background. Also there is a White square near the first pin on controller board.

While connecting cable from Pi-Light to controller board, ensure that
the pins with White square backgrounds match on both ends.

To install required packages and enable I2C support, run following:
cd pi-pan
sudo ./install-pilight.bash

Restart your Raspberry Pi to finish configuration, run command:
sudo reboot

To check that Pi-Light is working, run:
python ./check-pilight.py
Troubleshooting Pi-Light (Optional)

Install I2C tools for troubleshooting, using following command:
(i2c-tools are not needed for Pi-Light to function).
sudo apt-get install i2c-tools

To check for i2c device. run following command:
(I2C address of Pi-Light is 18.)
For Model B:
sudo i2cdetect 1

For Model A:
sudo i2cdetect 0

result should look like this (address 18 indicates Pi-Light is found there):
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Troubleshooting Image

Below are few of Raspbian images with Pi-Pan software pre-installed and configured.
Use one of this image on your Pi to troubleshoot Pi-Pan or Pi-Light. 


http://www.mindsensors.com/largefiles/2017-09-07-Stretch-with-pi-pan.zip (Stretch pre-installed with pi-pan and pi-light software. Use this for RPi 3 Model B)


http://www.mindsensors.com/largefiles/2017-07-14-Jessie-with-pi-pan.zip (Jessie pre-installed with pi-pan and pi-light software. Use this for RPi 3 Model B)


http://www.mindsensors.com/largefiles/2016-03-18-Jessie-with-pi-pan.zip (Jessie pre-installed with pi-pan and pi-light software. Use this for RPi 3 Model B)


http://www.mindsensors.com/largefiles/2015-10-28-Jessie-with-pi-pan.zip (Jessie pre-installed with pi-pan and pi-light software. Use this for B+ and 2 B boards)

http://www.mindsensors.com/largefiles/2014-01-07-wheezy-raspbian-with-pi-pan.zip (Wheezy pre-installed with pi-pan and pi-light software. Use this file for A or B boards.)

http://www.mindsensors.com/largefiles/raspbian-for-bplus-with-pipan.zip (Wheezy pre-installed with pi-pan and pi-light software. Use this file for B+ boards.)

http://www.mindsensors.com/largefiles/2015-05-13-wheezy-raspbian-2-16-with-pi-pan-check.zip (This image will start pan-tilt mechanism and pilight as soon as Pi boots up - use for troubleshooting on Wheezy).


Unzip the file, and set up your SD card.

To setup SD card, follow instructions from http://elinux.org/RPi_Easy_SD_Card_Setup
(refer to 'Create your own' section).