Design of a Heavy-Duty Vehicle Inner Wheel Difference Warning System Based on CAN Bus
2026-04-06 07:40:27··#1
Abstract: To avoid collisions caused by the inner wheel difference of heavy vehicles during turns, this paper introduces the formation principle of the inner wheel difference and proposes an ultrasonic pulse ranging warning system based on a microcontroller. The system monitors the inner side of the vehicle during turns using ultrasonic ranging sensors installed on both sides, displays the measured distance in real time, and issues warnings in dangerous situations to prevent collisions. Simultaneously, the system can also transmit data to a host computer via a CAN bus for network control and remote monitoring. Keywords: CAN bus; warning system; ultrasonic wave; sensor [b][align=center]The Design of Warning System for Difference of Radius Between Inner Wheels of Heavy-duty Truck Based on CAN Bus SHI Bin[/align][/b] Abstract: To avoid accidents caused by the difference in radius between the inner wheels when the heavy-duty truck is turning, the design of the warning system using ultrasonic pulse Distance Measurement was introduced. Ultrasonic pulse Distance Measurement, installed on both sides of the truck, can monitor the status inside the truck, so the system can display the real-time measured distance and warn when danger is imminent, effectively preventing collision accidents. The system can also transfer the data to the host machine through the CAN bus. Therefore, network control and remote monitoring are realized. Key words: CAN-bus; warning system; ultrasonic wave; sensor 1 Inner Wheel Difference Principle The inner wheel difference is the difference between the turning radius of the front inner wheel and the turning radius of the rear inner wheel when the vehicle is turning. Due to the existence of the inner wheel difference, the movement trajectories of the front and rear wheels do not overlap when a vehicle turns. The magnitude of the inner wheel difference is related to the steering wheel rotation amplitude and the length of the vehicle's wheelbase. The larger the steering wheel rotation amplitude, i.e., the larger the steering angle, the larger the inner wheel difference, and vice versa; the longer the vehicle's wheelbase, the larger the inner wheel difference, and vice versa. Heavy vehicles have relatively long bodies, especially after the front of the vehicle has turned, there is still a long part of the body that has not turned around, which can easily create a "blind spot" for drivers of large vehicles. If pedestrians enter the inner wheel range, it can easily cause life-threatening danger. The shaded area in Figure 1 is the area where the inner wheel difference is formed. [align=center] Figure 1 Schematic diagram of inner wheel difference[/align] 2 Ultrasonic warning principle 2.1 Ultrasonic ranging principle Sound waves with a resonant frequency higher than 20KHZ are called ultrasound. Ultrasound propagates in a straight line. The higher the frequency, the weaker the diffraction ability and the stronger the reflection ability. There are various methods of ultrasonic ranging, such as phase detection method, sound wave amplitude detection method, and round-trip time detection method. Although the phase detection method has high accuracy, its detection range is limited; the acoustic amplitude detection method is easily affected by reflected waves. This paper adopts the round-trip time detection method. Its working principle is: the ultrasonic transmitting probe emits an ultrasonic pulse into the medium. After the sound wave encounters the object being measured, a reflected wave will act on the receiving probe. If the speed of sound in the medium is known to be V, and the time difference between the time of the emitted pulse and the time of arrival of the first reflected wave is T, then the distance between the probe and the object being measured is S=VT/2. The calculation of the change in distance value can achieve the required control purpose. The speed of ultrasonic waves V is related to temperature. The relationship between the speed of sound in the air and temperature can be expressed as: (1) 2.2 Arrangement of ultrasonic sensors in wheel difference detection When a car is driving, it will turn to the left and to the right. Therefore, ultrasonic sensors should be installed symmetrically on both sides of the car body. In this system, a total of three pairs of sensors need to be installed. One pair is installed near the front wheel to remind the driver whether the rear of the car will hit the object on the inside of the turn when turning. The second pair is installed near the middle of the wheelbase to prevent objects from suddenly appearing on the inside of the turn when the car is turning. The third pair is installed near the rear wheel to remind the driver of dangerous situations in time. 3 System Hardware Design This system combines microcontroller technology, ultrasonic ranging technology, and CAN bus communication technology to detect the condition of the inside of a car during a turn. The three pairs of ranging sensors in the warning system operate independently, transmitting data to the main controller via the CAN bus and the interface chip PCA82C250. The ranging uses SensComp 600 sensors and SensComp 6500 ultrasonic distance modules. The low-cost AT89C51 microcontroller's main functions are: 1. Controlling the ranging sensors and sending the measurement data to the CAN bus in real time via the CAN controller SJA1000; 2. Correcting the speed of ultrasonic waves in the air using temperature parameters transmitted from the DS18B20 temperature sensor. A high-speed linear optocoupler 6N137 is added between the PCA82C250 and SJA1000 for isolation, effectively preventing transient interference in harsh working environments and ensuring the accuracy of data transmission. Because the hardware systems of the three pairs of ranging sensors are identical, only one will be described here. The system hardware structure is shown in Figure 2. [align=center]Figure 2 Hardware Structure Diagram of Wheel Difference Warning System[/align] 3.1 CAN Bus Communication Module The CAN bus protocol follows the ISO standard model, divided into a data link layer and a physical layer. These two layers are usually implemented by a CAN controller and a transceiver. CAN bus devices can be broadly divided into two types: one is with an on-chip CAN controller, such as 87C196CA/CB, MC6837, etc.; the other is a CAN controller that needs to be used independently with a microprocessor, such as Philips SJA1000, Intel 82526 and MCP251. The former is often used in many specific situations, and using integrated devices makes it convenient for users to make printed circuit boards, simplifying and compacting circuit design and improving efficiency; the latter is more flexible in use, and can be interfaced with various types of single-chip microcomputers and various buses of microcomputers. In this system, considering the microcontrollers selected above, Philips Semiconductor's SJA1000 is selected as the independent CAN controller. The main features of the SJA1000 include: extended receive buffer (128-byte FIFO); support for the CAN 2.0B protocol; simultaneous support for 11-bit and 29-bit identifiers; a bit communication rate of 1 Mbits/s; enhanced CAN mode (PeliCAN); a 24MHz clock frequency; support for multiple microprocessor interfaces; programmable CAN output driver configuration; and an operating temperature range of -40℃ to +125℃, sufficient to adapt to various harsh environments. The CAN bus driver selected is the Philips PCA820250, which features high speed (up to 1 Mbps), meeting the high real-time control requirements such as self-braking; it has the ability to protect the bus from transient interference and slope control to reduce radio frequency interference. Furthermore, it can connect to 110 nodes, prevents short circuits between power and ground, and does not affect the bus when a node loses power. The CAN bus communication module mainly consists of an AT89C51 microcontroller, an independent CAN communication controller SJA1000, and a CAN bus driver PCA82C250. To improve the system's anti-interference capability, an opto-isolator 6N137 was added between the SJAl000 and the CAN bus driver PCA82C250. When the microprocessor AT89C51 sends the ranging result data to the CAN bus controller SJAl000 through port P0, the SJAl000 converts the parallel data into serial data and sends it out from port TX0. After passing through the opto-isolator 6N137, it reaches the CAN bus driver PCA82C250, and finally the data is sent to the CAN bus. Conversely, data from the CAN bus can also reach the microprocessor through corresponding circuits. This enables the communication function between the ultrasonic ranging sensor and the host computer. 3.2 Introduction to the Ultrasonic Sensor This system uses the AT89C51 microcontroller to control the SensComp 600 series ultrasonic sensor and the SensComp 6500 ultrasonic ranging module. The SensComp 600 series electrostatic transducer has a frequency of 50kHz and a measurement range of 6 inches to 35 feet (0.15 meters to 10.7 meters). When used with SensComp's 6500 driver circuit, the sensor's measurement range can range from 2.5 cm to 15.2 m. The AT89C51 controls the transmission of ultrasonic waves through the P1.0 pin, and the microcontroller continuously monitors the INT0 pin. When the level of the INT0 pin changes from low to high, it is considered that the ultrasonic wave has returned. The data counted by the counter is the time taken for the ultrasonic wave to travel. By conversion, the distance between the sensor and the obstacle can be obtained. Figure 3 shows the hardware schematic diagram of ultrasonic ranging. [align=center] Figure 3 Hardware schematic diagram of ultrasonic ranging circuit[/align] 3.3 Temperature Compensation Design Since the speed of sound changes by 0.6 m/s for every 10°C change in temperature, the effect of temperature on ranging is quite significant. In order to achieve more accurate detection, this design uses the DS18B20 single-wire temperature sensor from DALLAS Semiconductor. This sensor can directly read the measured temperature and can achieve 9-12 bit digital readings through simple programming according to actual requirements. The temperature measurement range is -55℃ to +125℃, with an accuracy of ±0.5℃. The on-site temperature is directly transmitted digitally via a "one-wire bus," greatly improving the system's anti-interference capability. The entire product is small in size, low in price, and flexible in use. It meets the system requirements in terms of temperature measurement accuracy, conversion time, transmission distance, and resolution. Figure 4 shows the connection principle diagram between the temperature sensor and the microcontroller. [align=center] Figure 4 Temperature Correction Part Principle Diagram[/align] 4 System Software Design The software adopts a modular design. The program consists of a main program, a ranging subroutine, a CAN bus communication subroutine, and other modules. During debugging, each functional module and subroutine is debugged one by one. After each subroutine completes its specified function, they are integrated to complete the final comprehensive debugging. The flowcharts of the main program and the ranging subroutine of the wheel difference early warning system are shown in Figures 5 and 6, respectively. When the car turns, the warning system is activated. The AT89C51 first sets P1.0 to 0, starts the ultrasonic sensor to emit ultrasonic waves, and simultaneously starts the internal timer T0. The ultrasonic sensor we use is a transceiver; after transmitting 16 pulses, the sensor still has aftershocks. To identify and eliminate the ultrasonic sensor's transmitted signal from the return signal, the return signal can only be detected 2.38ms after the transmission signal is started. When the ultrasonic signal encounters an obstacle, it immediately returns. The microprocessor continuously scans the INT0 pin. If the signal received by INT0 changes from low to high, it indicates that the signal has returned, and the microprocessor enters an interrupt to disable the timer. The data from the timer is then combined with the ambient temperature from the temperature sensor for calibration and calculation to determine the actual distance between the ultrasonic sensor and the obstacle. The distance measurement result is then displayed. If the distance measurement result is lower than a set threshold, an alarm signal is generated. Finally, the obtained distance data is sent in real-time to the car's main controller via the CAN bus network. This enables communication and network control functions between the warning system and other nodes on the CAN network and the host computer. 5. Conclusion This paper proposes a wheel difference warning system for heavy-duty vehicles. It uses ultrasonic pulse ranging to measure distances, corrects the data based on ambient temperature, and integrates the system with the vehicle's digital platform via a CAN bus, reducing the impact of environmental factors and improving the system's detection accuracy. The system displays the real-time distance from obstacles to the vehicle; when this calculated distance is less than the safe distance, a warning is issued to remind the driver to take necessary measures to avoid a collision. This system has a simple structure, high reliability, and can economically and effectively reduce the incidence of wheel difference accidents in large vehicles, showing great promise for future applications. References [1] Huang Shilin et al. Automobile Collision and Safety [M]. Beijing: Tsinghua University Press, 2000. [2] He Xicai. Sensors and Their Application Circuits [M]. Electronic Industry Press, 2001. [3] Wu Kuanming. CAN Bus Principles and Application System Design [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 1996. [4] Yang Xianhui. Fieldbus Technology and Application [M]. Beijing: Tsinghua University Press, 1999. [5] Wang Shaoguang, Xia Qunsheng, Li Jianqiu et al. Automotive Electronics [M]. Beijing: Tsinghua University Press, 2005. [6] Huang Shilin, Zhang Jinhuan, Wang Xiaodong et al. Automobile Collision and Safety [M]. Beijing: Tsinghua University Press, 2000.