Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

i2c and twisted pair

i2c and twisted pair

2009-03-31 by Steve Hodge

I would like to use standard shielded Cat 5/6 cable to carry I2C signals
between boards, i.e., between microcontrollers on separate boards.
Distances are not the question here, because if they end up a factor I'll
just use a PCA9517 buffer or something similar, but should someone ask they
will be of the order of a few to several feet.

The question is rather what conductors of the four twisted pairs should I
use?   At first, without thinking about it much I thought just use a single
twisted pair for both SCL & SDA, but after thinking about it further for a
few minutes, I now think that might be a bad idea, because SCL & SDA do not
comprise a single differential signal.

So now I'm thinking they should be on separate twisted pairs.   Perhaps with
GND as the other half of each pair.

I'd appreciate any help on this. 

Thanks, Steve
 

__________ Information from ESET Smart Security, version of virus signature
database 3976 (20090330) __________

The message was checked by ESET Smart Security.

http://www.eset.com

Re: [AVR-Chat] i2c and twisted pair

2009-03-31 by John Samperi

At 12:04 PM 31/03/2009, you wrote:
>So now I'm thinking they should be on separate twisted pairs.   Perhaps with
>GND as the other half of each pair.

That would be my choice and have in fact done something similar
except that I used 1 wire as V+. ie only used 2 pair.



Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: [AVR-Chat] i2c and twisted pair

2009-03-31 by Tim Gilbert

You are correct that twisted pair will only help if you're running a differential signal.    In fact, running SDA and SCL on the same pair could, in theory, make the signal worse.

Why bother with Cat5?  I'd probably use a ribbon cable.  You can tie every other conductor to ground if it makes you feel better (the electrons won't know either way).  I'd just hook it up and try it. 

Regards,



Tim Gilbert
JEM Innovation Inc.
303-926-9053 (office)
303-437-4342 (cell)
720-890-8582 (fax)
www.jeminnovation.com
www.pdksolutions.com
Show quoted textHide quoted text
  ----- Original Message ----- 
  From: Steve Hodge 
  To: AVR-Chat@yahoogroups.com 
  Sent: Monday, March 30, 2009 7:04 PM
  Subject: [AVR-Chat] i2c and twisted pair


  I would like to use standard shielded Cat 5/6 cable to carry I2C signals
  between boards, i.e., between microcontrollers on separate boards.
  Distances are not the question here, because if they end up a factor I'll
  just use a PCA9517 buffer or something similar, but should someone ask they
  will be of the order of a few to several feet.

  The question is rather what conductors of the four twisted pairs should I
  use? At first, without thinking about it much I thought just use a single
  twisted pair for both SCL & SDA, but after thinking about it further for a
  few minutes, I now think that might be a bad idea, because SCL & SDA do not
  comprise a single differential signal.

  So now I'm thinking they should be on separate twisted pairs. Perhaps with
  GND as the other half of each pair.

  I'd appreciate any help on this. 

  Thanks, Steve


  __________ Information from ESET Smart Security, version of virus signature
  database 3976 (20090330) __________

  The message was checked by ESET Smart Security.

  http://www.eset.com




  

[Non-text portions of this message have been removed]

Re: [AVR-Chat] i2c and twisted pair

2009-03-31 by David VanHorn

As others have indicated, you want to go with signal and ground in a
pair.  Putting two signals on a pair will cause large crosstalk.
I don't see why this won't work, but be prepared to insert some series
resistance in the driving end, maybe 100 ohms or so, to cut down on
ringing.  The cable capacitance will be the limiting factor on speed.

And of course, a good solid ground connection between the systems is important.

good luck!

-- 
There is no computer problem which cannot be solved by proper
application of a sufficiently large hammer.

RE: [AVR-Chat] i2c and twisted pair

2009-03-31 by Steve Hodge

Thanks for everyone's input.   It's always good to get confirmation!   I'll
use one pair for SDA+GND and another for SCL+GND.  Or I may substitute V+
for one GND.

 

I have other reasons for wanting to use Cat5:  shielding, quick & easy
connect/disconnect, relatively cheap and easy to make up cables, and for my
situation cables that are flexible and easy to run convoluted paths is very
important.   I also have other uses for the remaining conductors in "RJ45"
cable, so that, plus shielding, is the reason I'm not just using "RJ11" or
"RJ12" modular cable (I've never been able to find such cable that is
shielded).

 

Steve
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Tim Gilbert
Sent: Tuesday, March 31, 2009 8:08 AM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] i2c and twisted pair

 

You are correct that twisted pair will only help if you're running a
differential signal. In fact, running SDA and SCL on the same pair could, in
theory, make the signal worse.

Why bother with Cat5? I'd probably use a ribbon cable. You can tie every
other conductor to ground if it makes you feel better (the electrons won't
know either way). I'd just hook it up and try it. 

Regards,






[Non-text portions of this message have been removed]

Re: [AVR-Chat] i2c and twisted pair

2009-03-31 by David VanHorn

> I have other reasons for wanting to use Cat5:  shielding, quick & easy
> connect/disconnect, relatively cheap and easy to make up cables, and for my
> situation cables that are flexible and easy to run convoluted paths is very
> important.   I also have other uses for the remaining conductors in "RJ45"
> cable, so that, plus shielding, is the reason I'm not just using "RJ11" or
> "RJ12" modular cable (I've never been able to find such cable that is
> shielded).

Shielding is tricky, and may not buy you much.
If you have more than one ground connection between the systems, then
you risk "ground loop" noise.
Basically, any current flowing in the grounds gets expressed as a
voltage, which hoses up the logic thresholds.

Belden has all sorts of shielded cables, solid, stranded, 2 pair, no problem.


-- 
There is no computer problem which cannot be solved by proper
application of a sufficiently large hammer.

RE: [AVR-Chat] i2c and twisted pair

2009-03-31 by Steve Hodge

Thanks.  I'm aware of ground loop issues.  My boards always have jumpers to
allow disconnecting ground lines when otherwise there would be multiple
ground connections.  Similarly for the shield, so that it can be grounded at
only one end.  The application is for a boat, which at times has strong
radio transmissions all through it.   My approach is that shielding cannot
hurt (properly implemented).

 

Steve
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of David VanHorn
Sent: Tuesday, March 31, 2009 9:46 AM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] i2c and twisted pair

 

> I have other reasons for wanting to use Cat5:  shielding, quick & easy
> connect/disconnect, relatively cheap and easy to make up cables, and for
my
> situation cables that are flexible and easy to run convoluted paths is
very
> important.   I also have other uses for the remaining conductors in "RJ45"
> cable, so that, plus shielding, is the reason I'm not just using "RJ11" or
> "RJ12" modular cable (I've never been able to find such cable that is
> shielded).

Shielding is tricky, and may not buy you much.
If you have more than one ground connection between the systems, then
you risk "ground loop" noise.
Basically, any current flowing in the grounds gets expressed as a
voltage, which hoses up the logic thresholds.

Belden has all sorts of shielded cables, solid, stranded, 2 pair, no
problem.




 



[Non-text portions of this message have been removed]

Re: [AVR-Chat] i2c and twisted pair

2009-03-31 by David VanHorn

On Tue, Mar 31, 2009 at 2:13 PM, Steve Hodge <steve@terrafirma.us> wrote:
> Thanks.  I'm aware of ground loop issues.  My boards always have jumpers to
> allow disconnecting ground lines when otherwise there would be multiple
> ground connections.  Similarly for the shield, so that it can be grounded at
> only one end.  The application is for a boat, which at times has strong
> radio transmissions all through it.   My approach is that shielding cannot
> hurt (properly implemented).

Cool. I wasn't sure if you were aware of the complications.

Re: [AVR-Chat] i2c and twisted pair

2009-03-31 by Ken Holt

Also, be sure to keep your I2C pullup resistors (Rp) as low as possible,
down as far as 1K is allowed by the spec.  This will help help your
rise-time and speed with that long shield capacitance. Also it may
help your noise immunity in that boat-electrical environment.

Steve Hodge wrote:
Show quoted textHide quoted text
>
> Thanks. I'm aware of ground loop issues. My boards always have jumpers to
> allow disconnecting ground lines when otherwise there would be multiple
> ground connections. Similarly for the shield, so that it can be 
> grounded at
> only one end. The application is for a boat, which at times has strong
> radio transmissions all through it. My approach is that shielding cannot
> hurt (properly implemented).
>
> Steve
>
> From: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> 
> [mailto:AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>] 
> On Behalf
> Of David VanHorn
> Sent: Tuesday, March 31, 2009 9:46 AM
> To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com>
> Subject: Re: [AVR-Chat] i2c and twisted pair
>
> > I have other reasons for wanting to use Cat5: shielding, quick & easy
> > connect/disconnect, relatively cheap and easy to make up cables, and for
> my
> > situation cables that are flexible and easy to run convoluted paths is
> very
> > important. I also have other uses for the remaining conductors in "RJ45"
> > cable, so that, plus shielding, is the reason I'm not just using 
> "RJ11" or
> > "RJ12" modular cable (I've never been able to find such cable that is
> > shielded).
>
> Shielding is tricky, and may not buy you much.
> If you have more than one ground connection between the systems, then
> you risk "ground loop" noise.
> Basically, any current flowing in the grounds gets expressed as a
> voltage, which hoses up the logic thresholds.
>
> Belden has all sorts of shielded cables, solid, stranded, 2 pair, no
> problem.
>
> [Non-text portions of this message have been removed]
>
>

RE: [AVR-Chat] i2c and twisted pair

2009-03-31 by Steve Hodge

Thanks.  I was figuring on 5K, but I'll drop it to 1.2 K.  I'm running it at
3.3 V so 1.2 K still keeps the drain slightly under 3 mA, which is another
spec isn't it?   Or would you choose something else given the 3.3 V?   Steve
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Ken Holt
Sent: Tuesday, March 31, 2009 12:00 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] i2c and twisted pair

 

Also, be sure to keep your I2C pullup resistors (Rp) as low as possible,
down as far as 1K is allowed by the spec. This will help help your
rise-time and speed with that long shield capacitance. Also it may
help your noise immunity in that boat-electrical environment.






[Non-text portions of this message have been removed]

Re: i2c and twisted pair

2009-03-31 by Brian

Twisted pair with ground is good. What about diff driver to increase reliability and performance?

Brian

--- In AVR-Chat@yahoogroups.com, "Steve Hodge" <steve@...> wrote:
Show quoted textHide quoted text
>
> I would like to use standard shielded Cat 5/6 cable to carry I2C signals
> between boards, i.e., between microcontrollers on separate boards.
> Distances are not the question here, because if they end up a factor I'll
> just use a PCA9517 buffer or something similar, but should someone ask they
> will be of the order of a few to several feet.
> 
> The question is rather what conductors of the four twisted pairs should I
> use?   At first, without thinking about it much I thought just use a single
> twisted pair for both SCL & SDA, but after thinking about it further for a
> few minutes, I now think that might be a bad idea, because SCL & SDA do not
> comprise a single differential signal.
> 
> So now I'm thinking they should be on separate twisted pairs.   Perhaps with
> GND as the other half of each pair.
> 
> I'd appreciate any help on this. 
> 
> Thanks, Steve
>  
> 
> __________ Information from ESET Smart Security, version of virus signature
> database 3976 (20090330) __________
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
>

RE: [AVR-Chat] Re: i2c and twisted pair

2009-03-31 by Steve Hodge

Isn't that what a PCA9517 effectively does (among other things)?   Steve
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Brian
Sent: Tuesday, March 31, 2009 4:10 PM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: i2c and twisted pair

 

Twisted pair with ground is good. What about diff driver to increase
reliability and performance?

Brian

--- In AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> , "Steve
Hodge" <steve@...> wrote:
>
> I would like to use standard shielded Cat 5/6 cable to carry I2C signals
> between boards, i.e., between microcontrollers on separate boards.
> Distances are not the question here, because if they end up a factor I'll
> just use a PCA9517 buffer or something similar, but should someone ask
they
> will be of the order of a few to several feet.



 



[Non-text portions of this message have been removed]

Re: i2c and twisted pair

2009-04-01 by Stefan Wimmer

--- In AVR-Chat@yahoogroups.com, "Steve Hodge" <steve@...> wrote:
>
> Thanks for everyone's input.   It's always good to get confirmation!   I'll
> use one pair for SDA+GND and another for SCL+GND.  Or I may substitute V+
> for one GND.

working in vehicle electronics (trains) I always cringe when I see people going off board with a bus that was initially invented to be a simple connection between IC on the same PCB (Inter-IC bus). In a train with it's bursts and surges in the kV range, it berely works on board and I would never even try it "long range".

Sure, in most (hobby) applications it works, but so does towing a car with a schoestring...

> I have other reasons for wanting to use Cat5:  shielding, quick & easy
> connect/disconnect, relatively cheap and easy to make up cables, and for my
> situation cables that are flexible and easy to run convoluted paths is very
> important.   I also have other uses for the remaining conductors in "RJ45"
> cable, so that, plus shielding, is the reason I'm not just using "RJ11" or
> "RJ12" modular cable (I've never been able to find such cable that is
> shielded).

So since you already have a connection made for differential transmission - why not use it just for that? Two RS422/485 trnasceivers aren't that expensive and e.g. a Tiny26 on the receiver side won't even cost more than your I2C Port extender.

Greetings from Berlin, Germany,
Stefan

Re: i2c and twisted pair

2009-04-09 by Brian

Sorry. it been a while. In your original post, you were going to use it incase the distance was great.

I was saying, using a diff driver on the parent board and a reciever on the child board regardless of distance would be better. Even short distances without a diff driver can cause problems. Just using ground doesnt give you the reliability needed even if the ground loops are isolatd. Grounds can cause problems. If your ground loops are isolated you could recieve EMI in one ground and not the other. Even if the grounds are connected there is a difference between one ground pin on a chip than another. I have experienced this at work.

Any way you do it may work. The question is 'what if'. And how far will you take it?

Brian

--- In AVR-Chat@yahoogroups.com, "Steve Hodge" <steve@...> wrote:
Show quoted textHide quoted text
>
> Isn't that what a PCA9517 effectively does (among other things)?   Steve
> 
>  
> 
> From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
> Of Brian
> Sent: Tuesday, March 31, 2009 4:10 PM
> To: AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] Re: i2c and twisted pair
> 
>  
> 
> Twisted pair with ground is good. What about diff driver to increase
> reliability and performance?
> 
> Brian
> 
> --- In AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> , "Steve
> Hodge" <steve@> wrote:
> >
> > I would like to use standard shielded Cat 5/6 cable to carry I2C signals
> > between boards, i.e., between microcontrollers on separate boards.
> > Distances are not the question here, because if they end up a factor I'll
> > just use a PCA9517 buffer or something similar, but should someone ask
> they
> > will be of the order of a few to several feet.
> 
> 
> 
>  
> 
> 
> 
> [Non-text portions of this message have been removed]
>

Re: i2c and twisted pair

2009-04-09 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "Steve Hodge" <steve@...> wrote:
>
> Isn't that what a PCA9517 ... does

No, not at all.  I think Brian is telling you to use differential signaling without understanding the I2C bus.

However, it turns out that the PCA9517 is a solution to the problem I described in the "Voltage level translation" thread, so thanks for mentioning it.

What you're doing with I2C sounds scary to me, but others have been encouraging, so I hope it's going well.

Graham.

Re: i2c and twisted pair

2009-04-09 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "Steve Hodge" <steve@...> wrote:
>
> ... Phillips App Note AN97055 ...

Yes, I think this is the canonical reference for this type of level translator.  The description of the operation again states that the MOSFET will turn on when the source is pulled below the gate by the threshold voltage, even though what is pulling it low is a diode from the drain, which is therefore at a lower voltage than the source.  I cannot agree with this analysis, but I could be wrong.  The MOSFETs recommended are, of course, all NXP products, and I would prefer to have a wider choice.  As far as I can tell, they have been chosen based on their gate-to-source threshold voltage (other parameters are easy to meet), which just increases my puzzlement.

Anyway, I think this subject isn't as interesting to others in the group as I thought it might be, so maybe we've reached the end of discussion.  I thought someone with an analog background might point out the error in my thinking.  Note that I'm not actually facing this problem right now; it's just an intellectual exercise.  I may have some work coming in soon, interestingly enough with a large analog content, so I may then be less inclined to stir up trouble.

Graham.

RE: [AVR-Chat] Re: i2c and twisted pair

2009-04-09 by Steve Hodge

It's going ok, thanks, but it's currently stalled waiting for a pcb to be
made.   I'm going to give I2C a try; switching to RS485 (which I do use for
other, longer-distance communication) adds complexity and other
disadvantages that I'd prefer to avoid if possible.   It will be the backup
solution if I2C doesn't work.

 

I was only skimming the voltage-translation thread and this may not be
relevant, but since you mention that the PCA9517 is a solution, are you also
aware of the Phillips App Note AN97055, where they suggest four mosfets,
BSN10, BSN20, BSS83, BSS88 for level translation?

 

Steve
Show quoted textHide quoted text
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Graham Davies
Sent: Thursday, April 09, 2009 4:48 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: i2c and twisted pair

 






--- In AVR-Chat@yahoogroups.com <mailto:AVR-Chat%40yahoogroups.com> , "Steve
Hodge" <steve@...> wrote:
>
> Isn't that what a PCA9517 ... does

No, not at all. I think Brian is telling you to use differential signaling
without understanding the I2C bus.

However, it turns out that the PCA9517 is a solution to the problem I
described in the "Voltage level translation" thread, so thanks for
mentioning it.

What you're doing with I2C sounds scary to me, but others have been
encouraging, so I hope it's going well.

Graham.





[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.