Monday, March 5, 2018

Controller Area Network (CAN bus)

A Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each others' applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but can also be used in many other contexts. For each device the data in a frame is transmitted sequentially but in such a way that if more than one device transmits at the same time the highest priority device is able to continue while the others back off. Frames are received by all devices, including by the transmitting device.

Controller Area Network (CAN), an overview


CAN (Controller Area Network) is a serial bus system, which was originally developed for automotive applications in the early 1980's. The CAN protocol was internationally standardized in 1993 as ISO 11898-1 and comprises the data link layer of the seven layer ISO/OSI reference model.
CAN, which is by now available from around 40 semiconductor manufacturers in hardware, provides two communication services: the sending of a message (data frame transmission) and the requesting of a message (remote transmission request, RTR). All other services such as error signaling, automatic re-transmission of erroneous frames are user-transparent, which means the CAN chip automatically performs these services.

The equivalent of the CAN protocol in human communication are e.g. the Latin characters. This means a CAN controller is comparable to a printer or a type writer. CAN users still have to define the language/grammar and the words/vocabulary to communicate.

CAN provides

  • a multi-master hierarchy, which allows building intelligent and redundant systems. If one network node is defect the network is still able to operate.
  • broadcast communication. A sender of information transmits to all devices on the bus. All receiving devices read the message and then decide if it is relevant to them. This guarantees data integrity as all devices in the system use the same information.
  • sophisticated error detecting mechanisms and re-transmission of faulty messages. This also guarantees data integrity.




CAN history

In February of 1986, Robert Bosch GmbH introduced the serial bus system Controller Area Network (CAN ) at the Society of Automotive Engineers (SAE) congress. It was the hour of birth for one of the most successful network protocols ever.
Today, almost every new passenger car manufactured in Europe is equipped with at least one CANnetwork. Also used in other types of vehicles, from trains to ships, as well as in industrial controls, CAN is one of the most dominating bus protocols maybe even the leading serial bus system worldwide.

CAN physical layer


  • Bit encoding
  • Bit-timing and synchronization
  • Interdependency of data rate and bus length
  • Physical media
  • Network topology
  • Bus access
  • Physical layer standards

Physical layer standards


ISO 11898-2 (high-speed)
ISO 11898-3 (fault-tolerant)
SAE J2411 (single-wire)
ISO 11992 (point-to-point)
Others

The Controller Area Network (CAN) protocol defines the data link layer and part of the physical layer in the OSI model, which consists of seven layers. The International Standards Organization (ISO) defined a standard, which incorporates the CAN specifications as well as a part of physical layer: the physical signaling, which comprises bit encoding and decoding (Non-Return-to-Zero, NRZ) as well as bit timing and synchronization.