1、 毕业设计(论文) 基于单片机的测距仪的设计基于单片机的测距仪的设计 学学 院(系) :院(系) : 航空电子电气工程系航空电子电气工程系 专专 业:业: 生产过程自动化生产过程自动化 学学 生生 姓姓 名:名: 班班 级:级: 自动化自动化 0901 0901 学学 号:号: 指指 导导 老老 师:师: 职称职称: : 讲师讲师 2012 年 03 月 摘 要 本设计介绍了基于单片机控制的超声测距仪的原理: 由 AT89C51 控制定时器产生 超声波脉冲并计时,计算超声波自发射至接收的往返时间,从而得到实测距离。并且 在数据处理中采用了温度补偿的调整,用四位 LED 数码管切换显示距离和温度
2、。 整个硬件电路由超声波发射电路、超声波接收电路、电源电路、显示电路等模块 组成。各探头的信号经单片机综合分析处理,实现超声波测距仪的各种功能。在此基 础上设计了系统的总体方案,最后通过硬件和软件实现了各个功能模块。相关部分附 有硬件电路图、程序流程图,给出了系统构成、电路原理及程序设计。此系统具有易 控制、工作可靠、测距准确度高、可读性强和流程清晰等优点。实现后的作品可用于 需要测量距离参数的各种应用场合。 关键词:AT89C51,超声波,温度补偿,测距 ABSTRACT The design introduces the principle of the ultrasonic distan
3、ce 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 pr
4、ocessing, with four LED nixie tubes display distance or temperature by switching. The entire hardware circuit is composed by ultrasonic transmitter circuit, ultrasonic receiver circuit, the power circuit, display circuit, and other modules. The probe signals are integrated analysised by SCMC to achi
5、eve the various functions of ultrasonic distance measurement instrument. Based on this has designed systems overall concept, final adoption of hardware and software to achieve the various functional modules. The relevant parts have the hardware schematics and process flow chart.It has given the system constitution, the circuitry and the programming. The instrument system has features: ease of control, stability of operation, highness of precision and distinctness of programme process ,etc. After the realization of the works can be used for needs of the various parameters measured