1、 I 摘摘 要要 在空气介质中,超声测距传感器因其性能好,价格低廉、使用方便,在现场机器人定 位系统、车辆自动导航、车辆安全行驶辅助系统、城市交通管理和高速公路管理监测系统, 以及河道、油井和仓库及料位的探测中都有应用。由于超声波传播不易受干扰,能量消耗 缓慢,在介质中传播的距离较远,因而超声波经常用于距离的测量,如测距仪和物位测量 仪等都可以通过超声波来实现。为此,深入研究超声波的产生与传播规律、开发高性能超 声波换能器及其收发电路,对于超声波检测技术的发展具有十分重要的现实意义。 本设计介绍了基于单片机控制的超声测距仪的原理: 由 AT89C51 控制定时器产生超声 波脉冲并计时,计算超声
2、波自发射至接收的往返时间,从而得到实测距离。并且在数据处 理中采用了温度补偿的调整,用四位 LED 数码管切换显示距离和温度。 整个硬件电路由超声波发射电路、超声波接收电路、电源电路、显示电路等模块组成。 各探头的信号经单片机综合分析处理,实现超声波测距仪的各种功能。在此基础上设计了 系统的总体方案,最后通过硬件和软件实现了各个功能模块。相关部分附有硬件电路图、 程序流程图,给出了系统构成、电路原理及程序设计。此系统具有易控制、工作可靠、测 距准确度高、可读性强和流程清晰等优点。实现后的作品可用于需要测量距离参数的各种 应用场合。 关键词:AT89C51;超声波;测距;电路 II Abstra
3、ct The features of the good performance,low cost,easy use are inearnated in the ultrasonic distance measurement sensor.The ultrasonic distance measurement sensor is usually used at thescene robot positioning system,automatic vehicle navigation,the safety of vehicles traveling support system,the uran
4、 traffic management and the highway management monitoring system, as well as the detect in rivers,oil wells,storages and materials.The ultrasonic wave transmssion is not easy todisturb,its energy consumption is slowly and it can be transmitted distantly in the medium,so it isfrequently used in ultra
5、sonic distance measurement.For example,the range finder and the materiallevel finder can be aehieved by ultrasonic wave.Therefore,the in-depth study of the generationand transmission law of ultrasonic and the development of high-performance ultrasonic sensor andtransmit and receive circuits is of gr
6、eat practical significance in the development of ultrasonicdetection technology. The design introduces the principle of the ultrasonic distance measurement instrument based on SCMC-controlled: AT89C51 controls timers to produce the ultrasonic wave pulse and time,count the time of ultrasonic wave spontaneous emission to receive round-trip,thus obtains the measured distance.And the temperature compensation adjustment is used in the data processing, with four LED nixie tubes display distance o