设计简介:
项目名:基于单片机的超声波测距控制系统设计-标准版、基于单片机的倒车报警装置系统设计-标准版、基于单片机的倒车测距控制系统设计-标准版
单片机:STC89C52
功能简介:
1、通过DS18B20测量当前环境温度,进行声波的温度补偿;
2、通过HC-SR04超声波测量当前距离值,当距离值在最小距离值的2/1~1之间,声光报警频率为300ms,当距离值小于距离最小值的1/2时,声光报警频率为100ms;
3、通过按键设置距离最小值
4、通过LCD1602显示温度值、距离值、距离最小值
总字数:17482
摘要
超声波测距作为一种无接触的测距方式,能够在多种环境状况下进行精准测距。随着生活水平的提高,出行的人数日益增多,造成严重的交通拥堵,不仅影响人们的出行体验感,还可能造成交通事故的发生,为了有效降低交通事故的发生频率,设计一款智能超声波测距系统意义重大。
本文基于STC89C52单片机,设计一款精确实用的超声波测距系统,采用DS18B20传感器对监测范围内的温度进行实时监测,并对测距系统进行温度补偿,使距离的测量精度大大增加;采用HC-SR04传感器对监测范围内的实际距离值进行监测;采用独立按键对设置距离最小值进行设置和修改;采用显示屏对距离值、温度值、设置距离阈值进行实时显示;当监测到的实际距离值在最小距离值的2/1-1之间,声光报警频率为300ms,当实际距离值小于距离最小值的1/2时,声光报警频率为100ms,通过相关测试,该系统基本能实现系统的预设功能,能够对距离进行实时监测。在超声波测距的过程中,由于超声波测距的方向性极强,使回波的监测和识别效率大大增加,因此,采用超声波测距的方法被广泛应用于智能机器人、交通等行业。
关键字:STC89C52;超声波;测距 ;显示屏
Abstract
As a non-contact ranging method, ultrasonic ranging can be accurately ranging in a variety of environmental conditions. With the improvement of living standards, the number of travel is increasing, causing serious traffic congestion, not only affect people’s travel experience, but also may cause traffic accidents, in order to effectively reduce the frequency of traffic accidents, the design of an intelligent ultrasonic ranging system is of great significance.
Based on STC89C52 microcontroller, this paper designs an accurate and practical ultrasonic ranging system. DS18B20 sensor is used to monitor the temperature in the monitoring range in real time, and temperature compensation is made to the ranging system, so that the measuring accuracy of distance is greatly increased. HC-SR04 sensor was used to monitor the actual distance in the monitoring range. Independent keys are used to set and modify the minimum distance. The display screen is used to display the distance value, temperature value and distance threshold in real time. When the actual monitored distance value is between 2/1-1 of the minimum distance value, the audible and optical alarm frequency is 300ms; when the actual distance value is less than 1/2 of the minimum distance value, the audible and optical alarm frequency is 100ms. Through relevant tests, the system can basically realize the preset function of the system and can monitor the distance in real time. In the process of ultrasonic ranging, due to the strong directivity of ultrasonic ranging, the efficiency of echo monitoring and identification is greatly increased, therefore, the method of ultrasonic ranging is widely used in intelligent robot, transportation and other industries.
Key words:STC89C52; Ultrasonic wave; Ranging; Display screen
目 录
摘要 I
Abstract II
第1章 绪论
第2章 超声波测距系统的原理和设计方案 12
第3章 系统硬件设计 19
第4章 系统软件程序设计 24
第5章 仿真测试 29
第6章 实物测试 32
结论 35
参考文献 37
致谢 39
附录A 原理图 40
附录B PCB图 41
附录C 实物图 42
附录D 程序 43