Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Robotics
  4. ›Raspberry Pi Motor and Servo HATs

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
Short answerWhat the Raspberry Pi motor, servo, stepper and robot controller HATs isRaspberry Pi motor, servo, stepper and robot controller HATs pinoutWiring the Raspberry Pi motor, servo, stepper and robot controller HATsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

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
01

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.

Tip

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.

02

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.

PinFunction
I2C (GPIO2, 3)Most sensor, ADC, servo and expander chips
SPI (GPIO8 to 11)Fast ADCs, displays and DAQ HATs
GPIOButtons, relays, motor direction and enable pins
5V / 3.3V / GNDPower from the Pi or the HAT's own input
Motor power terminalSeparate battery or DC supply for motors
PinFunction
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
03

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 pinConnectionNote
ServosSignal, V+, GND headers (brown to GND)Feed V+ from the terminal
DC motorsMA/MB outputsSwap leads to reverse
SteppersA1 A2 B1 B2 coilsSet 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
04

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.

Sweep a servo on a 16-channel PCA9685 HAT · MicroPython
# 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)
05

Setup and tuning

Motor power

feed motors from a separate battery input on the HAT, not the Pi's 5 V.

Servo HATs

PCA9685-based HATs drive 16 servos over I2C with the Adafruit ServoKit library.

Motor HATs

use the maker's library or gpiozero for DC and stepper motors.

I2C address

change address jumpers when stacking several HATs.

Power the Pi

keep the Pi on a stable 5 V supply so motor spikes do not reset it.

06

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
07

Alternatives and when to choose them

  • ✓MG996R servo: servo basics.
  • ✓DRV8825 driver: the stepper chip.
  • ✓Waveshare serial bus servo driver: for ESP32.
08

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.
09

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

  • Waveshare 16-Ch 12-bit Servo Driver HAT for Raspberry Pi
    ₹1,669View
  • Waveshare 16-Ch 12-bit Servo Driver HAT (B) for Pi I2C
    ₹1,269View
  • Waveshare Motor Driver HAT for Raspberry Pi I2C
    ₹1,889View
  • Waveshare Stepper Motor HAT for Raspberry Pi, Dual DRV8825
    ₹2,159View
  • Waveshare HRB8825 Stepper Motor HAT for Raspberry Pi
    ₹1,411View
  • Elecrow Stepper Motor HAT for Raspberry Pi
    ₹2,905View
  • Stepper Motor Shield V2.0 for Raspberry Pi Zero/3B+/4B
    ₹4,329View
  • Waveshare ESP32 Serial Bus Servo Driver HAT
    ₹2,099View
  • DFRobot Pan-Tilt HAT for Raspberry Pi & Jetson Nano
    ₹2,269View
  • Raspberry Pi Build HAT – LEGO Robotics Controller
    ₹1,964View
  • Cytron Maker pHAT for Raspberry Pi
    ₹1,289View
  • Hiwonder RasAdapter V5.3 Expansion Board for Raspberry Pi
    ₹6,059View
  • Hiwonder RasAdapter V3.6 for Raspberry Pi
    ₹5,709View
  • RasAdapter PuppyPi V2.0 Expansion Board for Raspberry Pi
    ₹5,709View
  • Hiwonder AiNexAdapter V2.0 Expansion Board for Raspberry Pi
    ₹6,059View
  • Hiwonder Raspberry Pi 5 Expansion Board C – without Heatsink
    ₹4,406View
  • Hiwonder Raspberry Pi 5 Expansion Board Model B
    ₹4,429View
  • Raspberry Pi 4 Model B with 4GB RAM
    ₹11,461View
  • Raspberry Pi 5 with 4GB RAM
    ₹14,079View
  • TowerPro MG90S Metal Gear Micro Servo
    ₹189View
  • NEMA 17 Stepper Motor 42HS48-2504 AF-01 (5.6 kg-cm)
    ₹794View
Shop Expansion Boards & HATs

Keep learning

Component guideIntermediateDRV8825 Stepper DriverThe DRV8825 is a small stepper motor driver for bipolar motors such as the NEMA 17.3 min read · SensorsComponent guideBeginnerMG996R servoThe MG996R is a standard-size metal gear servo with about 9.4 kg-cm of torque at 4.8 V and 11 kg-cm at 6 V.3 min read · Motors & MotionComponent guideIntermediateWaveshare Serial Bus Servo Driver BoardThe Waveshare serial bus servo driver board connects ST and SC bus servos to a PC or a microcontroller.3 min read · Motors & Motion

Sources

  • NXP PCA9685 datasheet
  • Raspberry Pi Build HAT documentation

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the Raspberry Pi motor, servo, stepper and robot controller HATs isRaspberry Pi motor, servo, stepper and robot controller HATs pinoutWiring the Raspberry Pi motor, servo, stepper and robot controller HATsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide8 items · ₹18,393

Waveshare 16-Ch 12-bit Servo Driver HAT for Raspberry Pi · Waveshare 16-Ch 12-bit Servo Driver HAT (B) for Pi I2C · Waveshare Motor Driver HAT for Raspberry Pi I2C · Elecrow Stepper Motor HAT for Raspberry Pi · Stepper Motor Shield V2.0 for Raspberry Pi Zero/3B+/4B · Waveshare ESP32 Serial Bus Servo Driver HAT · DFRobot Pan-Tilt HAT for Raspberry Pi & Jetson Nano · Raspberry Pi Build HAT – LEGO Robotics Controller

Run itChange the inputs and watch the output

PCA9685 HAT, servo on channel 0: 0, 90, 180, 90 degrees, 0.6 s each.

Servo ch 0 0°

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question