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.
Note: This HAT includes headers to connect to a Raspberry Pi, so there is no soldering required to get up and running quickly.
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.
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
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.
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
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.
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
Based on 5 ratings:
1 of 1 found this helpful:
About a week after posting this review I was contacted by the design engineer. He suggested I try a different base frequency and provided a link to a test program with the new frequency. Which I did - Problem solved. Thank you ...
I tested this unit using a standard Futaba servo motor connected to the first position, and a Raspberry Pi Zero. As soon as the Pi was booted the servo began to buzz and became warm. The supplied test programs operated the servo however the supplied timing constants only accounted for about 45 degrees on either side of center and had to be doubled to get a full 90 degrees. The buzzing continued the entire time the servo was connected and the servo became too hot to touch after about ten minutes of testing.
Quoting the datasheet "To conserve power, no internal pull-up resistors are incorporated on the hardware selectable address pins and they must be pulled HIGH or LOW." The schematic shows the pins unconnected. I soldered a wire across pins 1 to 5 and connected it to pins 24 and 25. 25 is grounded so all the address pins are now grounded giving an address of 0x40. Once I did this, it all worked as expected.
I had the previous version running a servo on an automatic dog door. Unfortunately, the motor was near the limit for the board and would brown-out the Pi Zero occasionally. The USB-C is a really nice upgrade!
This was surprisingly very easy to use for someone with absolutely no prior experience with Raspberry Pi and very little experience in coding. It did almost everything I wanted it to do, but I didn't realize the limitations of a HAT in that you lose ALL of the GPIO pins which doesn't work for the specific application I had in mind which requires buttons to control the servos. I have since moved on and am connecting servos directly to the GPIO pins and using the jittery software PWM, but this is still a great little device.
Utilizing the documents tab on the product page, you'll be greeted with the red links of confusion. I went straight to the "hookup guide" and read it over a few times to make sure I wasn't missing anything before physically assembling the device to the Pi and servos. The USB-C connector; it is BOTH a serial-UART and a separate power input. I bought this primarily to provide high power input to a gang of servos, the high power capability of USB-C is just what was needed. (Note to who wrote the tutorial section, please change the X's to checkmarks? or green icons? for the power control table.)
Make sure you have the RPi OS on the TF card before you start. I was running something weird and I got lost at this point as to why it wasn't running at all.
The sudo pip3 commands worked as listed in the guide. (Author; for beginners, can the tutorial be edited to separate things better? PyPi install kinda blended in too well with the "local installation" and caused me some issues in terminal.) Newbies like me- where it says Python Package Operation... use Thonny in your rasbian and build this into a new file (like Arduino IDE, but not). For low-power RPi, learn how to initiate your .py program in terminal to save computing resources. The GUI desktop and Thonny running the program will make an automation stutter badly.
Ensure your raspi-config interfaces are all activated or you'll get I/O problems, my connections were good, software enabled I2C... not so much. (OSError: Remote I/O error) Checking the I2C connection section (Author... maybe update? was it just me?) sudo apt-get install i2ctools did NOT work... sudo apt-get install -y i2c-tools = did work. Needed the hyphen between the c-t.
Overall: This device is solid, inexpensive and, after some trial and error, working beautifully. Now to write some python programs to use a PS4 controller to move the robot arm project I printed.