Go to Post I always viewed Gracious Professionalism as "I may not agree with you or even like you but we need to work together to solve this problem. So let's get to work!" - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2011, 21:36
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
shielding the serial cable

The CAN standard has been designed to be resistant to noise and message corruption, both on a hardware and protocol level.
RS232 has not.

Thus, while you can wire your CAN bus just about anywhere around the robot, you have to be more careful with your initial wire from the the cRIO to the bridging Black Jaguar.
Several teams have reported problems from running this initial cable next to motors.

Rather than wiring it up and hoping it works, I'd like some more protection. I was thinking a braided shield would do nicely.

The question is, what should the shield be connected to? Should it be connected to somewhere on the robot frame, or should it be connected to ground-potential? (The negative lead on the battery)
__________________
-- Marshal Horn
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2011, 23:23
MattG_3165 MattG_3165 is offline
Registered User
FRC #3165 (Newbots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Oregon
Posts: 16
MattG_3165 is an unknown quantity at this point
Re: shielding the serial cable

The first things that come to mind:

Don't build your cable to the manufacturer's spec, i.e. using flat wire and putting the CAN terminator in the DB9. This may work for short cables, but it opens up lots of noise/crosstalk potential with CAN and RS232 traffic on parallel pairs of wires. Use shielded twisted pair instead, and put your CAN terminator at the Jaguar end of the cable.

I can't determine from your post if you intend to use cable with an integral braided shield (STP), or if you intend to slip a separate braided shield over your otherwise unshielded cable. I recommend the former.

If you use shielded wire, you have some connection choices: the DB9 connector shell on the cRIO which is connected internally to cRIO chassis ground and should have true ground potential, or the robot chassis, which is not necessarily true ground potential, as your electrical system should be isolated from the robot chassis. Since the cRIO is normally isolated from the robot chassis (required by the rules), connecting the shield to both the cRIO and the chassis should be avoided. The signal ground (pin 5) is sourced from the cRIO. Since you already have a cRIO-sourced ground running through your RS232 cable, it makes sense to ground the shield to the same place, ie. the cRIO. This might be tough with an RJ-12 to DB9 adapter though, as these are usually plastic.

Maybe the easiest way to go about this would be to re-purpose an existing serial cable. They're usually already shielded and have the shield connected to the DB9 shell at one end. Just cut off the other end and attach a CAN terminator and RJ-12 connector, and you're good to go. Shorter is also better in this business - don't make your cable longer than necessary.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2011, 23:51
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: shielding the serial cable

Okay, so ground potential is best.

MattG, I'm curious how you mean to do twisted pair. Would I twist the RX and TX, or RX and GND, or something else?
__________________
-- Marshal Horn
Reply With Quote
  #4   Spotlight this post!  
Unread 25-01-2011, 00:21
MattG_3165 MattG_3165 is offline
Registered User
FRC #3165 (Newbots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Oregon
Posts: 16
MattG_3165 is an unknown quantity at this point
Re: shielding the serial cable

Well, I was thinking of buying it, something like this:

http://www.altex.com/Belden-20AWG-2-...L-P140283.aspx

But you could certainly make your own.

EDIT: Ignore my previous advice about which wires to twist, and here's a better cable choice that matches Joes's recommendation (see next post) about which pairs to twist.

http://www.altex.com/Belden-22AWG-2-...L-P140284.aspx

Last edited by MattG_3165 : 25-01-2011 at 01:46. Reason: Remove bad advice given.
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2011, 00:35
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: shielding the serial cable

Quote:
Originally Posted by MattG_3165 View Post
Well, I was thinking of buying it, something like this:

http://www.altex.com/Belden-20AWG-2-...L-P140283.aspx

But you could certainly make your own - twist the RX and TX.
I would expect that if you want the "twisted" pair to help you at all, you would have 2 twisted pair... one TX and ground, the other RX and ground. You can also ground the shield around both pairs. The point of twisted pairs is that those pairs are twisted at different rates so that over a longer distance, the induced voltages tend to cancel out. If you twist RX and TX with each other, then you are promoting coupling between RX and TX the same as if you had a flat cable. Technically it's even a little worse than a flat cable since the twisted cable would have to be a little longer.

-Joe
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2011, 01:42
MattG_3165 MattG_3165 is offline
Registered User
FRC #3165 (Newbots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Oregon
Posts: 16
MattG_3165 is an unknown quantity at this point
Re: shielding the serial cable

kamocat, listen to Joe's advice and not mine: he has the correct info. I don't know why I've always associated the 'twist' with the two sides of a 'channel,' but now I know better. Learn something new every day!
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2011, 02:15
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: shielding the serial cable

So a twisted pairs help reduce interference between two signals in the same cable?
That's interesting, but not what I'm looking for. It sounds like just shielding the cable is the correct approach here. Perhaps I need to pull out an O-scope and find out.

As far as types of shielding, what are my options?
I have some bonding braid I can slip around the 6 conductor ribbon cable. Assuming I've insulated the braid, why would I not want to do this?
__________________
-- Marshal Horn
Reply With Quote
  #8   Spotlight this post!  
Unread 25-01-2011, 03:30
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: shielding the serial cable

Quote:
Originally Posted by kamocat View Post
So a twisted pairs help reduce interference between two signals in the same cable?
Yes.

Quote:
Originally Posted by kamocat View Post
That's interesting, but not what I'm looking for. It sounds like just shielding the cable is the correct approach here. Perhaps I need to pull out an O-scope and find out.
It actually is a component of what you want. While it is likely that the CAN traffic coupling onto the serial wires is the source of your problems, you also don't want the serial TX coupling to the RX or vice versa. That's not as likely since the frequency is an order of magnitude lower than the CAN traffic, but if you're building a custom cable anyway, this can help. Shielding will help your use case more though, for sure.

Quote:
Originally Posted by kamocat View Post
As far as types of shielding, what are my options?
I have some bonding braid I can slip around the 6 conductor ribbon cable. Assuming I've insulated the braid, why would I not want to do this?
You can do that and it will probably be pretty effective, but also ugly and a bit unwieldy. Generally there are plenty of manufactured shielded cables out there that will do just great for your application. You can go with the 2 twisted pair as I described, or you will probably be fine with a simple shielded 3 conductor cable. Just don't be tempted to use the shield as the ground conductor for the serial port in a cable such as the one linked to earlier. As Alan suggested, only ground the shield at the DB9 end.

-Joe
Reply With Quote
  #9   Spotlight this post!  
Unread 25-01-2011, 16:55
ratdude747's Avatar
ratdude747 ratdude747 is offline
Official Scorekeeper
AKA: Larry Bolan
no team
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Madison, IN
Posts: 1,063
ratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond reputeratdude747 has a reputation beyond repute
Re: shielding the serial cable

i actully have turned old serial cables into can cables. let me warn you now that as rosy as it sounds with all of the shielding, getting that type of cable to work and work well is a challange... doable but still a pain if you are not careful and lucky. the gauge of wire used for the rj-12 is somewhat difficult to strip and solder witout breaking... it takes a lot of skill to get it right. get it wrong and a few days after you made the cable, the solder breaks and the cable dies. not a lot of fun to fix.

my team is using the db9 to rj12 adapter with a terminator in the db9-half and standard flat 6p cable. the cable runs right under two CIMs and we have not been having any issues.

besides, i thought flat cables were supposed to be more crosstalk resistant than other types.
__________________
Dean's List Semi-finalist 2010
1747 Harrison Boiler Robotics 2008-2010, 2783 Engineers of Tomorrow 2011, Event Volunteer 2012-current

DISCLAIMER: Any opinions/comments posted are solely my personal opinion and does not reflect the views/opinions of FIRST, IndianaFIRST, or any other organization.

Last edited by ratdude747 : 25-01-2011 at 17:01.
Reply With Quote
  #10   Spotlight this post!  
Unread 01-02-2011, 11:30
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,766
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: shielding the serial cable

Guys,
Twisted pairs minimize noise only when the receiver takes the signal differentially from both wires. This method makes the signal opposite in polarity (phase) on each wire at the transmitter while the noise is in polarity (phase) on each wire. For short distances on single ended wiring (RS232), twisting has no effect on noise pickup. If you think about it, the induced noise must exceed the trigger threshold in the receiver to be an issue. It is for this reason that RS232 implementations can use relatively high voltage for signaling. (Up to +/- 15 volts.)
The CAN buss is a balanced or differential pair so noise immunity is pretty high on those connections. The receivers are also Schmidt Trigger inputs. Shielding may help if wired as Alan has pointed out above. There is no ground on the robot but the common point for noise picked up by the shield is returned to the Crio chassis and then to the negative lead of the battery.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
Reply With Quote
  #11   Spotlight this post!  
Unread 24-01-2011, 23:38
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: shielding the serial cable

Connect it to the "ground" pin on the serial connector at the cRIO end. Connect it only to that pin. Do not connect it to anything at the other end.

Other options are possible, but this is the most common way to use a shielded cable.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi