Application of RF Card Technology in Digital Prepaid Meter System

Pick    To: This paper introduces a digital prepaid meter system based on RF card, and gives the hardware and software structure of the digital meter.

introduction

The RF card is a non-contact smart IC card. It is a new technology developed in recent years. It transmits data by radio waves without the electrical contacts of the contact IC card. Therefore, compared with the traditional The contact IC card has the advantages of high reliability, long life, and the like, and has been widely used.

We designed a prepaid digital watt-hour meter using ATMEL 's TEMIC series 125kHz RF card read/write base station chip U2270B .

System composition

The whole system consists of three parts: meter management system, RF card, and RF card prepaid digital meter. The meter management system is used by the electricity management department to issue electricity meter RF cards to users, purchase cards for users, and purchase information for users. The system consists of a microcomputer, an electric meter management software, a radio frequency card reading and writing device for electric meters. The functions it completes are: initialization of the radio frequency card of the meter, which can set, clear, change the password, write the pre-purchased power of the user into the user card, and write the newly purchased electric power number into the database. The maintenance of the meter RF card database includes inquiry, deletion, transfer and printing.

The RF card is used to record information such as the user serial number, the pre-purchased power, and the operating parameters of the distribution meter.

The prepaid meter supplies power to the user according to the pre-purchased power of the user, and accurately records the user's power consumption. When the user pre-purchases the power amount to be used up, the alarm message is sent. If the user does not re-purchase the power within the specified power range, The meter will automatically cut off the user's power until the pre-purchased power is written to the RF card again and is confirmed to resume power.

Figure 1   RF card read and write circuit diagram

 

Figure 2   Electric meter block diagram

Hardware composition of RF reading and writing system

There EEPROM 264bit in series TEMIC RF card, it is divided into 8 (block). In block 8, Block0 is a control block for controlling the various operating characteristics of the card, such as: synchronization signal, coding, baud rate, data stream length, and the encrypted passwords off function enabled wake-up and the like; block1 ~ bloc6 It is a user block for storing user data and information; block7 is a password block, and can be used as a user block if the encryption function is not enabled.

The system sets the base station to work at a carrier frequency of 125 kHz , adopts the transmission baud rate of RF/32 , Manchester coding, and uses the Sequence Terminator synchronization signal to cyclically transmit the data of block1~block6 . In this mode of operation configuration, the bit clock period is ms = 256ms .

This system selects AT89S52 single-chip microcomputer as the main control module, and together with TEMIC series RF card reading and writing module, serial communication module and sound and light prompt circuit, it constitutes a TEMIC series RF card reader system. The system hardware circuit is shown in Figure 1 .

The base station antenna needs to be wound by the user. Generally, the copper enameled wire is wound around a diameter of 3 cm and 150 turns, and the inductance value is 1.35 mH .

The carrier frequency fosc is typically 125 kHz and can also be set by the user. This frequency is determined by the current flowing into the RF (15) pin, so this frequency can be changed by adjusting the values ​​of the current- limiting resistors Rf1 and Rf2 between the RF (15) and VS (14) pins. Calculated as follows:

Rf1+Rf2=k Ω

When fosc = 125 kHz , Rf1 + Rf2 = 110k Ω.

The base station reads in the 125 kHz carrier-modulated signal from the RF card . It is capacitively coupled to the INPUT (4) pin through the CIN capacitor , after passing through the low-pass filter, amplifier, and Schmitt trigger, at OUTPUT(2). The pin outputs the demodulated signal. The cutoff frequency of the low pass filter is determined by fosc , which is typically fosc/18 . The coupling capacitor CIN of the INPUT pin and the decoupling capacitor CHP of the HIPASS (16) pin determine the high-pass characteristics of the demodulation circuit, which helps to further eliminate the interference signal. The values ​​of CIN and CHP vary according to the data transmission baud rate of the RF card. The baud rate is fosc/32 : 680pF and 100nF respectively . The relationship between CHP and the lower cutoff frequency is as follows:

Ri = 2.5k Ω. It should be noted that the signal output from the OUTPUT pin is only demodulated and not decoded. The decoding task is completed by the MCU programming.

Prepaid electric meter hardware structure and software

Figure 2 is a block diagram of the digital RF card prepaid meter.

The meter circuit uses the high-precision energy metering chip AD7755 , which uses pulse output to measure power. In the AD7755 , only the A/D converter and the reference circuit use analog circuits. All other signal processing ( such as multiplication and filtering ) uses digital circuits to ensure stability and accuracy under various extreme environmental conditions. The device has the following features: high precision, support 50/60HZ International Electrotechnical Commission 521/1036 standard, the error within the dynamic range of 500: l is less than 0.1% ; AD7755 provides average real power at the frequency output terminals F1 and F2 ; high output The CF provides instant power and can be interfaced to the MCU ; the programmable gain amplifier in the current channel facilitates interface with the sensor; on-chip power supply monitoring. The pulse output of the CF terminal of the meter is optically isolated and connected to the I/O port of the microcontroller . Its interface circuit is shown in Figure 3 .

The display part is displayed by a 4 -digit LED digital display tube. In the dynamic display mode, four LEDs are turned on in turn, each bit is kept for 1ms , and the light is repeated again after 10ms . In order to extend the use of LEDs , the display and control of the digital display tube is directly driven by the I/O port of the microcontroller .

The RF card read/write part circuit is substantially the same as the RF card read and write unit of the above-mentioned power selling system.

The user power cut-off circuit adopts a magnetic holding relay and its driving circuit, and the IO port of the single chip is matched with the on and off, and the circuit has a very low misoperation rate.

The power circuit is divided into two ways, one for the meter head, one for the single-chip microcomputer and the circuit it controls. They are respectively obtained by 220V AC power transformer, rectification, filtering, and voltage regulation. The two power supplies are independent and not shared. .

Figure 3   Header interface circuit

Figure 4   Main monitor flow chart

Figure 4 shows the main monitor program flow. When the system power-on reset is initialized, the password, power, and other data in the EEPROM data memory EEPROM are read first , and the following functions are implemented:

When the meter is working, the external interrupt service routine is executed as soon as an external interrupt occurs. The interrupt service program completes the pulse counting and the electricity metering function. Each time the interrupt is entered, the software pulse counter is incremented by 1. When the count value reaches the standard count value, the power-on flag is set and the interrupt program is exited. After the main monitoring program finds that the power-off flag is set, the used power is deducted from the total power.

Conclusion

The digital RF card prepaid meter system introduced in this paper is designed in strict accordance with the requirements of productization. The high-performance energy metering chip AD7755 is used as the energy measuring unit. The system circuit is simple and economical. This system has been applied in the sales system of a non-contact IC card prepaid meter in Wenzhou . The practical application shows that the system can meet the design requirements in terms of accuracy and reliability. The system runs well and has high reliability. .

LED Shoebox Light

Shoebox Light,LED Shoebox Light,Shoebox Light Fixture ,Flood Lights

LED light Co., Ltd. , http://www.nbroadlight.com