Hardware

The examples in this guide are no longer supported. Check out the PCA9685 driver guide for CircuitPython and Python usage: https://learn.adafruit.com/16-channel-pwm-servo-driver

Parts

You'll need the following parts to follow this guide:

CircuitPython board.  This guide focuses on the ESP8266 and Feather M0/SAMD21-based boards, but any CircuitPython board that supports I2C should work.

 

If your board doesn't come with CircuitPython running on it already then check out your board's guide for how to load CircuitPython firmware.  For example the Feather M0 express guide is a good reference.

 

If you're using a Feather board and FeatherWing you probably want a Feather female header set or Feather stacking female header set.

PCA9685 PWM & Servo Driver Board.  If you're using a Feather the 8-channel PWM & Servo FeatherWing is the perfect option.  If you need more channels or aren't using a Feather grab the 16-channel PCA9685 breakout board or even 16-channel PCA9685 Arduino shield.

5V Power Supply.  To power servos you almost always need an external 5V power supply.  Servos can pull a lot of power and could damage your board if powered directly from it!  A simple power option is a 4x AA battery pack or a 5V power supply and barrel jack screw terminal connector.

Servos or LEDs.  You'll want something to drive with the PCA9685, like servos you can move or LEDs you can dim.  Remember the PCA9685 only drives servos, not stepper or other motors.

Breadboard and jumper wires.  If you aren't using a Feather and FeatherWing you'll need a breadboard and jumper wires to connect the components.

 

Soldering tools.  You'll need to solder headers to the boards  Check out the guide to excellent soldering if you're new to soldering.

Make sure to follow the board and PCA9685 driver board product guides to assemble and verify they work before continuing.

Wiring

If you're using a Feather and the PCA9685 FeatherWing just slide the wing into the Feather's headers and you're done!  The wing will use an I2C connection to talk to the Feather board.

If you're using a PCA9685 breakout you'll need to connect its I2C and power pins as follows:

  • Board SCL / I2C clock to PCA9685 SCL.
  • Board SDA / I2C data to PCA9685 SDA.
  • Board 3.3V power to PCA9685 VCC.
  • Board GND / ground to PCA9685 GND / ground.

Once your board is wired to the PCA9685 continue on to learn how to use a MicroPython module to control servos and LEDs!

This guide was first published on Oct 25, 2016. It was last updated on Oct 25, 2016. This page (Hardware) was last updated on Sep 15, 2019.