background image

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 driver

 

PCA9685 

Working voltage

 

3.3V 

Interface

 

I2C 

Dimension

 

56.6X65(mm) 

 

 

 

Summary of Contents for Pan-Tilt HAT

Page 1: ...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 SPECI...

Page 2: ...tion 1 Hardware 3 Controller 3 Communication protocol 3 I2C Write data 3 I2C read data 4 I2C adress 4 How to use 5 Download examples 5 Examples 6 Download examples to Raspberry Pi 6 Install libraries...

Page 3: ...work with camera TSL2581 use I2C interface as well COMMUNICATION PROTOCOL I2C bus has one data line SDA and one clock line SCL When communicating three kinds of signals are product Start signal Stop...

Page 4: ...ent to slave to stop communicating I2C READ DATA When working Master will first send a Start signal then send a byte to Slaver whose first 7bits are address of Slaver and 1 bit write bit Slave respons...

Page 5: ...it HOW TO USE This part shows you how to use the module based on demo codes provided on wiki DOWNLOAD EXAMPLES Search with key word Pan Tilt HAT on Waveshare Wiki open the wiki page and download examp...

Page 6: ...an Tilt HAT Change it execute permission and enter the folder sudo chmod 777 R Pan Tilt_HAT cd Pan Tilt_HAT INSTALL LIBRARIES To run the examples you need to install related libraries first wiringPi b...

Page 7: ...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 net wiringPi cd wiringPi sudo build Python librar...

Page 8: ...ervo 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 con...

Page 9: ...egree place The starting place Then power off and assemble the servo as assemble guide Do not rotate the servo when assembling Assemble guide https www waveshare com img devkit accBoard Pan Tilt HAT P...

Page 10: ...nds to execute programs BCM2835 examples cd bcm2835 sudo main wiringPi examples cd wiringpi sudo main Python examples sudo python main py Note If it prompt that files is not exist when running bcm2835...

Page 11: ...al Version V1 0 0 Date 2019 03 16 11 17 3 Reboot Raspberry Pi sudo reboot 4 Test camera You can test the camera with command raspistill o image jpg About details about the raspistill command you can t...

Page 12: ...000 For details about camera command you can visit Raspberry Pi website WEB_CONTROL 1 Enable Camera by following the last chapter 2 Modify the modules file sudo nano etc modules add statements bcm2835...

Page 13: ...ent path information Type ifconfig command to get the IP information Note I connect the Raspberry Pi to WIFI so the IP address is wlan0 s if you directly connect network jack with cable the IP address...

Page 14: ...Pan Tilt HAT User Manual Version V1 0 0 Date 2019 03 16 14 17 Change the host to the IP address of your Raspberry Pi for example save and exit...

Page 15: ...thon mian py 7 Download the AlpahBot exe software from Waveshare wiki and open it Type IP address of your Raspberry Pi to it and Click Video Connect and Cmd Connect to enable connection Note The softw...

Page 16: ...ou need to disconnect Cmd and Camera first by pressing Video Connet and Cmd Connet buttons The Ctrl C to stop program EXPECTED RESULT Servo Driver The servos will rotate the Pan servo and Tilt servo L...

Page 17: ...2C addresses are incorrect in your Raspberry Pi please check if you have modified I2C address and check if you have enabled I2C interface The default I2C device address of Light sensor is 0x39 and 0x4...

Reviews: