Multiple Drivers (up to 62) can be chained to control still more servos.  With headers at both ends of the board, the wiring is as simple as connecting a 6-pin parallel cable from one board to the next. 

Addressing the Boards

Each board in the chain must be assigned a unique address.  This is done with the address jumpers on the upper right edge of the board.  The I2C base address for each board is 0x40.  The binary address that you program with the address jumpers is added to the base I2C address.

To program the address offset, use a drop of solder to bridge the corresponding address jumper for each binary '1' in the address.

Board 0:  Address = 0x40  Offset = binary 00000 (no jumpers required)
Board 1:  Address = 0x41  Offset = binary 00001 (bridge A0 as in the photo above)
Board 2:  Address = 0x42  Offset = binary 00010 (bridge A1)
Board 3:  Address = 0x43  Offset = binary 00011 (bridge A0 & A1)
Board 4:  Address = 0x44  Offset = binary 00100 (bridge A2)


In your sketch, you'll need to declare a separate pobject for each board. Call begin on each object, and control each servo through the object it's attached to.  For example:

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver(0x40);
Adafruit_PWMServoDriver pwm2 = Adafruit_PWMServoDriver(0x41);

void setup() {
  Serial.println("16 channel PWM test!");

  pwm1.setPWMFreq(1600);  // This is the maximum PWM frequency

  pwm2.setPWMFreq(1600);  // This is the maximum PWM frequency

This guide was first published on Oct 16, 2012. It was last updated on Sep 04, 2013.

This page (Chaining Drivers) was last updated on Oct 10, 2012.

Text editor powered by tinymce.