The Controller Area Network (CAN) protocol is a method of communication between electronic segments in a car, such as engine management systems, active suspension, central locking, air conditioning, and airbags, among others.
Robert Bosch GmbH came up with the idea of CAN in 1983 to increase the quality and safety of automobiles while also increasing their reliability and fuel efficiency.
Bosch’s CAN protocol, which was originally released in 1986, improved communication. This was a very crucial development in the automobile industry because, after the introduction of CAN in the automobile industry, the rate of innovation and advancement in the industry started rising.
We can say that the CAN was starting a new era in the automobile industry.
Electronics, for instance, provided greater capabilities and complications, such as the capacity to “communicate” with gadgets. Auto engineers were frequently tasked with adding such devices and ensuring that they functioned correctly.
Controller Area Network streamline the procedure by allowing multiple electronic modules to interact with one another over a single wire.
Need of Controller Area Network:
A vehicle is made up of a network of electrical devices that exchange data and information. For example, a spark-ignition engine requires a spark to start the combustion chamber. Here, timing is crucial. It “communicates” with the vehicle’s engine management unit to ensure that this happens correctly, and it chooses the best time for the ignition to produce the power and fuel economy.
The transmission-control unit of a car is another example of device communication. It uses data from the engine control unit and numerous sensors in the system to automatically alter a vehicle’s gear in proportion to its speed. Every electronic equipment has its own set of rules for sharing and transferring data, known as an ECU/MCU (electronic/microcontroller control unit).
However, for two or more devices to interact, they must be equipped with the necessary hardware and software. Each electrical equipment was connected to another via wires before CAN was introduced in vehicles (or, more specifically, point-to-point wiring). When the functions were simple, this worked well enough. But, as electronics improved, one of the primary challenges for automotive engineers was connecting the ECUs of various components so that real-time data could be exchanged. The CAN protocol was created to solve this issue.
Point-to-Point Wiring Connection in a CAN Protocol
The protocol established standards for electronic devices to communicate with one another via a common serial bus. It simplified the system’s electrical connections and overall complexity.
Connectivity Between Devices Using the CAN Protocol
The conventional technology at the time, an asynchronous transmitter/receiver, couldn’t handle multi-domain communication. A domain is a collection of electronic devices that all have the same set of needs to function successfully in the system. A CD/DVD player, GPS, and monitors, and screens, for example, are all part of the same domain. Another sector includes the dashboard, air conditioning system (or climate control), wipers, lights, and door locks.
The electronic devices in a car can be categorized into multiple domains, and CAN allows for multi-domain communication, which is very useful for auto engineers.
Multi-Domain Communication, Supported by the CAN Protocol
How is the CAN protocol implemented?
A set of rules for transmitting and receiving messages in a network of electronic devices is known as the CAN protocol. It specifies how data in a network is moved from one device to another.
CAN (Controller Area Network) was designed with the car industry in mind, but its architecture and benefits have prompted various other industries (such as the railway, aerospace, and medical) to adopt the protocol as well.
A simplified version of the CAN protocol
Every electronic device (or node) that uses the CAN protocol is connected over a shared serial bus, which allows messages to be exchanged. The nodes must initially have the proper hardware and software to share data.
Various nodes present in a CAN network
A typical CAN network has numerous nodes, as indicated in the diagram above. Each device has a host controller (ECU/MCU), which is in charge of a certain node’s function, as well as a CAN controller and transceiver.
The CAN controller transforms messages from nodes into CAN protocols, which are then sent over the serial bus via the CAN transceiver — and vice versa. The controller is a chip that can be included in the node’s host controller or added separately.
The CAN protocol does not use a master-slave design, which implies that any node on the CAN bus can read and write data. When a node is ready to deliver data, it checks for bus availability and sends a CAN frame to the network. A frame is a network structure that transports a meaningful series of bits or bytes of data.
here are two types of protocols: address or message-based.
- In an address-based protocol, the data packets contain the address of the device for which a message is intended.
- In a message-based protocol, every message is identified by a pre-defined ID rather than an address.
A message-based protocol is commonly used in the CAN sent the frame. A message is a data packet containing information. A CAN message consists of ten bytes of data structured in a specified structure (called a frame). The CAN protocol specifies the data carried by each byte.
All nodes that use the CAN protocol get a frame, and the CAN “decides” whether or not to accept it based on the node’s ID. If multiple nodes transmit the message at the same time, the bus access is given to the node with the highest priority (and thus the lowest arbitration ID). Lower priority nodes will have to wait till the bus arrives.
Benefits of CAN:
Low cost: A CAN serial bus has a strong price-to-performance ratio because it only uses two wires (with high-volume, low-cost production).
Reliable: CAN deliver a very reliable transmission thanks to its superior fault detection and handling methods. It’s also resistant to electromagnetic interference to a significant extent.
Flexibility: The protocol does not limit the flexibility of CAN nodes, which can be readily linked and detached.
Fast: At a bus length of 40 meters, CAN supports a data rate of 1 MBit/s.
Communication with Many Masters: Any node can connect to the bus.
Fault Isolation: Faulty nodes do not interfere with communication.
Broadcast Capabilities: Messages can be conveyed to one, several, or all nodes using broadcast capabilities.
Standardized: ISO has standardized the CAN protocol with ISO-DIS 11898 (for high-speed applications) and ISO-DIS 11519-2 (for low-speed applications) (for low-speed applications).
Industry organizations, such as the SAE-Society of Automotive Engineers, have also standardized the CAN protocol.
So this was all about the basics of Control Area Network, in the next chapters in the Inverted University we will explore CAN in more depth.