摘要
水位测量及控制在现实生活及工业生产中有着重要的意义。为了满足对测量的准确度和控制精度的要求,以STC12C5A60S2单片机为核心设计了一个水位测控系统,该系统利用MPX2050传感器来测量水位,测得的电压信号经过放大后传送到单片机处理,然后利用串口通信将水位数据发送到PC机上显示。同时在PC机上可以设置水位的上下限阈值,并传送给单片机与测得的水位比较,从而控制水泵工作或停止,使水位保持在设定值范围内。通过测试表明该系统具有测量准确度高,响应速度快及控制精度高等特点。
Water level measurement and control is of great significance in real life and industrial production. In order to meet the requirements of measurement accuracy and control accuracy,a water level measurement and control system was designed with STC12 C5 A60 S2 single-chip microcomputer. The system uses MPX2050 sensor to measure the water level,the measured voltage signal is amplified and sent to the MCU,then using the serial port communication to send the water level data to the PC. At the same time,the upper and lower threshold of the water level can be set on the PC,which can be transmitted to the MCU to compare with the measured water level,and control the pump to work or stop so that to keep the water level within the setting range. The test shows that the system has high accuracy,quick response speed and high control precision.
作者
周佐
张兆基
ZHOU Zuo;ZHANG Zhaoji(College of Physics and Electromechanical Engineering,Hexi University,Gansu Zhangye 734000,China;College of Information Engineering,Xizang Minzu University,Shaanxi Xianyang 712082,China)
出处
《工业仪表与自动化装置》
2018年第2期90-93,96,共5页
Industrial Instrumentation & Automation
基金
河西学院校长基金项目资助(XZ2017012)
关键词
水位测量
水位控制
STC12C5A60S2单片机
串口通信
信号放大
water level measurement
water level control
STC12C5A60S2 microcontroller
serial port communication
signal amplification