Share this

Research on a CAN bus-based automotive body vision inspection station

2026-04-06 06:58:54 · · #1
Preface An automotive body vision inspection station is a large-scale, specialized inspection system used to measure the three-dimensional spatial coordinates of key points on the vehicle body. It consists of five main parts: a mechanical and positioning system, a three-dimensional vision sensor system, a measurement control and interface system, a calibration system, and computer software. The primary method utilizes structured light sensors. After calibration by the calibration system, the control system selects the points to be measured, acquires images, and combines these with a vision inspection algorithm to calculate the coordinate parameters of the measured points. For measurement to be performed, the computer must be connected to the transmitter. Inspectors should be able to select measurement points via computer, causing the sensors to enter the measurement state in a pre-set sequence, generating a light stripe plane for measurement. They should also be able to adjust the measurement sequence at any time and achieve real-time control of the light source and multi-user image acquisition. Controller Area Network (CAN) is a highly secure serial communication network that effectively supports distributed and real-time control. The CAN bus belongs to the fieldbus category and, compared to other existing buses, is a distributed, digital, bidirectional, multi-site, and multi-variable communication system. It has many advantages such as high communication speed, high reliability, convenient connection, and high performance-price ratio, making it very suitable for data communication in distributed measurement systems. I. Visual Inspection Principles and Control System of the Visual Inspection Station Automotive body visual inspection is a newly developing method for vehicle body inspection. Its main principle utilizes computer vision technology, employing active triangulation to acquire information about points on the vehicle body surface. Three-dimensional vision algorithms are then used to calculate the coordinates of key points, thereby measuring key parameters such as the position of each vertex, windshield frame dimensions, the size and position of positioning holes, and the position and orientation of edges at door mounting locations. Since the length, width, and height of a car body are typically several meters, at least 50 measurement points are required, and network cabling must exceed 300 meters. Furthermore, the control system should also control the mechanical and positioning systems within the inspection station. The entire control system should have a certain degree of scalability and adaptability to facilitate the addition of other control units. In this system, different types of sensors are used for different measurement objects, totaling more than 50 units. The inspection station's control system should be able to control the actions of these sensors in real time to ensure coordinated operation. Additionally, this measurement system will be used on an automotive production line, where the vehicle body is first placed onto a transport trolley by a crane, and then transported to the inspection station by the trolley. The crane and transport trolley are driven by DC motors. Their movements should be controllable both via the main control keyboard and directly via the control cabinet in the testing station. Considering these factors, we decided to use the CAN bus as the communication standard for this control network. Figure 3 shows a schematic diagram of the interface card . II. Network Topology and CAN Bus In the vehicle body testing station, data acquisition and image processing for each sensor are mainly handled by the PC. For ease of operation, the mechanical parts should also be controllable via the control console. This system has many control nodes (more than 50) and high reliability requirements. While traditional centralized control methods offer concentrated functions and high speed, they suffer from complex hardware structures, difficult on-site wiring, and low scalability. Therefore, we use microcontrollers as direct control units for direct sensor control. Each microcontroller is a node on the control network, directly connected to the data bus. Similarly, the PC and control cabinet are each connected to the bus as nodes, meaning the control network should have multi-master control capabilities. Therefore, the entire network adopts a multi-master structure, where each node is also a master, and control requirements are achieved through communication between masters. Therefore, we decided to adopt a bus-type network topology, leveraging the flexibility and multi-master support of CAN to establish a control network. It is easy to see that, as long as the "collision" problem is solved, this method has the advantages of simple structure, high safety factor, good flexibility, and easy expansion, which can fully meet the control requirements of this testing station. The structural diagram of the control network is shown in Figure 2. Existing microcomputers are generally equipped with two serial interfaces, and their mechanical and electrical characteristics conform to the RS-232C standard. Because the RC-232C standard uses a single-ended circuit, it is very easy to introduce additional voltage levels, and the load capacitance cannot exceed 2500pF, resulting in very limited transmission distance and speed; while the CAN bus far surpasses RS-232C in these aspects. The CAN bus is an intelligent bus with self-management capabilities, effectively supporting multi-master distributed control, effectively solving the "collision" problem, and possessing advantages such as high transmission rate (up to 1Mbps), long transmission distance (up to 1000m), and high signal transmission accuracy (<0.01%). Furthermore, the use of cyclic redundancy check (CRC) and unique data signal representation enables error detection and automatic retransmission, reducing the probability of missed errors to less than 5 × 10⁻¹¹. Therefore, we adopted the CAN bus. The excellent performance and intelligent management of the CAN bus ensured the normal operation of the entire testing station in harsh environments. For channel access control, a combined master-slave and free-competition communication method was adopted. The PC main processor and console served as the master control nodes, with the priority of the two master nodes corresponding to their node identifiers. The transmission of commands and information from the master control nodes could be agreed upon externally or achieved through free competition. Regarding the PC, an interface card was used to connect the PC to the bus, and its interface circuit is shown in Figure 3. Here, the parallel interface uses the 8255A programmable peripheral interface chip, and the interface logic and CAN conversion are mainly controlled by the MC68HC05X16 microcontroller. During operation, information is sent from the PC's data bus, enters the microcontroller through the PA port of the 8255A, and under the control of the microcontroller, the parallel input signals are converted into CAN bus outputs. Here, a 16V8 GAL is used for address decoding and to implement some logical relationships. For the communication interface between the sensor and control cabinet, the MC68HC05X16 microcontroller is selected. Since the MC68HC05X16 has its own CAN interface, it simplifies the hardware design, reduces system failures, and increases the reliability and security of communication. The system hardware is designed for 128 nodes (more can be designed), which can fully meet the requirement of 50 nodes in the testing station, and can be further expanded to add new testing equipment and testing points. III. CAN Bus Communication Protocol To meet the needs of the measurement system, we adopted a multi-master communication method. This method can fully utilize the role of each master, easily establish data connections between nodes, and allow communication between any two nodes as needed. Communication and control are very simple, fully meeting the requirements of this testing station for speed, reliability, and real-time performance. Based on the needs of the testing system and the CAN frame structure, and focusing on the functional requirements of the measurement sensors and control cabinet, we researched and designed the network communication protocol. In this system, the CAN bus transmits data in message units and uses bit arbitration to access the bus, meaning a node identifier is sent at the beginning of the message. The arbitration field of a standard CAN bus data frame has 11 bits, primarily used to resolve collisions on the bus. The smaller the data frame identifier, the higher the priority of the data frame. That is, when two data frames are sent simultaneously from high to low bits, if there is a difference in level, the data frame sending the "recessive level" will stop transmitting, while the data frame sending the "dominant level" will continue. In this way, the CAN bus itself resolves the collision problem. We designed an 8-bit DIP switch at each node, which allows for easy modification of the sensor address. The data represented by this switch is used as the high 8 bits of the identifier for the data frames sent by that node. Thus, nodes with smaller addresses have higher priority for their data. Arranging addresses according to node importance effectively solves the collision and priority issues. IV. The process control software using the CAN bus divides instructions into general instructions and addressing instructions according to the needs of the detection system: general instructions are those that all nodes receiving the instruction must execute; addressing instructions are those that only the node with the corresponding address executes. Since a standard CAN bus data frame can carry a maximum of 8 bytes of data, we use the first byte as the address (127 is the general address; the first byte of a data frame with general instructions is 127), and the second byte as the instruction byte, indicating the action the node must perform. Table 1 shows some of the codes used in this system and their meanings. For different nodes, some operations should sometimes be blocked or even prohibited (e.g., operation on the control cabinet should be prohibited during measurement). Therefore, we have established remote blocking/unblocking and corresponding near-ground blocking/unblocking commands. A blocked node can only receive the near-ground blocking/unblocking command after being unblocked. A blocked node can only continue executing instructions after being unblocked. We have set up a control switch at each node to implement the near-ground blocking/unblocking command through local operation. This further reduces the possibility of erroneous operation in this system and increases system security. Figures 4 and 5 show the workflow diagrams for the sensors and control cabinet, respectively. To accurately monitor the status of each node and promptly detect errors and make corresponding adjustments, each node has a node status word. Through communication, nodes can report their respective operating statuses. In case of a fault or illegal operation, an alarm is triggered via the PC. The PC periodically checks each node, and if a communication fault is detected, an alarm is triggered. Conclusion To test the communication capability and anti-interference performance of this system, we placed the communication line in a strong interference environment. After continuous testing, at a transmission distance of 500m and a transmission rate of 2Mbps, the reliability of data transmission can be fully guaranteed. This system uses a new generation of Field Bus Control System (FCS) to replace the traditional Distributed Control System (DCS), achieving the integration of the field communication network and the control system. Due to the use of the CAN bus, it supports multi-master mode and has non-destructive error identification. CAN does not define the physical layer driver and receiver characteristics, allowing users to define the transmission medium and bus levels according to specific needs, making the network function highly flexible. The software can be programmed to perform powerful functions and can be expanded, which is of great significance for further improving the functions of the testing station and completing other control tasks.
Read next

CATDOLL Dodo 109CM TPE

Height: 109cm Weight: 15.6kg Shoulder Width: 26cm Bust/Waist/Hip: 52/50/57cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22