(3) summary of the invention:
The present invention relates to the Automatic meter reading system of tap water supply pipe network, for recording user's water consumption.The system is by more
Number of elements is constituted according to the water meter of output, controller, intelligent telephone set, small, dedicated computer and main controller, intelligent telephone set and master control
Device is placed in the cabinet of building bottom wall, and small, dedicated computer can be loaded in cabinet and also be carried by administrator.Each water meter will
Measurement data sends controller to by half wave communication of power line, and user's water usage data of acquisition is passed through electric power by each controller
Half wave communication of line sends main controller to.When there is water meter failure or power outage, from main controller through intelligent telephone set to management
Member issues the audio alert signal solidified in the chips, so as to on-call maintenance or starts backup power source.The water meter example of data output
Such as: pulse exports water meter, ultrasonic water meter, electromagnetic flowmeter, so that every water meter is equipped with toggle switch, is both provided with volume
Number, controller timing is scanned registration to each water meter controlled, finds failure or is artificially moved away from system, which is remembered
It records and alarms to administrator.Each water meter and each controller and main controller are respectively mounted cycle discriminator circuit in device, for generating
The synchronization time of system keeps system acting consistent, while communications electronics switch, a switch are respectively installed in its telecommunication circuit
Drive module.Above-mentioned apparatus is connected on same electric power cable and is arranged master switch, and master switch is followed by rectifier diode, by city
The rectified diode of electricity is sent into system, and system is in minus half wave communication positive half-wave power supply state.Each water meter, controller and main controller
Communications electronics switch is connected in setting call duration time, conversely, main controller first sends switching command to each water meter and its controller,
Turn off communications electronics switch.
Each water meter and each controller and main controller, communication is by being controlled synchronization time to keep communication operation permanent one therebetween
It causes, the switch driving circuit of communications electronics switch is just connect diode and be further isolated from electric power cable after resistance is depressured
After the negative half-wave of cycle, it is connected to comparator input terminal, reference voltage is 100Mv to 200Mv, using diode drop through resistance
Partial pressure obtains, therefore the output end of comparator is square-wave signal, it produces corresponding power network after the isolating diode just connect
The positive square-wave signal of the negative half-wave of cycle, is connected to the I/O mouth of respective single-chip microcontroller, executes communication when single-chip microcontroller scanning is to positive square-wave signal
Operation, the positive square-wave signal are also used to that communications electronics is driven to switch, therefore communications electronics switch is turned off in cycle positive half-wave, week
It is connected when the negative half-wave of wave.Communications electronics switch is connected to single-chip microcontroller corresponding port according to used communication mode, and carries out signal condition,
When sign off under main controller control, make driving circuit shutdown communications electronics switch.
Cabinet installs an intelligent telephone set, main controller and small, dedicated computer.Main controller transmits alert data through I2C
To intelligent telephone set nonvolatile storage, intelligent telephone set is to pass through telephone network to send the voice solidified in the chips to administrator
Signal.Meter reading data is also sent to small, dedicated computer through RS232 by main controller, then from small, dedicated computer through internet to from
Water water supply administrative center summarizes.
The present invention utilizes the positive half cycle ascent stage of power network cycle, and three examination point realizations is taken to sentence the identification of cycle signal
It is fixed, recycle the cycle time to establish synchronization time, the synchronous operation of main controller and each water meter, each controller in realization system.
Main controller and each water meter, each controller cycle discriminator circuit structural schematic diagram as shown in Fig. 2, by two using stagnant
The voltage comparator composition of comparator is returned, includes filter circuit, the benchmark electricity of voltage comparator in each voltage comparator
Pressure is provided by voltage regulator circuit.Clock timer and synchrotimer is arranged in system.If detecting two adjacent cycle signals
It is very, then to take out the clock timer timing time between two adjacent cycle signal zero passages, when being sequentially stored in cycle
Between in storage unit, which can store 100 cycle times, the one cycle time of every deposit when being filled with,
The cycle time being stored at first is first removed, and calculates the average value Tz of the cycle time of deposit and saves, utilizes Tz value
Identify cycle signal to be identified, to reduce the influence of power network frequency fluctuation, while reducing erroneous judgement using three examination points may
Property.
Two comparators are respectively used to screen point 1, screen point 2, as shown in Figure 1.In the cycle of cycle positive half cycle ascent stage
At zero passage, that is, screen point 0 setting a voltage zero-cross detection module, it using cycle positive half-wave signal through electric resistance partial pressure, diode into
The clock end CLK of feeding d type flip flop after negative half period, signal condition is isolated in one step, and the Q of d type flip flop terminates single-chip microcontroller external interrupt
Mouthful, which is arranged to level triggers, the end the D ground connection of d type flip flop, and S terminates single-chip processor i/o mouth, usually sets for the I/O mouthfuls
1.When cycle positive half-wave zero cross signal arrives, cycle signal rising edge immediately after makes the end d type flip flop Q 0, outside single-chip microcontroller
Fracture low level in portion executes instruction in the interrupt service program to generate interruption: setting the 0, Central Shanxi Plain for described I/O mouthfuls and breaks, counts
When, described I/O mouthfuls set 1, open interruption.Remaining two comparator is separately positioned on the cycle positive half cycle ascent stage, crest voltage
The examination point 2 of the examination point 1 and 50% to 70% place at 35% to 50% place.
Cycle signal determining: for single-chip microcontroller after setting time opens interruption, clock timer resets and starts timing, works as cycle
When voltage zero-cross, the output voltage jump that d type flip flop in the voltage zero-cross inspection survey mould block ﹙ V0 ﹚ for screen point 0 is arranged in is become zero, and is produced
It is raw to interrupt, record its zero crossing break period Th0;Hereafter, the output electricity of electricity pressure comparator ﹙ V1 ﹚ at point 1 is screened in single-chip microcontroller scanning
Pressure, when all wave voltages reach to ﹙ V1 ﹚ threshold voltage when, output voltage jumps from high to low, scanning record its bound-time Th1;
Same scanning record screens electricity at point 2 and presses comparator ﹙ V2 ﹚ output voltage bound-time Th2, and Th0 and voltage zero-cross are detected mould
The output voltage bound-time setting value Ts0 of Kuai ﹙ V0 ﹚ makes comparisons;The output voltage bound-time of Th1 and electricity pressure comparator ﹙ V1 ﹚
Setting value Ts1 and Th2 makes comparisons respectively with the output voltage bound-time setting value Ts2 of electricity pressure comparator ﹙ V2 ﹚, if
Within the scope of allowable error, then otherwise it is false that the discriminator signal detected, which is true,.When above-mentioned judgement discriminator signal is true, calculate
When clock timer timing between cycle signal zero passage when this cycle signal zero passage and an adjacent preceding discriminator signal are true
Between Tzu, it is made comparisons with the average value Tz of cycle time, if be no more than setting cycle time error Tzv if cycle signal
It is very, at this moment to save Tzu and 20ms is taken to be added with synchrotimer timing time, in the value deposit synchrotimer that will add up.
When clock timer starts timing with cycle voltage zero-cross, then timing to 16ms opens the break period between 18.5ms
Open interruption when setting value Tk, the Central Shanxi Plain is disconnected when clock timer timing to 25ms is to pass break period setting value Tn between 27ms.
After system boot, clock timer starts timing, and when detecting first cycle voltage zero-cross, setting is being screened
The output voltage jump that the voltage zero-cross Jian of point 0 surveys Mo Kuai ﹙ V0 ﹚ takes out the time of cycle voltage over zero to generate interruption
T0 is saved, and clock timer is reset to and started timing, and at this moment cycle time voltage crosses zero Th0 is 0, while single-chip microcontroller is by above-mentioned
Method scans and determines discriminator signal.What it is due to detection is first cycle, and clock timer is opened in cycle voltage zero-cross
Beginning timing, the value of Th0, Th1 and Th2 must subtract open the difference of break period setting value Tk plus cycle time 20ms, such as
Three discriminator signals of fruit are that very, the time T0 of the cycle voltage over zero of taking-up is stored in synchrotimer as initial time,
I.e. opening the break period for the first time takes Tk next time.It otherwise is fictitious time, the clock timer time must add T0 at this time, continue to test.
When detecting first and adjacent second cycle voltage zero-cross, due to not saving the cycle time of detection,
Therefore the clock timer timing time twice between cycle signal zero passage is made comparisons with cycle time 20ms, determines cycle signal
Then it is that the difference for taking 20ms to subtract Th0 is added with synchrotimer timing time when being true, i.e., saves the standard cycle time for the first time
20ms need to deduct its Th0 value, this is because when hereafter detecting that cycle signal is true every time, when opening interruption by clock meter
When device reset after restart timing, and be that the standard cycle time is included in synchrotimer when opening interruption, open interruption
Clock timer is reset afterwards, otherwise determines that cycle signal is fictitious time, and the clock timer time must add T1=T0+Tk at this time, after
It is continuous to detect first cycle again according to the above method.After detecting first cycle signal is very, restore above-described cycle
Signal determining.
As shown in Figure 1, if detect cycle signal be it is false, open the break period next time and open the break period at this
Afterwards, open interruptions when average value Tz through the cycle time that is delayed, and open interrupt after be delayed Tns when the Central Shanxi Plain it is disconnected, when the setting Central Shanxi Plain is broken
Between be when cycle signal screen point 0 when do not generate interruption, at this moment must be in the setting time point more than Ts0 allowable error range
Start to scan, and when scanning examination point 1 and examination point 2, voltage comparator output voltage does not generate jump, all breaks in the Central Shanxi Plain
The time Tns Central Shanxi Plain is disconnected and stops scanning, Tns are as follows:
Tns=Tn-Tk
If detecting that cycle signal is very, next cycle opens break period Tks are as follows:
Tks=Tk+Th0
I.e. from being opened after the break period takes Tk for the first time, clock timer is that timing to Tks opens interruption, and weight after resetting
New to start timing, the Central Shanxi Plain is broken when Tns is arrived in timing, to make the synchrotimer time by the correction of cycle time voltage crosses zero.
It repeats the above process.If the upper cycle signal detected is that very, when this cycle determines, discriminator signal is
Vacation, or the cycle time detected is more than setting cycle time error Tzv or clock meter compared with the average value Tz of cycle time
When device timing to when closing break period setting value Tns, voltage zero-cross inspection is surveyed mould block ﹙ V0 ﹚ output voltage and is not jumped, does not generate
Disconnected, then when Tns is arrived in clock timer timing, the Central Shanxi Plain is disconnected, at this moment remembers and does not count cycle N 1 and to store, when opening interruption next time
Between be to open the break period in last time to open interruption after Tz, hereafter every time determine the cycle signal true and false, if false or this detection
Though discriminator signal is true but last time is vacation, then N is taken, will be restored after N+1 in memory, clock timer not reset after opening interruption
Continue timing, at this moment, next cycle of setting opens the break period and temporarily uses out break period interim setting value Tkz instead:
Tkz=(N+1) × Tz
Meanwhile next cycle pass break period temporarily uses instead and closes break period interim setting value Tnz:
Tnz=Tkz+Tns
When clock timer to after Tkz, the time that point is screened in scanning can be obtained by simple computation.If at this moment examined
Measuring cycle signal is very, then to take out N in memory and save, and by N zero setting in memory, make clock timer clocking value Ts
Are as follows: at this moment (Ts-Tkz) → Ts takes the value of (N+1) × 20ms to be added in synchrotimer, and restore using setting value Tks with
Tns, recovered clock timer are reset after opening interruption.
System synchronization time is the time of synchrotimer, along with currently just in the time of the clock timer of timing.
When determining to screen the point signal true and false, Th0, Th1, Th2 are by setting with voltage comparator output voltage bound-time
Definite value Ts0, Ts1, Ts2 make comparisons see it is whether overproof, come determine screen point a signal true and false, can choose: Th0, Th1, Th2 are
It is true that the cycle discriminator signal, which is true or Th0, when true, while when one of Th1, Th2 are true or when Th1, Th2 are true, should
Cycle discriminator signal is very, depending on to determining that cycle signal true and false difference requires.
If system fault, when N be greater than 25 to 70 between a setting value when, due to main controller in system and each water
Table, each controller, the Tz value and N value of detection may be different, and at this moment, power network frequency accumulated error may cause synchronometer
When the device time corrected when can not be by detecting true cycle signal, when it is true for detecting cycle signal, using clock
Clocking value of the timer at Tkz is directly added in synchrotimer, and to reduce the asynchronous time of system, power network is normally transported
N is much smaller than 25 in the case of battalion.
The cycle time error Tzv of permission and the flip-flop transition setting value of voltage comparator output voltage, by test assessment
Its average value is taken to obtain.