基于单片机测距的装置设计

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

毕业设计(论文)论文题目:基于单片机测距的装置设计摘要超声波具有指向性强,能量消耗缓慢,传播距离较远等优点。所以,在利用传感器技术和自动控制技术相结合的测距方案中,超声波测距是目前应用最普遍的一种,它广泛应用于煤位高度、防盗、倒车雷达、水位测量、建筑施工工地以及一些工业现场。本设计详细介绍了超声波传感器的原理和特性,以及Atmel公司的AT89S51单片机为核心的性能和特点,并在分析了超声波测距的原理的基础上,设计测距系统的思路和所需考虑的问题,给出了以AT89S51单片机为核心的低成本、高精度、微型化数字显示超声波测距仪的硬件电路和软件设计方法,由于温度对超声波影响较大,设计中添加了温度补偿电路。该系统电路设计合理、工作稳定、性能良好、检测速度快、计算简单、易于做到实时控制,并且在测量精度方面能达到工业使用的要求。关键词:AT89S51;超声波;温度;补偿;ABSTRACTUltrasonichasstrongdirectional,energyconsumptionisslow,transmissiondistanceisfarther,etc.So,theuseofthesensortechnologyandautomaticcontroltechnologyofcombiningthemeasurementprogram,ultrasonicrangingistheapplicationofthemostcommonone.Itiswidelyusedincoalaheight,guardagainsttheft,backingupradar,waterlevelmeasurement,constructionsiteandsomeindustrialfield.Thedesigndetailedintroducestheprincipleandcharacteristicsofultrasonicsensors.andtheAtmelcompanyAT89S51asthecoreoftheperformanceandcharacteristics.Andanalysistheultrasonicrangingbasedonthetheoryoftheideasanddesignrangingsystemneededtoconsiderthequestion.ThedesignisgivenbasedonAT89S51asthecoreoflowcost,highprecision,miniaturizationdigitaldisplayultrasonicrangefinderhardwarecircuitandsoftwaredesignmethod.Becausethetemperatureeffectisbig,soindesignaddtemperaturecompensationcircuit.Thesystemcircuitdesignreasonable,stable,theperformancegood,detectionspeed,simplecalculation,easytodoreal-timecontrol,andinthemeasurementprecisioncanreachtherequirementsofindustrialuse.keywords:AT89S51;ultrasonic;temperature;compensation;目录1绪论...........................................................................................................................11.1课题研究意义....................................................................................................11.2测距传感器........................................................................................................12超声波测距设计概述...................................................................................................22.1超声波的基本性质............................................................................................22.2超声波测距原理................................................................................................22.3超声波传感器的选型........................................................................................32.4超声波的影响因素............................................................................................43系统硬件设计...............................................................................................................43.1单片机系统设计................................................................................................43.1.1单片机的选择.........................................................................................43.1.2单片机引脚功能.....................................................................................53.1.3单片机最小系统.....................................................................................83.2超声波发射和接收电路设计............................................................................83.2.1超声波发射电路设计.............................................................................83.2.2超声波接收电路设计.............................................................................93.3温度传感器的选择..........................................................................................103.3.1DS18B20的特征...................................................................................113.3.2DS18B20的引脚分布图及其功能.......................................................113.4显示模块的选择..............................................................................................124系统软件设计.............................................................................................................124.1超声波测距的算法设计..................................................................................124.2主程序设计......................................................................................................134.3超声波发生子程序和超声波接收中断程序..................................................134.4温度补偿子程序..............................................................................................155电路的安装与调试.....................................................................................................175.1电路安装要注意问题......................................................................................175.2电路的调试......................................................................................................175.2.1调试电路常用的仪器...........................................................................175.2.2调试电路前的检查...............................................................................175.2.3调试步骤...............................................................................................175.2.4调试注意事项.......................................................................................186系统的测量数据及误差分析.....................................................................................186.1实测比较..........................................................................................................186.2温度误差分析.......................

1 / 45
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功