如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
PAGEIII摘要本文是利用超声波测距的原理而设计的一种液位测距系统。该系统采用STC12C5A08S2单片机为核心控制器,并为超生测距模块提供触发控制信号,在发射超声波的同时,启动单片机的内部定时器开始计时,超声波在空气中传播遇到障碍物后反射回波,超声波接收电路检测到回波信号时停止计时,则根据公式:S=Vt/2即可计算出液位距离。文中设计的系统着重解决了超声波测距的时间计算和温度补偿问题。其中通过温度传感器将温度值采集到单片机中,经过一定的数值修正即可得到当时温度值下的超声波传播速度V。本文采用了硬件和软件相结合的设计方法,在软件方面,采用了汇编语言进行程序编写。在数据处理上充分利用汇编语言的查表优势,建立了速度修正值表和数码管显示值表,可以便捷、明了地进行数据处理和显示。关键词:超声波测距STC12C5A08S2温度补偿液位测距系统TitleDesignofliquidlevelbasedonultrasonicdistancemeasurementsystemAbstractThisarticledesignsaliquidlevelmeasurementsystemwhichisbasedontheprincipleofultrasonicdistancemeasurement.ThesystemtakesSTC12C5A08S2asthecoreofthesystemcontroller.TheSCMprovidescontrolsignalsforultrasonicdistancemeasurementmodules,andstartsthemonolithicintegratedcircuitinternaltimertoworkwhileemittingultrasonic.Ultrasonicreflectionechoafterthecommunicationobstaclesintheair,andtheSCMstopstimingwhentheechosignalisdetectedbytheultrasonicreceiver.Accordingtotheformula:S=Vt/2,theliquidleveldistanceiscalculated.Thesystemisdesignedtofocusonthetimeandtemperaturecompensationofultrasonicdistancemeasurement.ThetemperaturevalueiscollectedintheSCMthroughthetemperaturesensor,undergoingacertainnumericalcorrectiontogettheultrasonicwavepropagationvelocityunderthetemperature.Thisarticleusesacombinationofhardwareandsoftwaredesign.Insoftware,weuseassemblylanguagetoprogram.FulluseofAssemblylanguagereferencetableadvantagesindataprocessing,weestablishedthespeedcorrectiontableandthedigitaldisplayvaluestablewhichcanbeconvenientandclearfordataprocessinganddisplay.Keywords:Ultrasonicdistance-measuring;STC12C5A08S2;Temperaturecompensation;Liquidlevelmeasurementsystem目录TOC\o"1-3"\h\z\uHYPERLINK\l"_Toc355614588"1引言PAGEREF_Toc355614588\h1HYPERLINK\l"_Toc355614589"1.1测距在工业方面的应用PAGEREF_Toc355614589\h1HYPERLINK\l"_Toc355614590"1.2现有的测距方法及其优缺点PAGEREF_Toc355614590\h1HYPERLINK\l"_Toc355614591"1.3超声波测距的原理及优点PAGEREF_Toc355614591\h2HYPERLINK\l"_Toc355614592"1.4课题研究的意义PAGEREF_Toc355614592\