便携式测距仪系统设计与实现毕业论文

 2021-04-15 11:04

摘 要

空气介质中,超声波测距作为一种普遍应用的距离测量方法,在公路车速测量、汽车导航、施工现场等环境复杂的使用场景下具有极强的实际应用价值。除使用场景广泛外,超声波测距仪还拥有性能优越、价格低廉,使用便携的优点,因而超声波测距仪在对精度要求不苛刻的测距中受到青睐。所以深入研究超声波的原理和测距方案,对超声波在实际测距中的应用具有十分深远的实践意义。本文中简要概述了超声波距离测量的理论基石,并描述了超声波测距的发展历史。

本次设计的超声波测距仪以AT89S52单片机为主体,为了减少误差还使用温度传感器对超声波速度进行相对精确计算。测距仪的超声波测距模块是以反相器74LS04、集成芯片CX2016A和超声波换能器为核心。系统通过单片机产生40kHz的脉冲方波信号,然后通过发送模块传出该信号以产生超声波并开始计时,在超声波接收模块接收超声波后停止计时。使用发送、接收过程经过的时间和温度补偿后的超声波速度计算出距离,并在1602液晶显示屏上显示出温度和距离值。

关键词:单片机;超声波;测距

Design and implementation of portable distance measuring instrument system

ABSTRACT

In the air medium, ultrasonic distance measurement is a commonly used distance measurement method, which has extremely strong practical application value in the environment of road speed measurement, car navigation, construction site and other environment use scenarios. In addition to a wide range of applications, the ultrasonic distance meter also has the advantages of superior performance, low cost, and portable use. Therefore, the ultrasonic distance meter is favored in ranging that does not require strict accuracy. Therefore, in-depth study of the principle of ultrasonic and ranging programs, the application of ultrasonic in the actual distance measurement has a profound practical significance. This article briefly outlines the theoretical cornerstones of ultrasonic distance measurements and describes the history of the development of ultrasonic ranging.

The ultrasonic distance meter designed this time is based on the AT89S52 microcontroller. In order to reduce the error, the temperature sensor is used to calculate the ultrasonic velocity relatively accurately. The ultrasonic distance measuring module of the range finder is based on the inverter 74LS04, the integrated chip CX2016A and the ultrasonic transducer. The system generates a pulsed square wave signal of 40 kHz through the single-chip microcomputer, and then sends the signal through the sending module to generate the ultrasonic wave and start timing. After the ultrasonic wave receiving module receives the ultrasonic wave, the time is stopped. The distance is calculated using the elapsed time of the transmission and reception processes and the ultrasonic speed after temperature compensation, and the temperature and distance values are displayed on the 1602 liquid crystal display.

Key words: single-chip microcomputer, ultrasonic, ranging.

目录

摘 要 I

ABSTRACT II

目录 III

1 绪论 1

1.1 课题研究的背景和意义 1

1.2 国内外研究现状 1

1.2.1 国外研究现状 1

1.2.2 国内研究现状 2

1.3 本论文研究的内容及各章节的安排 2

2 超声波测距技术 4

2.1超声波特点 4

2.2超声波测距的方法及选择 4

2.3超声波频率的选择 5

3 超声波测距的方案及硬件实现 6

3.1 超声波测距的总体方案 6

3.2系统主要芯片选型 6

3.2.1主控芯片选型 6

3.2.2超声波测距系统 7

3.2.3温度传感器选型 8

3.2.4显示模块选型 9

3.3硬件电路 10

3.3.1电源电路 10

3.3.2单片机最小系统 11

3.3.3超声波发射电路 12

3.3.4 超声波接收电路 13

3.3.5温度补偿电路 14

3.3.6LCD1602显示电路 15

3.3.7报警模块电路 15

4 系统软件设计 17

4.1 系统主程序设计 17

4.2报警警子程序设计 18

4.3按键扫描子程序设计 18

4.4 LCD1602显示子程序设计 20

4.5温度获取子程序设计 21

4.6距离计算子程序设计 21

5 电路仿真 23

5.1 超声波测距仿真 23

5.2 温度传感器仿真结果 25

5.3 报警部分仿真结果 26

总结与体会 27

致 谢 28

参考文献 29

附录Ⅰ:电路及仿真图 - 30 -

附录Ⅱ:软件程序设计 - 31 -

1 绪论

1.1 课题研究的背景和意义

超声波作为声波的一种类型,其振动频率超过正常人能够听到的两万赫兹的极限阈值。因为超声波具有的高频特性,从而被广泛地应用在医学、工业等领域。又因为其具有指向性突出、能耗较少、同时能够发送很远距离等特点,所以它经常被用在距离测量上[[1]]

大生产的效率越来越高,对测距技术的要求也日益严苛,比如要求检测速度更快、精度更高以及低损伤测距。原先人工使用螺旋测微器、游标卡尺等进行测量的方式其成本较高、效率比较低下和易受外界干扰,而且由于测量工具直接对工件本身进行操作,对量具以及工件都会造成细微的损伤。因此高效率、高精度测距领域中非接触式测量方式已经替代了接触式测量。

非接触测量方法是基于光电技术,电磁技术和其他技术的发展来测量物体的距离而不接触待测物体的测量方法。传统的非接触式距离测量方式包括有激光测距、红外线测距和超声波测距。在上述提到的几种测距方式之中,激光测距的测量精度最高,操作也较为便捷,但易受工作环境的影响,成本和后期的保养维护费用也比较高,所以一般在工业环境中很少使用[[2]]。红外线测距速度比较快,精度也令人满意的,但是成本要比超声波测距高,而且还会受到阳光以及其他与红外线波长相近的光源的干扰。与激光距离测量和红外线距离测量相比,在大气中,可以防止烟雾,光线、灰尘、电磁等干扰超声波对距离的测量,而且测距方案简单,对硬件的要求也不高,使用也很方便。因此,在公路车速测量、汽车导航、机器人行走诸多领域应用广泛。

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。