Counting method of long-power-supply diaphragm gas meter photoelectric direct-reading counter

文档序号:1859138 发布日期:2021-11-19 浏览:29次 中文

阅读说明:本技术 一种长供电的膜式燃气表光电直读计数器的计数方法 (Counting method of long-power-supply diaphragm gas meter photoelectric direct-reading counter ) 是由 邹航 严晓慧 于 2021-08-16 设计创作,主要内容包括:本发明公开了一种长供电的膜式燃气表光电直读计数器的计数方法,光电直读计数器包括计数器单片机、计数器支架、计数器字轮、若干组光电收发板及电池,计数器字轮转动设置于计数器支架上,计数器支架包括五个且分别用于个位、十位、百位、千位和万位计数器字轮上,在个位、十位和百位计数器字轮上各设置一组光电收发板;计数方法包括:S1、计数器单片机通过光电收发板读取个位、十位和百位计数器字轮的数值,并将读数数据发送给燃气表主控单元;S2、计数器单片机计算千位和万位是否需要进位,计算完毕后,计数器单片机控制光电直读计数器进入深度休眠状态。该方法既降低了光电直读计数器的成本,还减少了数据返回的时间,提高了产品合格率。(The invention discloses a counting method of a long-power-supply diaphragm gas meter photoelectric direct-reading counter, wherein the photoelectric direct-reading counter comprises a counter singlechip, a counter support, a counter character wheel, a plurality of groups of photoelectric transceiving plates and a battery, the counter character wheel is rotationally arranged on the counter support, the counter support comprises five parts which are respectively used on the ones, tens, hundreds, thousands and tens counter character wheels, and the ones, tens and hundreds counter character wheels are respectively provided with a group of photoelectric transceiving plates; the counting method comprises the following steps: s1, the single chip microcomputer of the counter reads the numerical values of the character wheels of the units, tens and hundreds counters through the photoelectric transceiving board and sends the reading data to the master control unit of the gas meter; and S2, the counter singlechip calculates whether the kilo-digit and the ten-thousand-digit need carry, and after the calculation is finished, the counter singlechip controls the photoelectric direct reading counter to enter a deep sleep state. The method reduces the cost of the photoelectric direct-reading counter, reduces the data return time and improves the product percent of pass.)

1. The counting method of the photoelectric direct-reading counter of the long-power-supply diaphragm gas meter is characterized in that the photoelectric direct-reading counter at least comprises a counter singlechip, a counter support, a counter character wheel, a plurality of groups of photoelectric receiving and transmitting plates and a battery, wherein the counter character wheel is rotatably arranged on the counter support, the counter support comprises five parts which are respectively used on the ones, tens, hundreds, thousands and tens counter character wheels, a group of photoelectric receiving and transmitting plates are respectively arranged on the ones, tens and hundreds counter character wheels, each group of photoelectric receiving and transmitting plates comprises a transmitting plate and a receiving plate, the transmitting plates and the receiving plates are symmetrically arranged on two sides of the counter character wheel, and the battery supplies power to the whole photoelectric direct-reading counter;

the counting method comprises the following steps:

s1, the single chip microcomputer of the counter reads the numerical values of the character wheels of the units, tens and hundreds counters through the photoelectric transceiving board and sends the reading data to the master control unit of the gas meter;

and S2, the counter singlechip calculates whether the kilo-digit and the ten-thousand-digit need carry, and after the calculation is finished, the counter singlechip controls the photoelectric direct reading counter to enter a deep sleep state.

2. The method of claim 1, wherein each set of optoelectronic transceiver boards comprises at least 4 pairs of transmitting and receiving tubes.

3. The method of claim 1, wherein in step S1, the counter single chip is designed to wake up automatically every n hours and control the optoelectronic transceiver board to read the values of units and tens, wherein n is greater than or equal to 1 and less than or equal to 6.

4. The method according to claim 3, characterized in that in step S2, when the hundreds digit value is detected to change, the current reading is recorded in the data memory of the single-chip computer of the counter for comparison with the next reading: when the comparison shows that the hundred-digit reading is turned once, adding 1 to the thousand-digit reading; when the kilo-digit reading is added to 10, the kilo-digit reading is added to 1 and the kilo-digit reading is set to 0.

5. The method of claim 4, wherein in step S2, when the hundreds digit value is detected to change, the current reading is recorded in the RAM of the single-chip counter and then stored in the ROM of the single-chip counter.

6. The method of claim 3, wherein the final reading value of each reading is recorded in the RAM of the single chip microcomputer of the counter, and is compared with the reading value of the next reading, and whether the reading is legal or not is judged.

7. The method of claim 6, wherein determining whether the reading is legitimate comprises:

if the difference value of the two readings is detected to be larger than the preset maximum gas flow for n hours, the occurrence of abnormity is indicated, namely the readings are illegal, and the single chip microcomputer of the counter sends the abnormal information to the main control unit of the gas meter; otherwise, the reading is legal.

8. The method of claim 3, wherein when the master control unit of the gas meter needs to read the data of the photoelectric direct-reading counter, the photoelectric direct-reading counter is powered, and after the photoelectric direct-reading counter detects the power supply, the photoelectric direct-reading counter reads the numerical values of the character wheels of the unit, ten and hundred counter and resets the sleep time for n hours.

9. The method of claim 1, wherein the counter single chip microcomputer is a low power consumption single chip microcomputer, and the power consumption is about 200nA in a deep sleep state.

10. The method of claim 1, wherein the battery is a CR2032 coin cell battery with a nominal capacity of 210 mAH.

Technical Field

The invention relates to the technical field of diaphragm gas meters, in particular to a counting method of a photoelectric direct-reading counter of a long-power-supply diaphragm gas meter.

Background

The photoelectric direct reading counter of the diaphragm gas meter is generally used for converting the reading of the counter of the diaphragm gas meter into an electric signal and sending the electric signal to a main control board of the intelligent diaphragm gas meter, so that an intelligent module can read the reading of the diaphragm gas meter and realize the function of intelligent meter reading.

In the prior art, the photoelectric direct reading counter is generally powered only when reading is needed, and data reading and result sending are completed immediately after power on. And the civil counter integer number required in the national standard is 5 bits (namely, units, tens, hundreds, thousands and tens), so in order to ensure the reading accuracy, the number of the counter character wheel is generally read as the maximum integer number displayed. However, in the existing scheme, when reading, if the interval time is long, the reading is carried out a lot, the valid digits are read, and because the thousands of digits and the ten thousands of digits are generally changed for a long time, the reading of the integer digit with the maximum digit is not required to be carried out every time of reading, and the time is wasted because the data return during reading requires time; in addition, since a set of optoelectronic transceiver boards is provided for each digit, cost is considered.

Disclosure of Invention

In the method, the photoelectric direct-reading counter needs to be powered all the time, preferably 3 reading values of units, tens and hundreds are read, and the thousands and tens of thousands reading values are obtained through calculation. Because the invention provides long power supply for the photoelectric direct reading counter, the values of thousands of bits and ten thousands of bits can be obtained through calculation, and the cost is reduced as the number of the photoelectric transceiving boards is reduced in spite of the long power supply. The method of the invention not only reduces the cost of the photoelectric direct reading counter, but also reduces the data return time and improves the product percent of pass.

The technical scheme adopted by the invention for overcoming the technical problems is as follows:

a counting method of a long-power-supply diaphragm gas meter photoelectric direct-reading counter at least comprises a counter singlechip, a counter support, a counter character wheel, a plurality of groups of photoelectric receiving and transmitting plates and a battery, wherein the counter character wheel is rotationally arranged on the counter support, the counter support comprises five parts which are respectively used on the unit, ten, hundred, thousand and ten thousand counter character wheels, a group of photoelectric receiving and transmitting plates are respectively arranged on the unit, ten and hundred counter character wheels, each group of photoelectric receiving and transmitting plates comprises a transmitting plate and a receiving plate, the transmitting plates and the receiving plates are symmetrically arranged on two sides of the counter character wheel, and the battery supplies power to the whole photoelectric direct-reading counter;

the counting method comprises the following steps:

s1, the single chip microcomputer of the counter reads the numerical values of the character wheels of the units, tens and hundreds counters through the photoelectric transceiving board and sends the reading data to the master control unit of the gas meter;

and S2, the counter singlechip calculates whether the kilo-digit and the ten-thousand-digit need carry, and after the calculation is finished, the counter singlechip controls the photoelectric direct reading counter to enter a deep sleep state.

Furthermore, each group of photoelectric transceiving plates comprises at least 4 pairs of transmitting tubes and receiving tubes; further, each group of the optoelectronic transceiver boards preferably comprises 5 pairs of transmitting tubes and receiving tubes.

Further, in step S1, the counter single chip is designed to wake up once every n hours and control the photoelectric transceiving board to read the values of units and tens, wherein n is greater than or equal to 1 and less than or equal to 6; further, n =4 is preferable.

Further, in step S2, when it is detected that the hundreds digit value changes, the current reading is recorded in the data storage of the single chip of the counter for comparison with the next reading: when the comparison shows that the hundred-digit reading is turned once, adding 1 to the thousand-digit reading; when the kilo-digit reading is added to 10, the kilo-digit reading is added to 1 and the kilo-digit reading is set to 0. Further, in step S2, when the change of the hundreds digit value is detected, the current reading is recorded in the RAM of the single chip microcomputer of the counter, and then stored in the ROM of the single chip microcomputer of the counter.

Furthermore, the final reading value of each reading is recorded in the RAM of the single chip microcomputer of the counter, and is compared with the reading value of the next reading, and whether the reading is legal or not is judged.

Further, judging whether the reading is legal specifically includes:

if the difference value of the two readings is detected to be larger than the preset maximum gas flow for n hours, the occurrence of abnormity is indicated, namely the readings are illegal, and the single chip microcomputer of the counter sends the abnormal information to the main control unit of the gas meter; otherwise, the reading is legal.

Further, when the master control unit of the gas meter needs to read data of the photoelectric direct-reading counter, the photoelectric direct-reading counter is powered, and after the photoelectric direct-reading counter detects that power is supplied, the photoelectric direct-reading counter reads numerical values of character wheels of the units, tens and hundreds counters and resets the sleep time for n hours.

Furthermore, the counter singlechip is a low-power-consumption singlechip, and the power consumption is about 200nA in a deep sleep state.

Further, the battery adopts a CR2032 button battery, has a nominal capacity of 210mAH, and is used for supplying power to the whole photoelectric direct-reading counter.

The invention has the beneficial effects that:

1. the invention reduces 2-bit reading, reduces the use of a photoelectric receiving and transmitting plate, reduces the cost of a photoelectric direct reading counter and reduces the time for returning data; in addition, the use of the photoelectric transceiving plate is reduced, and the qualification rate of products can be improved.

2. The photoelectric direct-reading counter can be replaced and used on the basis of not changing the use habit of the existing photoelectric direct-reading counter, namely, the photoelectric direct-reading counter directly replaces the photoelectric direct-reading counter in the prior art, and other modules or structures of a gas meter do not need to be changed.

3. In the invention, the built-in battery and the communication line of the gas meter can supply power to the photoelectric direct-reading counter, and if the gas meter main control board can supply power to the photoelectric direct-reading counter at all times, the added battery can be saved, and part of cost is saved.

4. The photoelectric direct-reading counter can effectively judge the legality of the data by reading the data at regular time, and timely detect whether the photoelectric direct-reading counter is damaged or not, so that the reliability of reading is improved.

Drawings

Fig. 1 is a schematic block diagram of a diaphragm gas meter photoelectric direct reading counter according to an embodiment of the present invention.

Fig. 2 is a schematic structural diagram of a five-bit counter character wheel according to an embodiment of the present invention.

Fig. 3 is a schematic structural diagram of a counter word wheel of one of the units, tens and hundreds according to an embodiment of the present invention.

Detailed Description

In order to facilitate a better understanding of the invention for those skilled in the art, the invention will be described in further detail with reference to the accompanying drawings and specific examples, which are given by way of illustration only and do not limit the scope of the invention.

As shown in fig. 1-3, this embodiment discloses a long-powered diaphragm gas meter photoelectric direct-reading counter, which at least includes a counter single chip, a counter support, a counter character wheel, a plurality of groups of photoelectric transceiver boards, and a battery, counter character wheel rotates and sets up on the counter support, counter support and counter character wheel are used for showing the reading of diaphragm type gas table, the counter support includes five and is used for the unit respectively, ten, hundred, on thousand and ten thousand counter character wheels, this embodiment is preferred, only in the unit, ten and hundred counter character wheels respectively set up a set of photoelectricity transceiver panel, every set photoelectricity transceiver panel includes a transmitting plate and a receiving plate, transmitting plate and receiving plate symmetry set up in the both sides of counter character wheel, thousand and ten thousand counter character wheels are last no longer to set up photoelectricity transceiver panel, thousand and ten thousand reading is acquireed through calculating. The counter single chip microcomputer reads the data of the counter character wheel by controlling the photoelectric receiving and transmitting plate and transmits the data to the gas meter main control unit through the data transmission line, wherein the counter single chip microcomputer is a low-power-consumption single chip microcomputer, and the power consumption is about 200nA in a deep sleep state. The battery supplies power to the whole photoelectric direct-reading counter, and the preferable battery in the embodiment is a CR2032 button battery with a nominal capacity of 210 mAH.

In this embodiment, each group of the photoelectric transceiving plates includes at least 4 pairs of transmitting tubes and receiving tubes, and preferably 5 pairs of transmitting tubes and receiving tubes, that is, each group of the photoelectric transceiving plates includes 5 transmitting tubes and 5 receiving tubes, and the number of the transmitting tubes and the receiving tubes not only ensures the accuracy of the reading, but also can reasonably control the cost, and the reading of the current character wheel is determined by a coding mode of the character wheel opening of the counter (the coding mode is not an innovative point of the present invention and is not described herein again).

The counting method of the photoelectric direct-reading counter of the long-power-supply diaphragm gas meter comprises the following steps:

and S1, the single chip microcomputer of the counter reads the numerical values of the character wheels of the units, tens and hundreds counters through the photoelectric transceiving board and sends the reading data to the main control unit of the gas meter.

Specifically, the maximum specification of the civil diaphragm gas meter is 4 square/hour, and the limit maximum flow is 7.2 square/hour. According to the maximum flow, the time for moving 10 square gas is about 1.38 hours, the time for moving 100 square gas is 13.8 hours, and the time for moving 1000 square gas is 138 hours.

The counter single chip microcomputer is designed to automatically wake up once every n hours and controls the photoelectric transceiving board to read the numerical values of the units and the tens, wherein n is more than or equal to 1 and less than or equal to 6, and n =4 is preferably selected in the embodiment, namely, the counter single chip microcomputer automatically wakes up once every 4 hours.

In a specific embodiment, 10 pairs of photoelectric receiving and transmitting tubes need to be read every 4 hours of reading operation, 0.5ms is needed for reading every 1 pair of photoelectric receiving and transmitting tubes, the transmitting current of the transmitting tube is controlled to be 5mA, the maximum conducting current of the receiving tube is controlled to be 1mA, the running current of the single chip microcomputer of the counter is 1mA, the total current in the reading process is 7mA, and the total reading time is 5 ms. It can be calculated that the amount of electricity consumed to read the photoelectric counter every 4 hours is 7mA × 5ms =35mAs, about 0.0097 mAh. When the current of the photoelectric direct-reading counter in the dormant state is 200nA, the electricity consumed in 4-hour dormant state is calculated to be 0.0008mAh, the total electricity consumed in 4 hours is about 0.0105mAh, 210/0.0105 × 4=80000 hours can be used by using a CR2032 button cell (with the capacity of 210 mAh), the year is about 9.13 years in a conversion mode, and the year is larger than the actual service life of the membrane type gas meter.

The hundred digit value is read only when the ten digit value is turned, the ten digit value needs to be read for 1 time within 16 hours under the condition of maximum flow, and the ten digit value needs to be turned over within several days when the gas is used by a common household, so that the electric quantity consumed by reading the hundred digit character wheel can be ignored.

Further, when the master control unit of the gas meter needs to read data of the photoelectric direct-reading counter, the photoelectric direct-reading counter is powered, and after the photoelectric direct-reading counter detects that power is supplied, the photoelectric direct-reading counter reads numerical values of character wheels of the units, tens and hundreds counters and resets the sleep time for n hours.

And S2, the counter singlechip calculates whether the kilo-digit and the ten-thousand-digit need carry, and after the calculation is finished, the counter singlechip controls the photoelectric direct reading counter to enter a deep sleep state.

Specifically, when the hundred-digit value is detected to change, the current reading is recorded in a data memory of the single chip microcomputer of the counter for comparison with the next reading, specifically: when the comparison shows that the hundred-digit reading is turned once, adding 1 to the thousand-digit reading; when the kilo-digit reading is added to 10, the kilo-digit reading is added to 1 and the kilo-digit reading is set to 0. Furthermore, when the change of the hundred-digit value is detected, the current reading is recorded in the RAM of the single chip microcomputer of the counter and then stored in the ROM of the single chip microcomputer of the counter, so that the data loss caused by the abnormal resetting or power failure of the single chip microcomputer of the counter can be prevented.

In this embodiment, the final reading value read each time is recorded in the ROM of the single chip microcomputer of the counter, and is compared with the reading value at the next time, and whether the reading value is legal is determined, which specifically includes:

if the difference value of the two readings is detected to be larger than the preset maximum gas flow rate of n hours (in the embodiment, the diaphragm gas meter with the specification of G4 is taken as an example, and the maximum gas flow rate of 4 hours is 28.8), the occurrence of an abnormality is indicated, namely the readings are illegal, and the counter single chip microcomputer sends the abnormal information to a gas meter main control unit and the abnormal information is processed by the gas meter main control unit; otherwise, the reading is legal.

In this embodiment, the photoelectric direct reading counter is supplied with power for a long time, and only 3 reading values of the ones, tens, and hundreds are read, and the thousands and tens of thousands reading values are obtained through calculation. Because two sets of photoelectricity transceiver boards (in this embodiment, each set of photoelectricity transceiver board includes 5 pairs of photoelectric transmitting tubes and receiving tubes) have been reduced, the cost can be obviously saved, and because the use of photoelectricity transceiver boards has been reduced, the qualification rate of products can also be improved.

The foregoing merely illustrates the principles and preferred embodiments of the invention and many variations and modifications may be made by those skilled in the art in light of the foregoing description, which are within the scope of the invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种适用于污水检测流量计

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!