General > General Technical Chat
CANBUS
<< < (3/4) > >>
Siwastaja:

--- Quote from: filssavi on October 20, 2020, 08:01:36 am ---The propagation delay in itself have nothing to do with it unless you plan to somehow run canbus at GHz speed :-DD

--- End quote ---

Of course it has to do with it, as I showed with a simple calculation.

In order to your ":-DD" claim to be meaningful, you would need the signal to travel well over the speed of light which is, AFAIK, still very much impossible, but feel free to show otherwise, you'll be rich!
AndersJ:

--- Quote from: David Hess on October 19, 2020, 10:35:51 pm ---Cable capacitance only matters if the ends are not terminated into the characteristic impedance of the cable.

--- End quote ---

How can added capacitance NOT affect signal integrity?
In particular during recessive bits when the terminators pull CAN-L and CAN-H together.
Berni:

--- Quote from: filssavi on October 20, 2020, 08:01:36 am ---The propagation delay in itself have nothing to do with it unless you plan to somehow run canbus at GHz speed :-DD

The two problems you have with wire length are capacitive loading and transmission line effects

- since drivers in the transceivers have a limited current driving ability (usually few amps at most) the longer cable with the higher capacitance will slow down edges, if you go too far you will have reception problems

-if the line is long enough to be bigger than 1/10 of the wavelength (rule of thumb) the cable will not behave as as quasi-ideal conductor but as a full blown transmission line, with all the wacky and wonderful effects that this brings about (this condition is difficult to have in practice in standard systems, as you run into capacitance problems well before it)

--- End quote ---

It is actually the propagation delay!

The signals remain pretty intact over long cables due to it being a differential transmission line. The CAN transceiver doesn't see all of the cables capacitance across its pins, it mostly sees the 120 Ohm characteristic impedance of those twisted pairs. For this reason it does not need amps of drive current to drive it fast. Only a part of the cable is charged up at any moment as the signal propagates down it, being limited by self inductance. Since it is behaving like a transmission line the CAN nodes also have termination resistors inside them to avoid signal reflections.

The actual problem with long cables on CAN comes from the bus arbitration process. At the start of each packet the address is sent out, if multiple CAN nodes transmit this address the logic OR nature of the bus makes the address with more 1s win arbitration. To additionally confirm this there is an acknowledge bit after it that is surrounded by bus inactive state. This acknowledge bit is sent out by other devices listening on the bus. So this means that if the propagation delay between two devices is larger than 1 bit time that acknowledge bit arrives 1 bit too late and this is seen as a error (Since now that far away device is out of sync) and the rest of the packet transmission is aborted by transmitting a error condition on purpose in order to get all other devices to stop listening too. The CAN protocol requires all nodes to be in sync for the arbitration to work correctly and this ensures it doesn't continue if they happen to de-sync for any reason.

So at 1Mbit this bit time is 1us. this determines the maximum propagation delay, but due to timing tolerance and transceiver propagation delay lets say 0.75us is what we need. Most copper cable is around 2/3 the speed of light so 0.75us*300Mm/s*(2/3) = 150m . But the signal needs to go there and back, so take half of that and you get 75m max with ideal conditions. But you would want to take some headroom so that you are not running on the edge so about half that would be practically usable in an actual CAN bus installation.

Ethernet deals with this problem by having separate RX and TX lines while things like GSM or Cable DSL modems deal with it by measuring the propagation delay and transmitting too early on purpose to compensate for it.
David Hess:

--- Quote from: AndersJ on October 20, 2020, 06:04:45 am ---
--- Quote from: David Hess on October 19, 2020, 10:35:51 pm ---Cable capacitance only matters if the ends are not terminated into the characteristic impedance of the cable.
--- End quote ---

Please discuss this further.
--- End quote ---

If the cable is properly terminated with a resistive load into its characteristic impedance, then it appears as a resistive load at all frequencies; the distributed capacitance and inductance cancel out to make a resistive load at all frequencies.

If the cable is unterminated, then it appears as a capacitive or inductive load depending on frequency.  In the common case where the end is open, it appears capacitive at low frequencies with a time constant RC from the series resistance of the driver and total capacitance of the cable which depends on cable length.  What is actually happening is the reflections bouncing back and forth charge the cable in steps, with each step lasting for a duration equal to the propagation time through the cable.  When the cable is properly terminated, then the reflections are absorbed and this never happens.
David Hess:

--- Quote from: Berni on October 21, 2020, 04:47:04 am ---The actual problem with long cables on CAN comes from the bus arbitration process. At the start of each packet the address is sent out, if multiple CAN nodes transmit this address the logic OR nature of the bus makes the address with more 1s win arbitration.
--- End quote ---

Just to expand on this, during arbitration when the CAN transceiver is sending a 1, it watches for another transceiver sending a 1, and the propagation delay needs to be short enough for this to happen between the two nodes furthest from each other.

The CAN bus transceivers are able to watch the bus during the transmission of a 1 because that is when the driver output is disabled.


--- Quote ---Ethernet deals with this problem by having separate RX and TX lines while things like GSM or Cable DSL modems deal with it by measuring the propagation delay and transmitting too early on purpose to compensate for it.
--- End quote ---

Half duplex Ethernet on shared media, coaxial cable or twisted pair with a hub, watches for a collision of the entire packet instead of bit period, and arbitration is handled with a randomized back-off time.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod