您好,欢迎来到佳博论文网!

单片机流体计量控制仪的设计

论文编号:JD1043论文字数:38709,页数:85

摘要:在当今社会,流量测量变得越来越重要。面对全球自然资源供应日益紧张的局面,为了节约使用,对重要的资源如水、天然气、石油及其相关产品的测量变得更加重要,对测量仪表的精度要求也越来越高。流量测量系统就是适应了这种需求,针对食品、化工等行业中进行流体计量原料消耗计量等流量测量领域而进行研究设计的。本设计的流量计量测量系统具有功耗低、精度高、重量轻、工作可靠、价格便宜等优点。

本设计根据流量测量的环境要求,对各种流量计进行了对比研究,后选用了涡轮流量计作为本液体流量仪流量测量系统的一部分。文中对涡轮流量计的工作特性、使用特点等进行了一定的研究。涡轮流量计受流体物性(粘度、温度、密度等)的影响会使其测量精度变低,本文就涡轮流量计受物性影响的状况进行了理论分析,并给出了一些补偿公式。本文所研制的智能流量计量仪,能切换显示累计体积流量、累计质量流量以及能通过手操设置仪表系数、密度等参数,软件编程中考虑到了低功耗、可靠性的要求,采用了结构化的模块设计方法。

关键词:流量计;涡轮传感器;单片机;脉冲

The Design of Fluid Measuring Set and Controller

Based on One-chip Computer

Abstract :Nowadays, flow measure becomes more and more important。The supply of natural resource has been lacking。It is more important to measure the flux of important resource, such as the water, natural gas, petroleum and petroleum derivative, for saving. The flowmeter is required to be more precision. The flow measurement system for food processing industry、 chemical engineering in this paper adapts to the requirement of above consumers. The flow measurement system for food processing industry、 chemical engineering has the advantages of low power, high precision, light, long time use, low price etc。

A right flowmeters is chosen in this flow measurement system. At last, the paper chooses turbine Flowmeter to be the object of the study. The turbine flowmeter is affected by the characteristics of flowing medium, such as viscosity, temperature and density. The paper analyses the affected status of the characteristics of flowing medium to the turbine flowmeter. Some compensate formulae are presented in the paper. The smart flow integrating and displaying instrument can switch to display cumulative flux of quantity and cumulative flux of volume etc. Its parameters can be changed by manual key-press panel. The software of the instrument is modularized written to make the instrument working on high efficiency.

Key words:Flowmeter, Turbine Sensor, Single Chip Microcomputer, Pulse

目录

摘要

Abstract

第1章 绪论 1

1.1 课题的来源与意义 1

1.2 单片机及其发展概述 1

1.2.1 微处理器.微机和单片机的概念 1

1.2.2 单片机的一般结构及特点 2

1.2.3 单片机的发展过程 2

1.3单片机的应用领域 3

1.3.1 单片机在智能仪器中的应用 3

1.3.2 单片机在过程控制中的应用 3

1.3.3 单片机与e-Home 4

1.3.4 单片机与Internet 4

1.4流量测量技术的发展现状 5

第2章 总体方案设计 8

2.1 流体测量原理 8

2.2 方案选取 8

2.3测量系统构成 10

2.3.1 系统组成 10

2.3.2 系统参数和功能分析 12

2.3.3 系统工作原理 13

2.4硬件资源分配 13

2.4.1 存储器的地址空间分配 13

2.4.2 8031 I/O口的分配 14

第3章 硬件设计 15

3.1流量传感器的选择 15

3.2 8031单片机的简介 17

3.2.1 电源及时钟引脚 18

3.2.2 控制引脚 18

3.2.3 I/O口引脚 19

3.3 单片机系统的扩展 19

3.3.1 程序存储器的扩展 19

3.3.2数据存储器的扩展 22

3.3.3 I/O的扩展 24

3.4接口电路设计 24

3.4.1键盘显示电路 24

3.4.2 料泵电机的输出接口电路 27

3.4.3 掉电检测与数据保护电路的设计 28

3.4.4 复位电路的设计 29

3.4.5 报警器的接口电路设计 31

3.4.6 电源的设计 32

第4章 软件设计 34

4.1 软件开发环境选择 34

4.2 软件结构模块及功能 35

4.3主控与初始化程序设计 36

4.4 键盘显示子程序 37

4.5 参数设置键处理子程序 39

4.5.1 容积/重量键处理程序 39

4.5.2 仪表常数键处理程序 40

4.5.3 比重键处理程序 41

4.6 其它功能键处理程序设计 42

4.6.1启动键处理子程序 42

4.6.2掉电启动键处理子程序 43

4.6.3定量/普通键处理程序 44

4.6.4 总数键处理程序 44

4.6.5 计量处理程序 45

4.6.6 中断及其处理程序 47

4.7 运算程序. 48

4.7.1 多字节无符号数加法子程序 48

4.7.2 多字节无符号数减法子程序 49

4.7.3 多字节无符号数乘法子程序 50

4.7.4多字节无符号数除法子程序 51

4.7.5 单字节BCD码转换成压缩的BCD码子程序 52

4.7.6 压缩的BCD码转换成单字节的BCD码子程序 53

4.7.7 16进制转换为BCD码子程序(多字节) 54

结束语. 56

参考文献. 57

致谢. 58

附录A 硬件电路图 59

附录B 显示.指示.报警.电源电路原理图 60

附录C 程序清单 61

单片机流体计量控制仪的设计......