A kind of photoelectric direct-reading water meter prevents the circuit that bubble disturbs
Technical field
The present invention relates to water meter field, be specifically related to the circuit that a kind of photoelectric direct-reading water meter prevents bubble from disturbing.
Background technology
Along with improving constantly of China's expanding economy, the expansion of city size and up-to-dateness, the water supply pipe net system in city is more and more huger, and pipe network is measured and management difficulty is increasing;On the one hand, in water system, pipe network monitoring point is large number of, and monitoring is not comprehensive, and geographical position disperses, and is not the most to rely on merely manpower can be competent at;On the other hand, each public supply mains monitoring management is not carried out standardization and standardization, the leakage loss of pipe network, booster, pipe network basic data are inaccurate, imperfection, shortage effectively leak administrative mechanism, lack unified leakage water management system etc. makes public resource wasting phenomenon huge, and water utilities operating unit also causes direct large amounts of economic loss.
Therefore, the problems such as leakage loss, traffic monitoring, manual metering that solve need the management of comprehensive production and marketing difference and omission to control solution system;And wet type liquid sealing photoelectric direct-reading tele-metering water meter have employed the mode taking photoelectric coding, water meter mechanical count character wheel directly reads coded data, compared with traditional pulse table, give up the dynamoelectric signal translative mode that impulse sampling is accumulative completely, error in reading can be reduced to zero by it, is the electronic remote transmission water meter of data-collection zero error in Automatic meter reading system, and uses low power dissipation design, usually need not power, only checking meter or just need during valve it is powered;And the greatest problem that photoelectric device operationally runs into is water source muddiness or bubble, luminous tube launch time run into bubble light will reflect, diffraction, the light intensity being irradiated to photosensitive receiving tube is made to reduce, the faradic current making photosensitive receiving tube reduces, cause sensor code error, cause the error in reading produced due to bubble interference, thus cause economic loss.
Summary of the invention
The invention aims to the circuit providing a kind of photoelectric direct-reading water meter to prevent bubble from disturbing.
The present invention is achieved through the following technical solutions: a kind of photoelectric direct-reading water meter prevents the circuit that bubble disturbs, including single chip control module, steady pressure of system module, Communication processing module, M-BUS bus module, photocell module;Described single chip control module connection system Voltage stabilizing module, Communication processing module and photocell module respectively, described Communication processing module is connected with each other with steady pressure of system module, described Communication processing module and steady pressure of system module are also connected with M-BUS bus module, and described photocell processing module also connects with steady pressure of system module;Described Communication processing module includes receiver module and transmitter module, described transmitter module includes the first paster audion, 7th resistance, 4th resistance, + 3.3V power supply and+10V power supply, described first paster audion is provided with 6 pins, first pin ground connection of described first paster audion, second pin of described first paster audion and three-prong connect, 4th pin of described first paster audion connects+3.3V power supply, 5th pin of described first paster audion connects one end of the 4th resistance, the other end of described 4th resistance connects+3.3V power supply, 6th pin of described first paster audion connects one end of the 7th resistance, the other end of described 7th resistance connects+10V power supply, 5th pin of described first paster audion is also connected to single chip control module;Described receiver module includes the second paster audion, 8th resistance, 5th resistance, 4th electric capacity, + 3.3V power supply, described second paster audion is provided with 3 pins, first pin of described second paster audion connects one end and one end of the 5th resistance of the 8th resistance, described second pin of the second paster audion and the other end of the 8th resistance all connect+3.3V power supply, the three-prong ground connection of described second paster audion, the other end of described 5th resistance connects one end of the 4th electric capacity, the other end of described 4th electric capacity is connected to M-BUS bus module, first pin of described second paster audion is also connected to single chip control module;Described steady pressure of system module includes rectification module and voltage reduction module, described rectification module includes rectification chip, bi-directional voltage stabilizing diode, first resistance, 9th resistance, socket, described socket is connected to the two ends of bi-directional voltage stabilizing diode, the two ends of described bi-directional voltage stabilizing diode are connected respectively to one end and one end of the 9th resistance of the first resistance, described rectification chip is provided with 6 pins, first pin of described rectification chip and the 4th pin all ground connection, second pin and the 5th pin of described rectification chip are all connected to M-BUS bus module, described rectification chip three-prong connects the other end of the 9th resistance, described rectification chip the 6th pin connects the other end of the first resistance;nullDescribed voltage reduction module includes the 4th paster audion、12nd resistance、13rd resistance、Tenth electric capacity、First Zener diode、Second Zener diode、+ 10V power supply、9th electric capacity、Second electric capacity、3rd electric capacity、Power supply changeover device、+ 3.3V power supply、+ 10V power supply,Described 4th paster audion is provided with 5 pins,First pin and second pin of described 4th paster audion are connected with each other,The three-prong of described 4th paster audion connects the negative pole of the second Zener diode,The negative pole of described second Zener diode is also connected with one end of the tenth electric capacity,One end of described tenth electric capacity is also connected with one end of the 13rd resistance,The other end of described 13rd resistance connects the negative pole of the first Zener diode,The positive pole of described second Zener diode、The other end of the tenth electric capacity and positive pole all ground connection of the first Zener diode;The negative pole of described first Zener diode is also connected to the 4th pin of the 4th paster audion, and the 4th pin of described 4th paster audion is also connected with the 5th pin of rectification chip;5th pin of described 4th paster audion connects one end of the 12nd resistance, 5th pin of described 4th paster audion is also connected with+10V power supply, the other end of described 12nd resistance is connected to one end of the 9th electric capacity, described Power convert is provided with VIN, tri-pins of OUT and GND, the VIN pin of described power supply changeover device connects one end and one end of the 3rd electric capacity of the 9th electric capacity, the other end of described 3rd electric capacity connects one end of the second electric capacity, the other end of described second electric capacity connects the OUT pin of power supply changeover device, the OUT pin of described power supply changeover device is also connected with+3.3V power supply, the GND pin of described power supply changeover device and the other end all ground connection of the 9th electric capacity;Described single chip control module includes emulation module, single-chip microcomputer, 3rd resistance, first electric capacity, second electric capacity, 3rd electric capacity, 11st resistance, 18th resistance, 19th resistance, 20th resistance, + 3.3V power supply, described single-chip microcomputer is provided with 32 pins, first pin of described single-chip microcomputer connects one end of the first electric capacity, 5th pin of described single-chip microcomputer connects one end of the second electric capacity, 6th pin of described single-chip microcomputer connects+3.3V power supply, described+3.3V power supply is also connected with one end of the 3rd electric capacity, the other end of described first electric capacity, 4th pin of single-chip microcomputer, the other end of the second electric capacity and the other end all ground connection of the 3rd electric capacity;Tenth three-prong of described single-chip microcomputer connects one end of the 20th resistance, 14th pin of described single-chip microcomputer connects one end of the 19th resistance, 15th pin of described single-chip microcomputer connects one end of the 11st resistance, 16th pin of described single-chip microcomputer connects one end of the 18th resistance, 26th pin of described single-chip microcomputer connects one end of the 3rd resistance, and the other end of the other end, the other end of the 18th resistance, the other end of the 19th resistance, the other end of the 20th resistance and the 3rd resistance of described 11st resistance all connects+3.3V power supply;The model of described single-chip microcomputer is STM8S103K3;Described emulation module includes adapter and+3.3V power supply, described adapter arranges 4 pins, first pin ground connection of described adapter, second pin of described adapter connects+3.3V power supply, the three-prong of described adapter connects the first pin of single-chip microcomputer, and the 4th pin of described adapter connects the 26th pin of single-chip microcomputer;Described photocell module includes some optical circuit plugboards, and described photocell inserts in optical circuit plugboard;Described photocell quantity is 20 right.
nullThe present invention by single-chip microcomputer when system data to be read in advance water meter in photocell detection in all of photocell module one time,Detect all photocells the most then the value of the value of the luminous tube detected and reception pipe to be preserved temporarily,By the value of luminous tube detected and the value receiving pipe,Divided by 2, the minima received deducted by the maximum of reception again show that intermediate value saves this value temporarily,As being partially worth use,Then single-chip microcomputer reads the value of current character wheel position again,Compare with intermediate value according to this value,Enter look-up-table function draw the position at current character wheel place by comparing the value that draws,And calculate accurate data and data are returned single-chip microcomputer pass system back by Communication processing module again,Ensure also can automatically adjust decision level deviation under the water meter muddiness at water source and bubble interference,Thus ensure data accuracy,Thoroughly solve the bubble interference effect to light conduction,The possibility of photoelectricity reading erroneous judgement is completely eliminated.
The invention have benefit that: 1) single-chip microcomputer uses the simulation inclined value-based algorithm of dynamic discriminant can automatically adjust decision level deviation, thoroughly solves the bubble interference effect to light conduction;2) luminous tube can be detected in real time and receive the quality of pipe, uploading the ruuning situation of water meter in time;3) there is water meter and damage the function reported in time.
Accompanying drawing explanation
Fig. 1 is the circuit block diagram of the present invention.
Fig. 2 is the circuit theory diagrams of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawings and detailed description of the invention, the invention will be further described.
See that Fig. 1 to Fig. 2, a kind of photoelectric direct-reading water meter prevent the circuit that bubble disturbs, including single chip control module, steady pressure of system module, Communication processing module, M-BUS bus module, photocell module;Described single chip control module connection system Voltage stabilizing module, Communication processing module and photocell module respectively, described Communication processing module is connected with each other with steady pressure of system module, described Communication processing module and steady pressure of system module are also connected with M-BUS bus module, and described photocell processing module also connects with steady pressure of system module;nullDescribed Communication processing module includes receiver module and transmitter module,Described transmitter module includes the first paster audion Q1、7th resistance R7、4th resistance R4、+ 3.3V power supply and+10V power supply,Described first paster audion Q1 is provided with 6 pins,The first pin ground connection of described first paster audion Q1,Second pin of described first paster audion Q1 and three-prong connect,4th pin of described first paster audion Q1 connects+3.3V power supply,5th pin of described first paster audion Q1 connects one end of the 4th resistance R4,The other end of described 4th resistance R4 connects+3.3V power supply,6th pin of described first paster audion Q1 connects one end of the 7th resistance R7,The other end of described 7th resistance R7 connects+10V power supply,5th pin of described first paster audion Q1 is also connected to single chip control module;Described receiver module includes the second paster audion Q2, 8th resistance R8, 5th resistance R5, 4th electric capacity C4, + 3.3V power supply, described second paster audion Q2 is provided with 3 pins, first pin of described second paster audion Q2 connects one end and one end of the 5th resistance R5 of the 8th resistance R8, described second pin of the second paster audion Q2 and the other end of the 8th resistance R8 all connect+3.3V power supply, the three-prong ground connection of described second paster audion Q2, the other end of described 5th resistance R5 connects one end of the 4th electric capacity C4, the other end of described 4th electric capacity C4 is connected to M-BUS bus module, first pin of described second paster audion Q2 is also connected to single chip control module;Described steady pressure of system module includes rectification module and voltage reduction module, described rectification module includes rectification chip Q3, bi-directional voltage stabilizing diode U4, first resistance R1, 9th resistance R9, socket J1, described socket J1 is connected to the two ends of bi-directional voltage stabilizing diode U4, the two ends of described bi-directional voltage stabilizing diode U4 are connected respectively to one end and one end of the 9th resistance R9 of the first resistance R1, described rectification chip Q3 is provided with 6 pins, first pin of described rectification chip Q3 and the 4th pin all ground connection, second pin and the 5th pin of described rectification chip Q3 are all connected to M-BUS bus module, described rectification chip Q3 three-prong connects the other end of the 9th resistance R9, described rectification chip Q3 the 6th pin connects the other end of the first resistance R1;nullDescribed voltage reduction module includes the 4th paster audion Q4、12nd resistance R12、13rd resistance R13、Tenth electric capacity C10、First Zener diode Z1、Second Zener diode Z2、+ 10V power supply、9th electric capacity C9、Second electric capacity C2、3rd electric capacity C3、Power supply changeover device U3、+ 3.3V power supply、+ 10V power supply,Described 4th paster audion Q4 is provided with 5 pins,First pin and second pin of described 4th paster audion Q4 are connected with each other,The three-prong of described 4th paster audion Q4 connects the negative pole of the second Zener diode Z2,The negative pole of described second Zener diode Z2 is also connected with one end of the tenth electric capacity C10,One end of described tenth electric capacity C10 is also connected with one end of the 13rd resistance R13,The other end of described 13rd resistance R13 connects the negative pole of the first Zener diode Z1,The positive pole of described second Zener diode Z2、The other end of the tenth electric capacity C10 and positive pole all ground connection of the first Zener diode Z1;The negative pole of described first Zener diode Z1 is also connected to the 4th pin of the 4th paster audion Q4, and the 4th pin of described 4th paster audion Q4 is also connected with the 5th pin of rectification chip Q3;5th pin of described 4th paster audion Q4 connects one end of the 12nd resistance R12, 5th pin of described 4th paster audion Q4 is also connected with+10V power supply, the other end of described 12nd resistance R12 is connected to one end of the 9th electric capacity C9, described power supply changeover device U3 is provided with VIN, tri-pins of OUT and GND, the VIN pin of described power supply changeover device U3 connects one end and one end of the 3rd electric capacity C3 of the 9th electric capacity C9, the other end of described 3rd electric capacity C3 connects one end of the second electric capacity C2, the other end of described second electric capacity C2 connects the OUT pin of power supply changeover device U3, the OUT pin of described power supply changeover device U3 is also connected with+3.3V power supply, the GND pin of described power supply changeover device U3 and the other end all ground connection of the 9th electric capacity C9;Described single chip control module includes emulation module, single-chip microcomputer U2, 3rd resistance R3, first electric capacity C1, second electric capacity C2, 3rd electric capacity C3, 11st resistance R11, 18th resistance R18, 19th resistance R19, 20th resistance R20, + 3.3V power supply, described single-chip microcomputer U2 is provided with 32 pins, first pin of described single-chip microcomputer U2 connects one end of the first electric capacity C1, 5th pin of described single-chip microcomputer U2 connects one end of the second electric capacity C2, 6th pin of described single-chip microcomputer U2 connects+3.3V power supply, described+3.3V power supply is also connected with one end of the 3rd electric capacity C3, the other end of described first electric capacity C1, 4th pin of single-chip microcomputer U2, the other end of the second electric capacity C2 and the other end all ground connection of the 3rd electric capacity;Tenth three-prong of described single-chip microcomputer U2 connects one end of the 20th resistance R20, 14th pin of described single-chip microcomputer U2 connects one end of the 19th resistance R19, 15th pin of described single-chip microcomputer U2 connects one end of the 11st resistance R11, 16th pin of described single-chip microcomputer U2 connects one end of the 18th resistance R18, 26th pin of described single-chip microcomputer U2 connects one end of the 3rd resistance R3, the other end of described 11st resistance R11, the other end of the 18th resistance R18, the other end of the 19th resistance R19, the other end of the 20th resistance R20 and the other end of the 3rd resistance R3 all connect+3.3V power supply;The model of described single-chip microcomputer U2 is STM8S103K3;Described emulation module includes adapter P2 and+3.3V power supply, described adapter P2 arranges 4 pins, the first pin ground connection of described adapter P2, second pin of described adapter P2 connects+3.3V power supply, the three-prong of described adapter P2 connects first pin of single-chip microcomputer U2, and the 4th pin of described adapter P2 connects the 26th pin of single-chip microcomputer U2;Described photocell module includes some optical circuit plugboards, and described photocell inserts in optical circuit plugboard;Described photocell quantity is 20 right.
In present embodiment, when each single-chip microcomputer detects system data to be read, single-chip microcomputer will all detect one time all of luminous tube in photocell module and reception pipe in advance;First check the most whether luminous tube leaks electricity, short-circuit, open circuit, and the reverse data that single-chip microcomputer detects is not 0, and single-chip microcomputer is considered as luminous tube reverse leakage, if the forward current measured is more than or equal to 30mA ,Single-chip microcomputer is considered as luminous tube short circuit;The data receiving pipe reception as opened luminous tube corresponding are more than or equal to 253, and single-chip microcomputer is considered as luminous tube open circuit;Luminous tube checks out, and single-chip microcomputer reexamines reception pipe, opens the corresponding pipe that receives, and the normal signal accurate data receiving pipe is between 250-30;If the signal data received is less than or equal to less than 30, single-chip microcomputer is thought corresponding and is received tube short circuit, if the signal data received is more than or equal to more than 250, single-chip microcomputer is thought corresponding and received tube open circuit;As long as all luminous tubes of detection and receive pipe and have a pipe problematic, single-chip microcomputer the most no longer sends signal accurate data by Communication processing module, and directly passes to M-BUS bus module by Communication processing module and upload rub-out signal and report to user;As checked all luminous tubes of single-chip microcomputer and to receive pipe normal, then the luminous tube checked with receive the value of pipe and be saved in single-chip microcomputer and save, as being partially worth use temporarily;That is single-chip microcomputer will detect that the maximum transmission intensity that each luminous tube sends, and receives the maximum printing opacity value that pipe receives;Then the printing opacity value that single-chip microcomputer takes maximum value printing opacity value to deduct minimum except 2 thus calculates intermediate value, receives maximum printing opacity value 252, minimum printing opacity value 40 as current, that just takes (252-40)/2=106, the most current, value partially is exactly 106, namely intermediate value;This each intermediate value is probably different, is because to change with receiving the most aging of pipe along with luminous tube, thus plays and revise intermediate value every time;Then single-chip microcomputer is with this intermediate value, goes to judge whether the value that reception pipe receives is more than or less than this intermediate value;More than being exactly high level, being less than is exactly low level;Then single-chip microcomputer enters look-up-table function further according to this level value;Table look-up and find the position at current character wheel place, and calculate accurate data, then pass to M-BUS bus module by Communication processing module and return to system;If being equal to, maintaining the original state and not processing;Use the method, can remove from and set fixed data when water meter dispatches from the factory to water meter in advance and be partially worth, and water meter by bubble disturb during have employed dynamic decision be partially worth so that intermediate value will not produce deviation thus cause data to occur mistake makes electrical level judging accurate, from without there is drainage, cause economic loss.
In present embodiment, as long as all luminous tubes of single-chip microcomputer detection and reception pipe have a pipe problematic, single-chip microcomputer does not the most retransmit accurate data, and directly upload rub-out signal and report to user, luminous tube can be detected in real time and receive the quality of pipe, and upload the ruuning situation of water meter in time, there is water meter and damage the function reported in time.
Protection scope of the present invention includes but not limited to that embodiment of above, protection scope of the present invention are as the criterion with claims, replacement that any those skilled in the art making this technology is readily apparent that, deforms, improves and each fall within protection scope of the present invention.