Backup battery switching circuit, switching method and metering instrument
Through the backup battery switching circuit and method, the problem that the clock battery cannot be continuously powered is solved, and the low-power operation of the MCU when the meter reading battery is undervoltage or is removed is realized, which saves the clock battery power and ensures the reliability of the metering instrument.
Patent Information
- Application Number
- CN202510031321.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, the clock battery is not specifically unable to supply the low-power operation and open-cover detection circuit of the MCU, and when the meter reading battery is undervoltage or removed, it cannot continuously supply power, resulting in the open-cover detection function failing.
The backup battery switching circuit and method are adopted, including main power supply sampling and power supply circuit, meter reading battery sampling and power supply circuit, clock battery power supply circuit, first and second LDO circuits, power flow control circuit and MCU. The power supply flow control circuit is switched to the meter reading battery or clock battery after the main power supply is powered off, ensuring that the low-power consumption operation of the MCU and the open-cover detection circuit can still supply power when the meter reading battery is undervoltage or is removed.
When the meter reading battery is undervoltage or is removed, ensure that the low-power operation of the MCU and the open-cover detection circuit continue to be powered, effectively save the clock battery power and maintain the reliable operation of the real-time clock circuit.
Smart Images

Figure CN119891503A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of electronic information technology, and in particular relates to a backup battery switching circuit, a switching method and a metering instrument. Background Art
[0002] At present, the three-phase meter products in the Guonan Grid market have clock batteries and meter reading batteries. The clock battery is used to power the real-time clock circuit, and the meter reading battery is used to power the low-power operation of the MCU, which can support functions such as key display, infrared reading, and cover opening detection. Under normal circumstances, the nominal voltage of the clock battery is 3.6V, which is welded on the circuit board and cannot be replaced on site. The nominal voltage of the meter reading battery is 6V and can be replaced on site. Now the State Grid has updated the technical specifications, requiring that the power meter be powered off when the meter reading battery is undervoltage or removed, and the cover opening event can still be recorded when the meter cover is opened two days after the power outage. Since the existing three-phase meter MCU power supply scheme is that the clock battery is used to power the real-time clock circuit, if the meter reading battery is undervoltage or removed, the power supply to maintain the low-power operation of the MCU and the cover opening detection circuit is out of power, and the cover opening detection function fails. The meter can only maintain the clock operation, and cannot supply the low-power operation and cover opening detection circuit of the MCU. It is also impossible to shut down the clock battery to provide a channel for powering the low-power operation and cover opening detection circuit of the MCU after the clock battery supplies the low-power operation and cover opening detection circuit of the MCU for a period of time.
[0003] The patent with announcement number CN106532908B provides a dual-core electric energy meter and its power control method. The dual-core electric energy meter includes: a metering core, which is used to realize the electric energy metering function; a management core, which is used to realize the non-electric energy metering management function; and a power management control module, which is used to realize independent power supply to the metering core and the management core. Among them, the power management control module is composed of a main power supply, a clock battery and a stop-reading battery. Its control method is that when the main power supply is powered on, all power supplies are provided by the main power supply, and the metering core is powered by an independent power supply branch; when the main power supply is powered off, the clock battery provides power for the clock circuit RTC of the metering core, and the stop-reading battery provides power for the management core; when the clock battery is replaced, the supercapacitor temporarily provides power for the clock circuit RTC in the metering core. The clock battery in this patent is also specially used to power the clock circuit, and cannot be used for the cover opening detection circuit after power failure, and has the same disadvantages as the prior art.
[0004] Therefore, how to make the meter power off when the meter reading battery is undervoltage or removed, so that the clock battery can be used for low-power operation of the MCU and power supply of the cover opening detection circuit to make the cover opening detection function effective, is an urgent problem to be solved by personnel in this technical field. Summary of the invention
[0005] In view of the deficiencies in the prior art, the purpose of the present invention is to provide a backup battery switching circuit to solve the problem that in the prior art, the clock battery cannot specifically supply power to the low-power operation and cover-opening detection circuit of the MCU, nor can the clock battery be turned off to provide a channel for power supply to the low-power operation and cover-opening detection circuit of the MCU after the clock battery supplies the low-power operation and cover-opening detection circuit of the MCU for a period of time; in addition, the present invention also provides a backup battery switching method and a metering instrument.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a backup battery switching circuit, comprising: a main power sampling and power supply circuit, a meter reading battery sampling and power supply circuit, a clock battery power supply circuit, a first LDO circuit, a second LDO circuit, a power flow control circuit and an MCU; the input of the main power sampling and power supply circuit is connected to the main power supply VHH, the output VBB_IN is respectively connected to the output of the meter reading battery sampling and power supply circuit, the input of the first LDO circuit, and the input of the second LDO circuit, the output VRTC of the clock battery power supply circuit is connected to the real-time clock circuit power supply VRTC, the power pin of the power flow control circuit is connected to the real-time clock circuit power supply VRTC, the other end of the power flow control circuit is connected to the output VDD of the first LDO circuit, the output end VBB of the second LDO circuit is connected to the power pin of the MCU, the voltage-divided sampling signal output LVD of the main power sampling and power supply circuit is connected to the power-off detection port LVDIN of the MCU, the voltage-divided sampling signal output VB_6V of the meter reading battery sampling and power supply circuit is connected to the analog port ADCIN of the MCU, and the controlled end BAT_CTRL of the power flow control circuit is connected to an IO port of the MCU.
[0008] Furthermore, the main power sampling and power supply circuit includes a resistor R1, a resistor R2, a capacitor C1 and a diode D2, one end of the resistor R1 and an anode of the diode D2 are both connected to the main power input VHH, the other end of the resistor R1 is connected to one end of the resistor R2 and one end of the capacitor C1, and then connected to the power-off detection port LVDIN of the MCU, the other end of the resistor R2 and the other end of the capacitor C1 are both connected to the power ground, the cathode of the diode D2 is connected to the output of the meter reading battery sampling and power supply circuit as the output VBB_IN, and is also connected to the input of the first LDO circuit and the input of the second LDO circuit.
[0009] Furthermore, the meter reading battery sampling and power supply circuit includes a resistor R4, a resistor R5, a resistor R6, a capacitor C2, a meter reading battery BAT2 and a diode D3. The negative electrode of the meter reading battery BAT2 is connected to the power supply ground, and the positive electrode is connected to one end of the resistor R6. The other end of the resistor R6 is connected to one end of the resistor R4 and the anode of the diode D3 respectively. The other end of the resistor R4 is connected to one end of the resistor R5 and one end of the capacitor C2, and then connected to the analog port ADCIN of the MCU. The other end of the resistor R5 and the other end of the capacitor C2 are both connected to the power supply ground. The cathode of the diode D3 is connected to the output of the main power sampling and power supply circuit as the output VBB_IN, and is also connected to the input of the first LDO circuit and the input of the second LDO circuit.
[0010] Furthermore, the clock battery power supply circuit includes a clock battery BAT1, a resistor R3 and a diode D1, the negative electrode of the clock battery BAT1 is connected to the power ground, the positive electrode is connected to one end of the resistor R3, the other end of the resistor R3 is connected to the anode of the diode D1, and the cathode of the diode D1 is connected to the real-time clock circuit power supply VRTC as the output VRTC, and is also connected to the power flow control circuit.
[0011] Furthermore, the power flow control circuit includes a diode D4, a diode D5 and a controlled switch K. One end of the controlled switch K is connected to the cathode of the diode D4 and then connected to VRTC. The other end of the controlled switch K is connected to the anode of the diode D5. The controlled end BAT_CTRL of the controlled switch K is connected to an IO port of the MCU. The anode of the diode D4 is connected to the cathode of the diode D5 and then connected to the output VDD of the first LDO circuit.
[0012] Furthermore, the first LDO circuit includes a voltage stabilizing chip U1, a capacitor C4 and a capacitor C6. The power input pin of the voltage stabilizing chip U1 is connected to one end of the capacitor C4 and then connected to VBB_IN. The power output pin of the voltage stabilizing chip U1 is connected to one end of the capacitor C6 and then connected to the power flow control circuit as the output VDD. The ground pin of the voltage stabilizing chip U1, the other end of the capacitor C4 and the other end of the capacitor C6 are all connected to the power ground.
[0013] Furthermore, the second LDO circuit includes a voltage stabilizing chip U2, a capacitor C5 and a capacitor C7. The power input pin of the voltage stabilizing chip U2 is connected to one end of the capacitor C5 and then to VBB_IN. The power output pin of the voltage stabilizing chip U2 is connected to one end of the capacitor C7 and then used as the output VBB to connect the power pin VCC of the MCU, the power supply VBB of the cover opening detection circuit and other low-power circuit power supplies. The ground pin of the voltage stabilizing chip U2, the other end of the capacitor C5 and the other end of the capacitor C7 are all connected to the power ground.
[0014] In a second aspect, the present invention provides a backup battery switching method, comprising the following steps: S10, MCU is initialized and runs, BAT_CTRL is in any state; S20, real-time detection of LVD signal to determine whether the main power supply is powered off, if so, execute step S30; if not, repeat the step S20; S30, perform data preservation processing, and control BAT_CTRL output high, open the path for VRTC in the power flow control circuit to supply power to VDD; S40, detect VB_6V signal regularly according to preset cycle 1 to determine whether the meter reading battery is undervoltage, if so, control BAT_CTRL output high, open the path for VRTC in the power flow control circuit to supply power to VDD and start timing, the MCU enters low power consumption mode, and executes the step S50; if not , then control BAT_CTRL to be in a high impedance state or output low, close the path from VRTC in the power flow control circuit to VDD to supply power, the MCU enters a low power consumption mode, and repeats the step S40; S50, detect the VB_6V signal regularly according to the preset cycle 2 to determine whether the meter reading battery is undervoltage, if so, continue timing, and execute step S60, if not, reset the timing, execute low power consumption initialization, and repeat the step S40; S60, determine whether the timing reaches the preset time length, if so, control BAT_CTRL to be in a high impedance state or output low, close the path from VRTC in the power flow control circuit to VDD to supply power, so as to close the low power consumption power supply of the MCU, keep the real-time clock circuit running, and save the clock battery power; if not, repeat the step S60.
[0015] In a third aspect, the present invention provides a metering instrument, including the above-mentioned backup battery switching circuit, and adopting the above-mentioned backup battery switching method.
[0016] Compared with the prior art, the backup battery switching circuit, switching method and metering instrument provided by the present invention have at least the following beneficial effects:
[0017] In the prior art, the clock battery cannot specifically supply the low-power operation and cover-opening detection circuit of the MCU, nor can the clock battery shut down the power supply channel for the low-power operation and cover-opening detection circuit of the MCU after the clock battery supplies the low-power operation and cover-opening detection circuit of the MCU for a period of time. The present invention has a simple structure and convenient operation. When the meter reading battery is undervoltage or removed and the power is cut off, the clock battery can be switched to supply power to the low-power operation and cover-opening detection circuit of the MCU, so that the cover-opening detection function is effective, and the clock battery can be shut down after running for a preset time, providing a channel for supplying power to the low-power operation and cover-opening detection circuit of the MCU, saving the clock battery power, and having little impact on the reliable operation of the real-time clock circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the scheme of the present invention, a brief introduction is given below to the figures required for use in the description of the embodiments. Obviously, the figures described below are some embodiments of the present invention. For ordinary technicians in this field, other figures can be obtained based on these figures without paying any creative work.
[0019] Figure 1 A circuit diagram of a backup battery switching circuit provided by an embodiment of the present invention;
[0020] Figure 2 A power flow control circuit diagram of a backup battery switching circuit provided by an embodiment of the present invention;
[0021] Figure 3 A circuit diagram of a backup battery switching circuit provided by another embodiment of the present invention;
[0022] Figure 4 A circuit diagram of a backup battery switching circuit provided by another embodiment of the present invention;
[0023] Figure 5 A flowchart of a backup battery switching method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field of the present invention; the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. For example, the directions or positions indicated by the terms "length", "width", "up", "down", "left", "right", "front", "back", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. are based on the directions or positions shown in the drawings, which are only for the convenience of description and should not be understood as limitations on the present technical solution.
[0025] The terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions; the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In the specification and claims of the present invention and the above-mentioned drawings, when an element is referred to as being "fixed to" or "mounted on" or "disposed on" or "connected to" another element, it may be directly or indirectly located on the other element. For example, when an element is referred to as being "connected to" another element, it may be directly or indirectly connected to the other element.
[0026] In addition, reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] An embodiment of the present invention provides a backup battery switching circuit, which is applied to a process of realizing a cover opening detection function after a meter loses power. The backup battery switching circuit includes:
[0028] A main power sampling and power supply circuit, a meter reading battery sampling and power supply circuit, a clock battery power supply circuit, a first LDO circuit, a second LDO circuit, a power flow control circuit and an MCU; the input of the main power sampling and power supply circuit is connected to the main power supply VHH, the output VBB_IN is respectively connected to the output of the meter reading battery sampling and power supply circuit, the input of the first LDO circuit and the input of the second LDO circuit, the output VRTC of the clock battery power supply circuit is connected to the real-time clock circuit power supply VRTC, the power supply pin of the power flow control circuit is connected to the real-time clock circuit power supply VRTC, the other end of the power flow control circuit is connected to the output VDD of the first LDO circuit, the output end VBB of the second LDO circuit is connected to the power supply pin of the MCU, the voltage-divided sampling signal output LVD of the main power sampling and power supply circuit is connected to the power-off detection port LVDIN of the MCU, the voltage-divided sampling signal output VB_6V of the meter reading battery sampling and power supply circuit is connected to the analog port ADCIN of the MCU, and the controlled end BAT_CTRL of the power flow control circuit is connected to an IO port of the MCU.
[0029] The present invention has a simple structure and is convenient to operate. When the meter reading battery is under-voltage or removed and a power outage occurs, the clock battery can be switched to the low-power operation power supply of the MCU to enable the cover opening detection function to be effective. After running for a preset period of time, the clock battery is turned off to provide a channel for the low-power operation of the MCU and the cover opening detection circuit, thereby effectively saving the power of the clock battery and having little impact on the reliable operation of the real-time clock circuit.
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0031] The embodiment of the present invention provides a backup battery switching circuit, which is applied to the process of realizing the cover opening detection function after the meter loses power. Figure 1 and Figure 2 In this embodiment, the backup battery switching circuit includes:
[0032] A main power sampling and power supply circuit, a meter reading battery sampling and power supply circuit, a clock battery power supply circuit, a first LDO circuit, a second LDO circuit, a power flow control circuit and an MCU; the input of the main power sampling and power supply circuit is connected to the main power supply VHH, the output VBB_IN is respectively connected to the output of the meter reading battery sampling and power supply circuit, the input of the first LDO circuit and the input of the second LDO circuit, the output VRTC of the clock battery power supply circuit is connected to the real-time clock circuit power supply VRTC, the power supply pin of the power flow control circuit is connected to the real-time clock circuit power supply VRTC, the other end of the power flow control circuit is connected to the output VDD of the first LDO circuit, the output end VBB of the second LDO circuit is connected to the power supply pin of the MCU, the voltage-divided sampling signal output LVD of the main power sampling and power supply circuit is connected to the power-off detection port LVDIN of the MCU, the voltage-divided sampling signal output VB_6V of the meter reading battery sampling and power supply circuit is connected to the analog port ADCIN of the MCU, and the controlled end BAT_CTRL of the power flow control circuit is connected to an IO port of the MCU. By means of the backup battery switching circuit provided by the embodiment of the present invention, when the MCU does not participate in the control, the MCU, VRTC, the cover opening detection circuit and other low-power circuits are preferentially powered by the main power supply VHH. When the main power supply VHH is out of power, it is automatically switched to the meter reading battery BAT2 with a nominal voltage of 6V for power supply. In both cases, the power of the clock battery is not consumed. When the voltage of the meter reading battery BAT2 is lower than the voltage of the clock battery BAT1 or the meter reading battery BAT2 is not installed, the clock battery with a nominal voltage of 3.6V is used to power the VRTC, while the MCU, the cover opening detection circuit and other low-power circuits will not operate without power.
[0033] Furthermore, in this embodiment, the main power sampling and power supply circuit includes a resistor R1, a resistor R2, a capacitor C1 and a diode D2. One end of the resistor R1 and the anode of the diode D2 are both connected to the main power input VHH. The other end of the resistor R1 is connected to one end of the resistor R2 and one end of the capacitor C1, and then connected to the power-off detection port LVDIN of the MCU. The other end of the resistor R2 and the other end of the capacitor C1 are both connected to the power ground. The cathode of the diode D2 is connected to the output of the meter reading battery sampling and power supply circuit as the output VBB_IN, and is also connected to the input of the first LDO circuit and the input of the second LDO circuit.
[0034] Furthermore, in the present embodiment, the meter reading battery sampling and power supply circuit includes a resistor R4, a resistor R5, a resistor R6, a capacitor C2, a meter reading battery BAT2 and a diode D3. The negative electrode of the meter reading battery BAT2 is connected to the power supply ground, and the positive electrode is connected to one end of the resistor R6. The other end of the resistor R6 is connected to one end of the resistor R4 and the anode of the diode D3 respectively. The other end of the resistor R4 is connected to one end of the resistor R5 and one end of the capacitor C2, and then connected to the analog port ADCIN of the MCU. The other end of the resistor R5 and the other end of the capacitor C2 are both connected to the power supply ground. The cathode of the diode D3 is connected to the output of the main power sampling and power supply circuit as the output VBB_IN, and is also connected to the input of the first LDO circuit and the input of the second LDO circuit.
[0035] Furthermore, in this embodiment, the clock battery power supply circuit includes a clock battery BAT1, a resistor R3 and a diode D1. The negative electrode of the clock battery BAT1 is connected to the power ground, the positive electrode is connected to one end of the resistor R3, the other end of the resistor R3 is connected to the anode of the diode D1, and the cathode of the diode D1 is connected to the real-time clock circuit power supply VRTC as the output VRTC, and is also connected to the power flow control circuit.
[0036] Further, in this embodiment, if Figure 1 As shown, the power flow control circuit includes a diode D4, a diode D5 and a controlled switch K. One end of the controlled switch K is connected to the cathode of the diode D4 and then to VRTC. The other end of the controlled switch K is connected to the anode of the diode D5. The controlled end BAT_CTRL of the controlled switch K is connected to an IO port of the MCU. The anode of the diode D4 is connected to the cathode of the diode D5 and then to the output VDD of the first LDO circuit. After the MCU participates in the control, the controlled switch K can be turned on as appropriate, so that VRTC supplies power to the output VDD of the first LDO circuit through the controlled switch K and the diode D5, and then supplies power to the low-power power supply VBB_IN through the MOS inside the voltage regulator chip U1, and then supplies power to the MCU, the cover opening detection circuit and other low-power circuits through the second LDO circuit.
[0037] In another embodiment, Figure 2 As shown, the power flow control circuit includes a diode D4, a diode D5 and a controlled switch K. One end of the controlled switch K is connected to the cathode of the diode D4 and then connected to VRTC. The other end of the controlled switch K is connected to the anode of the diode D5. The controlled end BAT_CTRL of the controlled switch K is connected to an IO port of the MCU. The anode of the diode D4 is connected to the output VDD of the first LDO circuit, and the cathode of the diode D5 is connected to the low-power power supply VBB_IN. The MCU turns on the controlled switch K, so that VRTC supplies power to the low-power power supply VBB_IN through the controlled switch K and the diode D5, and then supplies power to the MCU, the cover opening detection circuit and other low-power circuits through the second LDO circuit.
[0038] In another embodiment, Figure 3 As shown, the power flow control circuit includes a diode D4, a diode D5, a buffer U3 and a resistor R7. The power pin of the buffer U3 is connected to VRTC, the output pin of the buffer U3 is connected to the anode of the diode D5, the enable end of the buffer U3, the signal input end of the buffer U3 and one end of the resistor R7 are connected to an IO port BAT_CTRL of the MCU, the power ground pin of the buffer U3 and the other end of the resistor R7 are both connected to the power ground, the anode of the diode D4 is connected to the cathode of the diode D5 and then connected to the output VDD of the first LDO circuit, and the cathode of the diode D4 is connected to VRTC.
[0039] In another embodiment, Figure 4 As shown, the power flow control circuit includes a diode D4, a diode D5, a PMOS tube Q1, an NMOS tube Q2, a resistor R7 and a resistor R8. The source of the PMOS tube Q1 is connected to one end of the resistor R8 and the cathode of the diode D4, and then connected to VRTC. The anode of the diode D4 is connected to the output VDD of the first LDO circuit. The other end of the resistor R8 is connected to the gate of the PMOS tube Q1 and the drain of the NMOS tube Q2. The source of the PMOS tube Q1 is connected to the anode of the diode D5. The cathode of the diode D5 is connected to VBB_IN as an output. The source of the NMOS tube Q2 is connected to the power ground. The gate of the NMOS tube Q2 is connected to one end of the resistor R7 and then connected to an IO port BAT_CTRL of the MCU. The other end of the resistor R7 is connected to the power ground.
[0040] Furthermore, in this embodiment, the first LDO circuit includes a voltage regulator chip U1, a capacitor C4 and a capacitor C6. The power input pin of the voltage regulator chip U1 is connected to one end of the capacitor C4 and then connected to VBB_IN. The power output pin of the voltage regulator chip U1 is connected to one end of the capacitor C6 and then connected to the power flow control circuit as the output VDD. The ground pin of the voltage regulator chip U1, the other end of the capacitor C4 and the other end of the capacitor C6 are all connected to the power ground.
[0041] Furthermore, in this embodiment, the second LDO circuit includes a voltage regulator chip U2, a capacitor C5 and a capacitor C7. The power input pin of the voltage regulator chip U2 is connected to one end of the capacitor C5 and then connected to VBB_IN. The power output pin of the voltage regulator chip U2 is connected to one end of the capacitor C7 and then used as the output VBB to connect the power pin VCC of the MCU, the power supply VBB of the cover opening detection circuit and other low-power circuit power supplies. The ground pin of the voltage regulator chip U2, the other end of the capacitor C5 and the other end of the capacitor C7 are all connected to the power ground.
[0042] The embodiment of the present invention further provides a backup battery switching method, which is applied to the backup battery switching circuit of the above embodiment. Figure 5 As shown, in this embodiment, the backup battery switching method includes the following steps:
[0043] S10, MCU initializes and runs, BAT_CTRL is in any state;
[0044] S20, real-time detection of LVD signal to determine whether the main power supply is powered off, if so, executing step S30; if not, repeating the step S20;
[0045] S30, perform data saving processing, and control BAT_CTRL output to be high, and open the path for VRTC in the power flow control circuit to supply power to VDD;
[0046] S40, regularly detecting the VB_6V signal according to a preset cycle 1 to determine whether the meter reading battery is undervoltage, if so, controlling BAT_CTRL to output high, opening the path for VRTC in the power flow control circuit to supply power to VDD and starting timing, the MCU enters a low power consumption mode, and executes the step S50; if not, controlling BAT_CTRL to be in a high impedance state or output low, closing the path for VRTC in the power flow control circuit to supply power to VDD, the MCU enters a low power consumption mode, and repeating the step S40;
[0047] S50, regularly detecting the VB_6V signal according to the preset cycle 2 to determine whether the meter reading battery is under-voltage, if so, continue timing and execute step S60, if not, reset the timing, execute low power initialization, and repeat the step S40;
[0048] S60, determining whether the timing reaches a preset duration, if so, controlling BAT_CTRL to be in a high impedance state or outputting low, closing the path for VRTC in the power flow control circuit to supply power to VDD, so as to close the low-power power supply of the MCU, keep the real-time clock circuit running, and save the clock battery power; if not, repeating step S60.
[0049] An embodiment of the present invention further provides a metering instrument, comprising the backup battery switching circuit of the above embodiment, and adopting the backup battery switching method of the above embodiment.
[0050] The backup battery switching circuit, switching method and metering instrument described in the above embodiments are compared with the prior art, in which the clock battery in the prior art cannot specifically supply the low-power operation and cover-opening detection circuit of the MCU, nor can the clock battery supply the low-power operation and cover-opening detection circuit of the MCU with power supply channels after a period of time. The present invention has a simple structure and convenient operation. When the meter reading battery is undervoltage or removed and the power is cut off, the clock battery can be switched to supply power to the low-power operation and cover-opening detection circuit of the MCU, so that the cover-opening detection function is effective, and the clock battery can be turned off after a preset period of operation, providing a channel for supplying power to the low-power operation and cover-opening detection circuit of the MCU, saving the clock battery power, and having little impact on the reliable operation of the real-time clock circuit.
[0051] Obviously, the embodiments described above are only preferred embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are shown in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A backup battery switching circuit, characterized in that: include: Main power sampling and power supply circuit, meter reading battery sampling and power supply circuit, clock battery power supply circuit, first LDO circuit, second LDO circuit, power flow control circuit and MCU; The input of the main power sampling and power supply circuit is connected to the main power supply VHH, the output VBB_IN is connected to the output of the meter reading battery sampling and power supply circuit, the input of the first LDO circuit, and the input of the second LDO circuit respectively, the output VRTC of the clock battery power supply circuit is connected to the real-time clock circuit power supply VRTC, the power pin of the power flow control circuit is connected to the real-time clock circuit power supply VRTC, the other end of the power flow control circuit is connected to the output VDD of the first LDO circuit, the output end VBB of the second LDO circuit is connected to the power pin of the MCU, the voltage-divided sampling signal output LVD of the main power sampling and power supply circuit is connected to the power-off detection port LVDIN of the MCU, the voltage-divided sampling signal output VB_6V of the meter reading battery sampling and power supply circuit is connected to the analog port ADCIN of the MCU, and the controlled end BAT_CTRL of the power flow control circuit is connected to an IO port of the MCU.
2. A backup battery switching circuit according to claim 1, characterized in that: The main power sampling and power supply circuit includes a resistor R1, a resistor R2, a capacitor C1 and a diode D2. One end of the resistor R1 and an anode of the diode D2 are both connected to the main power input VHH. The other end of the resistor R1 is connected to one end of the resistor R2 and one end of the capacitor C1, and then connected to the power-off detection port LVDIN of the MCU. The other end of the resistor R2 and the other end of the capacitor C1 are both connected to the power ground. The cathode of the diode D2 is connected to the output of the meter reading battery sampling and power supply circuit as an output VBB_IN, and is also connected to the input of the first LDO circuit and the input of the second LDO circuit.
3. A backup battery switching circuit according to claim 1, characterized in that: The meter reading battery sampling and power supply circuit includes a resistor R4, a resistor R5, a resistor R6, a capacitor C2, a meter reading battery BAT2 and a diode D3. The negative electrode of the meter reading battery BAT2 is connected to the power supply ground, and the positive electrode is connected to one end of the resistor R6. The other end of the resistor R6 is connected to one end of the resistor R4 and the anode of the diode D3 respectively. The other end of the resistor R4 is connected to one end of the resistor R5 and one end of the capacitor C2, and then connected to the analog port ADCIN of the MCU. The other end of the resistor R5 and the other end of the capacitor C2 are both connected to the power supply ground. The cathode of the diode D3 is connected to the output of the main power sampling and power supply circuit as an output VBB_IN, and is also connected to the input of the first LDO circuit and the input of the second LDO circuit.
4. A backup battery switching circuit according to claim 1, characterized in that: The clock battery power supply circuit includes a clock battery BAT1, a resistor R3 and a diode D1. The negative electrode of the clock battery BAT1 is connected to the power ground, the positive electrode is connected to one end of the resistor R3, the other end of the resistor R3 is connected to the anode of the diode D1, and the cathode of the diode D1 is connected to the real-time clock circuit power supply VRTC as an output VRTC, and is also connected to the power flow control circuit.
5. A backup battery switching circuit according to claim 1, characterized in that: The power flow control circuit includes a diode D4, a diode D5 and a controlled switch K. One end of the controlled switch K is connected to the cathode of the diode D4 and then connected to VRTC. The other end of the controlled switch K is connected to the anode of the diode D5. The controlled end BAT_CTRL of the controlled switch K is connected to an IO port of the MCU. The anode of the diode D4 is connected to the cathode of the diode D5 and then connected to the output VDD of the first LDO circuit.
6. A backup battery switching circuit according to claim 1, characterized in that: The first LDO circuit includes a voltage stabilizing chip U1, a capacitor C4 and a capacitor C6. The power input pin of the voltage stabilizing chip U1 is connected to one end of the capacitor C4 and then to VBB_IN. The power output pin of the voltage stabilizing chip U1 is connected to one end of the capacitor C6 and then connected to the power flow control circuit as the output VDD. The ground pin of the voltage stabilizing chip U1, the other end of the capacitor C4 and the other end of the capacitor C6 are all connected to the power ground.
7. A backup battery switching circuit according to claim 1, characterized in that: The second LDO circuit includes a voltage stabilizing chip U2, a capacitor C5 and a capacitor C7. The power input pin of the voltage stabilizing chip U2 is connected to one end of the capacitor C5 and then to VBB_IN. The power output pin of the voltage stabilizing chip U2 is connected to one end of the capacitor C7 and then used as the output VBB to connect the power pin VCC of the MCU, the power supply VBB of the cover opening detection circuit and other low-power circuit power supplies. The ground pin of the voltage stabilizing chip U2, the other end of the capacitor C5 and the other end of the capacitor C7 are all connected to the power ground.
8. A backup battery switching method, characterized in that: The following steps are involved: S10, MCU initializes and runs, BAT_CTRL is in any state; S20, real-time detection of LVD signal to determine whether the main power supply is powered off, if so, executing step S30; if not, repeating the step S20; S30, perform data saving processing, and control BAT_CTRL output to be high, and open the path for VRTC in the power flow control circuit to supply power to VDD; S40, regularly detecting the VB_6V signal according to a preset cycle 1 to determine whether the meter reading battery is undervoltage, if so, controlling BAT_CTRL to output high, opening the path for VRTC in the power flow control circuit to supply power to VDD and starting timing, the MCU enters a low power consumption mode, and executes the step S50; if not, controlling BAT_CTRL to be in a high impedance state or output low, closing the path for VRTC in the power flow control circuit to supply power to VDD, the MCU enters a low power consumption mode, and repeating the step S40; S50, regularly detecting the VB_6V signal according to the preset cycle 2 to determine whether the meter reading battery is under-voltage, if so, continue timing and execute step S60, if not, reset the timing, execute low power initialization, and repeat the step S40; S60, determining whether the timing reaches a preset duration, if so, controlling BAT_CTRL to be in a high impedance state or outputting low, closing the path for VRTC in the power flow control circuit to supply power to VDD, so as to close the low-power power supply of the MCU, keep the real-time clock circuit running, and save the clock battery power; if not, repeating step S60.
9. A measuring instrument, characterized in that: The metering instrument comprises the backup battery switching circuit as claimed in any one of claims 1 to 7, and adopts the backup battery switching method as claimed in claim 8.
Citation Information
Patent Citations
A dual-core energy meter and its power control method
CN106532908B
Cited By
Three-phase meter cover opening detection and power supply control circuit and electric energy meter
CN122178489A
A three-phase meter cover opening detection and power control circuit and an energy meter
CN122178489B