The Waveshare Servo Driver HAT uses PCA9685 to control up to 16 servos from just two I2C pins.
Specs
- PCA9685 16-channel, 12-bit PWM
- I2C address 0x40 (configurable)
- Separate servo power input (5-6V)
- Stackable — chain multiple HATs for 32+ servos
Setup
Mount HAT, enable I2C, connect external 5V power for servos.
pip3 install adafruit-circuitpython-pca9685 adafruit-circuitpython-motor
Python Code
from adafruit_pca9685 import PCA9685
from adafruit_motor import servo
import busio, board
i2c = busio.I2C(board.SCL, board.SDA)
pca = PCA9685(i2c); pca.frequency = 50
s = servo.Servo(pca.channels[0])
s.angle = 0; import time; time.sleep(1)
s.angle = 90; time.sleep(1); s.angle = 180
Projects
- Robotic arm (6-axis requires 6 channels)
- Animatronic figure with multiple moving parts
- Pan-tilt camera mount
- Hexapod robot (18 servos across 2 HATs)
- Automated blinds/curtain opener
Tips
- Always use external power for servos — Pi cannot supply enough current.
- Add decoupling capacitors (1000uF) across servo power to prevent brownouts.
- Start servos at centre position to avoid sudden jerks at power-on.
Frequently Asked Questions
Max servos?
16 per HAT. Stack up to 62 HATs on I2C for 992 servos.
Can I control DC motors?
Yes, but better to use a motor driver. PCA9685 outputs PWM only (no H-bridge).
Servo jitter?
PCA9685 has hardware PWM, so jitter is minimal. External power supply noise can cause jitter — use capacitors.
Works with Pi 5?
Yes, standard I2C interface is compatible.
Conclusion
The Servo Driver HAT is essential for multi-servo robotics projects, freeing GPIO pins and providing clean PWM signals.
Browse the full Waveshare collection at Zbotic.in with fast shipping across India.
Add comment