(3) content of the invention:
The present invention relates to a kind of warehouse humiture information acquisition system, by multiple humiture collectors and a main controller structure
Into each position sets a humiture collector in warehouse, and each humiture collector includes one or several humitures pass
The temperature-humidity signal of sensor, humiture collector recording synchronism time and its collection is simultaneously converted into data signal, in the same of setting
The step time sends main controller processing to, is easy to determine certain time point warehouse environment parameter using lock in time record.Each humiture
Acquisition Instrument and main controller are connected on same electric power netting twine and set master switch, and an electronic switch is installed after master switch,
Main controller AC power is connected between electronic switch and master switch, and in the telecommunication circuit of main controller and each humiture collector
In each one communications electronics switch of installation, the ac power input end of each humiture collector sets insulating electron to switch.
Communication synchronization time, main controller shut-off electronic switch simultaneously connect its communications electronics switch, and each humiture collector is also in setting
Lock in time of communication or when not receiving grid cyclic wave signal, connect respective communications electronics switch, shut-off insulating electron switch,
Communicated by electric power netting twine, after sign off, turn off all communications electronics switch, then connect electronic switch and insulating electron is opened
Close, at this moment, synchrotimer restarts timing after resetting and corrected, and to keep system synchronization, and remembers time synchronisation
Accumulated value.Communication period is powered by the rechargeable battery for being connected to microcontroller power supply filter capacitor, and whole with original through diode
Current circuit is isolated, and the charging circuit of rechargeable battery, possesses charging protection function.
The panel of each humiture collector is equipped with 3 to 5 LED modules with different colors, humiture collector after firm start one
Section setting time, sequentially show LED modules with different colors combine (such as:Red, green, blue, red green, bluish-green, red blue, RGB), each group
Conjunction is corresponding with the number of numbering, and when selection shows LED modules with different colors combination, shutdown obtains corresponding numbering and preservation, it
It is in the numbering period when can't detect grid cyclic wave signal, numbering data are stored in by single-chip microcomputer by the energy storage of its power capacitor
In nonvolatile storage.
The present invention utilizes the positive half cycle ascent stage of power network cycle, takes three to screen point and realizes that the identification to cycle signal is sentenced
It is fixed, recycle the cycle time to establish lock in time, realize the synchronous operation of main controller and each humiture collector in system.
The cycle identification circuit of main controller and each humiture collector is as shown in Fig. 2 by three using hysteresis loop comparator
Voltage comparator forms, and filter circuit is included in each voltage comparator, the reference voltage of its voltage comparator is by voltage stabilizing electricity
Road provides.System sets clock timer and synchrotimer.If it is true to detect two adjacent cycle signals, take
The clock timer timing time gone out between this two adjacent cycle signal zero passages, sequentially it is stored in cycle time memory cell
In, the cycle time memory cell can deposit 100 cycle times, and a cycle time is often stored in when being filled with, and first remove most
The cycle time being first stored in, and calculate the average value Tz of the cycle time of deposit and preserve, differentiated using Tz values to be identified
Cycle signal, erroneous judgement possibility is reduced to reduce the influence of power network frequency fluctuation, while point is screened using three.
Three comparators are respectively used to three examination points, that is, screen point 0, screen point 1, screen point 2, as shown in Figure 1.In week
At the cycle zero passage of ripple positive half cycle ascent stage, that is, screen point 0 and voltage zero-crossing comparator is set, remaining two comparator is set respectively
In the cycle positive half cycle ascent stage, the examination point 1 at 35% to 50% place of crest voltage and the examination point 2 at 50% to 70% place.
Cycle signal determining:After setting time opens interruption, clock timer resets and starts timing single-chip microcomputer, works as cycle
During voltage zero-cross, the output voltage upset for the voltage zero-crossing comparator V0 for screening point 0 is arranged on, in the generation of its voltage trailing edge
It is disconnected, record its zero crossing break period Th0 and the Central Shanxi Plain is broken;Hereafter, the output of voltage comparator V1 at point 1 is screened in single-chip microcomputer scanning
Voltage, when all wave voltages reach V1 threshold voltage, output voltage is overturn from high to low, and scanning records its flip-flop transition Th1;
Same scanning record screens voltage comparator V2 output voltages flip-flop transition Th2 at point 2.By Th0 and voltage zero-crossing comparator V0
Output voltage flip-flop transition setting value Ts0 make comparisons;Th1 and voltage comparator V1 output voltage flip-flop transition setting value
Ts1 and Th2 makes comparisons respectively with voltage comparator V2 output voltage flip-flop transition setting value Ts2, if in allowable error
In the range of, then the discriminator signal detected is true, is otherwise false.When above-mentioned judgement discriminator signal is true, this cycle is calculated
The clock timer timing time Tzu between cycle signal zero passage when signal zero passage and an adjacent preceding discriminator signal are true, will
It makes comparisons with the average value Tz of cycle time, and cycle signal is true if being no more than and setting cycle time error Tzv, at this moment
Preserve Tzu and take 20ms 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 during setting value Tk, clock timer timing to 25ms to Central Shanxi Plain during pass break period setting value Tn between 27ms is broken.
After system boot, clock timer starts timing, when detecting first cycle voltage zero-cross, is arranged on examination
The voltage zero-crossing comparator V0 of point 0 output voltage upset, is interrupted so as to produce, and the time T0 for taking out cycle voltage over zero is protected
Deposit, clock timer is reset and starts timing, at this moment cycle time voltage crosses zero Th0 is 0, while single-chip microcomputer is as stated above
Scan and judge discriminator signal.What it is due to detection is first cycle, and clock timer is to start to count in cycle voltage zero-cross
When, its Th0, Th1 and Th2 value must add the difference that cycle time 20ms subtracts out break period setting value Tk, if three
Individual discriminator signal is true, and i.e. opening the break period for the first time takes Tk next time.Otherwise be fictitious time, now the clock timer time must add
Upper T0, continue to detect.
When detecting first and second adjacent cycle voltage zero-cross, due to not preserving the cycle time of detection,
Therefore the clock timer timing time twice between cycle signal zero passage is made comparisons with cycle time 20ms, judges cycle signal
When being true, then take out clock timer cumulative time T1=T0+Tk when opening interruption and be stored in synchrotimer as initial time
In, open interruption after clock timer reset, otherwise judge cycle signal be fictitious time, now the clock timer time must add T1,
Continue to detect first cycle again as stated above.After it is very to detect first cycle signal, recover above-described week
Ripple signal determining.
If as shown in figure 1, detecting that cycle signal is false, the break period is opened next time and opens the break period at this
Afterwards, open interruptions during average value Tz through the cycle time that is delayed, and open interrupt after be delayed Tns when the Central Shanxi Plain break, when setting the Central Shanxi Plain to break
Between be when cycle signal screen point 0 when do not producing interruption, at this moment must be in the setting time point more than Ts0 allowable error scopes
Start to scan, and when scanning examination point 1 and examination point 2, voltage comparator output voltage does not produce upset, all in the Central Shanxi Plain breaks
The Central Shanxi Plain was broken and stopped scanning time Tns, and Tns is:
Tns=Tn-Tk
If it is true to detect cycle signal, next cycle opens break period Tks and is:
Tks=Tk+Th0
I.e. from opening for the first time after the break period takes Tk, clock timer is that timing opens interruption to Tks, and weight after resetting
New to start timing, timing is broken to Central Shanxi Plain during Tns, so that the synchrotimer time is corrected by cycle time voltage crosses zero.
Repeat said process.If the upper cycle signal detected is true, when this cycle judges, discriminator signal is
Vacation, or the cycle time detected exceed setting cycle time error Tzv, or clock meter compared with the average value Tz of cycle time
When device timing to close break period setting value Tns when, voltage zero-crossing comparator V0 output voltages are not overturn, do not produce interruption,
Then when clock timer timing is to Tns, the Central Shanxi Plain is broken, and is at this moment remembered and is not counted cycle N 1 and to store, and is opened the break period next time and is
The break period was opened in last time interruption is opened after Tz, clock timer is reset after interruption is opened and timing, timing to Central Shanxi Plain during Tns
It is disconnected, hereafter judge the cycle signal true and false every time, though if false or this detection discriminator signal be false true last time, then take N, will
Restored after N+1 in memory.
When it is true to detect cycle signal, then takes out N in memory and preserve, and by N zero setting in memory, and recover to make
With setting value Tks, (N+1) × 20ms value is at this moment taken to be added in synchrotimer.
The system synchronization time be synchrotimer time, along with currently just timing clock timer time.
When judging to screen the point signal true and false, Th0, Th1, Th2 are by being set with voltage comparator output voltage flip-flop transition
Definite value Ts0, Ts1, Ts2 make comparisons see it is whether overproof, come judge screen point a signal true and false, can select:Th0, Th1, Th2 are
The cycle discriminator signal is true when true, or Th0 is true, while when one of Th1, Th2 are true, or when Th1, Th2 are true, should
Cycle discriminator signal is true, depending on to judging the different requirements of the cycle signal true and false.
If system fault, when N is more than a setting value between 25 to 70, due to main controller in system and each warm and humid
Acquisition Instrument is spent, its Tz value detected may be different with N values, at this moment, power network frequency accumulated error, may cause synchrotimer
Time is corrected when can not be by detecting true cycle signal, when it is true to detect cycle signal, at this moment using clock
The accumulative clocking value of timer is directly added in synchrotimer, to reduce the asynchronous time of system, add up clocking value be N ×
Tz+20ms.N is much smaller than 25 in the case of power network normal operation.
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.