Zoom Print Startseite

 

CAN (Controller Area Network)
CAN Grundlagen / CAN basics


Germna   English
Zusammenfassung:

Der CAN-Bus ist ein asynchrones, serielles Feldbussystem für die Vernetzung von Steuergeräten, Sensoren und Aktoren. Im Gegensatz zu anderen Netzwerkprotokollen adressiert CAN nicht die Teilnehmer (Steuergeräte) sondern die übermittelte Nachricht. Kurz: Die Nachricht enthält die Information, von wem Sie gesendet wurde und die Teilnehmer entscheiden, ob sie die Nachricht verwenden. Hierfür ist der CAN-Bus als Multi-Master-Topologie (Alle Teilnehmer sind gleichberechtigt) ausgelegt, bei welcher der Buszugriff über das CSMA/CA (Carrier Sense Multiple Access / Collision Avoidance) Verfahren geregelt ist. Bus-Zugriffs-Kollisionen werden durch Bit-Arbitierung vermieden. Die Daten sind NRZ-L kodiert. Zusätzliche ist eine zyklische Redundanzprüfung via. CRC im Einsatz.
 

Summary:

The CAN bus is an asynchronous, serial field bus system for networking control units, sensors and actuators. Unlike other network protocols, CAN does not address the bus nodes (control units) but the transmitted message. In short: The message contains the information who has sent it and the bus nodes decide whether they use the message or not. For this purpose, the CAN bus has been designed as a multi-master topology (all nodes have equal access) where the bus access is regulated by the CSMA/CA (Carrier Sense Multiple Access / Collision Avoidance) procedure. Bus access collisions are avoided by using bit-by-bit arbitration. The data is NRZ-L coded. An additional cyclic redundancy check is performed via CRC.

     
CAN - Grundlagen Netzwerke:

CAN ist ein örtlich begrenztes System, das zur Familie der LAN  (Local Area Network) - Netze gehört. Es untersteht somit dem OSI Netzwerkmodell.  Das OSI Netzwerkmodell definiert sieben Schichten (Layer).


  CAN basics - networks:

CAN is a locally restricted system that belongs to the family of the LAN (Local Area Network) networks. Thus it conforms to the OSI network model. The OSI network model defines seven layers.

Layer Description
Application (7) Application layer / processing layer, the functionality of the network is provided to the user in this layer. For example: e-mail in the Internet (Ethernet)
Presentation (6) Presentation layer, the system-dependent data (data in the transmission control unit) is changed to a system-independent representation that corresponds to the CAN protocol. This also includes data compression and encoding. In short: The data of the transmission control unit is translated into the "CAN language".
Session (5) Session layer, communication between the control units in the vehicle is controlled here.
Transport (4) Transport layer that is responsible for segmenting data packages and avoiding data backup on the CAN bus.
Network (3) Network layer that is responsible for routing the data packages on the BUS. (The data streams are routed from the sending to the receiving stations. Can be compared to transferring a phone call from one extension to another.)
Data Link (2) Safety layer where data is split into bit data streams and provided with checksums. (encoding of the data)
Physical (1) Bit transfer layer, this is the cabling. (copper cable / optical cable)
   

CAN Übertragungssysteme:

Der CAN-Bus wird in Fahrzeugen als linearer Bus verwendet. Topologien in Ring- oder Sternanordnung sind nicht erlaubt. Als Bus-Medium ist eine verdrillte oder geschirmte Zweidraht-Kupferleitung (CAN-H und CAN-L), die an beiden Enden mit einem 120 ? Widerstand abgeschlossen ist, vorgesehen. Diese Abschlusswiderstände werden zwingend benötigt, da ansonsten die CAN-Signal von einem offenen oder falsch abgeschlossenen Leitungs-Ende reflektiert werden könne und auf der Leitung zurücklaufen. Diese Reflektionen überlagern die eigentlich auf dem CAN-Bus vorhandenen Signale, wodurch diese für die Netzknoten unlesbar werden.

  CAN transmission systems:

The CAN bus in vehicles is used as a linear bus. Ring or star topologies are not allowed. The bus medium is a twisted or shielded two-wire copper line (CAN-H and CAN-L) that is terminated with a 120 ? resistor. These terminating resistors are inevitable because otherwise the CAN signal could be reflected from an open or wrongly connected line end and return in the same line. These reflections overlay the signals that are actually provided on the CAN bus, thus causing the system nodes to become illegible.

CAN-Bus Topology

 


System node It consists of a micro-controller, a CAN controller and a bus driver.
Micro-controller Controls the CAN controller and processes transmission and receive data.
CAN controller Implements the transmission and receive operations via the CAN bus.
Bus driver Sending or receiving the bus level.
Bus line Two-wire line (twisted or shielded)
Bus terminator Resistors to avoid reflections. (inevitable)


Can Network
     
CAN Bus-Pegel:


Das CAN-Signal ist ein digitales Signal (nur zwei Zustände "rezessiv = 1" und "dominant = 0"), das für +24V Fahrzeuge im Bereich von -3 V bis +32V Kurzschlussfest ist. Der rezessive Pegel ist für beide Leitungen mit 2.5V definiert, der dominante Pegel mit 3.5V (3V bis 5V) für CAN-H und 1.5V  (max. 2V) für CAN-L. Für die Erkennung eins Zustandswechsels ist die Differenz zwischen CAN-H und CAN-L entscheidend. Die Differenzspannung zwischen CAN-H und CAN-L ist mit 2V ( 1.6V - 5V) für einen dominanten Pegel und 0V (-1V - 0.5V) für einen rezessiven Pegel definiert.
  CAN bus level:


The CAN signal is a digital signal (two conditions only "recessive = 1" and "dominant = 0") that is short-circuit proof for +24V vehicles in a range from -3 V to +32 V. The recessive level has been defined with 2.5 V for both lines, the dominant level with 3.5 V (3 V to 5 V) for CAN-H and 1.5 V  (max. 2 V) for CAN-L. The difference between CAN-H and CAN-L is decisive for detecting a change in the condition. The voltage difference between CAN-H and CAN-L has been defined with 2 V (1.6 V - 5 V) for a dominant level and with 0 V (-1 V - 0.5 V) for a recessive level.

CAN Bus 

CAN Aubau eines Datenprotokolls:

Ein vollständiges Datenpakte (Datensatz) auf dem CAN-Bus besteht sieben Feldern.

 

  CAN structure of a data protocol:

A complete data package (dataset) on the CAN bus consists of seven fields.
Data package

Start Frame The start frame marks the beginning of a message and synchronizes all stations.
Arbitration Field The arbitration field consists of a message identifier (11 bits) and one check bit. During transmission of this field, the sending station checks for each bit, whether it is still authorized to send, or whether another station with higher priority is sending. The check bit decides whether the message is a data frame or a remote frame.
Check Field The check field contains the code for the number of data bytes in the data field.
Data Field The data field transmits information for other stations. The information content is between 0 and 8 bytes (1 byte = 8 bits), max. 64 bits.
CRC Field The CRC field detects transmission faults.
Acknowledgement Field With the acknowledgement field, the recipient signals to the sender that it has received the message correctly. If a fault is detected, the sending station will be notified immediately. The sender will then resend the data.
End of Frame The end of frame marks the end of the message. This is the last chance to report faults.
     
Das CAN Protokoll SAE J1939 definiert zusätzlich noch ein erweitertes Statusfeld von 11 Bit (Base frame format)- auf 19 Bit (Extended frame format) - Identifizierung.

  The SAE J1939 CAN protocol additionally defines another arbitration field from 11 bits (base frame format) - to 19 bits (extended frame format) - identification.

     
Statusfeld - Objektidentifier:

Der Objektidentifier kennzeichnet den Inhalt einer Nachricht. Die Empfänger entscheiden anhat dieses Identifiers, ob die Nachricht für sie relevant ist, oder verworfen wird. Zusätzlich dient der Objektidentifier für die Priorisierung und Arbitierung der Nachrichten.

CAN ist ein Multi-Master Bussystem. Durch Arbitierung und Priorisierung wird das Senderecht auf den Bus geregelt. 

Arbitierungsprinzip:

Die Belegung des CAN-Busses erfolgt durch Aufschalten eines dominanten Bits (SOF). Anschließend werden die Bits des Identifiers nacheinander auf den Bus gelegt und mit dem tatsächlich vorhandenen Buspegel verglichen. Tritt während der Arbitierung ein Unterschied auf (rezessiv gesendet - dominat erkannt), zieht sich der Sender des rezessiven Pegels vom Bus zurück und schaltet unmittelbar in den Empfangsmodus. Der erkannte dominante Buspegel erfolgte durch einen Sender mit höherer Priorität.

 

  Arbitration field - object identifier:

The object identifier designates the contents of a message. On the basis of this identifier, the recipients decide whether the message is relevant to them or if it is discarded. This identifier is also used for priorization and arbitration of the messages.

CAN is a multi-master bus system. Arbitration and priorization regulate the transmission rights to the bus. 

Arbitration principle:

The bus load is started by transmitting a dominant bit (SOF). The bits of the identifier are then transmitted to the bus one after another and compared to the actually provided bus level. If a difference is detected during arbitration (recessive sent - dominant detected), the sender of the recessive level will withdraw from the bus and switches to the reception mode immediately. The dominant bus level that was detected was received from a sender with higher priority.