薄膜谐振式水位传感器的高度测量用频率计的设计(单片机)

以下是资料介绍,如需要完整的请充值下载. 本资料已审核过,确保内容和网页里介绍一致.  
无需注册登录,支付后按照提示操作即可获取该资料.
资料介绍:

摘 要
本文介绍了一种以单片机(AT89C51)为核心与薄膜谐振式水位传感器配套使用的液位高度测量用频率计的设计与制作。还介绍了谐振式水位传感器的新型传感原理,传感器的结构,数字振荡电路的特点,阐述了水位与频率的对应关系。薄膜谐振式水位传感器内置三点式水位传感器振荡电路,该振荡电路的固有频率随水位的变化而变化,通过检测该振荡电路的固有频率来判定水位的高低。
该频率计直接利用单片机内部的计数器对薄膜谐振式水位传感器的频率脉冲信号进行计数,然后利用单片机的定时功能实现对频率的检测,最后通过LED动态显示电路显示数值。在设计中应用了单片机的运算和控制功能,满足测量的精度要求,该频率测量仪器测量误差小于±10Hz测频性能稳定可靠,可单独使用,也可方便嵌入系统中。
该频率计具有结构简单、价格低、精度高、操作简单、并且降低产品的成本,有利于新产品的设计与研制、等特点。随着单片机应用技术的发展,越来越多的测量仪器都采用单片机作为系统进行设计,应用单片机进行系统设计时系统结构简单、控制方便、硬件设计需要外围器件较少,软件设计可采用汇编语言编程,汇编语言具有编程方便、运算效率高、占用内存少等优点。

关键词: 液位检测;频率测量;传感器;单片机 

Abstract
This paper presents the design and fabrication of a Microprocessor (AT89C51)based film resonant with the water level sensor supporting the use of the liquid level measurement frequencymeter.The principle of new resonator water level sensor is mainly introduced.The internal structure of this Sensor and the characteristic of numeral oscillation circuit are analyze dindetails.There ationship between frequently and water level is expounded.Films resonant water level sensor built-in three-point level sensor oscillation circuit.The oscillator circuit changed with the natural frequency of the water level. By detecting the oscillation circuit natural frequency to determine the level of water.
The frequencymeter use the Microprocessor  internal counter to counting the film resonant frequency of the water level sensor pulse,then Microprocessor regular function to achieve frequency testing, final adoption of LED display circuit dynamic numerical show.Application of the design of the 89C51 operation and control functions,Meet the required precision measurement,The error of the frequency measurement instrument is less than ±10Hz,Performance measurement frequency stability and reliability,Also it can be used alone, and easily embedded in the system.
The frequency- meter also has a simple structure, low cost, high accuracy and simple operation,reduce the cost of the product and facilitate the design and development of new product and so on. With the development of the Microprocessor technology, a growing number of measuring instruments are used as a single chip computer system design. Microprocessor system design is simple, easy to control, hardware design requires fewer external components, Software Design use assembly language programming, because assembly language with high computational efficiency and low memory  consume.

Keywords:  Water Level Measurement;  Frequency Measurement;  Sensors;Microprocessor













目 录
1 绪论...............................................................1
1.1选题的目的及意义 1
1.2 频率测量仪器的现状及发展 1
1.3 频率计的设计内容及要求 2
2 薄膜谐振式水位传感器应用...........................................3
2.1 薄膜谐振式水位传感器概述 3
2.1.1 薄膜谐振式水位传感器的结构 3
2.1.2水位传感器的工作原理 3
2.2薄膜谐振式水位传感器的功能简介 4
2.2.1水位检测 4
2.2.2水位与频率关系的对应 4
3 频率计总体方案设计.................................................6
3.1方案论证与比较 6
3.1.1 方案一 6
3.1.2 方案二 7
3.2 方案选择 7
4 频率计硬件分析与设计...............................................8
(优秀毕业设计:www.2bysj.cn)
4.1频率计系统的组成与基本工作原理 8
4.1.1  系统组成 8
4.1.2  系统设计原理 8
4.1.3  测频原理 9
4.2 AT89C51单片机在本系统中的应用 9
4.2.1  AT89C51简介 9
4.2.2  AT89C51器件的基本结构 11
4.2.3  AT89C51的定时器/计数器 13
4.2.4  AT89C51外围电路设计 14
4.3 地址锁存器74LS373介绍 14
4.4 八路反相缓冲器74LS240应用 15
4.5 显示电路 16
4.5.1显示电路设计 16
4.5.2单片机驱动数码管原理 17
4.6 硬件总电路图 17
5  软件设计.........................................................18
5.1主程序设计 18
5.2 中断服务子程序设计 19
5.3 显示子程序设计 20
6 运行与调试........................................................21
6.1硬件调试 21
6.2 软件程序调试 22
6.2.1 MedWin仿真软件简介 22
6.2.2 汇编语言程序的仿真调试 22
6.3系统联调 23
7 结论与展望........................................................25
7.1 结论 25
7.2 展望 25
谢辞................................................................26
参考文献............................................................27
附录 1..............................................................28
程序清单 28
附录 2..............................................................33
硬件总电路图 33

参考文献
[1] 陈丽芳.单片机原理与控制技术.南京:东南大学出版社,2003.
[2] 何立民.单片机应用系统设计.北京:北京航空航天大学出版社,1990.
[3] 李建忠.单片机原理及应用.西安:西安电子科技大学出版社,2006.
[4] 李广娣 .单片机基础. 北京:北京航空航天大学出版社,2000.5~30
[5] 李军.贺庆之.检测技术与仪表.北京:轻工业出版社,1989.188~190
[6] 王孙武.电子测量仪器原理及应用.哈尔滨:哈尔滨工程大学出版社,2002.129~132
[7] 何立民.单片机原理及应用系统设计.北京:北京航空航天大学出版社,1995.
[8] 曹玲芝、孙玉胜.水位传感器专用频率计的设计.郑州轻工业学院学报,1998年第13卷(第21期)
[9]  扈刚、王延峰. 谐振式水位传感器. 传感器技术,2002年第21卷(第5期)
[10]李朝青.单片机原理及接口技术.北京:北京航空航天学院出版社,1994.157~163
[11]肖洪兵、胡辉.跟我学用单片机. 北京:北京航空航天学院出版社,2002.9~38
[12]孙玉胜.洗衣机谐振式水位传感器特性检测仪的研制.郑州轻工业学院学报,2000年第15卷(第3期)

附录1
程序清单
================主程序 ====================
ORG    0000H         ;复位地址
LJMP   MAIN         ;转主程序
ORG   000BH         ;T0中断入口地址
LJMP   ZDZD         ;转T0中断服务程序
ORG   030H         ;主程序首地址
MAIN:
MOV   SP,#60H        ;单片机复位时,SP值在07H,08H-1FH共24字节
MOV   30H,#80H       
MOV   31H,#80H       
MOV   32H,#80        ;5位都显示8,这是开机自检,主要是检查数码管是否缺段或缺位
MOV   33H,#80H          
MOV   34H,#80H        
LCALL   XS5          ;多显示几遍,以便看清
LCALL   XS5          
LCALL   XS5           
LCALL   XS5            
CLR  A                ;清A
MOV   30H,A            ;清这几个存放显示字段码的寄存器
MOV   31H,A            ;
MOV   32H,A            ;
MOV   33H,A            ;