Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Adafruit PWM Servo Bonnet: Examples, Pinouts, and Specs

Image of Adafruit PWM Servo Bonnet
Cirkit Designer LogoDesign with Adafruit PWM Servo Bonnet in Cirkit Designer

Introduction

The Adafruit PWM Servo Bonnet is an add-on board designed for the Raspberry Pi that enables the control of up to 16 servo motors using the I2C interface with only two pins. Utilizing the PCA9685 PWM controller chip, it provides precise control over servo position and movement, making it an ideal choice for robotics, automation projects, and any application requiring multiple servo controls.

Explore Projects Built with Adafruit PWM Servo Bonnet

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi 4B Servomotor Control System with Rotary Encoder Input
Image of AIRS Wiring: A project utilizing Adafruit PWM Servo Bonnet in a practical application
This circuit features a Raspberry Pi 4B as the central controller, interfaced with an Adafruit PCA9685 PWM Servo Breakout to manage multiple servomotors (two MG90S servomotors are connected). The PCA9685 receives power from a 2.1mm Barrel Jack with Terminal Block and communicates with the Raspberry Pi via I2C (using GPIO2/SDA and GPIO3/SCL). Additionally, a HW-040 Rotary Encoder is connected to the Raspberry Pi for user input, which could be used for tasks like controlling the position of the servomotors.
Cirkit Designer LogoOpen Project in Cirkit Designer
16-Channel Servo Controller with Adafruit PCA9685
Image of my first project: A project utilizing Adafruit PWM Servo Bonnet in a practical application
This circuit consists of an Adafruit PCA9685 PWM Servo Breakout board connected to multiple MG995 servomotors. The PCA9685 board is used to provide PWM (Pulse Width Modulation) signals to control the position of each servomotor. Power (5V and GND) is distributed from the PCA9685 to all servomotors, and individual PWM outputs from the PCA9685 are connected to the signal inputs of the servomotors, allowing for independent control of each servomotor's angle or speed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano and PCA9685 PWM Servo Controller for Multi-Servo Robotic Arm
Image of BRAZOS_CABEZA: A project utilizing Adafruit PWM Servo Bonnet in a practical application
This circuit uses an Arduino Nano to control multiple servos via an Adafruit PCA9685 PWM Servo Breakout. The servos are powered by a 5V power supply, and the Arduino communicates with the PWM breakout over I2C to send control signals to the servos.
Cirkit Designer LogoOpen Project in Cirkit Designer
Raspberry Pi-Controlled Dual Servo Driver with PCA9685 Interface
Image of Copy of PWM, SERVO, ESC Wiring: A project utilizing Adafruit PWM Servo Bonnet in a practical application
This circuit controls two servomotors (MG996R and MG995) using a Raspberry Pi 5 and an Adafruit PCA9685 PWM Servo Breakout board. The Raspberry Pi communicates with the PCA9685 via I2C (using GPIO 2 and GPIO 3 for SDA and SCL, respectively) to send PWM signals to the servos. Power distribution is managed through an Adafruit Perma Proto Small Mint board, which connects the 5V and GND from the Raspberry Pi to the PCA9685 and the servos.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Adafruit PWM Servo Bonnet

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of AIRS Wiring: A project utilizing Adafruit PWM Servo Bonnet in a practical application
Raspberry Pi 4B Servomotor Control System with Rotary Encoder Input
This circuit features a Raspberry Pi 4B as the central controller, interfaced with an Adafruit PCA9685 PWM Servo Breakout to manage multiple servomotors (two MG90S servomotors are connected). The PCA9685 receives power from a 2.1mm Barrel Jack with Terminal Block and communicates with the Raspberry Pi via I2C (using GPIO2/SDA and GPIO3/SCL). Additionally, a HW-040 Rotary Encoder is connected to the Raspberry Pi for user input, which could be used for tasks like controlling the position of the servomotors.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of my first project: A project utilizing Adafruit PWM Servo Bonnet in a practical application
16-Channel Servo Controller with Adafruit PCA9685
This circuit consists of an Adafruit PCA9685 PWM Servo Breakout board connected to multiple MG995 servomotors. The PCA9685 board is used to provide PWM (Pulse Width Modulation) signals to control the position of each servomotor. Power (5V and GND) is distributed from the PCA9685 to all servomotors, and individual PWM outputs from the PCA9685 are connected to the signal inputs of the servomotors, allowing for independent control of each servomotor's angle or speed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of BRAZOS_CABEZA: A project utilizing Adafruit PWM Servo Bonnet in a practical application
Arduino Nano and PCA9685 PWM Servo Controller for Multi-Servo Robotic Arm
This circuit uses an Arduino Nano to control multiple servos via an Adafruit PCA9685 PWM Servo Breakout. The servos are powered by a 5V power supply, and the Arduino communicates with the PWM breakout over I2C to send control signals to the servos.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of PWM, SERVO, ESC Wiring: A project utilizing Adafruit PWM Servo Bonnet in a practical application
Raspberry Pi-Controlled Dual Servo Driver with PCA9685 Interface
This circuit controls two servomotors (MG996R and MG995) using a Raspberry Pi 5 and an Adafruit PCA9685 PWM Servo Breakout board. The Raspberry Pi communicates with the PCA9685 via I2C (using GPIO 2 and GPIO 3 for SDA and SCL, respectively) to send PWM signals to the servos. Power distribution is managed through an Adafruit Perma Proto Small Mint board, which connects the 5V and GND from the Raspberry Pi to the PCA9685 and the servos.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Robotics arms and walkers
  • Automated art installations
  • Animatronics for entertainment or education
  • Multi-servo projects like hexapods
  • Prototyping and educational projects in schools and workshops

Technical Specifications

Key Technical Details

  • Voltage: 5V (supplied via Raspberry Pi)
  • Channels: 16 servo channels
  • Communication Interface: I2C
  • Frequency Range: 40-1000 Hz
  • Resolution: 12-bit, 4096 steps

Pin Configuration and Descriptions

Pin Number Description
1-16 Servo control channels
V+ Servo power supply (5V-6V)
SDA I2C Data
SCL I2C Clock
GND Ground

Usage Instructions

Connecting the Bonnet to Raspberry Pi

  1. Attach the Adafruit PWM Servo Bonnet onto the GPIO header of the Raspberry Pi.
  2. Ensure that the Pi is powered off before attaching the bonnet to prevent any electrical damage.
  3. Connect the servos to the respective channels on the bonnet, paying attention to the correct polarity of the servo wires.

Software Setup

Before using the Adafruit PWM Servo Bonnet, you need to set up the necessary software on your Raspberry Pi.

  1. Install the Adafruit CircuitPython library by running the following commands:
sudo pip3 install adafruit-circuitpython-servokit
  1. Import the library in your Python script to start using the bonnet:
from adafruit_servokit import ServoKit
kit = ServoKit(channels=16)

Controlling a Servo

To control a servo, you need to specify the channel and set the angle. Here's an example of how to set the servo on channel 0 to 90 degrees:

kit.servo[0].angle = 90

Important Considerations and Best Practices

  • Always ensure that the power supply to the servos is sufficient and stable.
  • Do not exceed the recommended voltage as it may damage the servos or the bonnet.
  • When controlling multiple servos, be mindful of the power draw and consider using an external power source if necessary.

Troubleshooting and FAQs

Common Issues

  • Servos not responding: Check the I2C connection and ensure that the servos are correctly connected with proper polarity.
  • Jittery servo movement: This can be due to an inadequate power supply. Ensure that the power supply is stable and capable of delivering sufficient current.

Solutions and Tips for Troubleshooting

  • Verify that the Raspberry Pi and the Adafruit PWM Servo Bonnet are powered correctly.
  • Check the I2C address of the bonnet if the Pi is not detecting it. Use i2cdetect -y 1 to scan for connected I2C devices.
  • Ensure that the Adafruit CircuitPython library is installed and up-to-date.

FAQs

Q: Can I power the servos directly from the Raspberry Pi? A: It is not recommended to power multiple servos directly from the Raspberry Pi as it may not provide sufficient current and could potentially damage the Pi.

Q: How do I change the I2C address of the bonnet? A: The I2C address can be changed by soldering the address jumpers on the back of the bonnet. Refer to the Adafruit guide for detailed instructions.

Q: Can I use this bonnet with other single-board computers? A: While designed for the Raspberry Pi, the bonnet may work with other single-board computers that support I2C communication, but this is not guaranteed.

For further assistance, consult the Adafruit PWM Servo Bonnet forums and the extensive Adafruit learning system online.