Fell behind a series of questions which in view of the traditional water meter produced, the National Ministry of construction proposed the township dwellers housing “three manifested the household” request. Therefore the present domestic many water meter Manufacturer is carrying on the product new exploration, the majority uses the monolithic integrated circuit technology, intelligent water meter system’s practicability research oneself becomes one of current measuring appliance profession hot spots. This article introduces is one kind based on the MSP430F413 monolithic integrated circuit’s intelligent water meter’s design.
The present paper take the intelligent IC card water meter system as the object of study, has discussed with emphasis based on the MSP430F413 ultra low power loss monolithic integrated circuit’s on low power loss intelligence measuring appliance application and the development. The paper first proposed that uses the IC card technology intelligence water meter system’s overall project design; Has designed the systems control hardware circuit structure and has studied software control flow realization, uses method which the software and hardware unifies, to system’s low power loss, the anti-jamming design and the secure question has made certain analysis and the research.
MSP430F413 synopsis
TI Corporation MSP430 the F413 series monolithic integrated circuit is one kind of ultra low power loss composite signal controller, including a series of components, they in view of different application, but is composed of each kind of different module. They have 16 RISC structures, the CPU 16 registers and the constant generator enable the MSP430 micro controller to achieve the highest code efficiency. The nimble clock source may enable the component to achieve the lowest power dissipation. Numerical control’s oscillator (DCO) may cause the component to awaken rapidly from the low power loss pattern, in is smaller than 6μs in the time is activated to the normal working. The MSP430F413 series monolithic integrated circuit’s 16 timers are apply in the industrial control like ripple counter, the digitization motor control, the electric instrument, the water meter and the handhold measuring appliance and so on ideal disposition, its built-in hardware multiplier strengthened its function greatly and has provided with the software and hardware compatible scope, sharpened the data-handling capacity.
Intelligent water meter’s principle of work
This article designs intelligent water meter’s principle of work: The user purchases the IC card first (user card), and will carry the IC card to buy the water to charge workstation paying fee, the staff will buy information and so on water volume to read in the card. User when inserts the card in the IC card water outstanding place, in the IC card water meter the monolithic integrated circuit distinguishes the IC card password, after verifying and confirms unmistakably, after the card in buys in the water volume and the table surplus water volume adding together, (when primary use, surplus water volume is zero), reads in the IC card water meter’s memory, then control electricity valve clear valve water supply.
The user in the water used process, brings the magnetic induction impeller to rotate under the fluent impact, through magnetism transmission, leads the plum blossom gear-driven which on the table coats and causes the multipolar gear-drivens, realizes the machinery accumulation measurement, when measures 0.01m3 by is located at the 0.01m3 place measurement sensor to send out synchronized to the monolithic integrated circuit the measurement signal impulse, this time, MSP430F413 will input the effective impulse will include and calculates the water consumption, in the IC card water meter a surplus water volume corresponding reduction Measuring unit, the accumulation water consumption will increase a Measuring unit, on the LCD display monitor demonstrates the surplus water volume and so on related water used data. When the surplus water volume is lower than a quota (has one to establish good lowest surplus water volume value beforehand), the IC card water meter’s alarm system starts (buzzer to resound), the reminder user buys the water once more promptly to the water supply department, by now, on the LCD display monitor demonstrated “please buy the water” the inscription. When surplus water volume for - 1, the monolithic integrated circuit drives the dynamic electricity valve automatic shut-off, the cut-off water source, stops supplying water and reporting to the police. After the user buys Shui Duka stores, then opens the circular telegram valve water supply. In the normal condition, the valve is at the clear condition, when will meet the surplus water volume will be smaller than for - 1 or the battery voltage 3V and so on other peculiar circumstances the valve by the clear to become the off-position.
System project design
This article designs the intelligent water meter system mainly by the microprocessor, the flow sensor, the electrically operated valve, the IC card reads/writes, the LCD liquid crystal display and the power source and so on is composed,

Figure 1 intelligent water meter’s functional block diagram
Hardware structure drawing as shown in Figure 1.
1 system hardware’s design

Figure 2 system hardware functional block diagram
System hardware functional block diagram as shown in Figure 2.
① Power source low voltage examination electric circuit
This system uses three dry cell battery 4.5V to take the electric power supply, after using period of time, the dry cell battery will discharge, to guarantee the overall system, specially valve’s normal work, needs to carry on the real-time examination to the power source, when the electrical energy cannot satisfy the system request, will report to the police promptly the reminder user replacement battery, in order to avoid will create the nonessential trouble.
In order to enhance the intelligent water meter movement the reliability and the security, in the design uses the supply voltage real-time observation circuit. As shown in Figure 3. The voltage examination chip uses the Japanese Ricoh R3111H301C low voltage examination chip, the R3111H301C output voltage is 3.0V, the biggest operating current for 3.0μA, in ordinary circumstances’ operating current is only 1.0μA, the high accuracy integration, satisfies the system low power loss design completely the request. When the supply voltage is normal, the chip output foot outputs for the high level; When the supply voltage is smaller than 3.0V, outputs the foot to output the low level, namely P1.1 outputs the low level, P1.1 drops along the interrupt is effective, the monolithic integrated circuit examines when this signal namely changes over to interrupt service processing, by now the LCD liquid crystal display “traded the battery” the inscription, simultaneously the buzzer warning prompt user replacement battery, the MSP430F413 internal basic timer enables the interrupt, whether fixed time the 1s examination voltage does rise again, if the rise buzzer sends out a warning prompt once more, on the LCD liquid crystal “trades the battery” the demonstration inscription elimination. If has not risen again, then closes the valve, until the user replacement battery, only then once more opens the valve water supply. Because the MSP430F413 work uses electricity the pressure is 3.0V, therefore needs a voltage transformation chip to transform the 4.5V voltage 3.0V for MSP430F413 and other periphery module use, what in this electric circuit with is the RH5RL30AA- voltage regulation chip, it has the high accuracy output voltage, the operating current is extremely low only then 1.1μA.
② Pulse gathering electric circuit
In this system water meter’s base table uses conforms to ISO the 4064B standard rotor type cold water meter. This table counting mechanism and the primary element after the magnetic coupling transmission, use do the reed pipes sensor to measure to send a message, flows through when every time the 0.01m3 water produces a pulse. To prevent the multi-counting phenomenon which effectively each kind of possibility the disturbance vibration produces, in this design uses double does the reed pipes double pulse through is composed of the electric capacity and the resistance against shakes the electric circuit input monolithic integrated circuit counting, when two pulse input section has pulse input time in turn only then has an effective impulse counting, two pulses have the interlock function, P1.3 and P1.4 take the pulse input end. Inputs a pulse every time, subtracts the corresponding water volume in the memory. In the table is equipped with magnetism protective device, has the strong anti-outside magnetism disturbance ability.
③ Valve control electric circuit
The valve control is in the water meter control system a very sensitive part, the pass opens valve’s reliability to be bad, will give the water supply department to bring the very major problem. What this system uses is the electrically operated ball valve, working voltage 3V, when the work electric current only 50mA. In the design leads half ball valve clockwise or the reverse way using the direct current machine controls valve’s opening and the closure. Control valve’s pro and con rotation using MSP430F413 monolithic integrated circuit’s P6.6 and P6.7, (P1.6CA0, P1.7CA1) examines using the MSP430F413 interior comparator stops up transfers the electric current to control the electrical machinery movement. When electrical machinery normal work, CA0>CA1, once stops up the extension, the electric current increases rapidly, CAOUT=0, informs the MSP430F413 electrical machinery to change to the position. Whether the timer fixed time 1s examination electrical machinery does arrive, solves the valve closure unreliable problem effectively. When the forward end inputs the high level, when the reverse end inputs the low level, the valve opens; Otherwise, the valve closes. When the monolithic integrated circuit P6.7 mouth inputs the low level, the P6.6 mouth inputs the high level, the forward end (ON) outputs the high level, the reverse end (OFF) outputs the low level, when opens the valve, the opening arriving, inputs the detection signal by the monolithic integrated circuit P1.5 mouth, the movement stop; Otherwise, the forward end outputs the low level, the reverse end outputs the high level, closes the valve, similarly inputs the closure arriving detection signal by the monolithic integrated circuit P1.5 mouth.
2 system software’s designs
Figure 4 is the master routine flow chart. On after monolithic integrated circuit electricity replacement, the master routine uses the smooth execution the method, scans one by one from defines the flag bit one by one, inspects whether to have the movement occurrence, if has occurs changes over to corresponding subroutine processing, after processing, returns to the master routine, continues scans after that flag bit, finally enters the low power loss condition, the waiting next interrupt awakens, after awakening, similarly circulates, also enters the low power loss condition. Because various signals interrupt the way enters, therefore wants the special attention interrupt the priority and the interrupt nesting question. Uses modulation methods design each subroutine. According to the different function, has defined the different functional module. Is clear about the entrance export, the transfer relations, supply the transfer. The main software module includes: IC card read-write module, liquid crystal display module, measurement module, FLASH read-write module, low voltage protection module and so on. After on electricity, first carries on the initialization to the system. The initialization including to the interior storage location reset, the special function register sets at the starting value, the liquid crystal display establishment and so on. Then enters the main loop, the diagnosis, the supply voltage whether normal and so on, if all normal, then opens the valve water supply. Regardless in any situation so long as has the low voltage signal to appear, the system on the prompt undervoltage, the buzzer warning, liquid crystal display, prompts the user replacement battery: When the surplus water volume is lower than the setting value, the system liquid crystal display reminder user “please buy the water”, if the user has not bought the water to insert the card sufficient value promptly, when surplus water volume for negative, the systems control valve closure, stops the water supply.

Figure 3 power source low voltage examination electric circuit

Figure 4 system software design flow chart
3 system low power loss design
In the monolithic integrated circuit control system, system’s power loss often becomes the certain proportion relations with supply voltage’s size, the supply voltage is high, system’s power loss corresponding will also increase, therefore in the power loss request very strict intelligence water meter control system, under the guarantee function’s premise, will choose the low supply voltage as far as possible. In this system selects three alkalinity dry cell battery 4.5V power supply. This article designs intelligent water meter’s energy consumption mainly by three parts of constitutions: The first part is in the controller the monolithic integrated circuit (CPU) time the liquid crystal normal operation long-enduring energy consumption, this is the main power loss; The second part is the IC card water meter implementing agency (electricity valve) time the movement instantaneous energy consumption; The third part is the IC card water meter some auxiliary function like sound warning and so on energy consumption. Above intelligent water meter energy consumption’s first, second part have accounted for above total energy consumption 95%. Therefore, when design mainly considered: Chooses the low power loss motorized valve; Chooses the low power loss component (CMOS); Chooses the low working voltage and the low operating frequency; When software design chooses the low power loss the systems operation pattern.
4 system antijamming design
In this system the antijamming design considered from two aspects; first, takes the suitable measure in the hardware design to suppress with the interference elimination, for example uses the electromagnetic interference filter, as shown in Figure 5. On the other hand is takes certain measure from the system software design to sharpen system’s antijamming ability, even if the system receives the disturbance, can also the quick recovery on normal do automatically. For example: The reduced interrupt source, uses the method which as far as possible interrupts and inquires unifies, maintains. The possible short interrupt opening hour, along with to open along with the pass; Artificial inserts the spatial operational order in the procedure key’s place, protects CPU when to receive the disturbance, the procedure “the ball flies” the instruction is not broken up and so on software measures.

Figure 5 electromagnetic interference filter’s in system application
Concluding remark
The practice proved: This article designs the intelligent water meter speaks implements after the user “buys the water the first water used” administratively the pre-payment mode of administration, improves the traditional management pattern to a certain extent all sorts of malpractices, tallies with our country’s fundamental realities of the country, has the very strong suitable value.