摘 要本文描述以单片机为基础,以MCS-2051单片机为核心设计利用水的导电性,使用
电极作为水位敏感元件检测水位变化的系统,实现水位显示及报警等功能。实验证明,纯净水几乎是不导电的,但自然界存在的以及人们日常使用的水都会含有一定的镁,钙等离子,它们的存在使水导电。检测技术是现代信息技术的基础和源头,也是人们认识和改造世界的一种必不可少的重要手段。从大的方面来讲,检测技术是对被测量进行检出,变换,分析,处理和控制的综合认识过程。利用单片机软硬件技术实现测量过程、数据处理及输出的自动化, 利用水的导电性大大提高了测量精度。系统采用MCS-51结构,然后在MCS-51结构基础上,设计出具体的水位报警器系统结构。并对数据检测模块,数据处理模块和数据输出模块进行仔细的分析。在水位超过或低于正常水位时蜂鸣报警器会发出警报。
MCS-2051
A boiler is a very important device using in the department of giving electricity. A the pedestal boiler wants can safe, dependable, effectively of movement, the movement parameter can arrive the design value, besides boiler oneself the difference between different from every kind only of machine outside must still request to automate gauge work normally with the design project of the automatic control system rightly, for boiequipments and its control request should adopt the homologous control project design.
This paper based on the single chip computer description, with MCS-2051 single-chip processor core design using the conductivity of the water, the use of electrode as water level detection of water sensitive components change system, realize water level display and alarm functions. Experiments show, pure water is almost nonconductive, but the nature of existence and People's Daily use of water will contain certain magnesium, calcium plasma, their existence is the water
electricity. Detection is the foundation of the modern information technology and source, is also the understanding of and change the world a kind of indispensable important means. In a large extent, testing technique is to be measured for detection, transform, analysis, processing, and control of the comprehensive understanding process. Using single chip computer software and hardware technology to achieve the measurement process, data processing and output of automation, use water conductivity greatly improve the measuring precision. System USES MCS-51 structure, and then in the MCS-51 based on structure, the design gives the specific level alarm system structure. And the data detection module, data processing module and data output module careful analysis. In the water level or below the normal water level more than when the buzzer an alarm.
Keywords: single chip microcomputer control Water level MCS-2051 alarm
目 录
摘 要 ................................................................................................................................................ I Abstract ........................................................................................................ 错误!未定义书签。 第1章 绪论 .................................................................................................................................. 3
1.1课题的背景 ........................................................................................................................ 3 1.2.国内外研究现状............................................................................................................... 4 1.2.1国外研究现状................................................................................................................ 4 1.2.2国内研究现状................................................................................................................ 4 第2章 锅炉水位控制的设计 ...................................................................................................... 6
2.1水位测量方法概述 ............................................................................................................ 7 2.1.1 水位测量方案概述 ................................................................................................... 7 2.1.2水位测量方案原理 .................................................................................................... 7 2.1.3水位检测显示系统 .................................................................................................... 8 2.2主控方法的选择................................................................................................................ 8 2.2.1使用单片机实现锅炉液位控制的优点 .................................................................... 8 2.2.2 单片机的选取........................................................................................................... 9 第3章 系统结构原理 .................................................................................................................. 10
3.1水位测量控制的系统结构概述 ...................................................................................... 10 3.2 主控制器的特性............................................................................................................. 12 3.3 水位测量电路................................................................................................................. 13 3.4 水位状态的显示............................................................................................................. 13 3.4.1 LED的选择.............................................................................................................. 14 3.4.2 138译码器原理 ...................................................................................................... 15 3.5 报警电路 ........................................................................................................................ 16 第4章 软件设计 .......................................................................................................................... 18
4.1 水位测量软件流程图 ..................................................................................................... 18 第5章 结论 ................................................................................................................................ 19 参 考 文 献 .................................................................................................. 错误!未定义书签。
致 谢 .............................................................................................................................................. 20 附 录 A .......................................................................................................................................... 21
第1章 绪论
1.1课题的背景
长期以来,对汽包水位认识深化缓慢的重要原因之一在于,汽包水位测量问题属于热控与锅炉两专业之间的边缘课题,理论深化研究与许多具体技术问题的解决必然涉及到两专业,而两专业相互合作较差,影响了科研部门和高等院校的课题研究攻关。电厂、基建、设计院的专业习惯分工尤为分明,热控方提出需要解决的问题,由锅炉方负责解决,双方往往相互推委,以致有些问题长期不能解决。 1.1.2 锅炉水位控制的背景
水是生产、生活中必不可少的物质, 如对水塔、水箱及机舱水柜中水位的检测与控制显得十分重要, 它关系到生产、生活正常进行。对水位检测控制方法有很多, 按原理分常用的方法有继电器开关式、电容式、超声波式、压力传感器式。选用何种方法, 要根据系统的具体要求, 选择技术上可行, 最经济的方案。随着计算机技术、自动控制技术、信息技术的高速发展, 数字化、智能化产品开发应用日趋广泛。
当今社会许多工业控制系统,自然科学研究会需要对水位的监测。比如海洋环境监测开始,它是获取长期、连续的海洋环境资料的唯一途径。能够直接为沿海工程、港口建设、交通运输、海洋生物资源开发、海洋环境监测、湿地保护及近岸海洋开发提供研究、评价和作业必不可少的依据。又比如在工业锅炉控制系统中对水位的监测要求也是很高的,现今大多数电厂都采用工业锅炉采用微机控制,它可以直观而集中的显示锅炉各运行参数。能快速计算出机组在正常运行和启停过程中的有用数据,能在显示器上同时显示锅炉运行的水位、压力、炉膛负压、烟气含量、测点温度、燃煤量等数十个运行参量的瞬时值、累计值及给定值,并能按需要在锅炉的结构示意画面的相应位置上显示出参数值。因此,水位传感器的研究对实际有很大的现实意义。
基于对水位测量原理的研究和水位传感器的分析,在本水位测试系统中采用超声波水位传感器和单片机智能系统实现对水位的测量。在设计的过程中,首先对单片机、AD模数转换器、超声波传感器的工作原理进行研究,在此基础之上,对整个数据采集电路进行了设计,整个电路包括超声波传感器、信号输入电路、基准电压电路、看门狗电路和单片机和AD之间的接口五部分电路组成。然后根据整个电路的设计原理图,编制相应的数据采集程序,实现对水位的自动测量。该采集电路具有采集速度快、精度高和可靠