The content of the invention
The defects of present invention is directed to prior art, proposes a kind of NFC radio frequency CPU cards intelligent gas meter.
A kind of NFC radio frequency CPU cards intelligent gas meter, is made up of master control borad and NFC radio-frequency modules;
The master control harden structure is as follows:First single-chip microcomputer respectively with liquid crystal display drive circuit, external data storage circuit,
Real time clock circuit, flow pulse collection and magnetic protection interface circuit, power-off reset protection circuit, valve driving interface circuit,
Button shows and swiped the card control logic circuit, NFC radio-frequency module communication interface circuits, MCU DLLs circuit and power management
Module is connected, and power management module is connected with power supply;
The external data storage circuit is used for permanently storing for control system critical data;
The real time clock circuit is used to be history with destiny evidence, gas price adjust, inspection comdemning period and ladder gas price carry by force
For clock foundation;
The button show and swipe the card control logic circuit be used for control button show the time and triggering NFC radio-frequency modules open
Start building to make;
The NFC radio-frequency modules communication interface circuit is realized with NFC radio-frequency modules by connector or cable and communicated;
The NFC radio-frequency modules structure is as follows:Second singlechip respectively with NFC wireless transmitter receiver circuits, power supply, master control
Plate data communication interface circuit is connected;NFC wireless transmitter receivers circuit carries microstrip antenna with pcb board and is connected;NFC wireless transmissions connect
Circuit is received respectively with power supply and main control board data communication interface circuit to be connected;
The main control board data communication interface circuit is used to realize the data interaction between the first single-chip microcomputer and second singlechip;
The NFC wireless transmitter receivers circuit is used to realize to be interacted with second singlechip non-contact data.
The flow pulse collection and magnetic protection interface circuit are sampled from open type reed capsule dipulse flow signal, magnetic
Protection and no pulse protection.
First single-chip microcomputer is MSP430F series monolithics;The second singlechip is MSP430G series monolithics.
The power management module includes power-fail detection circuit, low power testing circuit, mu balanced circuit and high tension protection circuit;
Power-fail detection circuit, low power testing circuit, mu balanced circuit are connected with the first single-chip microcomputer respectively, high tension protection circuit ground connection.
The high tension protection circuit is using Transient Suppression Diode 5KP series and overcurrent protector BK series.
Beneficial effects of the present invention:The NFC radio frequency CPU cards intelligent gas meter of the present invention is in non-working condition condition ShiShimonoseki
Screen, spread its tail automatically during use, save electricity, resistance high voltage capability is strong, and safety coefficient is high, and circuit voltage is stable, and reading is supplemented with money
Numerical value and modification numerical value are convenient, reliably.
Embodiment 1
A kind of NFC radio frequency CPU cards intelligent gas meter, is made up of master control borad and NFC radio-frequency modules;
As shown in figure 1, the master control harden structure is as follows:First single-chip microcomputer respectively with liquid crystal display drive circuit, external number
According to storage circuit, real time clock circuit, flow pulse collection and magnetic protection interface circuit, power-off reset protection circuit, valve drive
Mobile interface circuit, button show and swiped the card control logic circuit, NFC radio-frequency module communication interface circuits, MCU DLL circuits
It is connected with power management module, power management module is connected with power supply;
The power management module includes power-fail detection circuit, low power testing circuit, mu balanced circuit and high tension protection circuit;
Power-fail detection circuit, low power testing circuit, mu balanced circuit are connected with the first single-chip microcomputer respectively, high tension protection circuit ground connection.
First single-chip microcomputer selects MSP430F series monolithics, has ultra low voltage and super low-power consumption, is suitably applied
Using the battery powered environment that works long hours, using 16 reduced instruction sets, there is flexible power-supply management system, when more
Clock pattern and serial onboard programming, are integrated with 16 bit registers and constant generator, and code efficiency is high, and embedded digital control is shaken
Device DCO is swung, the μ s of conversion time 3 ~ 6 is waken up, is designed with 16 bit timing devices, comparator, segment encode lcd driver and general purpose I/O draw
Pin.
The power supply is from the general dry cell power supply of AA types that use cost is cheap and easily buys, design service life
More than 1 year, operating voltage DC6V(DC1.5V x 4).
The external data storage circuit(EEPROM)For permanently storing for control system critical data, use
CAT24WC series, I2C communication modes, data retention cycle is more than 100 years, effective erasable more than 100,000 times, circuit work
Power supply is controlled by single-chip microcomputer mouth line, usually in non-powering state, to prevent the improper rewriting of data and saving system power dissipation.For
It is easy to product maintenance, using the pluggable encapsulation of DIP8, facilitates system data to shift.
The mu balanced circuit(LDO)Using Seiko S-812C series cmos voltage voltage-stablizers, DC3V is provided for control circuit
With DC3.3V power supplys, S-812C series LDO voltage stabilizers have the spies such as high withstand voltage, super low-power consumption, low voltage difference and larger output current
Point, it is adapted to require that low power consuming product uses.
The low-voltage detection circuit uses Seiko S-808 series high-accuracy voltage detectors, has low-power consumption(1uA),
High accuracy(5%)And the features such as low cost, the circuit provide DC3.6V and DC4.5V two and keep off battery low power testing, it is ensured that control electricity
The stable power work environment in road.When battery electric quantity deficiency, battery low-voltage signal, the first monolithic are sent to the first single-chip microcomputer
Machine preserves data to EEPROM, closes valve, send alarm indication instruction after useful signal is received.
The power-fail detection circuit completes the detection of power-off signal, and single-chip microcomputer preserves data after useful signal is received
To EEPROM, valve is simultaneously closed off, sends alarm indication instruction.Emphasis is needed to consider that solving battery power down shake is likely to cause
System disorders and random number problem.
The high voltage protection circuit(ESD)Using Transient Suppression Diode 5KP series and overcurrent protector BK series, prevent
Only impact of the high voltage such as electrostatic to control system.
The MCU DLLs circuit:The circuit can repeat without applied voltage to single-chip microcomputer FLASH program areas
Programming, it is easy to the program renewal after design phase production debugging and batch production.
The NFC radio-frequency modules communication interface circuit can realize carrying out shake communication by connector or cable with radio-frequency module,
Interface defines 6 line systems, including DC3V and ground wire, 4 SPI serial communication bus.Realize radio-frequency module MCU and main control board
Data interaction between MCU, complete the reading to radio frequency CPU card and NFC device and return to write.
The liquid crystal display and drive circuit(LCD):Liquid crystal display uses segment code type single color display screen, for showing maximum
99999.99 digital information(Such as:Surplus, cumulative amount, unit price value and arrange parameter etc.)And fixed character field(Such as:It is " surplus
It is remaining " " accumulative " " low electricity " " owing amount " " mistake card " " pass valve " " protection " " member " etc.), drive circuit use built in single-chip microcomputer LCD drive,
Special mouth line is shown by configuring I/O offers LCD.
The real time clock circuit(RTC)From SD2403AP real-time timepiece chips, and it is equipped with specialized lithium Asia battery
ER14250H, Theoretical Design life-span reach more than 15 years, disclosure satisfy that gas meter, flow meter service life requirement in 10 years, real-time clock master
To be adjusted for history with destiny evidence, gas price, strong inspection comdemning period and ladder gas price provide basis of time.
The flow pulse collection and magnetic protection interface circuit are from the sampling of open type reed capsule dipulse flow signal, magnetic
Protection and no pulse protection, pulse equivalency 0.1m3/P, projected life, more than 500,000 times magnetic fluxs broke, and dipulse metering can solve
More enumeration problems caused by certainly easily there is shake in pulse metering.
The power-off reset protection circuit:First single-chip microcomputer operating voltage is in zero boundary operating point(Minimum operating voltage is attached
Closely)When, I/O port status is likely to be in abnormal condition, so that influenceing peripheral circuit produces malfunction, causes system random
Number, fall the problems such as number and deadlock.To avoid the generation of this phenomenon, circuit design is realized to the first monolithic using voltage checking chip
The pressure of machine reseting pin drags down, i.e., some value between critical point and low voltage point is by single-chip microcomputer forced resetting, to protect
Data reliably preserve before protecting system power down, can also meet the requirement of the first single-chip microcomputer electrification reset in addition.
2 kinds of schemes can be selected in the valve driving interface circuit, and scheme one is transistor coupling control circuit, it is possible to provide super
500mA two way valve driving current is crossed, valve is pass type valve using the two-way no stall of electromechanical integration, and reliable open and close are secondary
Number is more than 8000 times, and running current is less than 50 mA.Scheme two uses special valve driving chip, it is possible to provide exceedes
1200mA two way valve driving current, level combinations are provided to driving chip by configuring 2 delivery outlets of single-chip microcomputer.
The button control logic circuit effect that shows and swipe the card is not only single display inquiry, due to radio-frequency module electricity
The operating current on road is larger, opens radio-frequency module for a long time by the very big service life for shortening battery, therefore design uses button
Logic of swiping the card can effectively avoid the generation of problem above, while also can guarantee that the ageing and stability of wireless card reading.
As shown in Fig. 2 the NFC radio-frequency modules structure is as follows:Second singlechip is electric with NFC wireless transmitter receivers respectively
Road, power supply, main control board data communication interface circuit are connected;NFC wireless transmitter receivers circuit carries microstrip antenna with pcb board and is connected;
NFC wireless transmitter receivers circuit is connected with power supply and main control board data communication interface circuit respectively;
The second singlechip(MCU)It is the mixed signal processing based on 16bit RISC for MSP430G series monolithics
Device, aim at meet super low-power consumption, Ultra Low Cost demand and design.Highest dominant frequency reaches as high as 16K up to 16Mips, Flash
Bytes, RAM reach as high as 512 Bytes, minimum encapsulation TSSOP14.
The power supply is derived from the DC3V of master control borad, and the supply voltage is controlled by master control borad single-chip microcomputer, only when master control borad is examined
Measured button swipe the card input signal when, just this power supply control is opened, the term of validity is the liquid crystal display time, and liquid crystal display terminates
Shut-off power supply afterwards.
The main control board data communication interface circuit realizes carrying out shake communication by connector or cable and master control borad, and interface is fixed
Adopted 6 line systems, including DC3V and ground wire, 4 SPI serial communication bus.Realize between radio-frequency module MCU and main control board MCU
Data interaction.
The NFC wireless transmitter receivers circuit is that the radio frequency chip CV520 realizations based on NXP are set with radio frequency CPU card or NFC
Standby non-contact data interacts, and CV520 is the contactless read-write chip of a low-voltage, low cost, small volume, working frequency
13.56MHz, supports TypeA the and MIFARE communication protocols of ISO/IEC 14443, and effective communication distance is less than 20mm.
The pcb board carries microstrip antenna and NFC wireless transmitter receivers circuit in same circuit board, exempts from feeder line connection, rectangle
Micro-strip designs, and is made up of 4 circle induction coils, frequency 13.56MHz, distance of reaction is less than 20mm.
The logical flow chart of above-mentioned NFC radio frequency CPU cards gas meter, flow meter work is as shown in figure 3, it can be implemented function such as:
(1)Non-contact radio-frequency CPU card prepaying charge, using the stored value card and CPU card for meeting financial PBOC2.0 standards
Encryption logic and multi-zone supervision issuing mechanism, it is the new all-purpose card system schema with highest safe class.
(2)Compatible NFC function, it is adapted to newest intelligent handheld device near field communication standard, supports the Third-party payment side of supplementing with money
Formula.
(3)The storage of history destiny evidence, can the most long accumulation gas consumption for preserving 24 months.
(4)Ladder support gas price function, algorithm, which includes, uses gas peak valley ladder and period dosage ladder, and the wherein period is used
Amount ladder can realize that 2 sections 3 grades set the maximum 6 grades of ladder gas prices of combination.
(5)Prevent dead table function, there is 2 grades of dead table protections, the corresponding different grade that decontrols of every grade of protection.
(6)Strong inspection sets function, can according to demand set and enable good general's function of periodically registering one's residence, and the strong pre- prompting of inspection, exceeds the time limit to protect
Shield.
(7)Unit price is measured, amount balance, and prestore the amount of money and existing unit price in table, and button gas equivalent is held by unit price conversion in table
OK.
(8)Default price adjustment function, new gas price can be preset by subscriber card and price adjustment card and enable the date, there is hysteresis price adjustment
Tracing function.
(9)Exceed the time limit to scrap function, table tool service life can be set, expire pre- prompting, exceeds the time limit to use mandatory protection.
(10)Button function of swiping card, meet that system low-power consumption designs, radio-frequency module is chronically at off working state, only pressed
Power-up work before liquid crystal display terminates after key, the validity and stability of the communication that can ensure while low power consuming to swipe the card.
(11)Subscriber card data, which are returned, writes acquisition function, and table tool system data can be returned by subscriber card and data collecting card to be write
Management system, it is easy to analysis gas situation and table to have maintenance.Design logic is to purchase gas after must being swiped the card on the day of user purchases gas, is otherwise managed
Gas writing operation is sold in the limitation of reason system, is returned with to reach user data and is write ageing requirement.