|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Terminating Resistor CAN
We are making an offseason bot using the 2014 pdb. How do you connect the 120 ohm terminating resistor (and can you use a resistor of a value higher than 120 ohm)?
|
|
#2
|
|||
|
|||
|
Re: Terminating Resistor CAN
Hey,
Assuming you're using this PDB: http://www.usfirst.org/sites/default...tion_Board.pdf I don't actually see anywhere to hook up a CAN line. The PDB I linked doesn't have current monitoring or anything that would require data being sent back and forth from the roboRIO to the PDB. That said, the exact mechanism to attach a 120 ohm resistor to the CAN circuit will vary. If you're using a talonSRX, for example, you could simply strip some wire back from each of the lines (green and yellow), and then solder a resistor onto there, with some heat shrink applied around there to prevent shorting. Above corrected by the helpful posts below. Last edited by TheHolyHades1 : 02-10-2015 at 16:07. |
|
#3
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
There should be a terminating resistor at each end of the CAN bus. The roboRIO has one built in (see page 9 of the roboRIO user's guide), and most 2015 FRC robots used the one built into the PDB. Using an older PDP, you will have to add your own terminator. This is simply a 120Ω resistor is connected to the green wire at one end and the yellow at the other. As this is just provided to make the impedance correct for how the lines are driven, it shouldn't be crucial that it be exactly 120Ω, but I wouldn't just use a 100Ω or 150Ω resistor either. There would certainly be no problem if you put (for example) a 100Ω and a 22Ω resistor in series with each other to make 122Ω.
Physically, I would recommend a few inches of green wire, the resistor(s), and a few inches of yellow wire, then plug this into the empty connectors of the last device on your chain. Added: In case it wasn't clear, the green and yellow wire aren't important electrically, but they help communicate the purpose of the resistor to the controls team. Last edited by GeeTwo : 01-10-2015 at 20:57. |
|
#4
|
||||
|
||||
|
Re: Terminating Resistor CAN
Typically a CANBus will have 120Ω across CANH and CANL at each of the ends. This gives a measured 60Ω between CANH and CANL (parallel resistors). When the CAN transceiver in a CAN node drives dominant (logic 0) the transceiver provides high and low voltage across the termination resistors.
Using smaller than 120Ω means the total bus resistance would be less than 60Ω, causing the transceivers have to source more current (outside what they are spec'd). So I would stick to 120Ω if you can help it. For bench top use, if your bus is short (like a couple feet or less) you can probably get away with just one side terminated. But since you are building a bot you should probably not skimp on the bus termination. If the end of the chain is a PCM you can just insert the resistor into the empty weidmuller pair, like GeeTwo recommends. If the end of the chain is a Talon you can wire/solder/or use an extra CAN connector to insert the final resistor. Checkout section 1.3.2 in the Talon's SRX User's Guide for a diagram. http://www.ctr-electronics.com/talon...ical_resources Extra CAN connectors... http://www.ctr-electronics.com/adapt...or-5-pack.html |
|
#5
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
The terminator resistor value is not arbitrary. It's chosen to match the "characteristic impedance" of the CAN bus wiring. If the impedances do not match, some of the high-frequency signal will be reflected at the end of the bus. Reflected signals interfere with signals sent later. This Stack Exchange question has some good answers.
Of course, the CAN wiring used in an FRC robot isn't exactly standardized, so the value is more of a good idea than a perfect number. |
|
#6
|
|||
|
|||
|
Re: Terminating Resistor CAN
Quote:
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
Quote:
That incorrect statement was made in only one of the three answers. Because it was corrected by a comment on that answer, I didn't think it necessary to warn anyone following the link to disregard it. The truth remains that it is not arbitrary at all. The other two answers both explained succinctly why 120 ohms is the proper value. |
|
#8
|
|||
|
|||
|
Re: Terminating Resistor CAN
Quote:
|
|
#9
|
||||
|
||||
|
Re: Terminating Resistor CAN
Just backing up Alan's post with some screenshot captures from the Dual Wire CAN bus spec. Seems like every couple months there is a post asking where these numbers come from - a good question.
Using two term resistors that matches this spec... www.ctr-electronics.com/downloads/images/canbus/termRes.png ...to match the typical characteristic impedance of twisted pair... www.ctr-electronics.com/downloads/images/canbus/physMedSpec.png ...gives us a termination at each end that matches the bus impedance. This gives us the sufficiently good signal quality by reducing signal reflections. So to wrap up: stick to 120Ω if you are terminating the bus yourself. One end of the resistor is common to green (CANL) and the other end to yellow(CANH). The resistor should be physically at the end of the bus. Last edited by ozrien : 04-10-2015 at 14:31. |
|
#10
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
To back up Alan and Oz, the termination of the CAN bus has more to do with transmission line theory than anything else. A typical twisted pair of #22 wire with approx. 1/3 turn per inch has a stable impedance (above 1 kHz) of about 60 ohms. As the bus can have several receivers and transmitters, it is not practical to treat this system with matched sources and loads so the transmission line is terminated at each end with a nominal 120 ohm resistor. The receivers and transmitters then present a high impedance to the line (except when transmitting data). As the bus length is typically much less than 1/10 wavelength of the highest frequency, the two resistors do appear to properly terminate the line in 60 ohms. By terminating the line in it's characteristic impedance, reflections at each end are reduced and the overall signal degradation is minimized. The greatest problems we see in the field with teams using CAN is the improper termination resistors and failure to properly install the resistors. The ability to use the termination on the PDP, while it may not directly fit your design, is perhaps the best method to prevent termination problems from affecting your operation.
Last edited by Al Skierkiewicz : 05-10-2015 at 08:24. |
|
#11
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
There's a bit more good info here than just how to pick a terminating resistor. While it's always best to keep any wire run as short as possible, there may come a day when you want to use CAN cable runs that are longer than the motor controller pigtails. When you do, try to match those same size and twist count specs as they use. An easy place to find 20-24 AWG pairs with 3-4 twists per foot is in a CAT3 cable; these are mostly easily found as telephone station wire. Matching the diameter is also about not reflecting signals, and the twists serve to reduce the size of the "loop antenna" which causes parallel runs of data cable to radiate signals out, and accept other signals in. (Don't untwist your motor controller CAN cables.) Finally, to minimize reflections, use connectors designed for approximately #22 wire - do not use power connectors like Andersons or Molex.
|
|
#12
|
|||
|
|||
|
Re: Terminating Resistor CAN
According to my experience the CANBus will have 120Ω across CANH and CANL at each of the ends.
This gives a measured 60Ω between CANH and CANL. When the CAN transceiver in a CAN node drives dominant the transceiver provides high and low voltage across the termination resistors. For bench top use, if your bus is short you can probably get away with just one side terminated. |
|
#13
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
Quote:
|
|
#14
|
|||||
|
|||||
|
Re: Terminating Resistor CAN
Quote:
That goes along with a good heuristic when trying to debug a high-speed bus like CAN: wiring problems near one end of the bus often produce symptoms at the other end. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|