There is no USPS pickup on Monday Feb 15th, 2016 because of President's Day. USPS orders placed after 11am EST Fri February 12th will go out Tuesday February 16. UPS orders will ship as normal.

Raspberry Pi - Adafruit PWM/Servo Driver - Error accessing 0x40
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/
Please be positive and constructive with your questions and comments.

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

by pentac on Wed Nov 28, 2012 7: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 | TOGGLE FULL SIZE
$ 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 | TOGGLE FULL SIZE
$ 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 6:36 am

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

by adafruit on Wed Nov 28, 2012 2:03 pm

try removing any other i2c devices, and also check your wiring that the power is good to the chip

adafruit
 
Posts: 12047
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

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

by pentac on Wed Nov 28, 2012 5: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 6:36 am

Please be positive and constructive with your questions and comments.