Throttle Network:CAN Bus
Summary: The Control Area Network (CAN) bus is a two-wire communications network originally designed for automotive use. It is low-cost, robust and easily-implemented as a layout control bus. It is resilient to electrically ‘noisy’ environments and as such is ideal for model rail applications and in many ways superior to other technologies such as RS-485.
|See more Throttle Networks|
|Reference material URL|
|Has computer interface||USB 2.0|
|Number Of Max Devices|
|Is open source||No|
CAN (Control Area Network) Bus was developed by Robert Bosch GmbH in the 1980s for automotive applications, and since has been implemented in other fields, including marine, industrial automation, and building control. It is present in every automobile manufactured in the past 30 years. It is designed for low-traffic applications where response times and safety are critical. Unlike Ethernet, it isn't designed to move large amounts of data between computers.
It has been adopted as the basis of the LCC protocol by the NMRA
See the Video.
Not a lot is known about the CAN Bus protocol. Zimo uses a CAN network with RJ45 8 conductor cables to transmit data to Zimo's controllers, turnout and track section modules. A socket is also found on some Zimo command stations for connection to other networks such as X-Bus, S88 and possibly Digitrax's LocoNet, but implementation details are unknown at this time.
CAN bus uses simple twisted-pair cabling that connects all layout control devices. The cable may also supply power to devices including wired throttles. Commercial implementations commonly use phone (RJ12) or network (RJ45) cables and connectors.
It is bi-directional and any device may transmit or receive data. CAN can operate over a wide speed range, with a linear trade-off between bus speeds and bus lengths. The 2.0b specification runs at up to 1Mbit/s and the newer CAN FD specification at up to 5Mbit/s, although the two are not compatible. Depending on the data rate, bus lengths of up to 1000m are possible. A common speed for model rail implementations is 125kbit/s, allowing a maximum bus length of 500m and up to 100 devices.
Since it is very prevalent in automotive applications, there are a large number of components available at low cost due to their large scale of application in various industries. The reason why CAN bus was selected for critical applications, such as automotive use, is due to its inherent noise tolerance and is designed for the 12/24V world.
Unlike other Peer to Peer systems, CAN Bus can operate at a 100% data throughput rate with error free collision resolution.
CBUS is an implementation of a Layout Control Bus by MERG in the UK. They felt it was a good choice as Zimo had demonstrated it would work on the layout, and a lot of devices are available on the market for CAN Bus applications.
- Zimo uses CAN bus to connect wired throttles and layout control devices with the command station.
- MERG’s CBUS layout control bus is based on CAN bus. Numerous devices (‘modules’) are available for layout control, train detection and computer interfacing, as well as MERG’s DCC command station and throttles. Self-assembly kits are available to members and there are software implementations for Arduino and Raspberry Pi as well, in addition to projects
designed by individual members.
- Layout Command Control (LCC) is the NMRA approved portions of the OpenLCB protocols and is based on CAN bus.
Disadvantages of CAN
The relatively high CAN bus speed does not allow free form network design. A CAN network segment requires a linear bus with terminations at each end. Timing and other electrical limitations mean that a single CAN segment is limited to 40 or fewer physical nodes. There are solutions to expand a CAN network into multiple segments.
CAN supports several different cabling and connector standards. Some require large (and costly) connectors. Often CAN will use the DB9 connectors found on RS232 serial cables. Another CAN connector option uses RJ45 connectors and cables, as wired Ethernet does.
The OpenLCB engineers opted for RJ45 connectors because of relative low cost and availability worldwide. The 4 wire pairs of an Ethernet cable also allow for additional options such as power and other signals in addition to the CAN signal pair itself.
Layout Command Control
Layout Command Control chose to use CAN for a number of reasons.
As mentioned above, the 125 kHz signalling and a maximum run of 1000 feet or 305 metres was determined to be an ideal situation for model railroading. These parameters are directly impact the cabling, which is determined by the propagation time and pulse widths.
For this to work reliably, the ethernet cabling should be made of at least 24AWG conductors. Lighter gauge wiring could impact the bus operation. The driver at the beginning of a network segment must be able to reliably drive a terminator at the other end, without going out of spec. A termination of approximately 120Ω is required to prevent reflections distorting the signals on the cable. The impedance of 24AWG wiring is such that it is possible to have a 1000' run of CAT5 wiring which will work reliably with a 120Ω termination.
Using lighter gauge CAT5 cables will work, but it will impact speed and maximum bus distance
- OpenLCB - The engineers who brought us Layout Command Control.
- Controller Area Network Physical Layer Requirements
CAN Bus Properties and Troubleshooting
CAN Bus FAQs
- No FAQs link to this page.
Other places that reference here
- Book:Appunti di DCC
- Layout Command Control
- Main Page/Getting Started
- Throttle Network
- WiFi Throttle