I2C drive capability

Hi,

I have a SKPANG relay board connected to my Pi, which works fine at address 020. I then connect a couple of TMP102 temperature sensors to the I2C from the relay board via fairly (5M) long cables. These work fine at addresses 48 and 49, but the pi can no longer see the relay board.

I'm assuming the I2C bus is unable to drive all 3 devices, which is, to say the least, disappointing, and completely suffs my central heating control project. Does anyone have any suggestions as to how to work round this?

Cheers, Tony

Reply to
Tony van der Hoff
Loading thread data ...

Use a lower datarate. And/or use linedrivers.

Reply to
Rob

I2C was never design to drive 5 Meters of anything !!!

Yes, find a driver chip, or isolate the cables from the relay board with a simple transistor driver.

hamilton

Reply to
hamilton

thanks, all, for the advice. I'll try to set up a line driver.

Reply to
Tony van der Hoff

Or use 1-Wire temp sensors.

--
Cheers 
Dave.
Reply to
Dave Liquorice

Considering the relay board runs from 5V I should imagine you have all sorts of issues with cable runs causing voltage drops and the 5V thresholds for I2C input not being met.

Without more details on how setup, and how many pull up resistors you have left in and what devices and pull up resistors are connected to very difficult to get a definitive solution.

There are many possibilities.

I have run 5V I2C successfully with line driver over 12m for acquisition equipment running for days.

Please remember the Pi I2C is 3V3, so check the I2C input thresholds for high and low can be met with the setup you want. Remember the cables if not good enough you will have a series resistor affetcting both thresholds.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk 
    PC Services 
  Raspberry Pi Add-ons 
 Timing Diagram Font 
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny 
 For those web sites you hate
Reply to
Paul

And you use them at 15+ feet ? At what frequency ?

How often do you read them ?

once a second, once a minute ?

Reply to
hamilton

5m - far too long.. I2C was really intended as a board-level bus.

Try dropping the data rate. If you have wiringPi installed, then unload the I2C drivers - use lsmod then rmmod, then

gpio load i2x 10

will load it at 10Kbps. (Default is 100Kbps) Give it a go then.

Gordon

Reply to
Gordon Henderson

If it's this one:

formatting link

then it's designed to run on the Pi at 3.3v It has an mcp23017 running at 3.3v that talks I2C on one side, and feeds into a ULN2803 at the other side to drive 4 relays and provide 4 spare open collector outputs.

The Pi's I2C bus has on-board 1K8 pullups to 3.3v

Gordon

Reply to
Gordon Henderson

I have four spaced at about 3 ft intervals after 10 ft plus of cable. They ought to work on cables up to 300+ m long (1000 ft), though I suspect you may be limited to the number of devices, where they are along the cable and be unable to reliably use the parasitic power. Still two pair telephone cable is cheap (or CAT5) to get the three required wires (data, ground, +V).

If you mean the data rate over the bus around 16 kbit/s.

I cheated and bought a Embedded Systems OW Server. That polls all the sensors at roughly 5 second intervals, provides a basic web interface to that data and can push the data as XML over ethernet.

It's is possible for a Pi to talk to 1-Wire devices directly, IIRC there are a few libraries for that.

--
Cheers 
Dave.
Reply to
Dave Liquorice

On 24/12/2013 10:47, Dave Liquorice wrote: []

You recall correctly, here's a very simple example:

formatting link

--
Cheers, 
David 
Web: http://www.satsignal.eu
Reply to
David Taylor

Consistent with rPi's minimalist approach: i2c seems very interesting. Where would I find the docos for the apparently existing rmmod gpio load 12x 10 notation/syntax, to start some experiments, with minimal initial effort?

That notation seems to imply that we have access to existing rPi software to simply, eg. connect 2 rPis via i2c. Is that right? Also the 3.3v 5v incompatibility wouldn't be a problem? OTOH I can't remember what I read: does i2c do peer-to-peer or only master-slave/s?

==TIA.

Reply to
Unknown

man rmmod man gpio

Reply to
Andreas Kernis

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.