CAN BUS architecture features, application advantages and case analysis

Publisher:幸福如愿Latest update time:2020-04-17 Keywords:CAN  BUS  MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

As the automotive industry continues to pursue goals such as safety and reliability, ultimate performance, comfort and convenience, and low cost, the highly complex system network within the car makes the wiring harness too large, resulting in increased costs and difficulty in continuously improving the network architecture, which conflicts with the former.


Therefore, Bosch of Germany proposed CAN BUS (Controller Area Network) in 1985  , which not only solved the problem of increasing wiring harnesses in vehicles, but also laid the foundation for reliable and efficient network systems in the future. In 1993, CAN BUS was standardized (ISO-11898). Due to its high reliability and error detection capabilities, it is also widely used in ships, avionics, public transportation, agricultural equipment, medical equipment, and industrial control.


CAN BUS Architecture and Features


CAN BUS is a technical specification for serial two-wire differential transmission (see Figure 1). The MCU is responsible for calculating data, and the CAN Controller processes the calculated data and transmits "0" or "1" data. After conversion by the CAN Transceiver, a differential signal is generated from CAN High and CAN Low (see Figure 2). Among them, CAN High voltage minus CAN Low voltage is less than 0.5V, which means the logic state is "1", and CAN High voltage minus CAN Low voltage is greater than 0.9V, which means the logic state is "0", so the transmitted bit string in Figure 2 is 101. The differential method can avoid the generation of noise, and the terminal resistance of 120Ω is to prevent interference caused by reflection after information transmission.

CAN BUS architecture features, application advantages and case analysis

The smallest unit on the CAN BUS is a node. Each node can actively send information to the bus, and can also request a specific node to return information. It is not limited to only one master terminal. Each message starts with an identification subfield (ID Field), and the identification value determines the priority of sending the message. The smaller the value, the higher the priority. Therefore, the transmission of information is not defined on the node, but on the message. Due to the serial connection architecture and the identification subfield (ID) judgment mechanism, nodes can be easily added or removed without modifying the software and hardware, which not only reduces the wiring cost but also reduces the complexity of maintenance. This multi-master terminal architecture creates a more complete intelligent network device.


Information transmission can be set on the node so that each node can receive the information into the buffer, or choose to ignore the information. CAN BUS also supports remote data requests. When the information identification value matches the identification value inside the node and the information is a remote message ,  the designated node will send out the matching data. Users can use this function to communicate between nodes.


On the CAN BUS, the fastest transmission speed can reach 1Mbps. Users can modify the transmission speed by modifying the bit timing settings. The transmission distance decreases as the communication speed increases. For example, when the communication speed is 40Kbps, the communication distance can reach 1km; when the communication speed is 1Mbps, the maximum communication distance can reach 40m. Users can make adjustments based on their own applications.


Strong fault tolerance


The CAN BUS protocol has a very reliable error handling and error detection mechanism, which are all automatic hardware detection responses. Under this mechanism, the transmission of network information is not only efficient but also more convenient to use.


Automatic retransmission


When a node on the bus detects an error, the hardware will automatically resend the message to the bus until any node responds to the message with ACK (Acknowledged ) , and then the message will stop being sent.


Error Detection


CAN BUS provides five error detection mechanisms, namely bit error (Bit Error), stuff error (Stuff Error), cyclic redundancy code check (CRC Error), format error (Form Error), and response error (Ack Error). These error detection mechanisms make the transmission on the bus more stable without user intervention.


Error Notification


When an error is detected, the node will send an error message to the bus, so that all nodes on the bus know that an error has occurred and can respond accordingly, including retransmission or stopping transmission.


Error recovery and troubleshooting


The CAN protocol specifies that each node has a transmit error counter (TEC) and a receive error counter (REC). The current state of the node is determined by the values ​​of TEC and REC. Once TEC is greater than 255, the hardware will take the node offline and temporarily stop receiving and sending signals to the bus. When a specific situation occurs, the user can reinitialize the node and start monitoring the signals on the bus again. In this way, it can avoid serious errors on the bus caused by individual nodes, affecting the transmission of other nodes.


Application Examples of CAN BUS


Elevator system


Traditional elevator systems use relay logic circuits, which have problems such as too many wiring harnesses and inconvenient maintenance. Changing to a CAN-based system not only greatly reduces wiring harnesses and increases system reliability, but also has the advantages of simple construction and easy system error detection.

Bridge strain gauge


In view of the frequent occurrence of natural disasters, bridge strain gauges are used to monitor the health of bridges to avoid casualties of people and vehicles. However, traditional strain gauges are mostly placed on bridges, requiring personnel to be on site and cannot be monitored remotely. Taking advantage of the long transmission distance of CAN BUS at low speed, strain gauges can be placed on bridges in the planned area and connected to CAN BUS to transmit back to the monitoring center to monitor the bridge status, greatly reducing labor costs.


Car monitoring system (Recorder with car information )


Due to frequent car accidents, dashcams are used to monitor the road conditions ahead as evidence of car accidents. However, the monitor can only record images of the road conditions ahead, but cannot effectively control the information inside the car, such as the current speed, throttle status, etc. By using CAN to process the driving information, and then transmitting it to the video monitor through high-speed interfaces such as SPI (Serial Peripheral Interface ) and I2C (Inter-Integrated Circuit) , the current information inside the car can be added to each video clip, which becomes more favorable evidence for the car accident.


Vehicle diagnostic system (OBDII)


OBDII (On Board Diagnosis - II) is a protocol that generates a fault warning signal when a vehicle breaks down, reminding the driver to go to the factory for repair. We can use an MCU that supports CAN to implement it, and use USB (Universal Serial Bus) devices and CAN to build a diagnostic system. The OBDII connector can be connected to the vehicle bus at any time, and the received information can be sent to the computer via USB . The computer program can be used to diagnose abnormal signals inside the vehicle, thereby speeding up vehicle repairs.


CAN BUS Demonstration System

Because CAN BUS has the characteristics of high scalability, high reliability, strong real-time performance and low cost, it has not only become the core key to the development of automotive network system technology, but also played a powerful and significant technical role in other industries. In order to better understand the overall operation of CAN BUS, the commonly used M0 MCU is used here to demonstrate a motor control system that transmits control commands and status messages via CAN BUS (Figure 3). The NUC140  TI ny Board, Learning Board No.1/No/2 and Motor Driving Board are different nodes on the CAN bus. The computer USB is connected to the NUC140  TI ny Board, and the NUC140 microprocessor decodes and converts it into CAN messages to achieve the connection between the computer and CAN BUS, and each node can send and receive system operation status and control commands. Therefore, in the demonstration system, through the connection of CAN BUS and the conversion of NUC140 microprocessor, each node can receive the real-time status message of the motor and display it on the LCD screen on the board or the human-machine interface on the computer.



Keywords:CAN  BUS  MCU Reference address:CAN BUS architecture features, application advantages and case analysis

Previous article:Design of car light control system based on single chip microcomputer and CAN bus
Next article:Analog Devices Launches Industry's First All-Digital Road Noise Cancellation System Using Automotive Audio Bus (A2B) Technology

Latest Automotive Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号