1论文(基于单片机的超声波液位测试系统研制)

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

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

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

资源描述

东北石油大学本科生毕业设计(论文)摘要本系统以AT89S52单片机为核心,利用超声波测距原理,通过硬件电路和软件编程实现对液位高度的检测。其主要原理是由单片机控制超声波测距模块DYP-ME007发射超声波,遇到液面反射后模块接收回波,同时单片机记录所用时间。为了提高精度,计算时涉及到温度补偿。将测得的温度与时间带入相应公式,即可求得当前液位。最后通过LCD液晶不断更新显示当前温度与液位。若液位超出预设的最低值或最高值,液晶显示警告,同时蜂鸣器报警。硬件部分包括AT89S52单片机,DYP-ME007超声波测距模块,12864LCD液晶显示模块,DS18B20温度测量模块和蜂鸣器报警模块。软件设计分为两部分,主程序和中断服务程序。主程序完成初始化、超声波发射和接收,温度测量,距离计算、结果显示等大部分主要工作。中断服务子程序主要完成时间值的读取。关键词:单片机;超声波测距;液位测量;温度补偿东北石油大学本科生毕业设计(论文)AbstractThesystemusetheAT89S52microcontrollerasthecore,usingultrasonicrangingprinciple,throughacombinationofhardwareandsoftware,anddebugging,andultimatelytotheliquidleveldetection.ThemainprincipleiscontrolledbythemicrocontrollermoduleDYP-ME007ultrasonicdistanceultrasonictransmitter,andreceivestheechoreflectedsurfaceencounteredwhilerecordingthetimeusedmicrocontroller.Forimprovedaccuracy,temperaturecompensationcalculationsinvolved.Themeasuredtemperatureandtimeintotheappropriateformulatoobtainthecurrentlevel.LastupdatedthroughtheLCDliquidcrystaldisplaythecurrenttemperatureandlevel.Ifthelevelexceedsthepresetminimumormaximumvalue,liquidcrystaldisplayawarningbuzzeralarm.AT89S52microcontrollerhardwareincluding,DYP-ME007ultrasonicdistancemeasuringmodule,12864LCDLCDmodule,DS18B20temperaturemeasurementmoduleandthebuzzeralarmmodule.Softwaredesignisdividedintotwoparts,themainprogramandinterruptserviceroutine.Mainprogramtoinitialize,transmitandreceiveultrasound,temperaturemeasurement,distancecalculation,theresultsdisplaymostofthemajorwork.Interruptserviceroutinereadsthekeyvaluesofcompletiontime.Keywords:SCM;Ultrasonicdistancemeasurement;liquidlevelmeasurement;temperaturecompensation东北石油大学本科生毕业设计(论文)I目录第1章概述..........................................................................................................11.1课题的背景和意义.............................................................................11.2液位测量系统的现状.........................................................................21.3液位传感器的发展方向.....................................................................31.4国内外液位监测技术的发展现状.....................................................31.5本章小结.............................................................................................4第2章超声波测液位系统....................................................................................52.1超声波与超声波传感器.....................................................................52.2超声波测液位原理.............................................................................52.3超声波测距原理.................................................................................62.4总体方案设计.....................................................................................72.5本章小结.............................................................................................8第3章硬件系统设计............................................................................................93.1单片机系统.........................................................................................93.2发射电路方案比较...........................................................................123.3接收电路方案比较...........................................................................143.4DYP-ME007超声波测距模块..........................................................163.5LCD显示模块...................................................................................203.6温度测量模块...................................................................................223.7报警模块...........................................................................................233.8单片机主机系统电路.......................................................................24东北石油大学本科生毕业设计(论文)II3.9本章小结...........................................................................................25第4章软件系统设计..........................................................................................264.1总体设计思想...................................................................................264.2系统主程序.......................................................................................274.3温度补偿与距离计算子程序...........................................................294.4基于DS18B20的测温子程序..........................................................304.5基于LCD12864的显示子程序.......................................................324.6本章小结...........................................................................................34第5章系统调试分析..........................................................................................355.1硬件调试...........................................................................................355.2实验数据...........................................................................................365.3误差分析...........................................................................................36结论......................................................................................................................37参考文献................................................................................................................38致谢................................................................

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

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

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

×
保存成功