Has anyone any experience of running an I2C bus from a PCB to a remote I2C device ? I am thinking of connecting a remote Dallas Semiconductor I2C temperature sensor IC to a micro over a length of 4 or 5 metres of wire. The temp sensor would be fixed to the ceiling to measure room temperature and the micro would be in a monitoring / control box on the wall. Could I run this at the typical 400 KHz clock speed with a decent bit of screened cable ? Colin
I2C off board distances
Started by ●September 16, 2004
Reply by ●September 16, 20042004-09-16
Colin MacDougall wrote:> Has anyone any experience of running an I2C bus from > a PCB to a remote I2C device ? I am thinking of > connecting a remote Dallas Semiconductor I2C temperature > sensor IC to a micro over a length of 4 or 5 metres of > wire. The temp sensor would be fixed to the ceiling to > measure room temperature and the micro would be in a > monitoring / control box on the wall. > > Could I run this at the typical 400 KHz clock speed with > a decent bit of screened cable ? > > Colin >IMHO, no. The I2C bus is an open-drain/collector -bus. The cable capacitance will kill your rise times. Also the system is too fragile for real world use - think about all noise and possible ESD. Tauno Voipio tauno voipio (at) iki fi
Reply by ●September 16, 20042004-09-16
On Thu, 16 Sep 2004 20:01:25 GMT, the renowned "Colin MacDougall" <colin@blueyonder.co.uk> wrote:>Has anyone any experience of running an I2C bus from >a PCB to a remote I2C device ? I am thinking of >connecting a remote Dallas Semiconductor I2C temperature >sensor IC to a micro over a length of 4 or 5 metres of >wire. The temp sensor would be fixed to the ceiling to >measure room temperature and the micro would be in a >monitoring / control box on the wall. > >Could I run this at the typical 400 KHz clock speed with >a decent bit of screened cable ? > >ColinThe ACCESS bus is/was based on I2C and designed to work off-board, hoewever it operates at 100KHz. http://www.semtech.com/pdf/abusv30.pdf Best regards, Spehro Pefhany -- "it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
Reply by ●September 16, 20042004-09-16
Colin MacDougall wrote:> Has anyone any experience of running an I2C bus from > a PCB to a remote I2C device ? I am thinking of > connecting a remote Dallas Semiconductor I2C temperature > sensor IC to a micro over a length of 4 or 5 metres of > wire. The temp sensor would be fixed to the ceiling to > measure room temperature and the micro would be in a > monitoring / control box on the wall. > > Could I run this at the typical 400 KHz clock speed with > a decent bit of screened cable ?Look at the Philips web, they have i2c info and also do i2c expanders/buffers for this type of application. Since this is room temperature, I would drop the 400KHz spec, and as you are reading slow data fields, you can use 'reality check' software to improve noise tolerance. -ie run as slow as you can tolerate, and design to tolerate disturbances. -jg
Reply by ●September 16, 20042004-09-16
"Colin MacDougall" <colin@blueyonder.co.uk> wrote in message news:pim2d.476$5V2.5354799@news-text.cableinet.net...> Has anyone any experience of running an I2C bus from > a PCB to a remote I2C device ? I am thinking of > connecting a remote Dallas Semiconductor I2C temperature > sensor IC to a micro over a length of 4 or 5 metres of > wire. The temp sensor would be fixed to the ceiling to > measure room temperature and the micro would be in a > monitoring / control box on the wall. > > Could I run this at the typical 400 KHz clock speed with > a decent bit of screened cable ?Not sure about that speed, but a data point - I have an HVAC controller I built using two Dallas DS1621s. One segment of the I2C bus is 23 feet, and the other is 43 feet. I'm bit banging I2C on an 8051's port. I think the overall speed is around 10-20Khz (can't remember - it has been a while since I wrote the code and don't exactly remember the speed). I don't know about 400KHz, but you can run it quite a bit slower. Also, why do you need a 400Khz clock speed to a temperature sensor, which takes in the mid millisecond range to do conversions? Are you expecting temperature changes in the sub 1 second range at all? Even at 10Khz, I could reread the temperature off each sensor around 400 times a second if I'm doing autoconversion, so unless you need that resolution, you won't have to run the bus that fast. -->Neil
Reply by ●September 17, 20042004-09-17
On Thu, 16 Sep 2004 20:01:25 GMT, "Colin MacDougall" <colin@blueyonder.co.uk> wrote:>Has anyone any experience of running an I2C bus from >a PCB to a remote I2C device ? I am thinking of >connecting a remote Dallas Semiconductor I2C temperature >sensor IC to a micro over a length of 4 or 5 metres of >wire.The Philips P82B96 I2C bus extender is a wonderful thing. We used it in an application involving thyristors and steam boilers. It works fine over several metres, and I have no reason to believe it will not work over much longer distances. There has also been some work on using the Dallas 1-wire bus over longer distances, but I'm not the person here doing that work. See the Dallas/maxim app notes. Stephen -- Stephen Pelc, stephenXXX@INVALID.mpeltd.demon.co.uk MicroProcessor Engineering Ltd - More Real, Less Time 133 Hill Lane, Southampton SO15 5AF, England tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691 web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads
Reply by ●September 17, 20042004-09-17
Colin MacDougall <colin@blueyonder.co.uk> wrote:> Has anyone any experience of running an I2C bus from > a PCB to a remote I2C device?No experience, but a caveat: that's not at all the kind of operation I2C is designed for. It may work, sure, but you should be aware you're stretching a design quite a bit beyond its intentions. Problems are almost guaranteed.> I am thinking of connecting a remote Dallas Semiconductor I2C > temperature sensor IC to a micro over a length of 4 or 5 metres of > wire.Their "1-wire" technology might be preferrable for that usage.> Could I run this at the typical 400 KHz clock speed with > a decent bit of screened cable ?Even if you could, why would you want to? I would think ambient temperatures in a room change at speeds on the order of at most 1 degree/minute, so anything faster than one reading per second per sensor would be complete overkill, and one reading every minute might still be perfectly enough. You don't need anything as fast as 400 kHz for that. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by ●September 17, 20042004-09-17
"Hans-Bernhard Broeker" <broeker@physik.rwth-aachen.de> wrote in message news:2r06ijF1442t9U2@uni-berlin.de...> Colin MacDougall <colin@blueyonder.co.uk> wrote: >> Has anyone any experience of running an I2C bus from >> a PCB to a remote I2C device? > > No experience, but a caveat: that's not at all the kind of operation > I2C is designed for. It may work, sure, but you should be aware > you're stretching a design quite a bit beyond its intentions. > Problems are almost guaranteed. > >> I am thinking of connecting a remote Dallas Semiconductor I2C >> temperature sensor IC to a micro over a length of 4 or 5 metres of >> wire. > > Their "1-wire" technology might be preferrable for that usage. > >> Could I run this at the typical 400 KHz clock speed with >> a decent bit of screened cable ? > > Even if you could, why would you want to? I would think ambient > temperatures in a room change at speeds on the order of at most 1 > degree/minute, so anything faster than one reading per second per > sensor would be complete overkill, and one reading every minute might > still be perfectly enough. You don't need anything as fast as 400 kHz > for that. > > -- > Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) > Even if all the snow were burnt, ashes would remain.I don't need the temperature measurements that fast ( 1 per minute would do ) but I intended the I2C bus to also connect an eeprom device to record those measurements. When the measurements have to be retrieved then the full bus speed would be desirable. A fast/slow clock select would of course be the solution but also mean more software overhead. Colin
Reply by ●September 17, 20042004-09-17
Colin MacDougall <colin@blueyonder.co.uk> wrote:> I don't need the temperature measurements that fast ( 1 per minute > would do ) but I intended the I2C bus to also connect an eeprom > device to record those measurements.In that case, I would think twice whether it's really a good idea to connect two devices with such rather incommensurable requirements regarding data rates, distance and EMI behaviour as an EEPROM right there on the board, and temperature sensor elsewhere in the room to the same data line. If ever there was a reason to have multiple data ports on a single CPU/controller, I would think you've just about given a textbook example for it. Questions to check: *) can you really afford having communication with that EEPROM disturbed by EMI effects collected by 5 meters of cabling? *) is it even remotely convenient to have to stop access to the EEPROM in order to access the temperature sensor? Unless you're absolutely starved out of free pins and/or free space on the board to use for a line protocol converter between I2C and whatever you'll use to driver that temperature sensor, I would think keeping these two device on separate busses would get you rid of quite a number of worries, for acceptable cost. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain.
Reply by ●September 17, 20042004-09-17
"Hans-Bernhard Broeker" <broeker@physik.rwth-aachen.de> wrote in message news:2r0ku2F13d79tU1@uni-berlin.de...> Colin MacDougall <colin@blueyonder.co.uk> wrote: >> I don't need the temperature measurements that fast ( 1 per minute >> would do ) but I intended the I2C bus to also connect an eeprom >> device to record those measurements. > In that case, I would think twice whether it's really a good idea to > connect two devices with such rather incommensurable requirements > regarding data rates, distance and EMI behaviour as an EEPROM right > there on the board, and temperature sensor elsewhere in the room to > the same data line. If ever there was a reason to have multiple data > ports on a single CPU/controller, I would think you've just about > given a textbook example for it. > [snip] > Unless you're absolutely starved out of free pins and/or free space on > the board to use for a line protocol converter between I2C and > whatever you'll use to driver that temperature sensor, I would think > keeping these two device on separate busses would get you rid of quite > a number of worries, for acceptable cost.Colin, Hans is offering some very, very good advice, here. I'm certain you've got a couple of I/O pins to spare - definitely do what he says. In my HVAC controller, I get several glitches on the I2C bus a day. I'm controlling a 12 amp @ 240 volt heat pump, a 9 amp furnace, 20 amp resisitve heating, and a backup generator, and when the heat pump shuts down, the collapse of the inductive field does generate a spike on the I2C bus, which causes the DS1621s to get scrambled (requiring them to be reset). I'm not sure if your environment is as noisy, but I would *NEVER* trust an E^2 write on the same set of lines as the temperature sensors. Here's a photo of that HVAC controller: http://www.synthcom.com/~nb/Controller3.jpg Yes, I'm aware that the power supply is a big ugly hack. ;-) It has since been replaced with a switcher... -->Neil