Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Talk about Adafruit Raspberry Pi® accessories!

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Postby pentac » Wed Nov 28, 2012 6:17 am

I bought the Adafruit 16-Channel 12-bit PWM/Servo Driver (from floris.cc) after reading the great tutorial:
http://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi
from Kevin Townsend.

I assembled en connected the servo breakout to my Raspberry Pi as described.
Everything looks OK, "sudo i2cdetect -y 0" returns output as expected and described in the tutorial.

Output i2cdetect after boot Pi:

Code: Select all
$ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --


But running the Servo_Example.py python script results in errors:
    Error accessing 0x40: Check your I2C address

Output i2cdetect after running Servo_Example.py

Code: Select all
$ sudo i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 71 72 -- 74 -- -- --


I double checked the board for shortages but it looks OK.
Does anyone have an idea what could be wrong?

Thanks
pentac
 
Posts: 2
Joined: Wed Nov 28, 2012 5:36 am

Re: Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Postby adafruit » Wed Nov 28, 2012 1:03 pm

try removing any other i2c devices, and also check your wiring that the power is good to the chip
User avatar
adafruit
 
Posts: 10545
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40

Postby pentac » Wed Nov 28, 2012 4:39 pm

Thanks for the tip.
Found one bad ground connection on the bread board which caused the problem.
Now I can continue with the project. :D

Thanks
pentac
 
Posts: 2
Joined: Wed Nov 28, 2012 5:36 am


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 0 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [113]

Raspberry Pi[81]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]
cron