Module – PCA9685 – Servo motor driver PWM 16 Kanaals 12-bit I2C

Hardware

BESTELLEN

Met deze module kan men 16 servo’s aansturen via I2C met gekoppelde modules (max 62) tot max 992 servo’s!

Specificaties (eng):

  • It’s an i2c-controlled PWM driver with a built in clock. That means that, unlike the TLC5940 family, you do not need to continuously send it signal tying up your microcontroller, its completely free running!
  • It is 5V compliant, which means you can control it from a 3.3V microcontroller and still safely drive up to 6V outputs (this is good for when you want to control white or blue LEDs with 3.4+ forward voltages)
  • 6 address select pins so you can wire up to 62 of these on a single i2c bus, a total of 992 outputs – that’s a lot of servos or LEDs
  • Adjustable frequency PWM up to about 1.6 KHz
  • 12-bit resolution for each output – for servos, that means about 4us resolution at 60Hz update rate
  • Configurable push-pull or open-drain output
  • Output enable pin to quickly disable all the outputs

I2C adres instellen

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)


Voorbeeld van meerder servo’s aangesloten:

Voorbeeld meerdere modules aangesloten:

 

Pinout

Arduino

Sluit de module aan volgens onderstaand overzicht:


Script

Onderstaand script maakt gebruik van de “Adafruit-PWM-Servo-Drive” bibliotheek.


Arduino Library

Installatie van Arduino IDE libraries: Arduino info

Informatie (ENG):

These drivers use I2C to communicate, 2 pins are required to interface.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, check license.txt for more information.

All text above must be included in any redistribution

Compatibility

MCU Tested Works Doesn’t Work Not Tested Notes
Atmega328 @ 16MHz X
Atmega328 @ 12MHz X
Atmega32u4 @ 16MHz X
Atmega32u4 @ 8MHz X
ESP8266 X
Atmega2560 @ 16MHz X
ATSAM3X8E X Use SDA1/SCL1
ATSAM21D X
ATtiny85 @ 16MHz X
ATtiny85 @ 8MHz X
Intel Curie @ 32MHz X
STM32F2 X
  • ATmega328 @ 16MHz : Arduino UNO, Adafruit Pro Trinket 5V, Adafruit Metro 328, Adafruit Metro Mini
  • ATmega328 @ 12MHz : Adafruit Pro Trinket 3V
  • ATmega32u4 @ 16MHz : Arduino Leonardo, Arduino Micro, Arduino Yun, Teensy 2.0
  • ATmega32u4 @ 8MHz : Adafruit Flora, Bluefruit Micro
  • ESP8266 : Adafruit Huzzah
  • ATmega2560 @ 16MHz : Arduino Mega
  • ATSAM3X8E : Arduino Due
  • ATSAM21D : Arduino Zero, M0 Pro
  • ATtiny85 @ 16MHz : Adafruit Trinket 5V
  • ATtiny85 @ 8MHz : Adafruit Gemma, Arduino Gemma, Adafruit Trinket 3V

Download @ github.com

Raspberry Pi

Sluit de module aan zoals aangegeven op onderstaand schema:

Ps. Altijd de pinout van je Raspberry Pi controleren, deze kan verschillen per versie.

Wat moet je doen?

1) I2C aanzetten op de Pi.
2) SMBUS module installeren voor Python:

Om de I2C bus in Python te gebruiken moet je een module installeren, genaamd SMBUS, dit kan via APT-GET met het commando:  sudo apt-get install python-smbus

Je kan dan de module importeren in python door middel van: import smbus

Controleren van de aansluiting

Om de aansluiting van de module te controleren voor je het volgende commando uit: sudo i2cdetect -y 1, je ziet dan het (0x40) adres staan in de lijst:

0x40 = Servo board.


Bronnen:
learn.adafruit.com

Afmetingen

Schema

Teardown

GEEN GEGEVENS

Datasheet

Fritzing

Downloads

GEEN GEGEVENS