IC卡燃气表的设计
摘要:本文设计了一个智能IC卡燃气表,IC卡燃气表在正常工作时可以通过控制电路对天然气的流量加以控制,也可以随时通过IC卡燃气表自身的显示器查询剩余的燃气金额。当燃气用户的剩余燃气金额低于一个警报值或者剩余的燃气金额为零时,IC卡燃气表将会产生声音警报提醒燃气用户进行缴费。本文的设计采用单片机中的AT89C52芯片为处理器核心,当IC卡插入IC卡燃气表,经过IC卡检测系统检测通过后,IC卡燃气表通过单片机的控制系统正常运作。流量传感器将通过的燃气流量计算得出一个电流值,再传送给I/V转换器得到需要获得的电压信号。电压信号再经过A/D转换器转换之后,将会以数字量的形式储存在于单片机AT89C52的存储单元中。被累计的量值将会与设定的数值一定存在一些相差的数值,这样需要系统经过一次PID调节,将调节的信息重新传送给单片机AT89C52的储存单元中。最后由单片机AT89C52发出控制信号控制IC卡燃气表的运行还是关闭。
关键词:燃气表;IC卡;单片机
Design of IC Card Gas eter
Abstract:This paper designs a intelligent IC card gas meter, IC card gas table in normal work can through the control circuit of the gas flow controlled, also can at any time through the IC card gas meter’s display query of the gas remaining amount. The IC card gas meter will generate a sound alarm to remind the gas user to pay when the amount of gas remaining gas is less than one alarm value or the remaining amount of gas is zero. In this paper, the design using microcontroller AT89C52 chip as the core processor, when the IC card is inserted into the IC card gas meter, after through the IC card detection system, IC card gas table through the normal operation of the system controlled by single chip microcomputer. Flow sensor will calculate the gas flow through a current value, and then transmitted to the I/V converter to get the need to get the voltage signal. After the voltage signal is converted by the A/D converter, it will be stored in the storage unit of the single chip microcomputer AT89C52 in the form of digital quantity. The amount of value will be accumulated with the set value must exist some difference between the value, so that the system needs to be a PID adjustment, the information will be adjusted to re transfer to the microcontroller AT89C52 storage unit. In the end, the control signal is sent out by the single chip microcomputer AT89C52 to control the operation of the IC card gas meter.
Key words: Gas meter IC card Singlechip
目录
1.2 国内发展现状及发展动态……………………………….. 2
1.3 国外发展现状及发展动态……………………………….. 2
第2章 智能IC卡燃气表的总体设计方案及原理……………………. 4
2.1 IC卡燃气表的设计方案………………………………… 4
2.1.2 智能IC卡燃气表的控制算法………………………. 5
2.2 IC卡燃气表的原理及功能……………………………… 5
2.3 IC卡燃气表系统结构………………………………….. 5
第3章 智能IC卡燃气表系统的硬件组成………………………… 8
3.1 传感器的功能及其技术参数…………………………….. 8
3.2(RCV420)变换器的设计………………………………… 9
3.3 A/D转换器的设计…………………………………… 10
3.4 TLC549与89C51芯片的连接方法……………………… 11
3.5.1 AT89C52芯片及片内功能…………………………. 11
3.5.2 AT89C52各引脚功能…………………………… 12
3.6.1 AT24C02内部芯片结构及使用方法………………… 14
3.6.2 AT24C02与单片机的连接……………………….. 14
3.7 LCD显示部分…………………………………….. 15
3.7.1 LCD显示及显示器接口…………………………. 15
3.7.2 显示器与单片机的连接………………………….. 15
3.11 IC卡读写器……………………………………….. 18
3.12 电磁阀控制电路…………………………………….. 18
第4章 智能IC卡燃气表的软件设计……………………………. 21