Controller Area Network (CAN bus)

21/10/2018

Hello!

 

Welcome to my blog! I hope that you are well because today I prepared a lot of info about CANbus system. I have even prepared a video and frankly speaking I am surprised that I have completed it because I had no clue how to make animations. I have to say that it was actually quite fun and I will try to use it more often to explain some stuff 🙂 Once again YouTube has proven that you can learn from there for free so highly recommend to use it as a source of information! Although, you have to be selective. I will really appreciate any comments related to this video.

 

Please have a look 🙂

 

 

If you are still here it means that it was not enough and you still wanna know more about CANbus have a look at the content that I prepared 🙂

 

What is CANBus?
A Controller Area Network refers to a network of independent controllers. It is a serial communications protocol that efficiently supports distributed real-time control with a very high level of security. The CANbus standard was developed by Bosch and Intel and the version of the current standard has been in use since 1990. It was invented to replace all the wiring.

 

How do CAN bus modules communicate?
CANbus uses two dedicated wires for communication. The wires are called CAN high and CAN low. Normally both lines carry the signal value of 2.5 [V]. When data is being transmitted, the CAN high line increases to 3.75 [V] and the CAN low drops to 1.25 [V], which meant that it generates 2.5 [V] differential between the lines. Since communication relies on a voltage differential between the two bus lines, the CAN bus is not sensitive to inductive spikes, electrical fields or other noise. That is why CANbus is good choice for networked communications on mobiles applications.

 

 

CAN power can be supplied through CAN bus. Or a power supply for the CAN bus modules can be arranged separately. The power supply wiring can be either totally separate from the CAN bus lines resulting in two 2-wire cables being utilized for the network, or it can be integrated into the same cable as the CAN bus lines resulting in a single 4-wire cable.

 

What is CAN 2.0A, CAN 2.0B, CAN FD?

CAN 2.0A – 11 bit message identifier

CAN 2.0B – 29 bit message identifier

 

Let’s have a look at protocol of CANbus. This example is related to CAN 2.0B with 29 bit messages. CAN 2.0A looks the same but has 11 bit messages.

 

 

SOF – Start of frame is a dominant zero to tell the other ECUs that message is coming

CAN ID – Contains the message priority as well as functional address (speed, RPM)

RTR – Remote transmission request allows ECUs to request messages to others ECUs

Control – Informs the length of the data in bytes

Data – Contains the actual data values which need to be scaled or converted to be readable

CRC – Cyclic redundancy check, checks data integrity

ACK – Indicates if the CRC process is correct

EOF – Marks the end of the CAN message

 

Are there master and slave modules on the CAN bus?

The main idea of Canbus is to allow every modul receive and transmit information on the bus. This means that every modules is able to send data and all the rest will receive it. In CANopen, the CAN bus normally includes one module acting as a network master which starts the bus communications, but a dedicated master module is not needed. In J1939, the master and slave concept is not used.

 

What is the data speed through the CANbus?
CANbus can use multiple baud rates up to 1 Mbit/s. The most common baud rates are 125 kbit/s (default CANopen) and 250 kbit/s (J1939). The CAN bus communication enables bus loads of up to 100% , allowing full usage of the nominal bit rate.

 

Is there any distance limitation?
The speed of data transmition depends on the distance between the modulesn namely,you can use cabling up to 250 meters and the data speed transmition will be around 250Kbit/s. The maximum bus length with a bit rate of 10 kbit/s is 1 km, and the shortest with 1 Mbit/s is 40 meters.

 

Is the number of nodes (modules on the bus) limited?
Protocol CANopen has unique addresses available for up to 127 nodes on the bus.

Protocol In J1939, there are 253 unique addresses available for the bus.

 

What is CANopen and SAE J1939?

CANopen and SAE J1939 are higher layer protocols. As the CAN standard does not include tasks of application layer protocols, such as flow control, device addressing, and transportation of data blocks larger than one message, and above all, application data, many implementations of higher layer protocols were created. Give me couple of weeks more and I will prepare an explanation for those protocols 🙂

 

 

No Comments

    Leave a Reply