AgTalk Home
AgTalk Home
Search Forums | Classifieds (118) | Skins | Language
You are logged in as a guest. ( logon | register )

CANBus terminators... what are they anyway?
Jump to page : 1
Now viewing page 1 [50 messages per page]
View previous thread :: View next thread
   Forums List -> Precision TalkMessage format
 
Adrian
Posted 3/21/2017 19:27 (#5914209)
Subject: CANBus terminators... what are they anyway?



South Georgia
I know that a CANBus network needs a terminator, and I think that the terminator is just a resistor. What exactly is it for? Why is it needed? A CANBus cable has 4 wires, +, -, CAN high, and CAN low. Which of these is the terminator between? I assume the CAN high and low? Why?

Just one of those things I've wondered for a long time.

Adrian
Top of the page Bottom of the page
Fingers77
Posted 3/21/2017 19:36 (#5914227 - in reply to #5914209)
Subject: RE: CANBus terminators... what are they anyway?



I was told it's a kind of an 'end of the line' for the signal.

On Trimble monitors sometimes a lack of terminal at or can cause no problems or all kinds of problems that are random and hard to predict.

I've never been without one or had a bad one, so I really don't know how bad it is or is not to have them.
Top of the page Bottom of the page
mx270a
Posted 3/21/2017 21:59 (#5914628 - in reply to #5914209)
Subject: RE: CANBus terminators... what are they anyway?



Cedar Rapids, Iowa
Ok, get your geeky glasses on, we're going deep. For my example, we'll assume this is a 5 volt CAN circuit, but CAN can use other voltages.

CAN uses two wires, high and low. Normally the voltage across the wires is 0 volts. We all know that computers send data in the form on 0s and 1s. When a node on a CAN network is transmitting a 0 bit, the CAN high wire gets driven to +2.5 volts, and the CAN low wire gets driven to -2.5 volts. The difference across them is then 5 volts. When a node wants to transmit a 1 bit, it just quits driving the high and low wires, and resistance on the circuit quickly bleeds off the voltage, taking the wires back to 0 volts.

The people that created the CAN standard decided that 60 ohms was the appropriate amount of resistance. This is enough resistance that it will quickly pull the voltage to 0, but not so much that it's hard to drive them to 5 volts.

It was then discovered that instead of a single 60 ohm resistor, it's better to use two 120 ohm resistors in parallel. Now, put one on each end of the bus. High speed electrical signals, in some scenarios, have a tendency to reflect or echo off the ends of a wire. By using two resistors, one at each end, it helps reduce this reflection. On a bus that is short, you can actually put both CAN terminators right next to each other. If you're working with CAN in a test environment, you can use a single 60 ohm resistor anywhere on the circuit.

The really really cool feature this creates is that two devices can start transmitting at the exact same time. The message ID is one of the first pieces of data transmitted, and the message with the lower ID always gets priority. How this works is that both nodes will begin transmitting a message, and any time there is a 1 bit, the bus should go back to 0 volts. Remember that when a device is 'sending' a 1 bit, it really isn't sending anything, the lines are being pulled back to 0 volts by the resistors, unless some other device is transmitting a 0 bit and thus holding the lines at 5 volts. So any time a device transmits a 1, it watches the line voltage to see if it remains at 5 volts, and if so, it aborts sending any more data. The device with a message of a lower number has priority and keeps transmitting.


So, if you only have one of the two terminators installed, what you have is 120 ohms of resistance, not the 60 that you should have on the circuit. This means that the lines won't return to 0 volts as quickly as they should. Devices will sometimes see this and think another device is transmitting a message with a higher priority, and thus they'll quit transmitting their message.

-Lance



(CAN.jpg)



Attachments
----------------
Attachments CAN.jpg (30KB - 498 downloads)
Top of the page Bottom of the page
torn
Posted 3/21/2017 22:01 (#5914642 - in reply to #5914209)
Subject: RE: CANBus terminators... what are they anyway?


roaming
Adrian - 3/21/2017 18:27

I know that a CANBus network needs a terminator, and I think that the terminator is just a resistor. What exactly is it for? Why is it needed? A CANBus cable has 4 wires, +, -, CAN high, and CAN low. Which of these is the terminator between? I assume the CAN high and low? Why?

Just one of those things I've wondered for a long time.

Adrian

Think about a rock thrown into a pond. It creates ripples, and when the ripples hit the shore, they bounce back or reflect in the direction from which they came. So you have the main ripples headed toward shore, and the reflected ripples headed back to the middle of the pond. A similar thing happens with electrical signals on a CAN bus. When the "ripples" hit the end of the line (unterminated), they reflect back, causing the reflected ripples to interfere with the "main" ripples. A terminator essentially absorbs the ripples when they reach the end of the line, so that they can't reflect.

A couple of articles that might help:
https://en.wikipedia.org/wiki/Electrical_termination

http://electronics.stackexchange.com/questions/55389/why-does-the-c...
Top of the page Bottom of the page
torn
Posted 3/21/2017 22:03 (#5914644 - in reply to #5914628)
Subject: RE: CANBus terminators... what are they anyway?


roaming
mx270a - 3/21/2017 20:59

Ok, get your geeky glasses on, we're going deep. For my example, we'll assume this is a 5 volt CAN circuit, but CAN can use other voltages.

CAN uses two wires, high and low. Normally the voltage across the wires is 0 volts. We all know that computers send data in the form on 0s and 1s. When a node on a CAN network is transmitting a 0 bit, the CAN high wire gets driven to +2.5 volts, and the CAN low wire gets driven to -2.5 volts. The difference across them is then 5 volts. When a node wants to transmit a 1 bit, it just quits driving the high and low wires, and resistance on the circuit quickly bleeds off the voltage, taking the wires back to 0 volts.

The people that created the CAN standard decided that 60 ohms was the appropriate amount of resistance. This is enough resistance that it will quickly pull the voltage to 0, but not so much that it's hard to drive them to 5 volts.

It was then discovered that instead of a single 60 ohm resistor, it's better to use two 120 ohm resistors in parallel. Now, put one on each end of the bus. High speed electrical signals, in some scenarios, have a tendency to reflect or echo off the ends of a wire. By using two resistors, one at each end, it helps reduce this reflection. On a bus that is short, you can actually put both CAN terminators right next to each other. If you're working with CAN in a test environment, you can use a single 60 ohm resistor anywhere on the circuit.

The really really cool feature this creates is that two devices can start transmitting at the exact same time. The message ID is one of the first pieces of data transmitted, and the message with the lower ID always gets priority. How this works is that both nodes will begin transmitting a message, and any time there is a 1 bit, the bus should go back to 0 volts. Remember that when a device is 'sending' a 1 bit, it really isn't sending anything, the lines are being pulled back to 0 volts by the resistors, unless some other device is transmitting a 0 bit and thus holding the lines at 5 volts. So any time a device transmits a 1, it watches the line voltage to see if it remains at 5 volts, and if so, it aborts sending any more data. The device with a message of a lower number has priority and keeps transmitting.


So, if you only have one of the two terminators installed, what you have is 120 ohms of resistance, not the 60 that you should have on the circuit. This means that the lines won't return to 0 volts as quickly as they should. Devices will sometimes see this and think another device is transmitting a message with a higher priority, and thus they'll quit transmitting their message.

-Lance

Yeah - what he said. :-)
Top of the page Bottom of the page
caseihfarmer
Posted 3/21/2017 22:35 (#5914703 - in reply to #5914628)
Subject: RE: CANBus terminators... what are they anyway?


East Central, Nebraska
holy crap, dude your my hero.
Top of the page Bottom of the page
KevinFButt
Posted 3/21/2017 23:38 (#5914764 - in reply to #5914628)
Subject: RE: CANBus terminators... what are they anyway?



North Central Iowa
X3...as torn said...Yeah, what he said.

Lance...I need you to come to my precision ag class one day and enlighten my students on CAN BUS and ISOBUS. Your videos from back in the day still work in class but I think a personal visit from the World's Most Interesting Farmer would be a class highlight.

Thanks for the enlightenment and sharing!
Top of the page Bottom of the page
grandrivers
Posted 3/21/2017 23:45 (#5914773 - in reply to #5914642)
Subject: what about ACTIVE vs PASSIVE terminators



what about ACTIVE vs PASSIVE terminators what makes them different, also seems like if they are just resistors they would be more resistant to failure than what my experience with them have been   

Top of the page Bottom of the page
Adrian
Posted 3/22/2017 05:54 (#5914852 - in reply to #5914628)
Subject: RE: CANBus terminators... what are they anyway?



South Georgia
Wow, Lance, that's exactly the kind of explanation I was hoping for. Thanks a lot for that.

I'm hoping to build a short cable to replace the 5'long cable that Trimble uses to connect the FMX to field IQ, which has a terminator on it. It's a fairly complicated cable as it is, but I only need the CANBus terminal on it, so now I understand how to make it work I think.

Thanks!
Adrian
Top of the page Bottom of the page
mx270a
Posted 3/22/2017 08:20 (#5915108 - in reply to #5914773)
Subject: RE: what about ACTIVE vs PASSIVE terminators



Cedar Rapids, Iowa
Any plain old resistor can function as a passive terminator.

While CAN is just two wires, it's often convenient to add two more wires (power and ground) the entire length of the bus so that any node you plug in can be powered from the cable. Doing this requires putting power into the cable somewhere. That's what an active terminator does.
http://manuals.deere.com/omview/OMPFP13250_19/RW00482,000018D_19_20...

Then you have the scenario with a tractor where you may or may not have a CAN implement plugged in. There has to be a smart terminator inside the plug on the back of the tractor so that without an implement, it acts as the terminator. With an implement attached, it doesn't act as a terminator, since the bus just got a lot longer and there will be a terminator at the back of the implement.
Top of the page Bottom of the page
tedbear
Posted 3/22/2017 08:24 (#5915120 - in reply to #5914628)
Subject: RE: CANBus terminators... what are they anyway?


Near Intersection of I-35 & I-90 Southern Mn.
Lance - thanks for the detailed reply. I knew some of this but reading your explanation is helpful. From experience I have observed that sometimes one could "get by" with only a single terminator in a system especially on a test stand. Other times not so.

I believe that the Ag Leader harness has one of the terminators built in close to the display since it would be at one end of the potential chain of devices and usually meant that another physical terminator was to be used on the "other end" of the chain. In most layouts this was simple - put a terminator at a location as far away as possible form the display.

I personally have some layouts where the CAN chain is not linear in the sense that a branch feeds a module but continues on to more modules and branches. This layout has the CAN chain branch with one branch leading to the side of the tractor but another branch leads back to the planter. In this situation I put the terminator on the branch that is the greatest distance from the display and this has worked fine.

I notice that on a combine install, Ag Leader avoids that by running a CAN cable to the flow sensor module and then back to another module rather than branching it off. Apparently it can work either way.

Someone speculated that the terminator plug in an Ag Leader system is just a resistor inside a dust cap. That is true. Ag Leader has dust caps and terminators. They use a color code to separate them externally. If you look at one that is a terminator, two of the pins are present. If you pull out the plastic plug on the other end you will notice that a common resistor is connected between the two pins. As Lance has stated this is a 120 Ohm resistor. If you look inside a dust plug, there are no pins and it acts just as a plug and has no electrical effect on the system. Raven CAN systems seem to operate in a similar fashion, they seem to use 180 Ohm resistors in parallel.

Someone mentioned having lots of problems with the terminators. I have never had a problem with one other than possible corrosion issues in nasty environments such as fertilizer.

Edited by tedbear 3/22/2017 08:27
Top of the page Bottom of the page
tedbear
Posted 3/22/2017 08:33 (#5915140 - in reply to #5915108)
Subject: RE: what about ACTIVE vs PASSIVE terminators


Near Intersection of I-35 & I-90 Southern Mn.
Your last point about needing a terminator at the back of the tractor when the implement with a module and terminators on it is disconnected makes good sense. Ag Leader used to provide a plug that acted as a dust plug and a terminator for the large AMP connector that is typically installed out the back of a tractor. This plug had a 120 Ohm resistor in it so when the implement cable was unplugged and the cap was installed the terminator issue was covered.

I have found that this cap is not always needed but still a good idea from a corrosion and dirt issue. I was surprised that the system continued to work fine with just the branch leading to the side of the tractor still operational and no terminator out the back. Maybe I just got lucky.

Top of the page Bottom of the page
mx270a
Posted 3/22/2017 08:48 (#5915177 - in reply to #5915120)
Subject: RE: CANBus terminators... what are they anyway?



Cedar Rapids, Iowa
From experience I have observed that sometimes one could "get by" with only a single terminator in a system especially on a test stand. Other times not so.


This ultimately depends on how much capacitance the bus has. Generally the longer the wires, the more capacitance. The type of insulation on the wires can also have an effect on the capacitance.

Think of an air hose in your shop. When you plug the air hose in, it gets pressurized. When you unplug it, Pssssh, the air comes out of the hose. If you have a short hose, like 10 feet long, the air comes out in half a second. If you have 200 feet of hose connected, it may take a couple seconds for the air to get out. Longer hose = more air being stored in the hose = more capacitance.

Electrically, a smaller value resistor is the equivalent of a larger hole for the air to escape. That's why 60 ohms of resistance (two terminators) will bleed off the voltage twice as fast as if you only have 120 ohms of resistance (only one terminator). If you happen to be working with a bus that is short, there is probably less capacitance, and so the voltage can still be bled off in a time that is short enough for the CAN nodes to be happy. All that really matters is that the voltage returns to zero quickly enough for the 1s and 0s to be determined.
Top of the page Bottom of the page
hushka1
Posted 3/22/2017 11:33 (#5915462 - in reply to #5915177)
Subject: RE: CANBus terminators... what are they anyway?


I believe what you are describing a transmission line's characteristic impedance which is affected by a number of things including the insulation type and size. When the CAN signals (or any electrical signal propagating along a transmission line) meets a change in impedance (note: end of the line is also a change in impedance) some or all of the signal reflects back to the source. A terminating resistor at the end of the cable that near matches the characteristic impedance of the transmission line reduces the reflections (in a perfect world none). 120 ohms has become the standard in the case of a CANbus. The resistive load also helps the two wires return to the recessive voltage faster after a bit is transmitted. This passive termination.

12V automotive power supplies are terribly noisy to begin with and the cables are not shielded so they pick-up noise from all kinds of radio signals. With so many different wiring harness chunks and connectors involved, the characteristic impedance across the communication system an be all over the place. In the real world, the signals don't look anything like those nice square shaped diagrams. So the active termination & bias circuits (TBC) were added to help deal with the very noisy CAN signals. In addition to trying to match impedance / prevent reflections on the cable, active terminators provide regulated power at the recessive voltage (2.5V), help filter out some noise, and suppress voltage spikes to protect the rest of the CAN devices' circuitry. Note, these active termination devices require a power source - usually a 5V supply, hence the 4 wire CANbus - 2 for the CAN High Low signals and 2 for power. ISOBUS actually specifies a independent power supply just for the TBCs so they have a clean supply all to their own. ISOBUS also specifies a quad twist cable instead of the usual twisted pair type wiring to help reduce noise on the rather long wiring harnesses on an implement (very long compared to the typical CAN system in a car)

In some cases, the signals are clean enough that the system can run without a terminator on boths, just one can get the job done. There could be lots of communication errors but the CAN protocol handles them and the messages get thru eventually . Some products build the termination into the device (which assumes it will always be installed at an end of the bus) so the external one on the wiring isn't needed.



Top of the page Bottom of the page
Dogface1SG
Posted 3/22/2017 18:55 (#5916042 - in reply to #5914642)
Subject: RE: CANBus terminators... what are they anyway?


NW Ohio
So without a terminator..... it sais, "I'll be back" Sorry I had to. It was just aching for it.
Top of the page Bottom of the page
neon
Posted 3/22/2017 19:48 (#5916151 - in reply to #5914209)
Subject: RE: CANBus terminators... what are they anyway?


.
Top of the page Bottom of the page
farmnsew
Posted 3/22/2017 21:33 (#5916450 - in reply to #5914209)
Subject: RE: CANBus terminators... what are they anyway?


N E Iowa
save this thread
Top of the page Bottom of the page
sbfarms
Posted 5/8/2020 14:16 (#8243640 - in reply to #5914628)
Subject: RE: CANBus terminators... what are they anyway?


NW Wyoming
Marking
Top of the page Bottom of the page
Jump to page : 1
Now viewing page 1 [50 messages per page]
Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)