Description
PCA9685 16-Channel 12-bit PWM/Servo Driver
Driving servo motors with the Arduino Servo library is pretty easy, but each one consumes a precious pin – not to mention some Arduino processing power. The Adafruit 16-Channel 12-bit PWM/Servo Driver will drive up to 16 servos over I2C with only 2 pins. The on-board PWM controller will drive all 16 channels simultaneously with no additional Arduino processing overhead. What’s more, you can chain up to 62 of them to control up to 992 servos – all with the same 2 pins!
The Adafruit PWM/Servo Driver is the perfect solution for any project that requires a lot of servos.
There are two sets of control input pins on either side. Both sides of the pins are identical! Use whichever side you like, you can also easily chain by connecting up two side-by-side
Power Pins
- GND – This is the power and signal ground pin, must be connected
- VCC – This is the logic power pin, connect this to the logic level you want to use for the PCA9685 output, should be 3 – 5V max! It’s also used for the 10K pullups on SCL/SDA so unless you have your own pullups, have it match the microcontroller’s logic level too!
- V+ – This is an optional power pin that will supply distributed power to the servos. If you are not using for servos you can leave disconnected. It is not used at all by the chip. You can also inject power from the 2-pin terminal block at the top of the board. You should provide 5-6VDC if you are using servos. If you have to, you can go higher to 12VDC, but if you mess up and connect VCC to V+ you could damage your board!
Control Pins
- SCL – I2C clock pin, connect to your microcontrollers I2C clock line. Can use 3V or 5V logic, and has a weak pullup to VCC
- SDA – I2C data pin, connect to your microcontrollers I2C data line. Can use 3V or 5V logic, and has a weak pullup to VCC
- OE – Output enable. Can be used to quickly disable all outputs. When this pin is low all pins are enabled. When the pin is high the outputs are disabled. Pulled low by default so it’s an optional pin!
Output Ports
There are 16 output ports. Each port has 3 pins: V+, GND and the PWM output. Each PWM runs completely independently but they must all have the same PWM frequency. That is, for LEDs you probably want 1.0 KHz but servos need 60 Hz – so you cannot use half for LEDs @ 1.0 KHz and half @ 60 Hz.
They’re set up for servos but you can use them for LEDs! Max current per pin is 25mA.
There are 220 ohm resistors in series with all PWM Pins and the output logic is the same as VCC so keep that in mind if using LEDs.
(1)Drive board connected to Arduino: The PWM driver board uses the I2C method, so only four lines can be connected to the Arduino device: “Classic” Arduino pin mode: + 5v -> VCC GND -> GND Analog 4 -> SDA Analog 5 -> SCL Old Mega pin way: + 5v -> VCC GND -> GND Digital 20 -> SDA Digital 21 -> SCL R3 and later Arduino pin method (Uno, Mega & Leonardo): (These boards have dedicated SDA and SCL pins) + 5v -> VCC GND -> GND SDA -> SDA SCL -> SCL VCC pin is only for the chip power supply, if you want to connect the servo or LED lights, use the V + pin power supply, V + pin supports 3.3 ~ 6V power supply (chip safe voltage 5V). It is recommended to connect the external power supply via the power supply terminal. (2) power supply part: Most of the servo design voltage is 5 ~ 6V, especially in a number of steering gear at the same time running, with the need for high-power power supply. If you are directly using the Arduino 5V pin to power the servo directly, there are some unpredictable problems, so we recommend that you have a suitable external power supply for the drive board. (3) Connect the servo: Most servos are connected using standard 3-wire female plugs, as long as the corresponding pin into the driver board on it. (Ground wire is generally black or brown, the signal line is generally yellow or white) (4) for the driver board assigned address: Each drive board of the cascade needs to have a unique access address. The initial I2C address of each driver board is 0 × 40, you can modify the upper right corner of the jumper I2C address. Connect a jumper with solder to indicate a binary number “1”. Board 0: Address = 0x40 Offset = binary 00000 (default) Board 1: Address = 0x41 Offset = binary 00001 (as shown above, connected to A0) Board 2: Address = 0x42 Offset = binary 00010 (connect to A1) Board 3: Address = 0x43 Offset = binary 00011 (connect A0 and A1) Board 4: Address = 0x44 Offset = binary 00100 (connect to A2) And so on. . . Code example: #include #include Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver (0 × 40); Adafruit_PWMServoDriver pwm2 = Adafruit_PWMServoDriver (0x41); Void setup () { Serial.begin (9600); Serial.println ( “16 channel PWM test! “); Pwm1.begin (); Pwm1.setPWMFreq (1600); // This is the maximum PWM frequency Pwm2.begin (); Pwm2.setPWMFreq (1600); // This is the maximum PWM frequency }}
Learn More PCA9685 16-Channel 12-bit PWM/Servo Driver
Reviews
There are no reviews yet.