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.
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.
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
- Popular Resources
- Popular amplifiers
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- How much do you know about intelligent driving domain control: low-end and mid-end models are accelerating their introduction, with integrated driving and parking solutions accounting for the majority
- Foresight Launches Six Advanced Stereo Sensor Suite to Revolutionize Industrial and Automotive 3D Perception
- OPTIMA launches new ORANGETOP QH6 lithium battery to adapt to extreme temperature conditions
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions
- TDK launches second generation 6-axis IMU for automotive safety applications
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Frequently Asked Questions about Lingdongwei MM32F103 MCU
- The problem of increasing the driving capability of the oscillation circuit
- Antenna Design Solutions for Next Generation Mobile Devices
- Chapter 3 Using external interrupt EXTI to read keystrokes
- What are the effects of placing TVS tubes in front and behind? Which one is correct? Why?
- MAGTROL HD-106-8NA-0100 Dynamometer Failure
- Which big shot can surpass the design in the picture and realize fingerless touch screen?
- 【bk7231N】First experience with firmware upload platform
- Bluetooth cannot discover CHAR1
- LLAKG: Arduino automatic watering system (Episode 3: C language program upgrade and function optimization)