Pi Servo pHAT (v2) Hookup Guide

Pages
Favorited Favorite 1

Introduction

Note: This product and tutorial haven't been tested with the new Raspberry Pi 4 nor the recent distribution of Debian Buster. At the time of the development of this product, the Raspberry Pi 4 had just been released and Buster wasn't officially released yet.

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

DEV-15316
$10.95
1

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 3 B+

Raspberry Pi 3 B+

DEV-14643
$39.95
29

Raspberry Pi 3

DEV-13825
92
Raspberry Pi 3 A+

Raspberry Pi 3 A+

DEV-15139
$29.95
1
Raspberry Pi Zero W

Raspberry Pi Zero W

DEV-14277
$10.00
24
Raspberry Pi 3 B+ Starter Kit

Raspberry Pi 3 B+ Starter Kit

KIT-14644
$91.95
6
SparkFun Raspberry Pi Zero W Basic Kit

SparkFun Raspberry Pi Zero W Basic Kit

KIT-14298
$39.95
3
SparkFun Basic Autonomous Kit for Sphero RVR

SparkFun Basic Autonomous Kit for Sphero RVR

KIT-15302
$119.95
SparkFun Advanced Autonomous Kit for Sphero RVR

SparkFun Advanced Autonomous Kit for Sphero RVR

KIT-15303
$164.95

(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 with Adapter - 16GB (Class 10)

COM-13833
5
microSD Card with Adapter - 32GB (Class 10)

microSD Card with Adapter - 32GB (Class 10)

COM-14832
$24.95
microSD Card with Adapter - 64GB (Class 10)

microSD Card with Adapter - 64GB (Class 10)

COM-14833
$29.95

Raspberry Pi™ - 16GB MicroSD NOOBS Card

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

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

TOL-13831
$7.95
16
microSD USB Reader

microSD USB Reader

COM-13004
$4.95
8
USB 3.1 Cable A to C - 3 Foot

USB 3.1 Cable A to C - 3 Foot

CAB-14743
$4.95
2

(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)

ROB-09065
$8.95
11
Servo - Generic High Torque (Standard Size)

Servo - Generic High Torque (Standard Size)

ROB-11965
$12.95
4
Servo - Generic Continuous Rotation (Micro Size)

Servo - Generic Continuous Rotation (Micro Size)

ROB-10189
$11.95
3
Servo - Hitec HS-422 (Standard Size)

Servo - Hitec HS-422 (Standard Size)

ROB-11884
$18.95
1

(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

PRT-00116
$1.50
20
Solder Lead Free - 15-gram Tube

Solder Lead Free - 15-gram Tube

TOL-09163
$3.50
2
Soldering Iron - 30W (US, 110V)

Soldering Iron - 30W (US, 110V)

TOL-09507
$9.95
6
Hobby Knife

Hobby Knife

TOL-09200
$2.95
2

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.

I2C

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.