摘要闸门作为水利系统的核心机构,实现数字化、智能化、自动化己经变得十分迫切。
随着自动控制、通信及计算机技术的不断发展,把遥测遥控、通信及计算机技术应用于闸门及水位等参量的自动测量、计算、控制和调节,就是水闸监控系统的主要内容和目标。
闸门开度荷重测控仪是一种用于现场测量、控制闸门开度及荷重的智能化仪表。
老式的闸门开度测量仪的测量精度低,可靠性差,并且,目前我国大多数的闸门控制系统,都是将载荷监控与开度测控分开设计。
本系统就是在这样的实际要求下,在认真研究了国内外相关产品的优缺点的基础上,在整个设计过程中充分考虑到了用户的需求,设计出的一套使用灵活、通用性强、自动化程度较高的闸门开度荷重测控仪,使得设计出的产品能应用于各种规模的水电站及水利系统。
本文所述的闸门开度荷重测控仪是以单片机AT89C52为核心部件的工作系统,通过C语言编制的软件程序支持;对从传感器采集到的开度信号和荷重信号进行计算、判断处理;人机交互主要由按键来完成;显示闸门的开度、载荷状态并在故障时报警;驱动继电器工作;可以对闸门开度测控仪的各参数通过按键和汉字液晶显示器进行控制与管理;并且该系统还可以和远程监控(PC机)之间进行通信,数据传输采用485总线,依靠自主设计的通信协议来保证。
具有很好的安全冗余度和良好的人机界面,实现了更高的智能水平。
结果表明:系统整体设计合理、性能可靠,实现了预期的目标。
关键词:闸门;单片机;开度;荷重;测控仪器AbstractAs the core part of water conservancy system,it becomes much important to achieve the digital,intelligence and automation of the gate.With the development of auto-control,telecommunication and computer technology,it has applied remote control and measurement, telecommunication and computer technology on the measurement,calculation,control and adjustment of the gate's and water level's parameter in order to attain the main content and aim of this gate monitor system.The gate's open degree monitor is an intelligent instrument mainly used in scene measuring,gate's open degree and load controlling.The traditional gate's open degree monitor is bad in measurement's accuracy and dependability.What's more,it is common to measure and monitor was designed on the basis of clients,this monitor can be used in various scale water-electricity station for it's flexible,wide adaptation and high automotive degree.This gate's open degree monitor is a system mainly bases on AT89C52,with the help of software of C.Through calculation of the open degree signal and load signal of the sensor,signal judging and treating,communication between people and system by key,this system can display the state of open degree and load.It can alert when there are some problems,drive relay work,control and manage the various parameters of this monitor through key and LCD.It can also communicate with PC by 485 bus.This self design agreement assured theaccuracy and security of this communication.It has a perfect redundant degree and man-machine interface which is more intelligent than before.With the adjustment ,the result indicate:this design is reasonable and reliable.It has been made into production.Key Words: gate, Single-Chip Microcomputer, open degree, load value, measure and control instrument目录摘要 (i)Abstract (ii)第一章绪论 .................................................................................................... - 1 -1.1 概述............................................................................................................ - 1 -1.2 设计的主要内容........................................................................................ - 2 -1.3 闸门开度荷重监控系统的国内外研究概况............................................ - 3 -第二章总体方案的设计.................................................................................. - 5 -2.1 闸门自动化控制系统结构........................................................................ - 5 -2.2 闸门开度荷重测控仪工作原理................................................................ - 6 -2.3 总体方案.................................................................................................... - 6 -第三章硬件系统设计 ...................................................................................... - 8 -3.1 整体设计思想............................................................................................ - 8 -3.2 单片机的选择............................................................................................ - 8 -3.3 荷重传感器的选择.................................................................................. - 10 -3.4 荷重信号输入接口.................................................................................. - 12 -3.5 系统调零、调满参数信号输入接口...................................................... - 12 -3.6 A/D转换以及A/D转换模块TLC2543 .................................................. - 13 -3.7 旋转编码器接口电路.............................................................................. - 15 -3.8 D/A转换及D/A转换模块MAX518 ...................................................... - 16 -3.9 V/I转换电路............................................................................................. - 18 -3.10 继电器触发控制电路............................................................................ - 19 -3.11 LED显示接口电路 ................................................................................ - 20 -3.12 键盘接口电路........................................................................................ - 21 -3.13 液晶显示接口........................................................................................ - 22 -3.13.1 液晶的选型................................................................................. - 22 -3.13.2 液晶接口电路............................................................................. - 23 -3.14 直流稳压电源的选用............................................................................ - 24 -第四章软件系统设计 .................................................................................... - 26 -4.1 系统主程序设计...................................................................................... - 26 -4.1.1 软件设计概述............................................................................... - 26 -4.1.2 编程语言的选用........................................................................... - 27 -4.2 系统的程序.............................................................................................. - 27 -4.2.1 系统主程序................................................................................... - 27 -4.2.2 前向通道中的数据采集子程序................................................... - 29 -4.3 系统仿真.................................................................................................. - 33 -第五章毕业设计总结 .................................................................................... - 35 -参考文献 .............................................................................................................. - 37 -附录................................................................................................................... - 39 -致谢................................................................................................................... - 48 -第一章绪论1.1 概述水是人类的一种十分宝贵的资源,如果没有水,整个世界都将走向灭亡。