What is CAN Communication Protocol? The word CAN stand for controller area network. It is advanced form of networking method that provides the communication path between various electronic devices such as the communication path between engine management system, gear control, light control, air bags, air conditioning, central locking and an automobile embedded system. The idea about CAN was introduced in first time of world history by Robert Bosch GmbH in 1983 for making the automobile industry system more reliable, fuel efficient and safe. With the passage of time the more developments in electronics and semiconductor devices are taking place, they have totally changed the mechanical structure of automobile devices.
These devices have more functioning capability but with these devices more communication signals are introduced in automobile industry and the control of these singles have become more difficult task for automobile or electronic engineers during designing of any vehicle system. So, the idea about controller area network (CAN) has solved all problems of electronic or automobile engineer which they face during designing of any vehicle control system. This control area network provides the mechanism which is interconnected with software and hardware components and by using this mechanism different electronic module can communicate with each other through central common cable. A very simple system with CAN mechanism is shown in figure 1
Figure 1 A Simple system with CAN Mechanism
How CAN Communication Protocol works?
Every CAN mechanism consists of a CAN device. This CAN device sends data across CAN network in the form of packets and these packets are called CAN frame. Every CAN frame consists of arbitration ID, a data field, a remote frame, an over load frame and an error frame.
- Arbitration ID: Any message which goes towards CAN bus have an arbitration ID. The message which have heights arbitration ID has lowest priority to execute similarly the message which have lowest arbitration ID has highest priority of execute. Because, at the same time so many messages are coming towards CAN bus therefore CAN device will first execute the message which have low arbitration ID and then will execute the other one.
- Data Field: Data field is basically the format of data which is being transmitted to CAN bus. CAN protocol supports two data field formats. First One is standard frame format in which the length of data is 11bits and second one is extended frame format in which the length of data is 29 bits.
- When any message is sent by CAN device to CAN network then this message consists of two or more channels means first one is data and second one is the relevant information about this data. Then CAN network works according to this relevant information.
Types of CAN Communication Protocol
There are four main types of CAN with respect to speed, wire and software,
- High Speed CAN
- Low Speed /Fault Tolerant CAN
- Single Wire CAN
- Software Selectable CAN
High Speed CAN: It is type of CAN which has transmission rate up to 1 M bits.
Low Speed/Fault Tolerant CAN: It is the type of CAN which has transmission rate up to125 K bauds. It is basically the small satellite which triggered the communication system during any fault and is mostly used in automotive industry.
Software Selectable CAN: It is the type of CAN which has 1 and 2 ports. Each port could be used for high speed, low speed or single wire CAN
Single Wire CAN: It the is type of CAN which have only single wire and this wire goes from CAN device to CAN network. It has transmission rate up to 83.3 K bauds. This wire also gives high voltage pulse to wakeup up the sleeping device
Working Example of CAN: CAN network have been widely used in different domestic and industrial applications but one of its major application is mostly involved in vehicles to communicate different devices with each other. There is another application that can be made any one with help of different microcontrollers. Suppose we make a simple CAN network for basis applications with help of three microcontrollers to detect the password and switching on the bulbs or opening the lock door. Microcontrollers are connected with each other with help of two wires and these wires are called CAN bus. The block diagram of this simple CAN network is shown in figure 2
Figure 1 The Block Diagram of simple CAN Network
According to the block diagram, first one microcontroller is interfaced with keypad, second one is interfaced with LCD display, third one is interfaced with buzzer and operating relay. This operating relay switched on or off the connected lamp. Similarly, for switching on or off the output load when the user will type the password from keypad then first one microcontroller will act as a transmitter and second one will act as a receiver. During this situation both microcontroller communicates with each other bit by bit and second microcontroller displays this password or message on LCD display. When the whole password or message is transmitted then second microcontroller verify this message, is it correct or wrong. If it is wrong, then second microcontroller sends the signal to third microcontroller to turn on the buzzer. Similarly, if it is correct then it sends signal to third microcontroller to turn on the connected load or lamp.
CAN Protocols layers
If we talk about standardized method of CAN networking protocols then CAN protocols are divided into three layers,
(1) Object Layer:
- Message filtering
- Message and status handling
In this layer sending or receiving messages are filtered and then these messages are executed with respect to time.
(2) Transfer layer:
In this protocol layer flowing actions are executed
- Message framing
- Transfer rate and timing
- Message validation
- Error detection and Signaling
- Fault confinement
(3) Physical Layer
Physical layer is basically link layer protocol in which electrical aspects such as current, voltage and number of conductors are specified. Similarly, in this layer mechanical aspects such as number of pins, their colure, labels and type of connectors are also specified.
Different CAN Applications
In the begging CAN network system was introduced only for the purposes of automotive use but with the passage of time its applications are increased day by day.
- Auto start/stop the vehicle: Modern vehicles consists of an electronic control unit (ECU). This unit consist of the sensors which automatically start or stop the vehicle, and these are installed at the engine of the vehicle. When the engine is started then it required spark to combustible the chamber. During this situation the requirement of spark at correct time is so much necessary so this spark is provided to the combustion chamber through CAN network system. Similarly, for stop the vehicle this spark is turned off through CAN network.
- Electric Trains: This CAN network system has been used in electric trains for increasing or decreasing the speed, for controlling the lights, for communication proposes between two trains, for counting passengers and for door controlling. Beside it has been also used for controlling fuel system, pumps and actuators.
- Medical Equipment: This CAN network system has been also used in medical equipment’s such as in X ray machine, patient beds and so many other medical devices.
2 thoughts on “CAN Communication Protocol, working ,types and applications”
Make a microcontroller water flow meter as device install water purified plant.
Subject work define total liter count per/day liter converted in water gallon as per gallon 20 liter & 18 liter as per possible liter & gallon count day/ weekly/mounthely,
So suggest me.
Very Good Explanation