CANBUS - Page 1
Forum section: electronics / general

author: Mark Som
author_rank: Newbie
timestamp: October 16, 2020, 10:47:57 am
content: Hello, I read that the higher the communication speed, the shorter the cable is required. What are the reasons for this relationship? Is it because of stability like the higher the speeds, the easier the data get corrupted or distorted so we need shorter cable to reduce the chance of such problem?เว็บแทงบอลบนมือถือฝากถอนauto

author: Zero999
author_rank: Super Contributor
timestamp: October 16, 2020, 11:00:40 am
content: It's due to the propagation delay of the cable, i.e. how long it takes for the signal to travel from the transmitter to the receiver. The longer the cable, the longer it takes for the signal from the transmitter, to reach the receivers. CANBUS is a synchronous network, so all of the receivers need to pick up the signal in one clock cycle, so the longer, the cable, the longer the minimum cycle lengh needs to be, which corresponds to a lower speed.Disclaimer: I've not actually used CANBUS before. This is just my basic understanding of how it works.

author: David Hess
author_rank: Super Contributor
timestamp: October 16, 2020, 01:56:22 pm
content: CANBUS arbitration uses open drain or collector outputs and depends on the transmitter being able to see that another node is pulling the signal down within one bit time, so there is a maximum distance between nodes.

author: GlennSprigg
author_rank: Super Contributor
timestamp: October 17, 2020, 12:11:18 pm
content: Hello Mark.I know nothing of such devices, but as it's your first post,I'm just saying 'Hi' from Australia!

author: Red Squirrel
author_rank: Super Contributor
timestamp: October 18, 2020, 06:43:11 am
content: I think capacitance plays a role too, the longer the cable the more capacitance it has, so the longer it takes to "charge up" to the desired voltage and then "discharge". That means you need to give more time between each pulse of data. At least that's my understanding of it, someone correct me if I'm wrong.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 18, 2020, 06:59:28 am
content: You can indeed model the cable as a combination of dozens of inductances in series and dozens of capacitors in parallel, but at some point, it will be just easier to understand using transmission line theory. This happens when the cable is long enough so that you can actually consider thetimeof signal propagation at some 200 000 000 m/s. While this sounds very fast, it is only 200 m / µs. At 1 Mbaud/s, maximum for traditional CAN, 200 meters of transmission line is the time of one full bit already!Now if you think about having to do a full round-trip, and settlewell belowone bit time for successful arbitration, you are going to see why the bus length is limited to 40m; just from the simple speed calculation alone, no need to think about capacitances.

author: Zero999
author_rank: Super Contributor
timestamp: October 18, 2020, 09:37:59 am
content: Quote from: Siwastaja on October 18, 2020, 06:59:28 amJust looking at capacitance, implies you can increase the speed simply by reducing the resistance, up to the point of infinity. Inductance is also important and because it's evenly distributed with capacitance, we treat it as a transmission line.

author: David Hess
author_rank: Super Contributor
timestamp: October 19, 2020, 10:35:51 pm
content: Cable capacitance only matters if the ends are not terminated into the characteristic impedance of the cable.

author: AndersJ
author_rank: Frequent Contributor
timestamp: October 20, 2020, 06:04:45 am
content: Quote from: David Hess on October 19, 2020, 10:35:51 pmPlease discuss this further.I don’t understand.

author: filssavi
author_rank: Frequent Contributor
timestamp: October 20, 2020, 08:01:36 am
content: The propagation delay in itself have nothing to do with it unless you plan to somehow run canbus at GHz speedThe 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)

author: Siwastaja
author_rank: Super Contributor
timestamp: October 20, 2020, 10:31:09 am
content: Quote from: filssavi on October 20, 2020, 08:01:36 amOf course it has to do with it, as I showed with a simple calculation.In order to your "" 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!

author: AndersJ
author_rank: Frequent Contributor
timestamp: October 21, 2020, 04:20:27 am
content: Quote from: David Hess on October 19, 2020, 10:35:51 pmHow can added capacitance NOT affect signal integrity?In particular during recessive bits when the terminators pull CAN-L and CAN-H together.

author: Berni
author_rank: Super Contributor
timestamp: October 21, 2020, 04:47:04 am
content: Quote from: filssavi on October 20, 2020, 08:01:36 amIt 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.

author: David Hess
author_rank: Super Contributor
timestamp: October 21, 2020, 07:41:54 am
content: Quote from: AndersJ on October 20, 2020, 06:04:45 amIf 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.

author: David Hess
author_rank: Super Contributor
timestamp: October 21, 2020, 08:10:36 am
content: Quote from: Berni on October 21, 2020, 04:47:04 amJust 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.QuoteHalf 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.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: October 21, 2020, 08:53:15 pm
content: Here's a real-world data point: My weather station mounted on a radio tower sends sensor readings via CAN to my house over 178 feet of terminated CAT-5 twisted pair cable. It runs reliably at 500 kbps, but not at 1 mbps.

author: Siwastaja
author_rank: Super Contributor
timestamp: October 22, 2020, 07:38:54 am
content: Quote from: Sal Ammoniac on October 21, 2020, 08:53:15 pmExactly as expected; it's just beyond the recommended 40m, but not so long it would be 100% impossible. It would be interesting to see if you could make it barely work by adjusting the CAN bit timing, especially the sampling point which is typically somewhere around 80% of the bit time but you could make it a bit later, to prove the point re propagation delays.

author: Zero999
author_rank: Super Contributor
timestamp: October 22, 2020, 06:30:40 pm
content: Quote from: filssavi on October 20, 2020, 08:01:36 amAre you confusing logic gate propagation delay, with that of the cable? Theoretically, 1GHz speed CAN would only work over 20cm, so practical purposes would be confined to the same small piece of equipment, perhaps just a single PCB. I doubt you can get line drivers which are fast enough and comply with the standard, but it's possible to make something like CAN, which works at that speed. If you need to transfer data that quickly over a PCB, there are far superior alternatives.

author: amyk
author_rank: Super Contributor
timestamp: October 23, 2020, 01:54:04 am
content: Quote from: David Hess on October 21, 2020, 07:41:54 amUsed to advantage inhttps://en.wikipedia.org/wiki/Reflected-wave_switching