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.
external power to adafruit 16 ch servo driver
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- [email protected]
- Posts: 3
- Joined: Thu Aug 02, 2012 2:29 pm
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: external power to adafruit 16 ch servo driver
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.
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
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
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
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
Code that I followed is on https://github.com/adafruit/Adafruit-PW ... er-Library.
Thanks for support
Thanks for support
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: external power to adafruit 16 ch servo driver
@klemenz - Have you measured the PWM output from the servo driver? Are you getting the correct timings? How are you powering the servos?
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
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.
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
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
I checked on oscilloscope and it seems that on PWM I have only noise.
- Attachments
-
- IMG_20130318_184507.jpg (109.35 KiB) Viewed 983 times
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: external power to adafruit 16 ch servo driver
Looks like a lot of NACKs in your bus-pirate output. I suspect the chip is not happy with your i2c communication.
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
So what else can I check? Should it be 3.3V communication or 5V i2c communication toward servo driver?
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: external power to adafruit 16 ch servo driver
That depends on what level your Andriod wants to talk.Should it be 3.3V communication or 5V i2c communication toward servo driver?
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
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).
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).
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: external power to adafruit 16 ch servo driver
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
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
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
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
- adafruit_support_bill
- Posts: 88087
- Joined: Sat Feb 07, 2009 10:11 am
Re: external power to adafruit 16 ch servo driver
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.
On line 27, the constructor calls reset().
On line 32, reset() writes 0x0 to the PCA9685_MODE1 register.
-
- Posts: 23
- Joined: Tue Jan 29, 2013 9:04 pm
Re: external power to adafruit 16 ch servo driver
The problem I have it seems is that I read 0xFF instead of 0x00.
??
??
Please be positive and constructive with your questions and comments.