Business content writer for Corematic

Michelle Husbands

Mechatronics Engineer at Corematic

The rise of the smart, connected equipment is transforming competition. To implement “smarter” equipment, working knowledge of the accuracy of the data being transmitted throughout that equipment is needed. The controller area network (CAN) bus is the current interface to machine operation data transmitted between electronic control units (ECUs).

Let’s start at the beginning, what is CAN?

The best way to describe the Controller Area Network (CAN) Bus concept is by making the comparison between a car and our nervous system. Picture this – in the human body, our nervous system facilitates communication between all different body parts. Similarly, the CAN Bus interconnects nodes or Electronic Control Units (ECUs) in a vehicle acting as the central networking system without complex, dedicated wiring between nodes, lowering the cost in implementation.
Not only that, the CAN Bus also allows any ECU to communicate with the entire network without causing an overload to the controller by using priority in its message frame!

What are the best advantages of CAN Bus?

The CAN Bus network has endless advantages:

    • It allows multi-master configuration, meaning that any ECU connected can control the bus and transmit data.
    • CAN Bus is centralised, meaning that it provides a single point-of-entry to all ECUs, enabling central diagnostics, data logging, and configuration.
  • CAN is also robust towards electromagnetic interference by requiring only two wires twisted together (commonly known as twisted pair).
  • It is highly efficient as it prioritises messages based on IDs, and it is flexible by allowing the connection of new ECUs at any given time.

Close up engineer mechanic using electronic diagnostic equipment

CAN Bus automation, essential for engineers.

CAN Bus automation gives us a way to communicate with different ECUs using the same two wires, reducing costs and making installation easier. This differential signal makes the CAN Bus robust against electromagnetic interference, making the whole network reliable. Its centralised capabilities allow us – engineers – to have error logging and checking of the entire network in one place, reducing maintenance time.

Why was the CAN bus invented, and by whom?

The history of the CAN Bus starts in 1983 at German engineering company Bosch. The engineers at the time were evaluating existing serial bus systems for possible use in passenger vehicles. However, they could not find anything that suited their needs with reduced wiring complexity, so they ended up creating their own. The new bus protocol was introduced to the public in 1986 at the Society of Automotive Engineers Congress and used as the standard communication bus in Mercedes-Benz passenger cars since 1991. Today, CAN is present in almost every European vehicle manufactured after 2003, and American and Japanese cars after 2007. We can also find CAN Bus in trucks, buses, elevators, industrial machinery, ships, drones, as well as military and marine vehicles, and even Prosthetic limbs.

How does CAN bus work?

Let’s start with the topology first. A CAN bus network uses a bus topology, as its name indicates, with a main harness or backbone having each ECU stubs out as it goes along, similar to a fish skeleton.
The bus speed depends on the total length of the network. In other words, the less distance between devices, the higher the speed rate allowed, mainly because of the error that occurs at higher data rates. For example:
  • One hundred twenty-five kilobits per second (125kbps) is a low-speed bus, and it has a maximum length of 500 metres.
  • One megabit per second (1Mbps) is a high-speed bus, and the distance between devices should not surpass 40 metres.

Now, what type of wiring and voltages are used?

The CAN bus line is a high-speed data bus. Thus, it requires a terminator resistor at both ends to prevent part of the signal from reflecting and interfering with the incoming data. In other words, always remember to connect a resistor of around 120 Ohms at both sides.

CAN networks typically use a twisted pair cable, but it is also possible to use a shielded twisted pair, making the management slightly more complex. A CAN cable consists of CAN High (CANH) and CAN Low (CANL) signals (in the field, you usually use yellow and green colours, respectively). The twisted-pair makes the bus immune to noise and uses a differential of potential to transmit data.
Both lines sit at 2.5 Volts when there is no data transmission going. When a device in the network starts transmitting data, these voltages change immediately. CAN High goes from 2.5V to 3.5V and back, and CAN Low switches between 2.5V and 1.5V.

What message frame does CAN use?

A CAN message or message frame has eight essential parts:

  • Start of Frame or SoF. It is a dominant 0 bit that tells other ECUs that a message is coming.
  • Identifier or CAN-ID. It contains the message priority and the functional address of the device.
  • Remote Transmission Request or RTR. 1 bit long signal that allows ECUs to request messages from other ECUs.
  • Control. 6 bits part of the message that informs the length of the data in bytes.
  • Data. Up to 8 bytes and contains the actual data that needs to be scaled or converted to be readable.
  • Cyclic Redundancy Check or CRC. A 16-bit check for data integrity.
  • Acknowledgement or ACK. 2-bit that indicates the CRC process is okay or if retransmission is needed.
  • End of Frame or EoF. It indicates the end of a CAN message and is 7 bits long.
The CAN-ID indicates which device has the highest priority. For example, in a car, the engine would have the highest priority. In contrast, a blinker light would be a low priority allowing the vehicle to function even when a blinker fails. In standard CAN or CAN 2.0A, the CAN-ID is 11 bits long, and in extended CAN or CAN 2.0B is 29 bits long.

So, how does the ECU understand the message?

The CAN standard does not specify how to translate or handle a message. As a result, standardised protocols exist to define how ECUs communicate data among each other in a given network. The most common ones are:

SAE J1939. The Standard in-vehicle network for buses, trucks and other heavy-duty machines relies on the extended 29 bit CAN-ID. A Suspect Parameter Number (SPN) identifies data parameters, which are, in turn, grouped in Parameter Group Numbers (PGN). So, it is possible to interpret messages using parameter tables from the J1939 standard. For example, the Hydraulic Temperature is in the 65128 PGN message, part of the 1638 SPN.

OBD-II. On-Board Diagnostic is a self-diagnostic and reporting capability that identifies what is wrong with the vehicle. Using a CAN logger or diagnostic tool to retrieve the standardised Diagnostic Trouble Codes (DTCs) generated by this protocol.

CANOpen. Industrial automation applications used it widely. It builds on CAN in terms of the physical layer (number of lines used and voltages) and the data link layer (CAN frame message-based protocol). The data conversion will vary depending on the specific application.

Is CAN bus being improved?

Yes! The most recent CAN developed is the CAN FD or CAN with Flexible Data Rate, which is compatible with existing CAN 2.0 networks. CAN FD is quite similar to CAN 2.0, except for a new data frame format that allows using different data lengths and switching to the fastest bit rate after deciding the operation. Bosh developed CAN FD in 2011, and they released it in 2012 for commercial use. This new CAN bus can operate at fifteen megabits per second (15Mbps) with a maximum length for stubs of 10 metres.

In the future, I believe CAN will stay relevant, especially with the progress of inter-connected vehicles and IoT CAN loggers. In conclusion, we can only wait in excitement to see what this standard brings up next!