Anti-shake low-power-consumption metering circuit and novel water meter
By using pull-up anti-shake resistor and microcontroller in the water meter metering circuit, the sensitivity and accuracy of pulse detection are improved, power consumption is reduced, and the problems of poor anti-interference ability and high power consumption in the prior art are solved. Extend the service life of the water meter.
Patent Information
- Application Number
- CN202420690060.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-03
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2034-04-03
AI Technical Summary
The existing water metering circuit has poor anti-interference ability, which leads to unstable pulse signals and excessive power consumption, which affects battery life.
The pull-up anti-shake resistor R212 is used to couple it with the control pin IO1 and the pulse detection pin IO2 of the microcontroller. Through the control of the periodic timing element and the microcontroller, the sensitivity and accuracy of pulse detection are improved, and the interference of external signals is reduced. Set high resistance state when not detected to reduce power consumption.
It improves the anti-shake capability of the circuit, reduces false alarms and missed reports, extends the service life of the water meter, and reduces the power consumption of the circuit.
Smart Images

Figure CN222087074U_ABST
Abstract
Description
Technical Field
[0001] The utility model belongs to the technical field of water meter measurement, and specifically relates to an anti-shake and low-power consumption measurement circuit and a novel water meter. Background Art
[0002] In the water meter circuit, metering exists as an important function. Generally speaking, since most water meters are powered by batteries, the lower the power consumption of the metering circuit, the longer the life cycle of the water meter, so it is very important to reduce the power consumption of the metering circuit.
[0003] The pulses generated by the HALL device when the magnet approaches and moves away are sent to the MCU, and the MCU achieves the purpose of measurement by accumulating the number of pulses. Figure 1 In the circuit of the prior art, R212 has always been used as a pull-up resistor. However, if the resistance of the pull-up resistor R212 of the pulse input circuit is too large, the anti-interference ability of the circuit is poor, and the pulse is easily affected by other external signals such as high frequency, resulting in unstable pulses; and if the resistance of the pull-up resistor R212 is too small (the resistor discharges to the ground when the HALL output is low), the current is too large. Utility Model Content
[0004] In view of the above problems existing in the prior art, the utility model provides a metering circuit with a simple structure, which can effectively reduce the metering power consumption and improve the anti-shake capability of the circuit.
[0005] In a first aspect, the utility model provides an anti-shake and low-power consumption metering circuit, which is applied in a meter, and includes:
[0006] Hall element, used to generate pulse signal;
[0007] A pull-up anti-shake resistor R212, wherein a first end of the pull-up anti-shake resistor R212 is coupled to a pulse output end of the Hall element;
[0008] A microcontroller having a pulse detection pin IO2 for detecting a pulse signal and a control pin IO1, wherein the control pin IO1 is coupled to the second end of the pull-up anti-shake resistor R212, the normal output level of the control pin IO1 is a low level, and the pulse detection pin IO2 is coupled to the first end of the pull-up anti-shake resistor R212;
[0009] Periodic timing element, used for periodically outputting water meter working signals;
[0010] The microcontroller is used to receive the water meter working signal and set the output level of the control pin IO1 to a high level.
[0011] During the operation of the water meter, the microcontroller will continue to receive the water meter working signal, and the microcontroller will count the pulse signal. During this period, when the pulse detection pin IO2 of the microcontroller detects the pulse signal, the pull-up control pin IO1 is set to a high level to reversely offset the weak induced current generated by other external signals, which is convenient for detecting the pulse signal, can improve the sensitivity and accuracy of pulse detection, and effectively reduce the interference of external signals on the pulse, improve the anti-jitter ability of the circuit, make the detected pulse more stable, and reduce false alarms and missed alarms.
[0012] After the pulse detection is completed, the periodic timing element no longer sends out the water meter working signal, and the microcontroller does not receive the water meter working signal, indicating that no pulse signal will appear during the period, and the microcontroller sets the pull-up control pin IO1 to a high impedance state. In other words, at this time, the pull-up control pin IO1 presents a very high input impedance to the external circuit, and almost does not provide current to the external circuit, nor does it receive current from the external circuit. In this state, the pull-up control pin IO1 will not have any effect on the circuit connected to it, which is equivalent to disconnecting the pin from the external circuit, which can effectively reduce the impact on other components of the circuit, reduce the power consumption of the circuit, and extend the life of the meter.
[0013] As a preferred implementation, the resistance range of the pull-up anti-shake resistor R212 is 1K-20K.
[0014] As a preferred implementation, the periodic timing element is a timer built into the microcontroller.
[0015] As a preferred embodiment, it also includes a transistor Q1, and the microcontroller has an adjustment pin IO3. The collector of the transistor Q1 is coupled to the control pin IO1, the base is coupled to the adjustment pin IO3, and the emitter is coupled to the adjustment resistor R213. The other end of the resistor R213 is coupled to the electrical connection point between the pull-up anti-shake resistor R212 and the pulse detection pin IO2.
[0016] As a preferred implementation, the microcontroller is coupled with a voltage detection module for detecting the voltage of the control pin IO1, and the microcontroller is used to set the adjustment pin IO3 to a high level when the voltage of the control pin IO1 is less than a reference voltage value.
[0017] In a second aspect, the utility model also provides a new type of water meter, characterized in that it includes an anti-shake and low-power consumption metering circuit and a communication serial port as described above, and the communication serial port is communicatively connected to the MCU microcontroller of the metering circuit.
[0018] Compared with the prior art, the beneficial effects of the utility model are:
[0019] The microcontroller controls the mode of the pull-up control pin IO1 according to the detection pulse signal to control the on-off of the pull-up anti-shake resistor R212, which can improve the sensitivity and accuracy of pulse detection, effectively reduce the interference of external signals on the pulse, improve the anti-shake ability of the circuit, reduce the power consumption of the circuit, and extend the life of the instrument. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the utility model or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the utility model. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 It is a circuit diagram of the prior art.
[0022] Figure 2 It is a circuit schematic diagram of the utility model.
[0023] Figure 3 This is a circuit diagram of an anti-shake and low-power consumption metering circuit provided in the first embodiment of the utility model.
[0024] Figure 4 This is a circuit diagram of an anti-shake and low-power consumption metering circuit provided in the second embodiment of the utility model.
[0025] Figure numerals: 1. Hall element; 2. Microcontroller; 3. Voltage detection module. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0027] In the description of the embodiments of the present application, words such as "illustrative", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "illustrative", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "illustrative", "for example" or "for example" is intended to present related concepts in a concrete way.
[0028] In the description of the embodiments of the present application, the term "and / or" is only a kind of association relationship describing the associated objects, indicating that there may be three kinds of relationships, for example, A and / or B, which can represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0029] Reference Figure 1 In the circuit of the prior art, R212 has always been used as a pull-up resistor. However, if the resistance value of the pull-up resistor R212 of the pulse input circuit is too large, the anti-interference ability of the circuit is poor, and the pulse is easily affected by other external signals such as high frequency, resulting in unstable pulses; and if the resistance value of the pull-up resistor R212 is too small, the current is too large.
[0030] In view of the above-mentioned shortcomings of the prior art, the utility model connects one end of the pull-up anti-shake resistor R212 to the pull-up control pin IO1 of the MCU microcontroller 2, and the other end to the pulse detection pin IO2 of the microcontroller 2 and the pulse output end of the Hall element 1. The MCU microcontroller 2 samples and detects the pulse output end of the Hall element 1 through the pulse detection pin IO2, and controls the mode of the pull-up control pin IO1 to improve the sensitivity and accuracy of the pulse detection, improve the anti-shake ability of the circuit, and reduce the power consumption of the circuit.
[0031] Embodiment 1:
[0032] Reference Figure 2 and Figure 3 This embodiment provides an anti-shake and low-power consumption metering circuit, which is applied in a meter device, and includes:
[0033] Hall element 1, used for generating a pulse signal;
[0034] A pull-up anti-shake resistor R212, wherein a first end of the pull-up anti-shake resistor R212 is coupled to a pulse output end of the Hall element 1;
[0035] Periodic timing element, used for periodically outputting water meter working signals;
[0036] The microcontroller 2 has a pulse detection pin IO2 for detecting a pulse signal and a control pin IO1, wherein the control pin IO1 is coupled to the second end of the pull-up anti-shake resistor R212, the normal output level of the control pin IO1 is a low level, and the pulse detection pin IO2 is coupled to the first end of the pull-up anti-shake resistor R212;
[0037] The microcontroller 2 is used to receive the water meter working signal and set the output level of the control pin IO1 to a high level.
[0038] Specific:
[0039] The microcontroller 2 is also referred to as an MCU. In the present embodiment, the periodic timing element is a timer inside the MCU. In other embodiments, the periodic timing element may also be an external timing chip. The periodic timing element may set a working cycle for the MCU, and a working cycle is divided into a detection period and a sleep period. From a hardware perspective, it can be understood that the processor of the MCU receives the water meter working signal output by the periodic timing element, so that the MCU enters the detection period, indicating that a pulse signal will be generated. The MCU sets the pull-up control pin IO1 to a high level, which is convenient for detecting the pulse signal, can improve the sensitivity and accuracy of the pulse detection, and effectively reduce the interference of external signals on the pulse, improve the anti-jitter capability of the circuit, make the detected pulse more stable, and reduce false alarms and missed alarms.
[0040] After the pulse detection is completed, the MCU processor cannot receive the water meter working signal output by the periodic timing element, and the MCU enters the sleep period. The MCU sets the pull-up control pin IO1 to a high impedance state. At this time, the pull-up control pin IO1 presents a very high input impedance to the external circuit, and almost does not provide current to the external circuit, nor does it receive current from the external circuit. In this state, the pull-up control pin IO1 will not have any effect on the circuit connected to it, which is equivalent to disconnecting the pin from the external circuit, which can effectively reduce the impact on other components of the circuit, reduce the power consumption of the circuit, and extend the life of the meter.
[0041] Furthermore, the detection period of the pulse detection pin IO2 and the resistance of the pull-up anti-shake resistor R212 are adjusted according to the actual flow rate in the meter to balance the detection sensitivity and circuit power consumption. The resistance range of the pull-up anti-shake resistor R212 is 1K-20k.
[0042] It should be noted that the working cycle is preset in the MCU control program by personnel according to the actual water flow rate in the water meter. The specific time of the detection period and the sleep period and the resistance value of the pull-up anti-shake resistor R212 can be set according to the actual situation;
[0043] If the actual water flow rate in the water meter is slow and the pulse generation cycle is long, the detection cycle should be increased and the resistance value of the pull-up anti-shake resistor R212 should be increased;
[0044] If the actual water flow rate in the water meter is faster, the detection period should be shortened accordingly and the resistance value of the pull-up anti-shake resistor R212 should be reduced.
[0045] By adjusting the detection period of the pulse detection pin IO2 and the resistance value of the pull-up anti-shake resistor R212, the flexibility of the circuit design is increased. The parameters can be adjusted according to actual needs to adapt to different application scenarios. The detection sensitivity can also be controlled and the circuit power consumption can be reduced.
[0046] Embodiment 2:
[0047] Reference Figure 4 , the difference between this embodiment and the first embodiment is that: the microcontroller 2 has an adjustment pin IO3, the adjustment pin IO3 is coupled to a transistor Q1, the transistor Q1 is an NPN transistor, the collector of the transistor Q1 is coupled to the control pin IO, the base is coupled to the adjustment pin IO3, the emitter is coupled to the adjustment resistor R213, and the other end of the adjustment resistor R213 is coupled to the electrical connection point between the pull-up anti-shake resistor R212 and the pulse detection pin IO2. The microcontroller 2 is coupled to a voltage detection module 3 for detecting the voltage of the control pin IO1. The voltage detection module 3 is an existing voltage detection chip. The microcontroller 2 is used to set the adjustment pin IO3 to a high level when the voltage of the control pin IO1 is less than the reference value. It should be noted that the output voltage of the adjustment pin IO3 is less than the output voltage of the control pin IO1 to meet the transistor conduction condition, which can be achieved by a step-down switching regulator, adjusting the feedback resistor ratio, etc.
[0048] The implementation principle of this embodiment is as follows: after the voltage detection module 3 detects the voltage information of the pin IO1, the voltage information is transmitted to the microcontroller 2 through other pins. After the water meter battery is used for a long time and is out of power, the voltage is likely to drop, causing the output voltage of the single-chip computer, that is, the output voltage of the control pin IO1, to also drop; after the microcontroller 2 determines that the voltage of the control pin IO1 is less than the internal preset reference voltage value, it will set the adjustment pin IO3 to a high level during the detection period; at this time, the transistor Q1 is turned on, and the adjustment resistor R213 is connected in parallel with the pull-up anti-shake resistor R212 to reduce the resistance value of the total resistance, thereby increasing the anti-interference ability of the metering circuit, so that the ability of the metering circuit to resist interference from other external signals is not easily affected by the voltage drop of the pin IO1.
[0049] The utility model also provides a novel water meter, including an anti-shake and low-power consumption metering circuit and a communication serial port as described above, wherein the communication serial port is coupled to an MCU microcontroller 2 of the metering circuit via a data line to achieve communication connection.
[0050] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. An anti-shake and low-power consumption metering circuit, used in a meter, characterized in that: include: A Hall element (1), used for generating a pulse signal; A pull-up anti-shake resistor R212, wherein a first end of the pull-up anti-shake resistor R212 is coupled to a pulse output end of the Hall element (1); A microcontroller (2) having a pulse detection pin IO2 for detecting a pulse signal and a control pin IO1, wherein the control pin IO1 is coupled to the second end of a pull-up anti-shake resistor R212, the normal output level of the control pin IO1 is a low level, and the pulse detection pin IO2 is coupled to the first end of the pull-up anti-shake resistor R212; Periodic timing element, used for periodically outputting water meter working signals; The microcontroller (2) is used for receiving a water meter working signal and setting the output level of the control pin IO1 to a high level.
2. The anti-shake and low-power consumption metering circuit according to claim 1, characterized in that: The resistance range of the pull-up anti-shake resistor R212 is 1K-20k.
3. The anti-shake and low-power consumption metering circuit according to claim 1, characterized in that: The periodic timing element is a timer built into the microcontroller (2).
4. The anti-shake and low-power consumption metering circuit according to claim 1, characterized in that: The microcontroller (2) further comprises a transistor Q1, wherein the microcontroller (2) has an adjustment pin IO3, wherein the collector of the transistor Q1 is coupled to the control pin IO1, the base is coupled to the adjustment pin IO3, and the emitter is coupled to an adjustment resistor R213, wherein the other end of the adjustment resistor R213 is coupled to an electrical connection point between a pull-up anti-shake resistor R212 and a pulse detection pin IO2.
5. The anti-shake and low-power consumption metering circuit according to claim 4, characterized in that: The microcontroller (2) is coupled to a voltage detection module (3) for detecting the voltage of the control pin IO1. The microcontroller (2) is used to set the adjustment pin IO3 to a high level when the voltage of the control pin IO1 is less than a reference voltage value.
6. A new type of water meter, characterized by: It comprises an anti-shake and low-power consumption metering circuit and a communication serial port as described in any one of claims 1 to 5, wherein the communication serial port is communicatively connected to an MCU microcontroller (2) of the metering circuit.
