基于c51单片机的船舶辅锅炉水位自动控制系统设计 下载本文

内容发布更新时间 : 2024/6/26 9:06:10星期一 下面是文章的全部内容请认真阅读。

摘要

锅炉水位是锅炉运行时重要的参数,水位过低可能会发生锅炉干烧现象,导致锅炉烧坏。水位过高会导致蒸汽带水过多,蒸汽品质下降,会引起设备腐蚀、水击,烧坏过热器管子。

本文在“育鲲”轮辅锅炉现有设备的基础上,设计了一套简易的锅炉水位自动控制系统,由于育鲲轮通常是在航行时使用废气锅炉,停泊时使用燃油锅炉,对水位的控制不需要很精确,所以本系统对燃油锅炉水位采用单冲量控制。系统由硬件系统和软件系统两部分组成。硬件系统和软件系统都采用模块化设计,将系统分为若干模块进行初步设计,然后将各个模块进行整合,经过改进最终形成一个完善的控制系统。用仿真软件Proteus和编程软件Keil相结合,完成系统硬件设计和软件编程,程序由C语言编写。硬件系统以STC89C52单片机为核心,包括模拟量采集输入模块、单片机最小单元模块、报警模块、键盘模块、显示模块及端口扩展模块。软件系统包括初始化模块、中断模块、数据处理模块、键盘模块、显示模块、A/D转换模块和报警模块。通过硬件系统和软件系统相结合,实现具有液位检测和控制的双重功能,同时也具有报警和显示的功能,并能通过键盘对参数值进行手动设定。最后,提出了显示模块的合理改进方案,并且在育鲲轮现有的通信网络基础上设计了通信模块,使系统功能更加完善。

关键词:锅炉液位,单片机,单冲量控制,模块化

ABSTRACT

Water level is an important parameter when a boiler is running. The phenomenon of distilling without water may occur when the water level is too low, and the boiler may be burn down finally. Due to high water level, the quality of the steam will become worse. What’s worse, it may also cause corrosion and water attack of equipments, and burn down the super-heater coil.

This paper aims at design a simple set of automatic control system of the boiler’s water level based on existing equipments of the “YU KUN” vessel. Generally, exhaust gas boiler is in service during sailing and auxiliary oil-burning boiler is in service in harbor. Thus, the control of water level does not need to be very precisely. This control system applies single pulse control to the water level. It is composed of two parts: hardware system and software system. They are all modularized. Initially, this system is divided into several independent modularization and finally form a concrete system together. Programmer software “Keil uVision3” accomplished the design of the software system. And simulate software “Proteus” accomplished the design of the hardware system. Programs are accomplished with C programming language. Hardware system is based on STC89C52 microcontroller, including the imitation input modularization, the microcontroller least unit modularization, alarm modularization, keyboard modularization, display modularization and I/O extending modularization. Software system includes the initial modularization, interrupt

modularization, data handling modularization, the keyboard modularization, display modularization and A/D transform modularization. Hardware system and software system cooperate to accomplish the function of detecting and controlling the water level. Also, the system has functions of displaying and alarming. What’s more, the system parameters’ data can be programmed manually through keyboard. Finally, a more reasonable suggestion of display modularization can be achieved. And communication modularization is designed on basic of communications network that “YU KUN” vessel is applying in order to make the system more complete.

Keywords: Boiler, Water level, Microcontroller, Single pulse control, Modularization

目录

1 前言 .............................................................................................................................................. 1

1.1课题意义 ............................................................................................................................. 1 1.2发展状况 ............................................................................................................................. 1 2 硬件系统设计 ............................................................................................................................... 2

2.1 系统总体设计 .................................................................................................................... 2

2.1.1 系统功能 ................................................................................................................. 2 2.1.2 硬件系统示意图 ..................................................................................................... 2 2.2 各硬件模块设计 ................................................................................................................ 3

2.2.1 模拟量采集输入模块 ............................................................................................. 3 2.2.2 单片机最小单元模块 ............................................................................................. 5 2.2.3 I/O端口扩展模块 ................................................................................................... 7 2.2.4 键盘模块 ................................................................................................................. 9 2.2.5 显示模块 ............................................................................................................... 11 2.2.6 报警模块 ............................................................................................................... 12 2.3 硬件系统总原理图 .......................................................................................................... 13 3 软件系统设计 ............................................................................................................................. 14

3.1 软件系统总体设计 .......................................................................................................... 14

3.1.1 软件程序流程 ....................................................................................................... 14 3.1.2 软件程序主函数 ................................................................................................... 15 3.2 软件各模块程序设计 ...................................................................................................... 15

3.2.1 初始化模块 ........................................................................................................... 15 3.2.2 AD转换模块 ......................................................................................................... 16 3.2.3 数据处理模块 ....................................................................................................... 17 3.2.4 显示模块 ............................................................................................................... 20 3.2.5 报警模块 ............................................................................................................... 23 3.2.6 键盘模块 ............................................................................................................... 25 3.2.7 中断模块 ............................................................................................................... 28

4 系统功能改进与扩展 ................................................................................................................. 30

4.1 显示模块改进 .................................................................................................................. 30

4.1.1 LCD1602液晶显示 ............................................................................................ 30 4.1.2 液晶显示程序设计 ............................................................................................. 31 4.2通信功能扩展 ................................................................................................................... 36

4.2.1 RS-485通信 .......................................................................................................... 36 4.2.2通信模块设计 ........................................................................................................ 36

5总结 ............................................................................................................................................. 37 参考文献......................................................................................................................................... 39 致谢 ................................................................................................................................................ 39