Canada
Asked — Edited

I2c Help - Adafruit 16 Channel Servo Driver

Hello All,

Just curious if anyone has one of these Adadfruit 16 Channel servo Driver working with their EZ-B?

User-inserted image

I realized I needed to control a schwack of servos for my R2 Dome.

I've got a couple of these boards on order, I'm trying to make heads and tails of the world of i2c.

I've searched the forums and scrounged bits and pieces of info, I've visited all the tutorial links that DJ has provided. Viewed the examples in ARC as well.

What little I know.

Each Adafruit board has a unique address. 0x40 is the default.

Connections are pretty straight forward.

Making it work is where I'm lost. All I want to do is move servos.

I2CWrite(0, 0x40, ? )

I've looked at the Arduino examples (confused me more).

What would I need to address the individual 16 servos and make them move?

Any help would be appreciated, any example script would be GREATLY appreciated.

Yes I need my hand held. :D


ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

Canada
#1  

Nobody doing anything with I2C and servos?

United Kingdom
#2  

I looked but it's over my head, I2C is confusing at the best of times...

From what I understand of I2C the I2CWrite command needs to have what you showed I2CWrite(0, 0x40, ...) but also the code for setting the servo port and code for setting the servo position.

But those last 2 codes are not clearly there... I'll have another look when I have a clear head although hopefully someone else can give more help, it would be a very useful board to use.

Canada
#3  

I'm thinking the Arduino library file needs to be ported back to c+ or c++ code to work with the EZ-B.

I'm not a programmer so it's all gibberish to me! :D

PRO
Synthiam
#5  

No, that's waaaaaaaaaaay to complicated. :)

It's much easier in EZ-Robot :D.. You'll need to read the data sheet for the commands. But it would go something like this (if they created the board correctly)

  1. load ARC

  2. Press Add Control

  3. Select Scripting

  4. Add EZ-Script Control

  5. Press Config

  6. Enter this as code


i2cWrite(0, 0x40, 0, 100)

That should move the servo to a position 100. I don't know the datasheet. But if they didn't do it that way, the product is far too complicated to spend anytime on. How much do you value your time? Be cheaper to purchase another EZ-B :)

Canada
#6  

Hi DJ,

Thanks for the reply.

Here is the spec sheet for the chip. I've browsed it but I'm at work so I'll have to give it a good read tonight.

www.nxp.com/documents/data_sheet/PCA9685.pdf

It looks like this chip was originally for PWM LED's and such. Adafruit basically made it into a breakout board and added on-board resistors. They are only $14.95 from RobotShop.

I think the Arduino library was created to make communication with servos easier.

I'd really like to get this interfaced with the EZ-B. I'm looking at daisy chaining (2) of these to handle all my servo requirements for my R2 (Dome Panels, Holo Eye Movement, Lifters, Body Doors, etc).

I could easily add a second EZ-B (I have 7 now) but would rather utilize the I2C feature.

Maybe this could be a featured module supported and added under I2C in ARC? Hint...Hint...Hint :)

Get rid of the Blink-M (EZ-B is more than a Blinking LED controller right?) :D

As always any help is greatly appreciated.

Kris

P.S. Do you have a booth at the Calgary Expo this year?