Component guide · Intermediate · 4 min read
Raspberry Pi Motor and Servo HATs

Waveshare 16-Ch Servo, Motor Driver, DRV8825 and HR8825 Stepper, Serial Bus Servo, Pan-Tilt, Build HAT, Maker pHAT and Hiwonder Robot Boards
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
These HATs let a Raspberry Pi drive motors without extra wiring. 16-channel servo HATs (PCA9685) run robot arms and hexapods, motor driver HATs run two DC motors, stepper HATs drive two NEMA 17 motors, and the serial bus servo HAT controls ST and SC servos. The Build HAT runs LEGO motors, and Hiwonder boards are the controllers in their robot kits.
Key specs at a glance
- Servo
- 16 channels PWM (PCA9685) or serial bus
- DC motor
- 2 channels (TB6612 or similar)
- Stepper
- 2 x DRV8825 or HR8825, microstepping
- Motor power
- Separate 5 to 12V input
- Interface
- I2C, GPIO or UART
- Robot boards
- IMU, buzzer, RGB LEDs, battery monitoring
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Waveshare 16-Ch 12-bit Servo Driver HAT for Raspberry Pi₹1,669
Option 2Waveshare 16-Ch 12-bit Servo Driver HAT (B) for Pi I2C₹1,269
Option 3Waveshare Motor Driver HAT for Raspberry Pi I2C₹1,889
Option 4Waveshare Stepper Motor HAT for Raspberry Pi, Dual DRV8825₹2,159
Option 5Waveshare HRB8825 Stepper Motor HAT for Raspberry Pi₹1,411
Option 6Elecrow Stepper Motor HAT for Raspberry Pi₹2,905
What the Raspberry Pi motor, servo, stepper and robot controller HATs is
Pi motor, servo and robot HATs add DC motor drivers, stepper drivers and 16-channel servo controllers to a Raspberry Pi for robots, cameras and pan-tilt rigs.
Always power motors and servos from the HAT's own input, not the Pi. Servo stall current easily exceeds what the Pi's 5V rail can give and causes resets.
The Build HAT has its own microcontroller and takes 8V from a barrel jack. Hiwonder RasAdapter and AiNex boards come with that company's robot software.
Raspberry Pi motor, servo, stepper and robot controller HATs pinout
The pins on the Raspberry Pi motor, servo, stepper and robot controller HATs and what each one does.
| Pin | Function |
|---|---|
| I2C (GPIO2, 3) | Most sensor, ADC, servo and expander chips |
| SPI (GPIO8 to 11) | Fast ADCs, displays and DAQ HATs |
| GPIO | Buttons, relays, motor direction and enable pins |
| 5V / 3.3V / GND | Power from the Pi or the HAT's own input |
| Motor power terminal | Separate battery or DC supply for motors |
- I2C (GPIO2, 3)
- Most sensor, ADC, servo and expander chips
- SPI (GPIO8 to 11)
- Fast ADCs, displays and DAQ HATs
- GPIO
- Buttons, relays, motor direction and enable pins
- 5V / 3.3V / GND
- Power from the Pi or the HAT's own input
- Motor power terminal
- Separate battery or DC supply for motors
Wiring the Raspberry Pi motor, servo, stepper and robot controller HATs
Connect the motor supply ground to the HAT ground (it is shared through the board). Set stepper current before connecting the motor.
| Raspberry Pi motor, servo, stepper and robot controller HATs pin | Connection | Note |
|---|---|---|
| Servos | Signal, V+, GND headers (brown to GND) | Feed V+ from the terminal |
| DC motors | MA/MB outputs | Swap leads to reverse |
| Steppers | A1 A2 B1 B2 coils | Set current with the pot |
- Servos
- Connection:
- Signal, V+, GND headers (brown to GND)
- Note:
- Feed V+ from the terminal
- DC motors
- Connection:
- MA/MB outputs
- Note:
- Swap leads to reverse
- Steppers
- Connection:
- A1 A2 B1 B2 coils
- Note:
- Set current with the pot
Example code
Waveshare and Elecrow boards also ship their own examples. For the Build HAT use pip install buildhat; for the serial bus servo HAT use Waveshare's SCServo library.
# pip install adafruit-circuitpython-servokit
from adafruit_servokit import ServoKit
import time
kit = ServoKit(channels=16) # address 0x40
for angle in (0, 90, 180, 90):
kit.servo[0].angle = angle
time.sleep(0.6)Setup and tuning
feed motors from a separate battery input on the HAT, not the Pi's 5 V.
PCA9685-based HATs drive 16 servos over I2C with the Adafruit ServoKit library.
use the maker's library or gpiozero for DC and stepper motors.
change address jumpers when stacking several HATs.
keep the Pi on a stable 5 V supply so motor spikes do not reset it.
What you need
Shop this list20 of 20 found in our store · ₹62,947
Waveshare 16-Ch 12-bit Servo Driver HAT for Raspberry Pi: the part this guide coversWaveshare 16-Ch 12-bit Servo Driver HAT for Raspberry Pi₹1,669
Waveshare 16-Ch 12-bit Servo Driver HAT (B) for Pi I2C: another version this guide coversWaveshare 16-Ch 12-bit Servo Driver HAT (B) for Pi I2C₹1,269
Waveshare Motor Driver HAT for Raspberry Pi I2C: another version this guide coversWaveshare Motor Driver HAT for Raspberry Pi I2C₹1,889
Waveshare Stepper Motor HAT for Raspberry Pi, Dual DRV8825: another version this guide coversWaveshare Stepper Motor HAT for Raspberry Pi, Dual DRV8825₹2,159
Waveshare HRB8825 Stepper Motor HAT for Raspberry Pi: another version this guide coversWaveshare HRB8825 Stepper Motor HAT for Raspberry Pi₹1,411
Elecrow Stepper Motor HAT for Raspberry Pi: another version this guide coversElecrow Stepper Motor HAT for Raspberry Pi₹2,905
Stepper Motor Shield V2.0 for Raspberry Pi Zero/3B+/4B: another version this guide coversStepper Motor Shield V2.0 for Raspberry Pi Zero/3B+/4B₹4,329
Waveshare ESP32 Serial Bus Servo Driver HAT: another version this guide coversWaveshare ESP32 Serial Bus Servo Driver HAT₹2,099
DFRobot Pan-Tilt HAT for Raspberry Pi & Jetson Nano: another version this guide coversDFRobot Pan-Tilt HAT for Raspberry Pi & Jetson Nano₹2,269
Raspberry Pi Build HAT – LEGO Robotics Controller: another version this guide coversRaspberry Pi Build HAT – LEGO Robotics Controller₹1,964
Cytron Maker pHAT for Raspberry Pi: another version this guide coversCytron Maker pHAT for Raspberry Pi₹1,289
Hiwonder RasAdapter V5.3 Expansion Board for Raspberry Pi: another version this guide coversHiwonder RasAdapter V5.3 Expansion Board for Raspberry Pi₹6,059
Hiwonder RasAdapter V3.6 for Raspberry Pi: another version this guide coversHiwonder RasAdapter V3.6 for Raspberry Pi₹5,709
RasAdapter PuppyPi V2.0 Expansion Board for Raspberry Pi: another version this guide coversRasAdapter PuppyPi V2.0 Expansion Board for Raspberry Pi₹5,709
Hiwonder AiNexAdapter V2.0 Expansion Board for Raspberry Pi: another version this guide coversHiwonder AiNexAdapter V2.0 Expansion Board for Raspberry Pi₹6,059
Hiwonder Raspberry Pi 5 Expansion Board C – without Heatsink: another version this guide coversHiwonder Raspberry Pi 5 Expansion Board C – without Heatsink₹4,406
Hiwonder Raspberry Pi 5 Expansion Board Model B: another version this guide coversHiwonder Raspberry Pi 5 Expansion Board Model B₹4,429
Raspberry Pi 4 Model B (4 GB): works with all 40-pin HATsRaspberry Pi 4 Model B 1GB RAM₹4,476Closest match, check the specs
Raspberry Pi 5 (4 GB): the board the HAT stacks onGeekworm Raspberry Pi 5 PoE HAT 802.3af/at (USB-C)₹2,659Closest match, check the specs
TowerPro MG90S metal gear micro servo: a servo to test withTowerPro MG90S Metal Gear Micro Servo₹189
Alternatives and when to choose them
- MG996R servo: servo basics.
- DRV8825 driver: the stepper chip.
- Waveshare serial bus servo driver: for ESP32.
Common mistakes to avoid
- Running motors from the Pi 5 V pin.
- Using the same I2C address on two HATs.
- Missing ground connection between supplies.
- Undersized motor batteries.
Frequently asked questions
How do I control servos from a Raspberry Pi?
Use a PCA9685 servo HAT with the Adafruit ServoKit Python library.
Can I power motors from the Pi?
No. Use a separate battery on the HAT's motor power input.
Why does my Pi reboot when motors start?
Motor current spikes drop the voltage; separate the supplies.
Can I stack two motor HATs?
Yes, if you change the I2C address on one.
Which HAT suits a robot car?
A dual DC motor HAT with encoder inputs works well.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.



