16-Channel PWM Servo Driver i2cdetect not working
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/

16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Sun Oct 06, 2013 8:30 am

Hi there,

I have a Pi with the LCD module, the ultimate GPS, and the servo driver. I can see the LCD with i2cdetect at address 0x20 and I can successfully control it. So it appears the i2c bus is functional. I can also talk to the GPS even though I can't get a fix yet (indoors).

When I run i2cdetect, I expect to see the servo driver at address 0x40 but there is nothing there. The power LED on the PWM driver board comes on when the Pi is powered on. When I turn the external power supply on, the servo twitches once but of course without the device available on the bus, the python example fails to do anything. I have checked all the wiring multiple times and I don't see any problems.

At this point I suspect that I may have a faulty servo driver board. Please help.
I will post pictures of my setup shortly.
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Sun Oct 06, 2013 9:06 am

image.jpg
image.jpg (206.53 KiB) Viewed 361 times
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Sun Oct 06, 2013 9:10 am

image.jpg
image.jpg (260.19 KiB) Viewed 360 times
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Sun Oct 06, 2013 9:12 am

image.jpg
image.jpg (272.73 KiB) Viewed 360 times
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Sun Oct 06, 2013 9:14 am

image.jpg
image.jpg (252.71 KiB) Viewed 360 times
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Mon Oct 07, 2013 7:35 am

Bump
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Mon Oct 07, 2013 6:27 pm

Adafruit support, any ideas?
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by adafruit_support_mike on Mon Oct 07, 2013 9:11 pm

Your connections look to be right out of the tutorial: http://learn.adafruit.com/adafruit-16-c ... king-it-up , so this-goes-to-that doesn't seem to be a problem.

It's still worth verifying the connections though. Does the LED on the breakout light up when you connect the power?
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Mon Oct 07, 2013 9:22 pm

Hi Mike,

Yes, the led on the breakout board lights up when the Pi is powered on. But nothing on the i2c bus at 0x40...
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by adafruit_support_mike on Tue Oct 08, 2013 6:36 pm

Let's check one last thing before officially declaring that unit dead.. your solder joints look good, but much painful debugging has taught me never to trust anything I haven't verified instrumentally.

We know the connections between your RasPi and the LCD plate work, so let's check from there:

With the ribbon cable and power disconnected, do a continuity test between the SDA/SCK pins in the GPIO header and the corresponding pins on the MCP23017:

chipplace.jpg
chipplace.jpg (70.64 KiB) Viewed 283 times


Once you're sure you have the right pins on the chip, plug in the ribbon cable and test continuity between those and the SDA/SCK pins on the breakout. If the connections are good, there's probably something wrong with the breakout. OTOH, if you find an open connection, you can spend five minutes with the soldering iron rather than a few days waiting on an RMA.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Tue Oct 08, 2013 11:35 pm

Mike,

I followed your instructions and figured out I had a short between 3v3 and SDA on the perma PROTO board. Even after the meter indicated this, it was hard to see the short. I had a very fine line of solder jump the gap between these two lines.

Unfortunately it's still not working even after I removed the short. The question now is: did I damage the PWM board or the Pi or both? How do I tell? When I check impedance between the 3v3 pin and the SDA Pins on the Pi header, I get a reading of around 1800 ohms. Is that normal?

Any help you can provide determining what is damaged is appreciated.

Thanks,
Christo
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by adafruit_support_mike on Wed Oct 09, 2013 5:32 pm

I don't think shorting to 3v3 will damage the I2C pins, but there's an easy up/down test: if your LCD still works, the RasPi is fine.

The ~1800 ohm resistance you saw is normal, and in fact necessary. I2C requires a pull-up resistor on the SDA and SCK lines. The devices themselves don't generate signals, they just have 'open drain' mosfets that pull the lines LOW when they need to send data. It's a technique that allows an arbitrary number of devices to use the same bus, and prevents nasty problems that can happen when one device wants to send a HIGH signal while another device wants to send a LOW signal.

Do you have any kind of instrument that can trace dynamic signals.. oscilloscope, logic analyzer, etc? Multimeters are great at measuring fixed signals, but debugging a data connection with one is about 95% luck.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: 16-Channel PWM Servo Driver i2cdetect not working

by Fronie on Wed Oct 09, 2013 8:28 pm

No unfortunately a multimeter is all I have.
Fronie
 
Posts: 10
Joined: Sun Oct 06, 2013 8:13 am

Re: 16-Channel PWM Servo Driver i2cdetect not working

by adafruit_support_mike on Thu Oct 10, 2013 2:30 am

Okay, let's do the best we can with what we've got..

The fact that your LCD worked even in spite of a short to VCC on the SDA line strikes me as odd. It suggests a weak connection through the ribbon cable.

Let's try bypassing the ribbo cable temporarily. Remove the LCD plate from your RasPi and run a couple of jumpers from the SDA/SCK pins on the main GPIO header to the corresponding rows on your protoboard. Let's see if the device shows up that way.

Does your multimeter have a frequency counter? If so, before pulling the LCD Plate, write a quick program that sends continuous text to the LCD. The goal is to keep the SCK pin active for long enough to get a reading. Connect the ribbon cable to your protoboard, then while the LCD is updating, touch the meter's leads to the GND rail on the protoboard and the breakout's SCK pin. You should see a fixed, high frequency on it.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10082
Joined: Thu Feb 11, 2010 2:51 pm

Re: 16-Channel PWM Servo Driver i2cdetect not working

by sianegad on Fri Oct 11, 2013 11:23 pm

May I join this Thread? I too am trying to link a pwm module witn a Pi trough I2C and not getting a reply.
I do have an osciloscope, and can see the signal on SDA, but SCL is stuck on 3V. I do not have a cobbler and connected directly with jumper cables.
also im readin 10KOhm between VCC and SDA SCL.

edit:
Wiring fault,
sudo python Servo_Example.py adafruit might be interested in these, very affordable scopes, ideal for thinkerers on a budget
https://www.google.ca/#q=minidso
sianegad
 
Posts: 1
Joined: Sun Sep 22, 2013 10:34 pm