Integral multi-parameter water quality on-line monitoring device and control method thereof
Technical field
The present invention relates to the water quality monitoring technical field, specifically, is a kind of integral multi-parameter water quality on-line monitoring device and control method thereof.
Background technology
In the production of supplying water, in order to satisfy the drinking water safety index, must carry out real-time online to water quality and detect, the parameter of the online detection of water quality usually comprises residual chlorine concentration value, turbidity concentration value, water temperature and pH value or the like.
Yet, present various parameter detecting all needs to adopt independent equipment or sensor just can carry out, in the installation process of various device or sensor, all need the installing mechanism that provides independent, for the water quality on-line detecting system, the separate type of various sensors is installed, and volume is big, complex structure, the technical requirement height, inconvenience is installed, and the cost of equipment operation and maintenance is all than higher.
China's utility application 200520009768.1 discloses the online comprehensive parameters measurement and control instrument of a kind of water supply, though be mentioned to the multiple parameter water quality on-line monitoring device of a kind of support in this patent document, but its circuit structure complexity, the testing result of various parameters also is to adopt independent display module to show, not only increase system cost, and make device volume huge, turbidity transducer that is adopted and residual chlorine sensor also are that self is installed, do not adopt integrated apparatus, so the maintenance of this device and debugging are still very complicated, operation is had relatively high expectations, and not disclose the concrete control mode of this instrument in this patent document yet, person skilled also can't be by the control effect of disclosed technology realization optimum.
The shortcoming of prior art is: the parameter detecting for potable water or tap water adopts independent equipment or sensor to carry out mostly, the various device function singleness, the Installation and Debugging inconvenience, though be mentioned to a kind of water quality online monitoring method instrument of multiparameter in the existing patent document, but this device volume is big, complex structure, and cost is higher, and various parameter detecting results adopt independently display module demonstration, and the sensor installation is also inconvenient, and is also not really suitable for the small-sized water-supply plant in vast villages and small towns.
Summary of the invention
The purpose of this invention is to provide a kind of integral multi-parameter water quality on-line monitoring device and control method thereof, be primarily aimed at the small-sized water-supply plant amount body exploitation of Chinese villages and small towns, be one of important auxiliary products in the cover solution that proposes of the realization for Chinese countryside safe drinking water target, be different from popular on the market chlorine residue or turbidity on-line monitoring equipment, more not simply chlorine residue and turbidity monitoring equipment to be combined, adopt unique current member designs, make monitoring device measure chlorine residue simultaneously, turbidity, water level, multiple parameter such as water temperature, greatly reduce customer using cost and difficulty, be suitable for very much Chinese villages and small towns and supply water.
For achieving the above object, the present invention explains a kind of integral multi-parameter water quality on-line monitoring device, be provided with chlorine residue-cooling-water temperature sensor, turbidity transducer and level sensor, the signal wire of described chlorine residue-cooling-water temperature sensor, turbidity transducer and level sensor links to each other with single-chip microcomputer respectively, and its key is:
Also be connected with keyboard input circuit, output display circuit, EEROM storer, sound light alarming circuit and telecommunication circuit on the described single-chip microcomputer;
Described keyboard input circuit is used for the configuration-system parameter, also is used to be provided with residual chlorine concentration alarming value, temperature alarming value, turbidity alarming value and height of water level alarming value;
Described output display circuit is used for circulation and shows residual chlorine concentration value, temperature value, turbidity value and height of water level value;
Described EEROM storer is used for the storage of program and data;
When described residual chlorine concentration value greater than the residual chlorine concentration alarming value or/and temperature value greater than the temperature alarming value or/and turbidity value greater than the turbidity alarming value or/and height of water level value during greater than the height of water level alarming value, described sound light alarming circuit sends the sound and light alarm signal;
Described telecommunication circuit is used for the transmission and the control of teledata, realizes the online detection of water quality remote.
The simulating signal of chlorine residue-cooling-water temperature sensor, turbidity transducer and level sensor outputting standard, process A/D conversion directly is sent to single-chip microcomputer and is carried out data processing, and has demonstration, functions such as warning.Described display circuit adopts demonstrations that circulate of simple LED charactron, has promptly reduced cost, has simplified the structure of installing again.Described telecommunication circuit adopts the Modbus fieldbus and the GPRS telecommunication technique of present technology comparative maturity, makes this device realize that real-time online detects and remote data transmission.Dispose various systematic parameters by the keyboard input circuit, when a certain water quality parameter surpassed default alarming value, described sound light alarming circuit sent the sound and light alarm signal.
Described turbidity transducer is made up of power valve, first receiving tube, second receiving tube and turbidity transducer signal processing circuit, and the output terminal of described turbidity transducer signal processing circuit is connected with the turbidity signal input port of described single-chip microcomputer.
Advantages such as chlorine residue-cooling-water temperature sensor adopts the sensor of external import, has the precision height, and is highly sensitive, non-maintaining can detect chlorine residue or chlorine dioxide in the water in real time, simultaneously can also measuring water temperature.
Turbidity transducer is to research and develop voluntarily for the demand that satisfies vast villages and small towns water-supply plant, adopt photoelectric detecting method commonly used, the light intensity signal that by the difference ratio computing circuit that is provided with two infrared receiving tubes is received earlier in its signal processing circuit carries out subtraction to be handled, and then be sent in the single-chip microcomputer by operational amplification circuit, stable performance, the precision that cost is low, circuit is simple and turbidity detects are very high, the gain of amplifying circuit is also adjustable, for different application places, Installation and Debugging are also very convenient.
Described chlorine residue-cooling-water temperature sensor and turbidity transducer are installed in the chlorine residue turbidity transmitter, described chlorine residue turbidity transmitter is provided with waterway pipe, be provided with water main in this waterway pipe, one end of this water main is installed described power valve, the other end of this water main is installed described first receiving tube, described second receiving tube is installed on the sidewall of water main, also be provided with into water arm and exit branch on the sidewall of described water main, described second receiving tube is installed in between the water arm and exit branch, and described chlorine residue-cooling-water temperature sensor is installed in exit branch.
The chlorine residue turbidity transmitter adopts unique flowing water member designs, sensors such as chlorine residue-cooling-water temperature sensor, turbidity transducer are combined dexterously, in the Installation and Debugging process, only need directly to connect the signal wire and the waterway pipe of sensor, and no longer separately various sensor components are installed with fixing, simplify the operation steps of system, saved the cost of equipment operation and maintenance.
Be provided with the noise reduction button in the described keyboard input circuit, when described audible-visual annunciator is sounded alerting signal, described noise reduction button is used to send the noise reduction signal to described single-chip microcomputer, by corresponding interrupt routine is set in the single-chip microcomputer, when single-chip microcomputer receives this noise reduction signal, then control described sound light alarming circuit, make audible ringing signal close.
The present invention has also explained a kind of control method of integral multi-parameter water quality on-line monitoring device, mainly carries out according to following steps:
Step 1: system initialization
Select to enter the systematic parameter configuration flow by the keyboard input circuit, the parameter at zero point, precision parameter and the alarming value parameter that comprise residual chlorine concentration value, temperature value, turbidity value and height of water level value, the networking configuration parameter that also comprises telecommunication circuit, the various parameters of configuration are stored in the described EEROM storer; If system does not need to reconfigure parameter, then described single-chip microcomputer can directly read the default value that is stored in the various parameters in the EEROM storer.
Described single-chip microcomputer also reads the calculating parameter in the EEROM storer, the countdown of starting shooting after finishing;
After the start countdown is finished, enter step 2: data acquisition
Described single-chip microcomputer is selected the sampling channel of detected parameters, comprises the sampling of residual chlorine concentration value, temperature value sampling, turbidity value sampling and the sampling of height of water level value;
Number of times to the sampling of the sensor signal value in each passage is N, the sensor signal value of the gained of sampling is each time carried out software filtering and calculate the weighted mean of N sampled value by single-chip microcomputer, the weighted mean of gained store in the described EEROM storer;
Step 3: data processing
Described single-chip microcomputer carries out the calculating of running mean to the sensor signal value that each detected parameters is gathered, and calculates corresponding residual chlorine concentration value, temperature value, turbidity value and height of water level value by reading calculating parameter;
Store the residual chlorine concentration value, temperature value, turbidity value and the height of water level value that calculate into described EEROM storer;
Step 4: show, compare, report to the police
Described output display circuit circulates successively and shows residual chlorine concentration value, temperature value, turbidity value and the height of water level value that is calculated;
Described single-chip microcomputer reads default residual chlorine concentration alarming value, temperature alarming value, turbidity alarming value and height of water level alarming value, and the residual chlorine concentration value, temperature value, turbidity value and the height of water level value that calculate compared with corresponding alarming value, when described residual chlorine concentration value greater than residual chlorine concentration alarming value or temperature value greater than temperature alarming value or turbidity value greater than turbidity alarming value or height of water level value during greater than the height of water level alarming value, described sound light alarming circuit sends the sound and light alarm signal.
Described systematic parameter configuration flow carries out according to following steps:
The first step: enter the systematic parameter configuration menu
Select to enter the systematic parameter configuration menu by described keyboard input circuit;
Second step: judge whether maloperation
Described single-chip microcomputer judges whether maloperation, if belong to maloperation, then withdraws from described systematic parameter configuration flow automatically; If not maloperation, then entered for the 3rd step;
The 3rd step: select whether to withdraw from
Select whether to withdraw from described systematic parameter configuration flow by described keyboard input circuit;
If select to withdraw from, then withdraw from described systematic parameter configuration flow automatically;
If do not select to withdraw from, then entered for the 4th step;
Whether the 4th step: selecting needs to regulate zero point
Regulate zero point if desired, then enter the zero point processing module and carry out zero point and regulate, regulate entering for the 5th step after finishing zero point;
If do not need to regulate zero point, then directly entered for the 5th step;
The 5th step: whether need to select precision to regulate
Degree of regulation then enters the precision processing module and carries out the precision adjusting if desired, and precision entered for the 6th step after regulating and finishing;
If do not need degree of regulation, then directly entered for the 6th step;
The 6th step: whether need to select alarming value to regulate
Regulate alarming value if desired, then enter the adjusting that the alarming value adjustment module is carried out alarming value, entered for the 7th step after alarming value is finished;
If do not need to regulate alarming value, then directly entered for the 7th step;
The 7th step: whether need to select the networking configuration
Whether networking configuration if desired then enters the networking processing module and carries out the networking configuration, returned for the 3rd step after the networking configuration is finished and select to need to withdraw from;
If do not need the networking configuration, then directly returned for the 3rd step and select whether to need to withdraw from.
The described the 4th goes on foot the 7th goes on foot and can exchange, and these four kinds of parameters configurations can be not sequentially, and concrete operation technician is again selected by button.In the Installation and Debugging process, carry out adjusting at zero point, precision adjusting, alarming value adjusting and communication networking configuration by the systematic parameter configuration flow, the various parameters that configure are stored in the EEROM storer, read various parameters by single-chip microcomputer, make described integral multi-parameter water quality on-line measuring device can keep operate as normal.
After Installation and Debugging are finished, just can carry out data acquisition, the signal wire of various sensors is connected on the different sampling channels of single-chip microcomputer, single-chip microcomputer circulates successively and selects the sampling channel of various parameters, and every seed ginseng number average sampling N time is removed interference by software filtering, calculating weighted mean then stores as sampled value, ask average by repeatedly sampling, avoid random disturbance, make sampled value more accurate.
The sampled value of various parameters is the level signal value, need finish calculation of parameter by data processing, in described single-chip microcomputer, dispose the parameter of the conversion of various level signals, in data handling procedure, earlier sampled value is asked running mean, and then calculate with sliding average and default reduced parameter, the value that calculates is stored among the EEROM as final water quality detection parameter, by weighted mean value is asked sliding average, done twice statistical treatment, make system accuracy higher, stability is also stronger.
The various water quality parameters that single-chip microcomputer will calculate are sent in the described display circuit and show, single-chip microcomputer various water quality parameters that will calculate and the various parameter alarming values of presetting compare simultaneously, judge detected water quality parameter and whether exceed alarming value, surpassed default alarming value if detect a certain parameter, the sound and light alarm signal is sent in then sound light alarming circuit work.
Detected various water quality parameter can also be transferred on remote monitoring center or other watch-dogs by communication modes such as Modbus and GPRS, realizes that technician's remote online detects.
Remarkable result of the present invention is:
A kind of integral multi-parameter water quality on-line monitoring device and control method thereof are provided, can support the online detection simultaneously of multiple parameter, adopt the single display circuit cycles to show various parameters, reduced equipment cost, slowed down apparatus structure, adopt this particular structure of chlorine residue turbidity transmitter that various sensors are fixed, simplified the operating process of Installation and Debugging greatly, reduced equipment fitting operation difficulty, debugging also becomes convenient, in various parameter samplings and processing procedure, and the utilization Principle of Statistics, utilization repeatedly asks average mode to make that the precision of parameter detecting is higher, is fit to very much the water quality detection of China's small-sized water-supply plant in rural area.
Description of drawings
Fig. 1 is a schematic block circuit diagram of the present invention;
Fig. 2 is a turbidity transducer circuit theory synoptic diagram;
Fig. 3 is a chlorine residue turbidity transmitter structural representation;
Fig. 4 is a system of the present invention control flow chart;
Fig. 5 is systematic parameter configuration flow figure.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is described in further detail.
As shown in Figure 1, the present invention explains a kind of integral multi-parameter water quality on-line monitoring device, be provided with chlorine residue-cooling-water temperature sensor 1, turbidity transducer 2 and level sensor 3, the signal wire of described chlorine residue-cooling-water temperature sensor 1, turbidity transducer 2 and level sensor 3 links to each other with single-chip microcomputer 4 respectively, also is connected with keyboard input circuit 7, output display circuit 8, EEROM storer 9, sound light alarming circuit 6 and telecommunication circuit 5 on the described single-chip microcomputer 4;
Described keyboard input circuit 7 adopts the keypad of 5 keys, be provided with add, subtract, determine, function button such as cancellation, also comprise the noise reduction button.Keyboard input circuit 7 is mainly used in the configuration-system parameter, such as residual chlorine concentration alarming value, temperature alarming value, turbidity alarming value and height of water level alarming value etc. are set; Described noise reduction button is used to send the noise reduction signal to described single-chip microcomputer 4, by corresponding interrupt routine is set in the single-chip microcomputer, when sound light alarming circuit 6 sends sound and light alarm, can send the noise reduction signal by the noise reduction button, when single-chip microcomputer 4 receives this noise reduction signal, then control described sound light alarming circuit 6, make audible ringing signal close.
Described output display circuit 8 is used for circulation and shows residual chlorine concentration value, temperature value, turbidity value and height of water level value, in specific implementation process, adopt four 7 sections LED charactrons, wherein first is used to represent a kind of water quality parameter, three of backs are used to represent this parameter detected value of this moment, for example work as display circuit 8 and show that A0.58 represent that the residual chlorine concentration value is 0.58mg/L, show that b1.80 represents that the turbidity concentration value is 1.80NTU, show that C2.68 represents that height of water level is 2.68m, show that d25.0 represents that water temperature is 25.0 ℃, circuit structure is simple, and function is fairly perfect;
Described EEROM storer 9 is used for the storage of program and data;
Monitor a certain parameter when surpassing alarming value when described, the hummer in the described sound light alarming circuit 6 can send too cry, and the alarm lamp of relevant parameter can be bright simultaneously.
Described telecommunication circuit 5 has adopted one road Modbus field bus communication, has also adopted the GPRS wireless communication module, and the above communication technology all is proven technique comparatively, is not repeated at this.This telecommunication circuit 5 is mainly used in the transmission and the control of teledata, realizes the online detection of water quality remote.
As shown in Figure 2, described turbidity transducer 2 is made up of power valve 2a, the first receiving tube 2b, the second receiving tube 2c and turbidity transducer signal processing circuit 2d, and the output terminal ZD of described turbidity transducer signal processing circuit 2d is connected with the turbidity signal input port RA2 of described single-chip microcomputer 4.
As shown in Figure 3, described chlorine residue-cooling-water temperature sensor 1 is installed among the chlorine residue turbidity transmitter A with turbidity transducer 2, described chlorine residue turbidity transmitter is provided with waterway pipe, be provided with water main A1 in this waterway pipe, the end of this water main A1 is installed described power valve 2a, the other end of this water main A1 is installed the described first receiving tube 2b, the described second receiving tube 2c is installed on the sidewall of water main A1, also be provided with into water arm A2 and exit branch A3 on the sidewall of described water main A1, the described second receiving tube 2c is installed in between the water arm A2 and exit branch A3, and described chlorine residue-cooling-water temperature sensor 1 is installed in exit branch A3.
As shown in Figure 4, the present invention has also explained a kind of control method of integral multi-parameter water quality on-line monitoring device, mainly carries out according to following steps:
Step 1: system initialization
Select to enter the systematic parameter configuration flow by keyboard input circuit 7, the parameter at zero point, precision parameter and the alarming value parameter that comprise residual chlorine concentration value, temperature value, turbidity value and height of water level value, the networking configuration parameter that also comprises telecommunication circuit 5, the various parameters of configuration are stored in the described EEROM storer 9; If system does not need to reconfigure parameter, then described single-chip microcomputer 4 can directly read the default value that is stored in the various parameters in the EEROM storer 9.
Described single-chip microcomputer 4 also reads the calculating parameter in the EEROM storer 9, the countdown of starting shooting after finishing, and the time of start countdown is set to 6 seconds, as the preheating surge time before the device installation and operation, after the start countdown is finished, enters step 2: data acquisition
Described single-chip microcomputer 4 is selected the sampling channel of detected parameters, is followed successively by the sampling of residual chlorine concentration value, turbidity value sampling, the sampling of height of water level value and temperature value sampling;
In specific implementation process, default number of times to the sampling of the sensor signal value in each passage is 10, carry out software filtering and calculate the weighted mean of 10 sampled values by sample the each time sensor signal value of gained of 4 pairs of single-chip microcomputers, the weighted mean of gained store in the described EEROM storer 9;
Step 3: data processing
Described single-chip microcomputer 4 carries out the calculating of running mean to the sensor signal value that each detected parameters is gathered, moving window length is made as 16, promptly get continuous 16 values at every turn and ask average, each step-length of sliding is 1, and then calculates residual chlorine concentration value, temperature value, turbidity value and height of water level value respectively by reading corresponding reduced parameter;
Store the residual chlorine concentration value, temperature value, turbidity value and the height of water level value that calculate into described EEROM storer 9;
Step 4: show, compare, report to the police
Described output display circuit 8 circulates successively and shows residual chlorine concentration value, turbidity value, height of water level value and the temperature value that is calculated;
Described single-chip microcomputer 4 reads default residual chlorine concentration alarming value, temperature alarming value, turbidity alarming value and height of water level alarming value, and the residual chlorine concentration value, temperature value, turbidity value and the height of water level value that calculate compared with corresponding alarming value, when described residual chlorine concentration value greater than residual chlorine concentration alarming value or temperature value greater than temperature alarming value or turbidity value greater than turbidity alarming value or height of water level value during greater than the height of water level alarming value, described sound light alarming circuit 6 sends the sound and light alarm signal.
As shown in Figure 5, described systematic parameter configuration flow carries out according to following steps:
The first step: enter the systematic parameter configuration menu
Select to enter the systematic parameter configuration menu by described keyboard input circuit 7;
Second step: judge whether maloperation
Described single-chip microcomputer 4 judges whether maloperation, if belong to maloperation, then withdraws from described systematic parameter configuration flow automatically; If not maloperation, then entered for the 3rd step;
The 3rd step: select whether to withdraw from
Select whether to withdraw from described systematic parameter configuration flow by described keyboard input circuit 7;
If select to withdraw from, then withdraw from described systematic parameter configuration flow automatically;
If do not select to withdraw from, then entered for the 4th step;
Whether the 4th step: selecting needs to regulate zero point
Regulate zero point if desired, then enter the zero point processing module and carry out zero point and regulate, regulate entering for the 5th step after finishing zero point;
In the zero point processing module, at first also be that the corresponding sensor signal of various parameters is sampled, by software filtering, regulating zero point mainly is to determine that sensor does not have the state value under the detected material environment then, and the value of general this state can roughly be estimated to.If zero point is too high, might there be detected material to exist, for fear of maloperation instrument is broken one's promise, then need protect processing, the parameter at zero point will be refused to revise by system.Each parameter that will regulate at last is kept in the EEROM storer 9 zero point, is used for the calculating of measured value.
If do not need to regulate zero point, then directly entered for the 5th step;
The 5th step: whether need to select precision to regulate
Degree of regulation if desired, then enter the precision processing module and carry out the precision adjusting, precision entered for the 6th step after regulating and finishing, described precision processing module also is that the signal of earlier various sensors being uploaded carries out sampling filter, make detected various water quality parameter more accurately sensitive by the change calculating parameter, by disposing various calculating parameters, the sensitivity of residual chlorine concentration value can reach 0.01mg/L, error range≤± 2%FSR (Full Scale Range full scale); Turbidity value sensitivity can reach 0.1NTU, error range≤± 10%FSR; Water level sensitivity can reach 0.1m, error range≤± 2%FSR, temperature value sensitivity can reach 0.1 ℃, error range≤± 2%FSR.
If do not need degree of regulation, then directly entered for the 6th step;
The 6th step: whether need to select alarming value to regulate
Regulate alarming value if desired, then enter the adjusting that the alarming value adjustment module is carried out alarming value, entered for the 7th step after alarming value is finished; The alarming value adjustment module mainly is the new alarming value by the various detected parameters of keyboard input circuit 7 inputs, and it is stored in the EEROM storer 9, is convenient to comparison and warning in the water quality monitoring process;
If do not need to regulate alarming value, then directly entered for the 7th step;
The 7th step: whether need to select the networking configuration
Networking configuration if desired, then enter the networking processing module and carry out the networking configuration, whether returned for the 3rd step after the networking configuration is finished selects to need to withdraw from, described networking processing module mainly is that communication network is configured, comprise network attribute is set, the inquiry network of slave unit down connects apparatus for establishing inventory and memory allocated space or the like;
If do not need the networking configuration, then returned for the 3rd step and select whether to need to withdraw from.
In implementation process, from the 4th go on foot the 7th the step do not have concrete sequence requirement, the technician can do order adjustment, and a kind of mode of this step when just moving as program loop, the technician might not carry out according to this step in the parameter configuration process, regulates and disposes but select to enter relevant parameter configuration process module by keyboard input circuit 7 under systematic parameter configuration menu interface.
Principle of work of the present invention:
Detect by chlorine residue-cooling-water temperature sensor 1, turbidity transducer 2 and 3 pairs of various water quality parameters of level sensor, the simulating signal of various sensor outputting standards, process A/D conversion directly is sent to single-chip microcomputer 4 and is carried out data processing, single-chip microcomputer 4 converts the level signal of sensor output to corresponding water quality parameter value by various reduced parameters are set, and on output display circuit 8, show, in single-chip microcomputer 4, also be preset with the alarming value of various parameters, when a certain parameter surpasses alarming value, described sound light alarming circuit 6 output sound and light alarm signals.By Modbus fieldbus and GPRS remote communication module are set, make this device realize that real-time online detects and remote data transmission.
Chlorine residue-cooling-water temperature sensor 1 and turbidity transducer 2 are installed in the chlorine residue turbidity transmitter, in the Installation and Debugging process, only need directly to connect the signal wire and the waterway pipe of sensor, and no longer separately various sensor components are installed with fixing, simplify the operation steps of system, saved the cost of equipment operation and maintenance.
Output display circuit 8 also is to adopt the circulation demonstration in turn of 4 LED charactrons, and circuit design is simple, and cost is also cheap.In various parameter samplings and processing procedure, the utilization Principle of Statistics makes that by repeatedly asking average mode the precision of parameter detecting is very high, is fit to very much the water quality detection of China's small-sized water-supply plant in rural area.