external power to adafruit 16 ch servo driver

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
[email protected]
 
Posts: 3
Joined: Thu Aug 02, 2012 2:29 pm

external power to adafruit 16 ch servo driver

Post by [email protected] »

I have a 4 AA battery holder that I would like to use to supply external power to the 16 channel servo driver. Can I supply 6 volts to this driver or do I really need to bring it down to 5 volts?

This will interface with a pi or an arduino depending on what I am doing at the time.

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: external power to adafruit 16 ch servo driver

Post by adafruit_support_bill »

V+ is completely separate from VCC. You can put 6v on V+. Just don't connect the V+ pin back to 5v on your Pi or Arduino.

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

Hi,

I just recently bought adafruit 16 ch servo driver, with additional servo driver. I find it difficult to start the servo.
My configuration is as follows:
1) android tablet nexus 7
2) bus pirate with i2c functionality
3) adafruit 16 ch servo driver

bus pirate succesfully finds 0x40 adress of servo driver, but when I want to turn servo nothing happens.
I tried 3.3V i2c communication and 5V i2c communicationon 100kHz.

I followed the *.cpp and *.h 16ch servo driver sample.

The "oldmode" always returns 0xFF, I can see devices communicating but servo don't want to turn.
I attached some pictures and source code.

How can I troubleshoot?

Thank you,
Klemen
Attachments
ServoDriver.java.txt
(5.47 KiB) Downloaded 174 times
ServoAndroid_sample.zip
(732.53 KiB) Downloaded 40 times

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

Code that I followed is on https://github.com/adafruit/Adafruit-PW ... er-Library.
Thanks for support

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: external power to adafruit 16 ch servo driver

Post by adafruit_support_bill »

@klemenz - Have you measured the PWM output from the servo driver? Are you getting the correct timings? How are you powering the servos?

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

I am powering servos through V+ with 5V.
Didn't measure pwm output from servo - yet - I will try to do that afternoon. I suspect this is the pin that is not GND and it's not V+ for servo on channel 0 ... :)

Will report how it goes, I also attached i2c output (log.txt) from bus pirate - thanks for FAST support for now.
Attachments
log.txt
(3.63 KiB) Downloaded 188 times

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

I checked on oscilloscope and it seems that on PWM I have only noise.
Attachments
IMG_20130318_184507.jpg
IMG_20130318_184507.jpg (109.35 KiB) Viewed 983 times

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: external power to adafruit 16 ch servo driver

Post by adafruit_support_bill »

Looks like a lot of NACKs in your bus-pirate output. I suspect the chip is not happy with your i2c communication.

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

So what else can I check? Should it be 3.3V communication or 5V i2c communication toward servo driver?

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: external power to adafruit 16 ch servo driver

Post by adafruit_support_bill »

Should it be 3.3V communication or 5V i2c communication toward servo driver?
That depends on what level your Andriod wants to talk.

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

It's not arduino - it's "Bus Pirate". It can talk 3.3V or 5V.
What i2c frequency is supported with your servo driver? I haven't found that information in pdf (http://learn.adafruit.com/downloads/pdf ... driver.pdf).

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: external power to adafruit 16 ch servo driver

Post by adafruit_support_bill »

From the chip datesheet: http://www.adafruit.com/datasheets/PCA9685.pdf
1 MHz Fast-mode Plus compatible I2
C-bus interface with 30 mA high drive capability
on SDA output for driving high capacitive buses

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

now with different read and write adresses I get more ACKs, namely:

final int address_W = 0x80; // 0x00(0x00 W) 0x80(0x40 W) 0x81(0x40 R) 0xE0(0x70 W) 0xE1(0x70 R)
final int address_R = 0x81; // 0x00(0x00 W) 0x80(0x40 W) 0x81(0x40 R) 0xE0(0x70 W) 0xE1(0x70 R)

I am reading 0x11 for old mode and I am calculating 0x11 for new mode - something is not ok.

Can you help me with:
uint8_t oldmode = read8(PCA9685_MODE1);
uint8_t newmode = (oldmode&0x7F) | 0x10; // sleep

Can you tell me what are the values of oldmode and newmode from sample (https://github.com/adafruit/Adafruit-PW ... Driver.cpp).

See attached logs.

Thank you for support
Attachments
log.txt
(2.89 KiB) Downloaded 169 times
ServoDriver.java.txt
(5.98 KiB) Downloaded 163 times

User avatar
adafruit_support_bill
 
Posts: 88087
Joined: Sat Feb 07, 2009 10:11 am

Re: external power to adafruit 16 ch servo driver

Post by adafruit_support_bill »

The initial value at startup should be 0x0. (sleep bit not set)

On line 27, the constructor calls reset().
On line 32, reset() writes 0x0 to the PCA9685_MODE1 register.

klemenz
 
Posts: 23
Joined: Tue Jan 29, 2013 9:04 pm

Re: external power to adafruit 16 ch servo driver

Post by klemenz »

The problem I have it seems is that I read 0xFF instead of 0x00.
??

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”