SPRING SALE up to 20% OFF! (excludes trade customers)   •   FREE Standard Delivery for orders over £35 (ex VAT)
Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

I2C pullup resistors

The Expander Pi is an Analogue, Digital and RTC development Interface for the Raspberry Pi

05/03/2017

Posted by:
MhicAoidh

MhicAoidh Avatar

Hello, me again, sorry. Probably worng forum but don't know where else to go now. Using ExpanderPi with ServoPi and it works most of the time using a direct <20cm connection (5V side of the bus), but falls over with anything longer (e.g. a bit of veroboard sat next to the Pi), despite signal looking fine on a scope. In practice, this means I can't add anything else to the bus. Also, I would like to a P82B715 I2C extender to talk to remote components, but when I plug the chip in it knock the bus voltage down to ~1V and destroys the signal. I have a feeling this might be down to the chip lowering overall impedance below the threshold for the ExpanderPi's voltage converter, but not sure. If so, how could I extend the bus?Full thread here, with 'scope traces: Raspberry Pi. Any suggestions appreciated.

05/03/2017

Posted by:
andrew

andrew Avatar

Hi

Have you tried using the level converter on the servo pi to convert the I2C bus to 5V and then connect the SDA and SCL pins on the Servo Pi to the SDA and SCL on the expander pi, so the Servo Pi is the one doing the level conversion. By using the Servo Pi for the level conversion instead of the Expander Pi you may be able to get around the problem with the TXS0108E level shifter not working with low resistance on the bus. You may find you have to remove the TXS0108E from the expander pi so it is no longer connected to the I2C bus.

05/03/2017

Posted by:
MhicAoidh

MhicAoidh Avatar

Will give it a try, thanks

06/03/2017

Posted by:
andrew

andrew Avatar

One thing I forgot to mention is the TXS0108E also controls the SPI bus so removing it will mean the ADC and DAC on the Expander Pi stop working. Instead of removing it, you can cut the two I2C traces shown by the red line in the image below. This will isolate the I2C bus without stopping the SPI bus from working.

Forum Image

13/03/2017

Posted by:
MhicAoidh

MhicAoidh Avatar

Removing the ExpanderPi from the equation has solved both my problems, oddly. Other I2C devices now work fine over 50cm+ of wiring with lots of joins and a separate level converter, and the extender chip doesn't affect the signal. I can no longer talk to the ServoPi at all, but that could be down to my dodgy soldering. So I've decided to upgrade to Pi3 and have ordered some new bits - could you let me know what the pullup values are on the IOPi and ServoPWMPiZero please?

13/03/2017

Posted by:
andrew

andrew Avatar

The IO Pi and Servo Pi both use 10K pull-up resistors for the I2C bus.

22/03/2017

Posted by:
MhicAoidh

MhicAoidh Avatar

OK, things still not going well. I have all new hardware - RPi 3B, IOPi and ServoPi. i2cdetect does not find either. Have tried both in various combinations, checked power, checked for signal on scope and all is OK but no comms. Oddly, the IOPi causes i2cdetect and my simple bus-write programme to run very, very slowly, but isn't detected.I know the bus is working because my i2c sonar (via level converter) is fine. What haven't I done? Do I need to connect anything other than pin 3 to 3 and 5 to 5? Do I need to initialise them somehow or change from the default address?

22/03/2017

Posted by:
andrew

andrew Avatar

The only pins that are needed for the IO Pi and Servo Pi are the 1, 2, 3, 5 and 6 which are the 3.3V, 5V, SDA, SCL and GND. The IO Pi should appear on I2C addresses 0x20 and 0x21 and the Servo Pi on 0x40 so as long as your other I2C device doesn't use those addresses it should work.

Have you tried setting up a fresh Linux image and doing an i2cdetect using that? I had a problem last week with a Raspberry Pi where somehow the I2C bus became corrupted in Linux which caused the bus to run slowly as it was timing out every time it tried to access the bus. In the end, I had to set up a fresh install of Raspbian Linux to get it working again.

23/03/2017

Posted by:
MhicAoidh

MhicAoidh Avatar

Oops, didn't realise they needed 3.3V too. And I had a solder short on SCL on the IOPi (that I could only see in daylight) dragging it low and causing it to time out.All working now, thanks again.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.