|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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) |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
||||
|
||||
|
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? |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
Re: shielding the serial cable
Quote:
![]() -Joe |
|
#7
|
|||
|
|||
|
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!
|
|
#8
|
||||
|
||||
|
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? |
|
#9
|
|||
|
|||
|
Re: shielding the serial cable
Quote:
Quote:
Quote:
-Joe |
|
#10
|
||||
|
||||
|
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. Last edited by ratdude747 : 25-01-2011 at 17:01. |
|
#11
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|