• Preface
  • General
  • CAN network with the nodes
  • Different types of CAN speeds
  • CAN bus signals
  • Structure of the CAN bus message of a (standard) 11-bit identifier
  • Structure of the CAN bus message of an (extended) 28-bit identifier
  • Error recognition using Bitstuffing and CRC & ACK delimiters
  • Twisted Pair Wiring
  • Terminating resistors
  • Gateway
  • Measuring on the CAN bus

This page describes the basic principles of the CAN bus in as much detail as possible. An in-depth topic is: the structure of the CAN bus message of an 11- and a 29-bit identifier (standard and extended ID). Measuring on the CAN bus is described on page measuring on the CAN bus system.

CAN means: Cunwinder Aarea Nnetwork.

With the CAN bus system, all electronic devices in the car communicate with each other constantly. Conventional systems required a separate cable for each type of information, but with CAN data bus systems, all information takes place via two cables, namely the CAN-High and CAN-Low cable.
There is a difference between the bus systems; the bus system of the vehicle stabilization (including ABS) is separated from the comfort systems (think of the electronic seat adjustment). The vehicle stabilization bus system also operates at a much higher speed than that of the comfort systems. We will come back to this later on on the page at the CAN speeds.
Each CAN bus participant can put data on the bus that is received by the other CAN bus participants.
Cars from the 90s often use a K pipe. Since the late 90s and early 00s, cars have become increasingly luxurious (more comfortable), safer and cleaner. Comfort increased more and more (seat heating, air conditioning, electrically adjustable exterior mirrors & steering wheel), but safety was also expanded more and more (ABS, airbags, tire pressure monitoring system, faulty lighting control). All these additional systems also require more data transport. The data transport is via cables. On older cars, separate cables are routed in the wiring harness between each component and the control unit. The wiring harnesses would be impossibly thick in this case (see the picture below). To prevent this, data transport is now carried out in all new cars via CAN bus.


CAN bus thus provides the data transmission of signals. The power and ground cables of the components are of course still present. With CAN bus, the total number of wires has already decreased considerably, but the total weight of all cables can still rise to 100 kg in very luxurious cars, with a total wire length of approximately 2000 meters.

These images clearly show that the number of wires at one door is already significantly reduced when using CAN bus.

The advantage of CAN bus is that the amount of wiring is greatly reduced. Thinner wiring harnesses are then created, which are easier to conceal than the wiring harnesses of cars that do not use the CAN bus. Because thick wiring harnesses are less easy to hide, there is a greater chance of sanding through against, for example, the body or the dashboard. There is now also less chance of malfunctions because there are also fewer plugs to which the cables are connected.

The image below shows a vehicle with eleven control units (the red blocks). These control units are all connected by two wires; an orange and a green wire. Each control unit has its own function and can communicate with any other control unit in the network via CAN bus. More substantive information about the control units can be found on the page control devices.

1. Towbar installation control unit
2. Door control unit RA
3. RV . door control unit
5. Comfort control unit
6. Alarm system control unit
7. Instrument panel
8. Steering column electronics control unit
9. LV . door control unit
10. LA . door control unit
11. Park Distance Control Control Unit

With the arrival of CAN bus, it is also EOBD more comprehensive. EOBD stands for European On Board Diagnosis. EOBD has to do with the emissions. Various sensors of the engine and exhaust transmit information to the ECU. If there are incorrect values ​​(for example because of poor combustion), a MIL (Motor Indication Light) will light up. That is a sign that the car needs to be read. A diagnostic tester must then be connected to the OBD plug that reads out the errors. Based on the fault, the ECU has stored a hexadecimal fault code, which is displayed by the diagnostic tester as a P code or a fault with text (the latter is more brand specific).
Click here to learn more about OBD1, OBD II and EOBD.

CAN network with the nodes:
The CAN bus network consists of a CAN-High wire and a CAN-Low wire. CAN-High is red, CAN-Low is blue.
The control units (from now on called nodes) are connected to these wires. All nodes can both send and receive information. An example of a network is the CAN bus system in the interior of the car; here various nodes can be connected to one bus system.

As an example, let's take a reversing camera (node ​​5) that is retrofitted. This camera is attached to the license plate holder. The CAN wiring is connected anywhere in the interior. The condition is that the node of the camera contains the correct identifier (pre-programmed by the manufacturer) because the other nodes must recognize it. When the camera is registered on the supported radio, the image is immediately visible.
After programming the software, the radio receives a signal from the gearbox that reverse gear is selected. At that moment, the radio switches to the image from the rear view camera. The moment the first gear (forward) is selected, the image switches off again. All this thanks to the data transfer of the CAN bus system.

There are of course countless examples with functions that are made possible by CAN bus. With this example I hope to provide insight into the way of data communication and the peripheral equipment that is connected to the CAN bus.

Unsupported equipment (eg with an incorrect identifier) ​​can cause problems. If it sends messages that are not recognized by other nodes, an error message will appear. This type of equipment can also ensure that the CAN bus remains active after the ignition is switched off. The car will then not go into “sleep mode”, which would quickly drain the battery.

Different types of CAN speeds:

  • Class A: This network has a communication speed of up to 10 kb/s. The main purpose is to reduce the number of connecting wires. The speed is not important. The applications can include window and door controls, mirror controls and electric seat adjustment.
  • Class B: This network has a higher communication speed than class A. The speed is between 10 kb/s and 125 kb/s (depending on the system). Some applications include the data connection between various control units and the control of the dashboard.
  • Class C: This is the fastest type of network. There should be no time delay between sending and receiving the CAN bus message. The speed goes up to 1 Mb/s. The class C network has higher requirements with regard to error detection and error handling. The development costs are therefore also a lot higher than with class A or B.

CAN bus signals:
The CAN bus system uses the broadcast principle; a transmitter puts a message on the CAN bus. Each node on the same bus receives the message. However, the sender indicates in the message for which nodes the message is intended. All nodes receive the message and provide their feedback (more on that later). The nodes for which the message is not intended recognize it and ignore it.

A CAN bus signal consists of CAN-High and CAN-Low. In the image below, CAN-high is shown in red and CAN-low is shown in blue. The high and low signals are identical, but mirrored from each other. When the bus becomes dominant, the voltage of CAN high rises from 2,5 to 3,5 volts and CAN low drops from 2,5 to 1,5 volts. In recessive state (at rest) both voltages are 2,5 volts.

The image above shows an example of a measurement with an oscilloscope. It can be clearly seen that both voltages are identical to each other, only in mirror image. Finally, the voltage difference in the active (dominant) region is 2 volts. This means the difference between 1,5 and 3,5 volts. The difference of 2 volts is seen as a 0 (dominant) and the difference of 0 volts as a 1 (recessive).

If a (sending) node wants to send the binary code “0 0 1 0 1 1 0 1” it will set the stated voltages on the CAN-High and CAN-Low (see the example above). The receiving node will again see these voltages as a binary code, and then convert them into a hexadecimal code. Said binary code will be converted from hexadecimal to 2D.

To convert binary to hexadecimal it is easy to draw a table of 8 squares with a thick line in the middle. Name the boxes on the right 1, 2, 4 and 8 (see the red numbers in the picture). Then do the same on the left side. Write down the digits that have a 1 above them in the binary code. On the left it is only the 2, on the right it is 8, 4 and 1. Add everything on the right (13) and do the same with the left (2). Hexadecimal changes from 10 to A, 11 = B, 12 = C, 13 = D. So that ultimately makes 2D.

More information about converting binary to (hexa-)decimal and vice versa can be found on the page Binary, Decimal and Hexadecimal. Clear examples are described in detail here.

Structure of the CAN bus message of a (standard) 11-bit identifier:
The structure of a CAN bus message is always based on the figure below. There are differences in the structure; for example, the ARB and CTRL field of an 11-bit identifier and a 29-bit identifier are different. The information below refers to the 11-bit identifier. For your information: a 29 bit identifier has room for more data than the 11 bits. More on this later.

The structure of the message is now simply summarized, and later described in detail:

Every CAN message starts with a SOF (start of frame). When a node wants to send a message, a dominant bit is placed on the bus. The CAN bus is always recessive at rest (a 1, so both the CAN-High and the CAN-Low are 2 Volts). The dominant bit (a 0) indicates that other nodes should wait to send a message until the entire message has been posted. Only after the IFS (Interframe Space) is the next node allowed to send its message. Even if it's an important message, it can't get through.
When 2 nodes want to send a message at the same time (which they do not know about each other) and thus make the bus dominant together by placing a 0, the ARB (arbitration) determines which message takes precedence.

From here on, each section of the CAN bus message discussed will have that section added to this gray image. That way I try to keep a little overview. The message started with the SOF.

The Arbitration Field of an 11 bit identifier consists of 2 parts; the identifier and the RTR bit.
Suppose 2 nodes simultaneously make the CAN bus dominant, then the node with the least important message will wait until the important message is posted (until after the IFS). The message identifier contains a string of ones and zeros. These numbers are intentionally assigned to a message by the programmer. The identifier with a 0 in the message (dominant) has a higher priority than the one with a 1 in the message (recessive). The message with the 0 will continue, and the message with the 1 will have to wait.

Both identifiers start posting a message of 11 bits. At the SOF, the dominant bit is placed. After that, the first 5 bits of both identifiers are equal to each other (0 1 1 0 1). The 6th bit at the identifier number 2 is a 0, and at the first identifier a 1. Dominant predominates, so identifier 2 creates the final CAN message.
Identifier 1 placed a 6 as the 1th bit. The node that sends the identifier only recognizes when another node places a 0 on the bus that 2 nodes are sending a message at the same time. At this point, identifier 1 stops transmitting and now acts as a receiver. Although the message that started with 0 1 1 0 1 was originally intended to be the message this node wanted to send, it will now consider it the received message. The node then listens to the entire message and determines whether something is done with it.

The gray image of the SOF is now extended with the ARB that consists of 2 parts, namely the identifier and the RTR bit:

RTR Bit:
The last bit of the 11-bit identifier is called an RTR; this is a Remote Transmit Request bit. This RTR bit indicates whether it is a data frame or a remote frame.
0 = Data frame
1 = Remote frame

A data frame contains data that is forwarded to the nodes that need the information. A node can also request information; e.g. what the coolant temperature is at any given time. The node will then place a 1 as the RTR bit because it asks for the data.

The Control Field consists of the IDE (Identifier Extension), an R-bit and the DLC. The IDE bit indicates whether it is a standard (11 bits) or an extended (29 bits) identifier:
0 = Default identifier (11 bits)
1 = Extended identifier (29 bits)

The R-bit is reserved for the future and is now always recessive.

Then the DLC follows: A CAN bus network can send a maximum of 8 bytes. There are 1 bits in 8 byte, so a total of 64 bits can be sent according to the standard protocol. The Control Field indicates how much data is being sent. It would be pointless to send a large message with all empty data fields for a confirmation bit (1 for on or 0 for off). The number of bytes is stated in the appropriate DLC (Data Length Code). The DLC is a function in the programming software and thus is predefined value by the programmer.
Suppose there is 1 byte in the DLC, then 8 bits are sent. This is sufficient for short confirmation messages.
For very extensive messages there will be a value of up to 8 data bytes in the DLC.

The example has been expanded again. The IDE, R and DLC have been added.

The final data to be sent is placed in the data field. The size depends on the value of the DLC (Data Length Code). It has already been indicated that the DLC is a maximum of 8 bytes in size. Each byte consists of 8 bits, so in total the data field can consist of 64 bits.

The Cyclic Redundancy Check consists of a mathematical calculation, which is sent along with the message. The sending node calculates the total CAN message to date; the SOF, ARB, CTRL and DATA. So the CRC is the calculation. When the receiving node has received the message up to the CRC, it will perform the math calculation up to the DATA and compare it with the calculation in the CRC. If it does not match (due to an incorrect bit / fault), the message is not accepted and the message is requested to be sent again (with a certain maximum number of retries). The example has been extended with the CRC.

The Acknowledge field is used for the confirmation of receipt. When the sender has sent the message to the CRC, a kind of pause is inserted; the sender makes the bus recessive (with a 0) and waits until one or more nodes make the bus dominant (1). It does not matter whether one or more nodes have received the message, because if one node has received it, at least it has been sent successfully. After the bus is made dominant with a 1, message transmission resumes.

The End Of Frame consists of 7 recessive bits (1 1 1 1 1 1 1). This is a sign for all Control Units that the message has ended.

To avoid interference, an Inter Frame Space is always applied after the EDF. The IFS consists of 11 recessive bits. All nodes wait for these 11 recessive bits to pass before sending a message. After these 11 recessive bits, for example, 2 nodes can start sending a message at the same time. The ARB (Arbitration) is then looked at again to determine which message has the highest priority. The whole cycle then starts again.

Structure of the CAN bus message of an (extended) 28-bit identifier:
The 11-bit identifier was designed at a time when cars did not have so many control devices (nodes). The programmers soon found out that the 11-bit identifier was not enough. This one has only (2^11) = 2048 possibilities. Of these, 2032 unique combinations of the binary code remain. Modern cars now use much more codes thanks to the extended 28 bit identifier. This is called the extended identifier.
This means that no less than (2^29) = 536870912 combinations are possible. This is spacious enough for the future.
A number of things will change in the CAN bus message. Both identifiers (default and extended) are used interchangeably. In the CAN message, therefore, each species is indicated, after which a long message follows.
The base of the 11 bit identifier is used and also serves as a preparation before it is read through; now only the changes that the message undergoes when it is a 29 bit identifier are indicated.
The SOF (Start Of Frame) remains the same. The sending node makes it dominant when it starts sending a message.
Then follow the ARB and the CTRL where the differences are.

In the arbitration, there is first a standard 11-bit identifier (ie part of the 29 bits). The RTR bit (as it is with the 11 bits) is moved to the end of the ARB. Instead of the RTR comes the SRR: (Substitute Remote Request). This bit is always recessive (1) with an extended identifier.
After the SRR bit comes the IDE bit, which is located in the 11 bit identifier in the CTRL (Control Field). This is now removed from the control field and placed at the extended identifier after the SRR bit.

For clarity, the images below show the standard (11-bit) and extended (29-bit) identifiers.

Standard 11-bit identifier
Extended 29-bit identifier

The IDE bit stands for Identifier Extension. The IDE bit shows whether it is a standard or extended identifier.
IDE 0 = Default (11 bit ID)
IDE 1 = Extended (29 bit ID)

After the IDE bit comes the rest of the extended identifier. The 11 and 18 bits together make 29. These cannot be placed in the message as one whole, because the CAN protocol is then no longer correct. Basically the IDE bit now indicates that the message is split in two.

The Control Field has therefore been changed with the extended identifier. The IDE bit has been moved to the ARB.
The IDE bit is replaced by an R bit (spare). It is recessive by default. This is followed by an R bit and the DLC (Data Length Code), which indicates how many bytes the message will consist of.

Again, the control fields of both the 11-bit and 29-bit identifiers are shown.

CTRL from 11-bit IDE
CTRL from 29-bit IDE

Error recognition using Bitstuffing and CRC & ACK delimiters:
Bit stuffing:
To keep the synchronization between the sending and receiving nodes optimal, bit stuffing is applied. Bitstuffing means that after 5 identical bits, an opposite bit is added. No bit value changes to the originally sent message, but a bit is added.
The receiver recognizes this. After 5 identical bits, the receiver will erase the 6th bit (see figure below).

The original message of only ones is sent, but the sender appends a 6 every 0th bit. The message length does increase because of the zeros (but this length does not count for the DLC (Data Length Code). The receiver filters out the opposite bits (the zeros) and then reads the message again with only ones.

CRC & ACK delimiters:
Delimiters are placed after the CRC field and the ACK field. This is a bit with a known value for both the sender and the receiver. So if there is an error in the message, this value will be different. The receiver then receives a different bit value as expected and marks the message as erroneous. The sender will resend the message.

Twisted Pair Wiring:
Twisted pair cables are used as cabling for the CAN bus. The CAN-High and the CAN-Low cable are then twisted together as shown in the picture.
In this way, interference from outside is avoided; if an inductance of a few tenths of a volt enters one cable, it also enters the other. Because the CAN bus works in reverse, the interference on one bus will be positive and negative on the other. In this way the malfunction is eliminated, and the nodes are not affected by it.

Terminating resistors:
Termination resistors are used in every CAN bus system. These are often located in the nodes at the end of the CAN bus line (wire). These resistors each have a resistance of 120Ω (Ohms). The replacement resistance is measured as 60Ω with a resistance measurement on the wires.

These terminating resistors serve to suppress interference; if these were not there, reflection would arise. The voltage signal travels through the CAN bus wire, comes to the end and bounces back. The latter is prevented. The voltage is included in the resistor. Reflection could cause voltage signals to bounce off, affecting the messages sent and then interfering with control devices.

The car is equipped with a network of control devices (nodes). The gateway connects various CAN bus networks (think of the interior, the engine / transmission and the chassis), the MOST bus and the LIN bus with each other, so that all networks can communicate with each other. So it is in fact a node between all networks. The differences in speed are unimportant with a gateway. Click here to go to the page where the operation and functions of the Gateway are described.

Measuring on the CAN bus:
It is often asked whether it is possible to measure the CAN bus. You can. A diagnosis can be made by measuring the voltage levels on the wires and checking the voltage image on the oscilloscope. How to measure is described on the page measuring on the CAN bus system.

error: Alert: Content is protected !!