CAN bus/Using it/08. Speed and length
Using it · 08 of 9

Speed and length

Every CAN bit has to be long enough for a signal to reach the far end of the bus and come back, because arbitration and the acknowledgement both depend on it. So the bit rate sets the longest bus: about 100 m at 500 kbit/s, about 40 m at 1 Mbit/s. This board also slows its own edges to keep the bus quiet, which costs a little of every bit.

The round trip inside a bit

When two boards arbitrate, each has to see the other's dominant bit before it samples its own, even if they sit at opposite ends of the bus. The ACK slot is the same: the sender reads a bit the farthest board drove. So a signal has to go out, through a transceiver at each end, and come back within one bit, with time to settle before the sample point, about three quarters of the way through.

How fast, how far
500 kbit/s · about 100 m
Bit rate500 kbit/s
Longest bus, about
100 m
Round trip
1370 ns
Share of the bit
69 %
500 kbit/s reaches about 100 m. The round trip uses 69 % of the bit, which leaves time to settle before the sample point. For a longer bus, go slower: halving the rate roughly doubles the reach.

Cable costs about 5 ns a metre each way. The rest is the transceivers.

The rule of thumb

Bit rateLongest bus, about
1 Mbit/s40 m
500 kbit/s100 m
250 kbit/s250 m
125 kbit/s500 m
50 kbit/s1 km

These are the figures CAN designers work from, not guarantees; cable, stub lengths and the number of boards all move them.

What this board adds

The SN65HVD230 has three speeds for its edges, chosen by its Rs pin. On the TK109 that pin goes to GND through 10 kΩ, which puts it in slope control: each edge takes about 120 ns instead of about 50. Slower edges radiate less and ring less on long, unshielded cable, which is why it is fitted.

The cost is time. Round the loop, from CTX to the bus and back out of CRX, the chip takes up to 185 ns, so the two ends of a bus spend up to 370 ns of every bit before the cable has had any. At 500 kbit/s that is under a fifth of a bit. At 1 Mbit/s it is over a third, which is why 1 Mbit/s is the chip's rating, fine on a short bench bus, and not a figure to plan a long run on.

When it does not work

It worked at 500 kbit/s and fails at 1 Mbit/s.

This board's 10 kΩ slope control stretches each edge to about 120 ns, and the two transceivers' round trip to as much as 370 ns of a 1000 ns bit. On anything but a short bus that leaves too little. Go back to 500 kbit/s, which is what the boards were tested at.

What rate should I pick?

The slowest that carries your messages. A few sensor readings a second fit easily into 125 kbit/s, which reaches several hundred metres and shrugs off more noise. Faster buys nothing a slow bus cannot do, and costs length.

Can I turn the slope control off?

Only by changing the board: the chip's Rs pin goes to GND through a 10 kΩ resistor, and replacing it with a wire puts the chip in high-speed mode, with faster, noisier edges. For a short bus at 1 Mbit/s that is the trade. It is not needed at 500 kbit/s.

Alongside this page
Where this goes next

Where to look first, symptom by symptom.

When nothing arrives

Edit this page — content/books/can-bus/speed-and-length.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

CAN Bus

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum