×

In celebration of the 50th anniversary of Apollo 11's Moon Walk, we are offering $50 off our SparkFun Inventor's Kit for RedBot and the Arduino Engineering Kit while supplies last! Use promo code APOLLO11 at checkout until 11:59 p.m. MT to get yours today!

SparkFun Servo pHAT for Raspberry Pi

The SparkFun Servo pHAT for Raspberry Pi allows your Raspberry Pi to control up to 16 servo motors in a straightforward and uncomplicated manner via an I2C connection. Thanks to its I2C capabilities, this PWM HAT saves the Raspberry Pi's GPIO pins, allowing you to use them for other purposes. The Servo pHAT also adds a serial terminal connection, which will allow you to bring up a Raspberry Pi without having to hook it up to a monitor and keyboard. We have provided a Qwiic connector for easy interfacing with the I2C bus using the Qwiic system, and a 4-pin header specifically for connecting to the Sphero RVR.

Power to the SparkFun Servo pHAT can be supplied through USB-C connector. This will power either the servo motors only, or power the servo motors as well as the Raspberry Pi that is connected to the HAT. We switched to USB-C to allow you to bring more current to your servos than ever before. This USB-C connector can also be used to hook up the Pi via serial port connection to avoid having to use a monitor and keyboard for setting up the Pi. To supply power only to the servo power rail (and not the Pi's 5V power rail), you just need to cut a small trace on the isolation jumper. Doing this allows you to drive heavier loads coming from multiple or larger servos. We've even added power protection circuits to the design, to avoid damage to power sources.

Each of this pHAT's 16 servo motor pin headers has been spaced out to the standard 3-pin servo pinout (ground, 5V, signal) to make it easier to attach your servo motors. The Servo pHAT is the same size and form factor as a Raspberry Pi Zero and Zero W, but it can also operate with a regular Raspberry Pi (not yet tested on the Raspberry Pi 4).

Note: This HAT includes headers to connect to a Raspberry Pi, so there is no soldering required to get up and running quickly.

  • 16 PWM channels, controllable over I2C
  • Qwiic connector
  • 4-pin RVR header for connection to Sphero RVR
  • USB-C connector
  • 40-pin GPIO header for connection to Raspberry Pi
  • CH340C USB Serial SOIC16
  • Updated logic level conversion circuitry
  • Power protection circuits

SparkFun Servo pHAT for Raspberry Pi Product Help and Resources

Setting Up the Pi Zero Wireless Pan-Tilt Camera

September 14, 2017

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

Pi Servo pHAT (v2) Hookup Guide

July 11, 2019

This hookup guide will show you how to connect and use the Pi Servo pHAT.

Core Skill: Robotics

This skill concerns mechanical and robotics knowledge. You may need to know how mechanical parts interact, how motors work, or how to use motor drivers and controllers.

3 Robotics

Skill Level: Competent - You may need an understanding of servo motors and how to drive them. Additionally, you may need some fundamental understanding of motor controllers.
See all skill levels


Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

2 Electrical Prototyping

Skill Level: Rookie - You may be required to know a bit more about the component, such as orientation, or how to hook it up, in addition to power requirements. You will need to understand polarized components.
See all skill levels


Comments

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • Any chance of getting one of these with right angle servo headers and broken out address pins so that you can have multiple chained together?

    • I think we might be making a Qwiic version (with less channels???), but we will probably break out the address pins on that. I know that for this release, it was pretty tough just to squeeze all the components; especially with the RX switch and RVR, servo, and GPIO headers covering most of the real estate.

      Unfortunately, we don't offer custom board manufacturing. Maybe a 3x20 pin right angle M/F header might be worth scouring the internet?

      • Totally understandable, the layout looks great considering how much stuff is packed on there! I just wasn't sure if you were going to offer a header-less version like you do with other dev boards. I'll definitely keep an eye out for the Qwiic version. It's just unfortunate that these chips only offer 16 channels when a hexapod usually requires 18. Thanks!

        • You can configure the sub-addresses (see datasheet). Although that is not the design intention for those addresses, but it should allow you to control up to (3) chips (unfortunately, we don't have step-by-step instructions for that). I am pretty sure 16 is the maximum channels offered, but if you find a better IC, let us know.

          In this case, the hat was designed to be used with the Sphero RVR kit, so we have everything preassembled.

  • aBoogieman / last week * / 1

    Also, on your Qwiic_Py documentation page, you definitely have a typo:

    "The qwiic Python package current supports the following platforms:"

    Should be "... currently ...."

    Edit: Do you guys need an editor? I'm pretty good at editing. See how much practice I get at it? :-)

  • aBoogieman / last week * / 1

    Hey, sounds great!! I like the idea of being able to power stronger motors.

    However, I think you've got the wrong datasheet linked. The PCA9685 (according to your current link) is a: 16-channel, 12-bit PWM Fm+ I2C-bus LED controller

    We're not talking about LED controllers here. Or we're not supposed to be! :-)

    So tell you what, if you'll fix the link, I'll delete this comment. (I.e., if I can.)

    Thanks, Leland...

    Edit: Also, fix the document link, and I'll buy one right away!! Maybe two, if you fix it quickly enough! :-)

    Edit 2: Or is it actually the same controller?? (And I was wrong above?) Maybe that's possible, given my current knowledge level. (Pun intended.) :-P

    • You are correct, the PCA9685 was originally designed for LED PWM control. However, servos (this doesn't control DC motors) are controlled with PWM signals. Since the PCA9685 is capable of producing the proper PWM signals, it can be used to control the servos. (*I think I calculated the PWM resolution to equate to less than half a degree on a 90° servo; based on the datasheet.)

    • It's the same controller. It can be used as a generic PWM driver so it'll work for servos as well as LEDs.

  • Will this be able to control the Bolt without the need for the RVR at some point? What language is used to program the RVR using the pHat interface?

Customer Reviews

No reviews yet.