Waveshare Pan-Tilt HAT Operation & User’s Manual
Text of the manual
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
1 / 17
Pan-Tilt HAT
User Manual
OVERVIEW
This is a 2-DOF pan-tilt kit designed for Raspberry Pi. With onboard PCA9685 PWM
chip and TSL2581 ambient light sensor, it allows the Pi to control camera movement
and sense light intensity through I2C interface.
SPECIFICATION
Operating voltage:
3.3V/5V
PWM
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
2 / 17
CONTENT
Overview ........................................................................................................................................................1
Specification ............................................................................................................
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
3 / 17
HARDWARE
CONTROLLER
The PWN driver is PCA9685, an I2C-bus controlled 26-channel LED controller, 12-bit
resolution PWM output. Pan-Tilt HAT integrate TSL2581 on board. TSL2581 is a light
sensor, can be used to detect light and work with camera. TSL2581 use I2C interface as
well.
COMMUNICATION
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
4 / 17
When working, Raspberry Pi (hereafter named as Master) will first send a Start signal,
then send a byte to TSL2581 (hereafter named as Slaver), whose first 7bits are address
of Slaver and 1 bit write bit. Slave response with Answer signal every time it receives
any data. Master send command r
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
5 / 17
Note: The default I2C address pins are set as A5=A4=A3=A2=A1=0, address is 0x40.
I2C address pins are set as Float and its I2C address is 0x39 by default. If you use the
module with other development board, please add R/W bit to Low bit
HOW TO USE
This part shows you how to use the module bas
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
6 / 17
EXAMPLES
DOWNLOAD EXAMPLES TO RASPBERRY PI
You can download the demo code from wiki, uncompressing and copy to Raspberry
Pi, or directly clone it from github:
Open terminal of Raspberry Pi and download it:
git clone https://github.com/waveshare/Pan-Tilt-HAT
Change it execute permission and en
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
7 / 17
sudo make check
sudo make install
Note: The xx is the version number you download, for example, if the version you
download is bcm2835-1.52. then the command you should execute is sudo tar zxvf
bcm2835-1.52.tar.gz
wiringPi libraries:
sudo apt-get install git
sudo git clone git://git.drogon.ne
Pan-Tilt HAT User Manual
Version: V1.0.0; Date: 2019.03.16
8 / 17
ASSEMBLY
Note: Before you assemble servos to Pan-Tilt HAT, please test the servo with test
codes to avoid of servo stuck when rotate
1.
Connect servos to Pan-Tilt HAT
Brown wire
GND
Red wire
5V
Yellow wire
S1/S0
You should connect the Pan servo (close to HAT board) to S1, and connect Tilt
ser