Design of Ultrasonic Rangefinder Controlled by Single Chip Microcomputer
Authors: Bia Jian Pu , Gao Mei Xia 
Published: August 2014

This paper discusses the ultrasonic rangefinder car reversing system working principle based on single chip microcomputer control. Ultrasonic ranging module HC-SR04 is called to transmit and receive ultrasound by single chip computer, temperature is detected through the DS18B20 temperature sensor, the compensation of ultrasonic velocity influenced by temperature is done, and the display and alarm of distance and temperature are achieved by combining with the peripheral circuit module. On the basis of system hardware design, system software is designed and analyzed in detail.
At present, traffic accidents multiplied considerably with the exponential increase of the number of sedans in the domestic. For this reason, varied demands are put forward about reversing system. There are many varieties of reversing system, divided into three kinds: laser rangefinder reversing system, infrared rangefinder reversing system and ultrasonic rangefinder reversing system.
It is the operational principle of laser rangefinder reversing system that the distance between the car and the object is figured out by calculating the time from laser shot, vehicle mounted laser transmitter emits a very fine laser to the target, to receiving the bounced laser which is received by the optoelectronic device from the target. The advantages of the system are that the range is extremely accurate and the effect of real-time control is striking. However, it is more expensive than others.
Infrared rangefinder reversing system measures the distance based on the principle of infrared light without diffusion with the modulated infrared. And the measurement range generally is 1 to 5km. The real time of this reversing system is not very good but it has price advantage.
Ultrasonic transmitter launches ultrasound to the obstacle, starting the timer, and the wave will be reflected .At the same time, ultrasonic receiving module detects the reflected beam constantly. Once reverberated ultrasound was detected, timekeeper stops working. According to the time displayed in the timer and the velocity of propagation of the beam in the air this moment, and after they are processed by single-chip micro-computer, the distance between car and barrier is figured out .The above is the working philosophy of ultrasonic rangefinder reversing system. The system is worse than laser rangefinder reversing system and infrared rangefinder reversing system in accuracy and real time for the influence of environment on the ultrasonic wave is relatively large. The requirements of family car for these two aspects are not very high and the ultrasonic rangefinder reversing system is cheaper than the other two systems, so this design uses the ultrasonic ranging scheme.
Hardware Design of the System
Transmitting and receiving ultrasonic are controlled by single-chip microcomputer in this system. First, what the system has to do is completing the ranging task without contact, detecting the temperature at the time to compensate the velocity of ultrasonic and figuring out the propagation velocity of ultrasound this moment in the air. Finally, the distance can be calculated with the speed detected by the single chip computer and the propagation. Then a series of data is processed in single-chip microcomputer and then set to the peripheral devices which fulfill the corresponding display, alarm and other tasks. So the driver can get the information quickly to make the appropriate action.
Affected by the sensor characteristics, the system can carry on the distance measurement in the 3m range, the exact data shown in LCD, test and display the field temperature and compensate the corresponding velocity of ultrasonic wave to increase the applications. If the distance is less than 100 cm, buzzer makes alarm in a certain frequency, the lights of the digital pipe which is used for displaying data flashes and light-emitting diode lights to tell the driver the corresponding distance. And the frequency of buzzer becomes higher as the distance becomes closer. If the distance is beyond the measuring range, the distance display module shows 3 bars, LED lights, trembler buzz, while the temperature measurement module and the temperature display module work regularly.