CAN Protocol


The Controller Area Network (CAN) protocol is a communication protocol that was developed for use in the automotive industry, but has also been used in other industries such as industrial automation and medical equipment. It is a serial communication protocol that uses a multi-master, distributed control system. This means that any device on the network, called a node, can initiate communication and all other nodes on the network can participate in the communication. The protocol provides a way for devices to share information and synchronize their actions without the need for a central controller. The protocol uses a collision detection and arbitration method to prevent multiple nodes from transmitting at the same time and ensure that only one node can transmit at a time.

Why CAN?

The CAN protocol was developed for use in the automotive industry to address several challenges that arose as cars became more complex and incorporated more electronic systems. Some of the key reasons for why the CAN protocol was developed include −

  • High reliability − The CAN protocol is designed to be robust and fault-tolerant, making it suitable for use in critical systems such as the engine control and braking systems in a car.

  • Low cost − The CAN protocol uses a simple and efficient signaling method that allows for low-cost implementation, which is particularly important in the automotive industry where costs are a major concern.

  • Low weight and minimal wiring − The CAN protocol uses a two-wire bus, which reduces the amount of wiring needed in a car and makes the vehicle lighter, which can lead to improved fuel efficiency.

  • Scalability − The CAN protocol is designed to support a large number of devices on a network, making it easy to add new devices or remove existing ones as needed.

  • Multi-master capability − The ability of the any device (node) to initiate communication in the network, this allows different systems to communicate and act upon their requirement and also enables distributed control which is a major feature of this protocol.

Applications of CAN protocol

The Controller Area Network (CAN) protocol is widely used in a variety of applications, including −

  • Automotive − The CAN protocol was originally developed for use in the automotive industry and is used in a wide variety of systems in modern cars, including engine control, transmission control, anti-lock brakes, and body electronics.

  • Industrial automation − The CAN protocol is used in industrial automation systems to allow devices to communicate and coordinate their actions, such as controlling motors, sensors, and other equipment.

  • Medical equipment − The CAN protocol is used in medical equipment to control various functions and to transmit data between devices. For example, patient monitoring systems use the protocol to transmit patient vital signs data between devices

  • Avionics − The protocol is used in avionics to control and monitor various systems such as engine, navigation, and flight control systems.

  • Building automation − The protocol is used in building automation systems to control and monitor various systems such as heating, ventilation, air conditioning (HVAC), lighting, and security systems.

  • Robotics − The protocol is used in Robotics to control and monitor various systems such as motors, sensors, and other equipment, thus allowing the robots to communicate and coordinate their actions.

CAN Framing

In the Controller Area Network (CAN) protocol, a message is transmitted using a specific format called a frame. The frame consists of several fields that contain information about the message, such as the source address, destination address, and data payload.

The basic format of a CAN frame includes −

  • Start of Frame (SOF) − Identifies the start of a frame.

  • Identifier (ID) − A unique 11 or 29-bit number that identifies the message.

  • Remote Transmission Request (RTR) − Indicates whether the frame is a data frame (0) or a remote frame (1) requesting data.

  • Identifier Extension (IDE) − Indicates whether the ID field is 11-bit (0) or 29-bit (1)

  • Data Length Code (DLC) − Indicates the length of the data payload in bytes.

  • Data − The payload of the message, which can be up to 8 bytes.

  • Cyclic Redundancy Check (CRC) − A checksum used to detect errors in the frame.

  • Acknowledge Slot (ACK) − Acknowledge of the message transmission by the receiver node.

  • End of Frame (EOF) − Identifies the end of the frame.

A message is transmitted as a series of bits on the bus, with the most significant bit (MSB) transmitted first. Once a message has been transmitted, all nodes on the network will receive the message, but only the node with the matching identifier will process it.

CAN Layered Architecture

The Controller Area Network (CAN) protocol has a layered architecture that is designed to separate the different responsibilities of the protocol. The CAN protocol is typically divided into five layers −

  • Physical Layer − This layer is responsible for the physical transmission of bits over the communication medium, such as a cable or wireless link. It defines the electrical, mechanical, and operational specifications for the interface between the nodes and the communication medium.

  • Data Link Layer − This layer is responsible for providing reliable data transfer between the nodes. It includes error detection and correction mechanisms, such as bit stuffing and cyclic redundancy check (CRC). It also manages the arbitration process to ensure that only one node can transmit at a time and manages the Acknowledgement of the message.

  • Network Layer − This layer is responsible for providing a common communication format and addressing scheme for all nodes on the network. It defines the format of the messages, including the identifier, data payload, and priority.

  • Transport Layer − This layer defines the rules for message transmission and reception, such as message fragmentation and retransmission, flow control, and error handling.

  • Application Layer − This layer defines the services and interfaces that are available to the application, such as sending and receiving messages, and monitoring the status of the network. It also provides an interface for the Application layer.

Each layer of the architecture is designed to be independent of the others, so that changes or improvements can be made to one layer without affecting the others. This design allows for flexibility and scalability of the protocol, which makes it a well suited for various applications across different industries.

Conclusion

In conclusion, the Controller Area Network (CAN) protocol is a widely used communication protocol that was originally developed for use in the automotive industry. It is a serial communication protocol that uses a multi-master, distributed control system, which allows any device on the network, called a node, to initiate communication and all other nodes on the network to participate in the communication. The protocol provides a way for devices to share information and synchronize their actions without the need for a central controller.

Updated on: 08-Feb-2023

10K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements