- 1、本文档共32页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
基于超声波的液位测距系统设计设计4927723
基于超声波的液位测距系统设计
摘 要
本文是利用超声波测距的原理而设计的一种液位测距系统。该系统采用STC12C5A08S2单片机为核心控制器,并为超生测距模块提供触发控制信号,在发射超声波的同时,启动单片机的内部定时器开始计时,超声波在空气中传播遇到障碍物后反射回波,超声波接收电路检测到回波信号时停止计时,则根据公式:S=Vt/2 即可计算出液位距离。
文中设计的系统着重解决了超声波测距的时间计算和温度补偿问题。其中通过温度传感器将温度值采集到单片机中,经过一定的数值修正即可得到当时温度值下的超声波传播速度V。本文采用了硬件和软件相结合的设计方法,在软件方面,采用了汇编语言进行程序编写。在数据处理上充分利用汇编语言的查表优势,建立了速度修正值表和数码管显示值表,可以便捷、明了地进行数据处理和显示。
关键词: 超声波测距 STC12C5A08S2 温度补偿 液位测距系统
Title Design of liquid level based on ultrasonic distance measurement system
Abstract
This article designs a liquid level measurement system which is based on the principle of ultrasonic distance measurement. The system takes STC12C5A08S2 as the core of the system controller. The SCM provides control signals for ultrasonic distance measurement modules, and starts the monolithic integrated circuit internal timer to work while emitting ultrasonic. Ultrasonic reflection echo after the communication obstacles in the air, and the SCM stops timing when the echo signal is detected by the ultrasonic receiver. According to the formula: S=Vt/2, the liquid level distance is calculated.
The system is designed to focus on the time and temperature compensation of ultrasonic distance measurement. The temperature value is collected in the SCM through the temperature sensor, undergoing a certain numerical correction to get the ultrasonic wave propagation velocity under the temperature. This article uses a combination of hardware and software design. In software, we use assembly language to program. Full use of Assembly language reference table advantages in data processing, we established the speed correction table and the digital display values table which can be convenient and clear for data processing and display.
Keywords:Ultrasonic distance-measuring; STC12C5A08S2; Temperature compensation; Liquid level measurement system
目 录
1 引言 1
1.1 测距在工业方面的应用 1
1.2 现有的测距方法及其优缺点 1
1.3 超声波测距的原理及优点 2
1.4 课题研究的意义 2
2 总体方案论证 2
2.1 系统方案简化 3
2.2 系统软件设计说明 4
3 系统硬件电路设计 4
3.1 HC—SR04超声波测
文档评论(0)