Design and Application Of Corrosion Intensity Checking System
摘要:介绍了89C52单片机的防腐监测仪的设计开发过程。介绍了一个对微电流进行采集、转换、显示、储存的一套完整系统。该系统的工作原理是首先通过传感器采集微电流信号,再进行放大后送到A/D转换芯片中进行模数转换得到对应的数字信号,利用AT89C52单片机对此信号进行处理,结合按键输入,在液晶显示屏上实时显示当前的腐蚀电流以及对应的腐蚀度,同时判断检测卡槽是否有卡,在有卡的情况下,利用I2C串行通讯技术每隔一分钟将数据送入IC卡进行存储,实现对一段时间内微电流的监测。最后通过基于VB的上位机系统读卡,把IC卡里的数据导入计算机存档。该系统实际应用效果良好。
关键词:实时显示;I2C串行通信;微电流;上位机
Abstract:It introduces a corrosion intensity checking system, which collects the weak corrosion current and then converts, displays and stores it. Firstly, it collects the weak current by a current sensor, and then amplifies it. Secondly, the amplified signal is converted to the digital signal by the A/D converter, which is processed by AT89C52.Thirdly, the present current and its corresponding corrosion degree is displayed on the LCD screen real-time. Meanwhile it will detect whether there is an IC card. If so, it stores the data into the E2PROM based on the I2C serial communication technique. Thus the weak current in a period can be supervised. Finally, Super-computer based on VB is in communication with Smart Card Reader, and the data in the card can be read and stored on the computer. The following paper mainly depicts the design and development of the corrosion intensity checking system. The effect that system reality is applied is fine.
Keyword: Real-time,I2C serial communication technique,Weak Current,Super-computer
0 引言
本文介绍的腐蚀仪是为了监测野外输油管道腐蚀度而设计的,由于输油管道的腐蚀度影响到石油的生产,会造成经济损失和安全事故,故对其腐蚀度的监测是非常必要的。本系统中,可以通过检测管道里的微电流,然后通过输入经验参数来换算出管道当前的腐蚀度,并通过上位机程序把数据存档,绘制腐蚀度变化曲线图,以便操作人员可以直观的了解输油管道的腐蚀变化情况。
1 总体方案设计
1.1 设计总体构成方案
设计主要由下位机和上位机两个部分组成。下位机以单片机为核心,运用程序控制来进行电流的采集、处理、显示,并将有关数据存储到IC卡。上位机则是通过计算机与Q系列接触式IC卡读写器之间进行的串口通信,将IC卡里的数据导入计算机。
其下位机系统框图如图1所示。