Pi Servo pHAT (v2) Hookup Guide

Contributors: QCPete, santaimpersonator
Favorited Favorite 5


The SparkFun Pi Servo pHAT provides your Raspberry Pi with 16 PWM channels that can be controlled over I2C. These channels are broken out in a header combination that is perfect for connecting servo motors. Additionally, the PWM channels can control other PWM devices as well.

SparkFun Servo pHAT for Raspberry Pi

SparkFun Servo pHAT for Raspberry Pi


Furthermore, the Pi Servo pHAT can be used for a serial terminal connection to remotely control the Raspberry Pi, without the need for a monitor and keyboard (header used by the Sphero RVR). As an added bonus, we have provided a Qwiic connector for users to easily interface with the I2C bus using the Qwiic system. Who says you can't have it all?

Required Materials

Note: Below are lists of products that you will need for this hookup guide. You may already have some of these products in your cart or at home; please, feel free to modify your cart as necessary.

To get started with the Pi Servo pHAT, you will need a Raspberry Pi board with headers. There are several options that can be found under the Raspberry Pi Board product category. Additionally, we also offer these boards in various kits.

Raspberry Pi Compute Module 4 16GB (Wireless Version) - 4GB RAM


Raspberry Pi 4 Model B (8 GB)


Raspberry Pi 4 Model B (4 GB)

Raspberry Pi 3 B+

Raspberry Pi 3 B+


SparkFun Raspberry Pi Zero W Basic Kit

5 Retired

SparkFun Basic Autonomous Kit for Sphero RVR


SparkFun Advanced Autonomous Kit for Sphero RVR

4 Retired

Raspberry Pi 3 B+ Starter Kit

2 Retired

(Some, but not all of our Raspberry Pi kits include a Raspberry Pi. Be sure to double check the Includes tab of the associated product page. Additionally, the Sphero RVR kits will include this Pi Servo pHAT.).

There are a few additionally accessories that you will need to use your Raspberry Pi.

You will need an microSD Card, Power Supply, and USB-C Cable (optional) at minimum to run your Raspberry Pi. There are two options for the microSD card, a NOOBS card that comes pre-flashed with the OS need to run your Raspberry Pi or a blank SD card that can be flashed using the files and instructions from the Raspberry Pi Foundation page.

microSD Card - 16GB (Class 10)

microSD Card with Adapter - 32GB (Class 10)

microSD Card with Adapter - 32GB (Class 10)


SparkFun Noobs Card for Raspberry Pi (16GB)


microSD Card with Adapter - 64GB (Class 10)

Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)

Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B)

USB 3.1 Cable A to C - 3 Foot

USB 3.1 Cable A to C - 3 Foot

microSD USB Reader

microSD USB Reader


(To flash your own SD card, you will also want to grab a microSD USB adapter.)

Last of all, to test the functionality of the Pi Servo pHAT you will want a servo motor.

Servo - Generic (Sub-Micro Size)

Servo - Generic (Sub-Micro Size)

Actuonix PQ12-100-6-R Micro-Actuator

Actuonix PQ12-100-6-R Micro-Actuator

Servo - Generic Metal Gear (Micro Size)

Servo - Generic Metal Gear (Micro Size)

Servo - Generic High Torque (Standard Size)

Servo - Generic High Torque (Standard Size)


(Any "standard" 5V servo in our catalog should work. Keep in mind when purchasing, the continuous rotation servos behave differently from the normal servos.)

Required Tools

No tools are required to used this product. However, you may need a soldering iron, solder, and/or general soldering accessories to solder modify the jumpers or solder on headers to your Raspberry Pi board (if it didn't come with them).

Break Away Headers - Straight

Break Away Headers - Straight

Solder Lead Free - 15-gram Tube

Solder Lead Free - 15-gram Tube

Hobby Knife

Hobby Knife

Soldering Iron - 30W (US, 110V)

Soldering Iron - 30W (US, 110V)


Suggested Reading

Below are several tutorials and hookup guides covering various topics that we suggest users get familiar with before beginning this hookup guide. As a supplement, the hookup guides for the previous Pi Servo Hat are listed as well.

Pulse Width Modulation

An introduction to the concept of Pulse Width Modulation.


An introduction to I2C, one of the main embedded communications protocols in use today.

Raspberry Pi SPI and I2C Tutorial

Learn how to use serial I2C and SPI buses on your Raspberry Pi using the wiringPi I/O library for C/C++ and spidev/smbus for Python.

Hobby Servo Tutorial

Servos are motors that allow you to accurately control the rotation of the output shaft, opening up all kinds of possibilities for robotics and other projects.

Setting Up the Pi Zero Wireless Pan-Tilt Camera

This tutorial will show you how to assemble, program, and access the Raspberry Pi Zero as a headless wireless pan-tilt camera.

Pi Servo Hat Hookup Guide

This hookup guide will show you how to connect and use the Pi Servo Hat in a project.

Getting Started with the Raspberry Pi Zero Wireless

Learn how to setup, configure and use the smallest Raspberry Pi yet, the Raspberry Pi Zero - Wireless.

Python Programming Tutorial: Getting Started with the Raspberry Pi

This guide will show you how to write programs on your Raspberry Pi using Python to control hardware.

Qwiic Connect System

The Pi Servo pHAT also provides a Qwiic connector to take advantage of our new Qwiic system. We recommend familiarizing yourself with the Logic Levels and I2C tutorials before using it. Click on the banner above to learn more about our Qwiic products.