A design scheme of high-precision ultrasonic intelligent distance measurement system

Publisher:温文儒雅Latest update time:2014-02-16 Source: 21IC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

1.1 Overview of domestic and international development

Intelligent distance measurement systems have a certain level of research in China and are mostly used in the automotive industry, navigation systems of intelligent robots and related fields. The frequency, power and acoustic characteristics of the ultrasonic waves they generate are different, so their uses are also different. The piezoelectric ultrasonic generator is currently more commonly used.

Ultrasonic waves are often used to measure distances because of their strong directivity, slow energy consumption, and long propagation distance in the medium. They are mainly used in the development of reversing radars, rangefinders, level measuring instruments, mobile robots, construction sites, and some industrial sites, such as distance, liquid level, well depth, pipeline length, flow rate, etc. Ultrasonic detection is often quick and convenient, and the calculation is simple, easy to achieve real-time control, and can meet the requirements of industrial practicality in terms of measurement accuracy. Therefore, it has been widely used. This type of distance measurement technology in China is relatively complete, but the peripheral circuits of this type of system are relatively complex, the display part is not vivid enough, and the accuracy is not high, most of which remain at the centimeter level.

1.2 System Function and Performance Requirements

This design of "high-precision ultrasonic intelligent distance measurement system" can achieve accurate measurement function within the range of 2cm-4m, with an accuracy of up to 0.1mm, LCD screen Chinese character display function, and distance segment alarm function. The physical object is small in size, low in power consumption, and easy to embed into other systems, and has certain use value.

2. System structure

2.1 System Structure Diagram

2.2 Basic working principle

The 40KHZ square wave is generated at the P1.2 port through the single-chip microcomputer driver and driven by the modulation circuit to generate the ultrasonic transmitting probe. When encountering an obstacle, it is reflected and received by the ultrasonic receiving probe at the P1.1 port. The time is calculated by the internal timing circuit of the single-chip microcomputer to derive the distance between the obstacle and the probe, which is displayed on the LCD12864 connected to the P0 port. The distance threshold is divided into three sections with different frequency alarms: 0-1m; 1m-1.5m; above 1.5m.

3. Hardware Design

Ultrasonic sensor circuit:

(1) Use IO trigger ranging to provide a high-level signal of at least 10us;

(2) The module automatically sends 8 40kHz square waves and automatically detects whether there is a signal returned;

(3) When a signal is returned, a high level is output through IO. The duration of the high level is the time from the ultrasonic wave being emitted to the ultrasonic wave being returned. Test distance = (high level time (340m/s))/2; as shown in Figure 2.

4. Software Design
4.1 Flowchart
The following figure 3 shows the flow chart of the ultrasonic ranging system.
 
 
4.2 Program Execution Process
(1) MCU initialization;
(2) Detect whether there is an echo;
(3) Timed initialization;
(4) Sending ultrasonic waves;
(5) Disable external interrupts, read time, and calculate distance;
(6) Determine whether the threshold is exceeded and whether to issue an alarm.
Execute the program in a loop.
5. Debugging results and error analysis
This design uses the HC-SR04 ultrasonic sensor probe, and the range requirement for its ranging performance is 4cm-4m, so the experiment is to measure the data within its effective measurement range. The measurement results and error analysis are shown in Table 1.
 
 
The main errors in the experiment come from systematic errors, including systematic errors in determining the true value, errors caused by improper human operation, and unavoidable errors caused by environmental interference.
The relative error analysis within the limited range of the ultrasonic probe is in the range of 0-2.667%, with high measurement accuracy, achieving small distance measurement of 0.1mm.
6. Conclusion
This design adopts LCD12864 to achieve real-time display; compared with the traditional distance measurement circuit design, this design optimizes the circuit structure, making it simpler, and the components used are cheap, all functions can be realized, and on the basis of the original distance measurement range of 4cm-4m, the measurement accuracy is improved, and the small distance measurement of 0.1mm can be achieved, and the effect is significantly improved. This confirms the feasibility of this solution.
Reference address:A design scheme of high-precision ultrasonic intelligent distance measurement system

Previous article:Design of temperature inspection device for unmanned aerial vehicle based on FPGA
Next article:Improvement of the usage of MM74HC4046 in induction heating power supply

Latest Power Management 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号