A smart meter power-down detection circuit

By employing a combined circuit of a high-voltage power failure detection unit and a signal processing unit in the smart meter, the problem of incomplete data storage during power outages in smart meters is solved, enabling fast and reliable data saving, reducing power consumption and cost, making it suitable for various metering topologies, and enhancing anti-interference capabilities.

CN122218602APending Publication Date: 2026-06-16STATE GRID SICHUAN ELECTRIC POWER CO MARKETING SERVICE CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610387825.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-27
Publication Date
2026-06-16

Smart Images

  • Figure CN122218602A_ABST
    Figure CN122218602A_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent electric meter power failure detection circuits, it is related to the field of intelligent electric meter.It includes the strong power failure detection unit being connected between phase line and zero line, signal processing unit with zero line as reference ground and the detection unit being connected with the I / O port of micro control unit MCU;The signal processing unit carries out voltage division to the detection voltage output by strong power failure detection unit, RC filtering, and drives triode and photoelectric coupler, and outputs different level signals to MCU in power-on and power-down state, wherein the reference ground of signal processing unit is electrically isolated from DC bus ground, to block the leakage current of DC bus capacitor flowing into detection branch through rectifier bridge diode.Compared with prior art, the application can significantly shorten the power failure detection time, reduce the power consumption of detection circuit, reduce the capacity of bus capacitor and subsequent capacitor, and is suitable for single-phase, three-phase and different sampling topology intelligent electric meter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart meters, and more specifically to a power failure detection circuit for smart meters. Background Technology

[0002] One of the core functions of smart meters is to save data during power outages. Smart meters can reliably save data when power is off, which can effectively prevent the loss of electricity information and ensure the continuity and accuracy of metering and billing.

[0003] To ensure that smart meters reliably retain data during power outages, the following three solutions are available:

[0004] 1. PVD detection: When the MCU detects that the PVD voltage is lower than 1.2V, the EEPROM starts storing data.

[0005] 2. The input voltage is transmitted to the MCU in real time through the metering chip. When the voltage drops to a threshold, such as 100V, the MCU determines that the power is off and the EEPROM starts storing data.

[0006] 3. Through a high-power failure detection circuit, the MCU can identify power failure in advance by recognizing the I / O port level.

[0007] All three solutions have the risk of incomplete data retention after power failure. Solution 1 has a slow detection time and is prone to incomplete data retention after power failure. Solution 2 is not suitable for metering chips and MCUs that communicate via UART because UART communication is slow, resulting in slow detection speed. Solution 3, the existing solution, has leakage current in the diode, which causes leakage current from the bus capacitor through the diode, resulting in slow detection speed. In a project test, it was found that the power failure was only detected several seconds after the meter lost power, which also increased the meter's power consumption and did not have any advantages. Summary of the Invention

[0008] The technical problem to be solved by this invention is that the integrity and reliability of data stored in smart meters are low under various conditions (such as three-phase power, single-phase power, isolated and non-isolated conditions) when power is lost, and the continuity and accuracy of metering and billing are also poor. The purpose is to provide a power failure detection circuit for smart meters, which solves the problem that the existing solution has a slow power failure detection time, resulting in incomplete data storage and data loss.

[0009] This invention is achieved through the following technical solution:

[0010] A power failure detection circuit for a smart meter, applied in a smart meter including at least one AC input power supply and a microcontroller unit (MCU), comprising:

[0011] A high-voltage power failure detection unit, whose input terminal is connected between at least one phase line and neutral line of the AC input power supply, is used to rectify and sample the AC voltage between the phase line and neutral line to obtain a detection voltage VH corresponding to the amplitude of the AC voltage.

[0012] A signal processing unit has its input terminal electrically connected to the output terminal of the high-voltage power failure detection unit and its output terminal electrically connected to the judgment unit. The signal processing unit includes a voltage divider resistor network, a filter capacitor connected to the voltage divider resistor network, and a switching device driven by the output terminal of the filter capacitor. The voltage divider resistor network and the filter capacitor form an RC filter circuit, which is used to divide and smooth the detection voltage VH output by the high-voltage power failure detection unit, so as to generate a reference voltage that varies with the detection voltage VH at the control terminal of the switching device. When the reference voltage is higher than a preset conduction threshold, the switching device is turned on; when the reference voltage is lower than the preset conduction threshold, the switching device is turned off.

[0013] The judgment unit includes a pull-up resistor connected to the output terminal of the switching device and an I / O port of the MCU connected to the pull-up resistor. It is used to collect the output level of the switching device, collect a first level when the switching device is turned on, collect a second level when the switching device is turned off, and determine that the AC input power supply has lost power based on the signal level switching from the first level to the second level.

[0014] The reference ground of the signal processing unit is connected to the neutral line and is electrically isolated from the DC bus ground where the DC bus capacitor that provides DC power to the MCU is located. This prevents the leakage current of the DC bus capacitor from flowing into the signal processing unit through the rectifier unit, avoids the discharge of the DC bus capacitor from affecting the power-down detection speed, and reduces the power consumption of the power-down detection circuit.

[0015] Furthermore, the high-voltage power failure detection unit includes a current-limiting resistor and a rectifier bridge connected in series between the phase line and the neutral line, and the detection voltage VH is taken from the DC output terminal of the rectifier bridge and the neutral line.

[0016] Furthermore, the voltage divider resistor network includes a first voltage divider resistor and a second voltage divider resistor connected in series. One end of the filter capacitor is connected to the connection node of the first voltage divider resistor and the second voltage divider resistor, and the other end is connected to the neutral line. The time constant τ of the RC filter circuit formed by the filter capacitor and the second voltage divider resistor satisfies:

[0017] The power frequency is greater than one power frequency cycle of the AC input power supply and less than the preset power failure judgment time threshold, so as to ensure that the switching state of the switching device is completed within the preset power failure judgment time threshold while filtering out short-term voltage fluctuations.

[0018] Furthermore, the switching device is an NPN transistor. The base of the NPN transistor is connected to the output terminal of the filter capacitor, the emitter is connected to the neutral line, and the collector is connected to the power supply terminal of the MCU via the pull-up resistor. The I / O port of the MCU is connected to the collector node to acquire the level signal formed by the on / off state of the NPN transistor.

[0019] Furthermore, the determination unit also includes an optocoupler, the input terminal of which is connected to the output node of the switching device, and the output terminal is connected to the I / O port of the MCU via the pull-up resistor. The optocoupler is used to provide electrical isolation between the signal processing unit and the MCU.

[0020] Furthermore, the AC input power supply is a three-phase AC power supply, and the high-voltage power failure detection unit includes at least two high-voltage power failure detection sub-units. The input terminal of each high-voltage power failure detection sub-unit is connected between the corresponding phase line and the neutral line. The output terminals of each high-voltage power failure detection sub-unit are combined after rectification to form the detection voltage VH, so as to trigger the output change of the signal processing unit when any phase line loses power.

[0021] Furthermore, the AC input power supply is connected to the power metering circuit via a sampling unit, which is at least one of a manganese copper sampling resistor or a current transformer. The input terminal of the high-voltage power failure detection unit is connected to the front-end circuit between the sampling unit and the AC input power supply.

[0022] Furthermore, the power failure detection circuit of the smart meter is configured as follows:

[0023] When the AC input power supply fails, the I / O port of the MCU detects the change from the first level to the second level within a time period not exceeding a preset time threshold T_off. The time threshold T_off is less than the time required for the MCU to complete the storage of key metering data after the power failure.

[0024] Furthermore, the input terminal of the optocoupler is powered by a first DC power supply with the neutral line as the reference ground, and the output terminal is powered by a second DC power supply with the same reference ground as the MCU power supply.

[0025] The power supply circuit of the second DC power supply is equipped with an energy storage capacitor, so that after the AC input power supply is powered off, it can still provide working voltage to the output terminal of the optocoupler and the pull-up resistor within a preset holding time, so as to ensure that the I / O port of the MCU continuously obtains effective level changes for power-off detection within the preset holding time.

[0026] The present invention also provides a smart meter, including an AC input terminal, a metering unit, a non-volatile memory, and a microcontroller unit (MCU).

[0027] The AC input terminal is used to connect at least one AC input power source, the metering unit is used to measure the power consumption corresponding to the AC input power source, and the non-volatile memory is used to store the metering data.

[0028] The MCU is electrically connected to the metering unit and the non-volatile memory, and is also electrically connected to the judgment unit of the smart meter power failure detection circuit according to any one of claims 1 to 9.

[0029] The MCU is configured to: when it detects that the I / O port level output by the power-down detection circuit has switched from the first level to the second level, trigger the non-volatile memory to write and save the current metering data before the AC input power is completely de-energized.

[0030] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0031] This invention connects the reference ground of the signal processing unit to the neutral line and isolates it from the DC bus ground power supply to the MCU. This topologically blocks the loop of leakage current from the DC bus capacitor flowing into the power failure detection branch through the rectifier bridge diode, preventing the bus capacitor from slowly discharging through the detection circuit. This significantly shortens the power failure determination time, enabling the MCU to obtain a reliable power failure signal before the actual voltage drop in the power grid, thereby improving the integrity and security of critical metering data storage in power failure scenarios.

[0032] Since the detection voltage changes from the voltage envelope on the bus side to the voltage envelope between the phase line and the neutral line, the voltage amplitude at the detection front end is reduced. Under the premise of meeting the power failure judgment time requirements, the resistance value of the voltage divider resistor can be increased and the capacity of the filter capacitor can be reduced, thereby reducing the static power consumption of the power failure detection circuit. At the same time, the amount of large-capacity capacitors and power devices used can be reduced, thereby reducing the standby power consumption of the whole machine and saving material costs and installation space.

[0033] This invention uses an analog circuit structure consisting of a current-limiting resistor, a rectifier bridge, a voltage divider resistor network, an RC filter circuit, and transistors / optocouplers to achieve power failure detection. It does not require the addition of a dedicated detection chip or complex control algorithm, and can be directly ported to existing smart meter hardware platforms. The circuit structure is simple, the implementation cost is low, the reliability is high, and it is easy to mass-produce and maintain.

[0034] By arranging the high-voltage power failure detection unit between the phase line and the neutral line and supporting multi-phase input, this invention can be applied to single-phase meters, three-phase meters, and different metering topologies such as manganese copper sampling and current transformer sampling. This enables a single power failure detection circuit to be compatible with multiple product forms, facilitating serialized design and unified maintenance.

[0035] Optocouplers are used to provide electrical isolation between the signal processing unit and the MCU side, and energy storage capacitors are used to maintain the power supply to the MCU side for a short time. This ensures that the MCU port can stably collect effective level changes during power failure, and also improves the anti-interference capability and safety of the entire power failure detection circuit in harsh electromagnetic environments such as lightning strikes and power grid disturbances. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0037] Figure 1 This is a block diagram of the power failure detection circuit of the smart meter in Example 1;

[0038] Figure 2 This is a circuit diagram of the power failure detection circuit isolation scheme for a smart meter in Example 1;

[0039] Figure 3 This is a circuit diagram of the non-isolated scheme for the power failure detection circuit of the smart meter in Example 1. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0041] Example 1

[0042] A power failure detection circuit for a smart meter, applied in a smart meter including at least one AC input power supply and a microcontroller unit (MCU), comprising:

[0043] A high-voltage power failure detection unit, whose input terminal is connected between at least one phase line and neutral line of the AC input power supply, is used to rectify and sample the AC voltage between the phase line and neutral line to obtain a detection voltage VH corresponding to the amplitude of the AC voltage.

[0044] A signal processing unit has its input terminal electrically connected to the output terminal of the high-voltage power failure detection unit and its output terminal electrically connected to the judgment unit. The signal processing unit includes a voltage divider resistor network, a filter capacitor connected to the voltage divider resistor network, and a switching device driven by the output terminal of the filter capacitor. The voltage divider resistor network and the filter capacitor form an RC filter circuit, which is used to divide and smooth the detection voltage VH output by the high-voltage power failure detection unit, so as to generate a reference voltage that varies with the detection voltage VH at the control terminal of the switching device. When the reference voltage is higher than a preset conduction threshold, the switching device is turned on; when the reference voltage is lower than the preset conduction threshold, the switching device is turned off.

[0045] The judgment unit includes a pull-up resistor connected to the output terminal of the switching device and an I / O port of the MCU connected to the pull-up resistor. It is used to collect the output level of the switching device, collect a first level when the switching device is turned on, collect a second level when the switching device is turned off, and determine that the AC input power supply has lost power based on the signal level switching from the first level to the second level.

[0046] The reference ground of the signal processing unit is connected to the neutral line and is electrically isolated from the DC bus ground where the DC bus capacitor that provides DC power to the MCU is located. This prevents the leakage current of the DC bus capacitor from flowing into the signal processing unit through the rectifier unit, avoids the discharge of the DC bus capacitor from affecting the power-down detection speed, and reduces the power consumption of the power-down detection circuit.

[0047] The high-voltage power failure detection unit includes a current-limiting resistor and a rectifier bridge connected in series between the phase line and the neutral line. The detection voltage VH is taken from the DC output terminal of the rectifier bridge and the neutral line.

[0048] The voltage divider resistor network includes a first voltage divider resistor and a second voltage divider resistor connected in series. One end of the filter capacitor is connected to the connection node of the first voltage divider resistor and the second voltage divider resistor, and the other end is connected to the neutral line. The time constant τ of the RC filter circuit formed by the filter capacitor and the second voltage divider resistor satisfies:

[0049] The power frequency is greater than one power frequency cycle of the AC input power supply and less than the preset power failure judgment time threshold, so as to ensure that the switching state of the switching device is completed within the preset power failure judgment time threshold while filtering out short-term voltage fluctuations.

[0050] The switching device is an NPN transistor. The base of the NPN transistor is connected to the output terminal of the filter capacitor, the emitter is connected to the neutral line, and the collector is connected to the power supply terminal of the MCU via the pull-up resistor. The I / O port of the MCU is connected to the collector node and is used to acquire the level signal formed by the on / off state of the NPN transistor.

[0051] The judgment unit further includes an optocoupler, the input terminal of which is connected to the output node of the switching device, and the output terminal is connected to the I / O port of the MCU via the pull-up resistor. The optocoupler is used to provide electrical isolation between the signal processing unit and the MCU.

[0052] The AC input power supply is a three-phase AC power supply. The high-voltage power failure detection unit includes at least two high-voltage power failure detection sub-units. The input terminal of each high-voltage power failure detection sub-unit is connected between the corresponding phase line and the neutral line. The output terminals of each high-voltage power failure detection sub-unit are combined after rectification to form the detection voltage VH, so as to trigger the output change of the signal processing unit when any phase line loses power.

[0053] The AC input power supply is connected to the power metering circuit via a sampling unit. The sampling unit is at least one of a manganese copper sampling resistor or a current transformer. The input terminal of the high-voltage power failure detection unit is connected to the front-end circuit between the sampling unit and the AC input power supply.

[0054] The power failure detection circuit of the smart meter is configured as follows:

[0055] When the AC input power supply fails, the I / O port of the MCU detects the change from the first level to the second level within a time period not exceeding a preset time threshold T_off. The time threshold T_off is less than the time required for the MCU to complete the storage of key metering data after the power failure.

[0056] The input terminal of the optocoupler is powered by a first DC power supply with the neutral line as the reference ground, and the output terminal is powered by a second DC power supply with the same reference ground as the MCU power supply.

[0057] The power supply circuit of the second DC power supply is equipped with an energy storage capacitor, so that after the AC input power supply is powered off, it can still provide working voltage to the output terminal of the optocoupler and the pull-up resistor within a preset holding time, so as to ensure that the I / O port of the MCU continuously obtains effective level changes for power-off detection within the preset holding time.

[0058] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0059] like Figure 1 As shown, the smart meter power failure detection circuit provided by this invention generally includes: a high-voltage power failure detection unit, a signal processing unit, and a detection unit. The high-voltage power failure detection unit is connected between the phase line and the neutral line of the AC input power supply, used to rectify the AC voltage and output a detection voltage VH. The input terminal of the signal processing unit is electrically connected to the node that outputs the detection voltage VH, and the reference ground is connected to the neutral line N. It is used to divide and filter the detection voltage VH and drive switching devices, thereby outputting different level signals under different power supply states. The judgment unit is electrically connected to the output of the signal processing unit, typically consisting of an MCU I / O port and its pull-up resistors, used to collect the level signal and determine whether the AC input power supply has failed. The signal processing unit is used to output different level states to the MCU I / O port under the two conditions of power-on and power-off. It consists of a resistor voltage divider, RC filter, NPN transistor and optocoupler. The judgment unit is implemented by the MCU I / O port. It determines whether the power is off by reading the I / O port level. When the I / O is low, it means that the power is on. When the I / O port is high, it means that the power is off.

[0060] Based on the overall structure described above, this invention can be implemented in two specific forms, an isolation scheme and a non-isolation scheme, depending on the different metering topology and security isolation requirements. The isolation scheme is suitable for smart meters that use manganese copper sampling and require electrical isolation between the power failure detection circuit and the metering circuit; the non-isolation scheme is suitable for smart meters that use current transformer sampling and allow the power failure detection circuit and the metering circuit to share a common ground. The two schemes are basically the same in terms of the wiring method of the high-voltage power failure detection unit and the topology of the signal processing unit with the neutral wire as the reference ground. The main difference lies in whether electrical isolation with the MCU side is achieved through optocouplers and the power supply maintenance method.

[0061] 1: Isolation Plan

[0062] like Figure 2 As shown, Figure 2The diagram shows a schematic of an isolated implementation of the power failure detection circuit for a smart meter according to the present invention. When the meter is powered on normally, the detection voltage VH output by the high-voltage power failure detection unit is U_H relative to the neutral line N. The average value of U_H is approximately 1.17U_eff, where U_eff is the effective value of the AC input power supply. U_H is sequentially divided by voltage divider resistors PR11, PR12, PR22, PR26, and PR29, and then RC filtered by filter capacitors PC28 and PC32, forming a smooth base drive voltage at the base of transistor PQ2. When this base voltage is greater than the conduction threshold voltage of PQ2, PQ2 conducts, and its collector current drives the input terminal of optocoupler PU2 to conduct, thereby pulling the output terminal of PU2 low. The MCU's I / O port detects a low-level state, indicating that the AC input power supply is powered on. PU2 is used to provide electrical isolation between the signal processing unit and the MCU side.

[0063] When the AC input power supply fails, U_H gradually decreases through RC discharge. When the base voltage of PQ2 drops below its turn-on threshold voltage, PQ2 turns off, the input terminal of PU2 stops conducting, and the output terminal of PU2 is pulled high by the pull-up resistor. The MCU's I / O port detects the high-level state, thus determining that the AC input power supply has failed. It should be noted that the supply voltage on the primary side of PU2 is referenced to the neutral line N, and the supply voltage on the secondary side of PU2 is referenced to the same ground as the MCU power supply reference ground. Furthermore, the secondary power supply is equipped with an energy storage capacitor to ensure that the operating voltage can still be provided to the secondary side of PU2 and the pull-up resistor within a preset holding time after the AC input power supply fails, thus preventing the pull-up resistor from failing after power failure.

[0064] In one specific embodiment, taking a three-phase energy meter as an example, the resistance values ​​of PR11, PR12, PR22, and PR26 are all 390kΩ, the resistance value of PR29 is 100kΩ, the capacitance values ​​of PC28 and PC32 are both 1μF, the resistance values ​​of PR27 and PR28 are both 10kΩ, the resistance value of PR25 is 4.7kΩ, and the resistance value of R26 is 10kΩ. Testing shows that under three-phase AC input conditions, when the AC side loses power for 200ms, the MCU can detect the I / O port level switching from low to high. Compared with the original power-down detection circuit, the power-down detection time in this embodiment is shortened by approximately 7 times, and the static power consumption of the power-down detection circuit in this embodiment is approximately 0.238 times that of the original circuit.

[0065] 2: Non-isolation plan

[0066] like Figure 3The diagram shows another implementation of the power failure detection circuit for a smart meter according to the present invention. This circuit is suitable for smart meters that use current transformers for sampling and allow the power failure detection circuit and metering circuit to share a common ground. When the meter is powered on normally, the detection voltage VH output by the high-voltage power failure detection unit is U_H relative to the neutral line N, with an average value of approximately 1.17U_eff, where U_eff is the effective value of the AC input power supply. U_H is sequentially divided by voltage divider resistors PR11, PR12, PR22, PR26, and PR29, and smoothed by an RC filter circuit composed of filter capacitors PC28 and PC32, forming a stable base drive voltage at the base of transistor PQ2. When this base voltage is greater than the conduction threshold voltage of PQ2, PQ2 conducts, and its collector pulls the MCU's I / O port to a low level under the action of the pull-up resistor. The MCU detects the low-level state, indicating that the AC input power supply is powered on.

[0067] When the AC input power supply fails, U_H gradually decreases through RC discharge as the bus voltage decreases. When the base voltage of PQ2 drops below its turn-on threshold voltage, PQ2 turns off, and the MCU's I / O port is pulled high by the pull-up resistor. The MCU detects the high-level state and thus determines that the AC input power supply has failed. In this embodiment, the power supply of the branch containing PQ2 is equipped with an energy storage capacitor to ensure that sufficient voltage is maintained for a preset holding time after the AC input power supply fails, providing operating voltage for the pull-up resistor and related logic. This prevents the pull-up resistor from failing due to a sudden drop in power supply, thus affecting the reliability of power failure detection.

[0068] In one specific embodiment, taking a three-phase energy meter as an example, the resistance values ​​of PR11, PR12, PR22, and PR26 are all 390kΩ, the resistance value of PR29 is 100kΩ, the capacitance values ​​of PC28 and PC32 are both 1μF, the resistance values ​​of PR27 and PR28 are both 10kΩ, the resistance value of PR25 is 4.7kΩ, and the resistance value of R26 is 10kΩ. Testing shows that under three-phase AC input conditions, the power failure detection time of this embodiment is significantly shorter than the original power failure detection circuit, and the detection speed is several times faster than the original scheme. At the same time, the static power consumption of the power failure detection circuit in this embodiment is significantly reduced compared to the original circuit.

[0069] This invention connects the reference ground of the signal processing unit to the neutral line and isolates it from the DC bus ground power supply to the MCU. This topologically blocks the loop of leakage current from the DC bus capacitor flowing into the power failure detection branch through the rectifier bridge diode, preventing the bus capacitor from slowly discharging through the detection circuit. This significantly shortens the power failure determination time, enabling the MCU to obtain a reliable power failure signal before the actual voltage drop in the power grid, thereby improving the integrity and security of critical metering data storage in power failure scenarios.

[0070] Since the detection voltage changes from the voltage envelope on the bus side to the voltage envelope between the phase line and the neutral line, the voltage amplitude at the detection front end is reduced. Under the premise of meeting the power failure judgment time requirements, the resistance value of the voltage divider resistor can be increased and the capacity of the filter capacitor can be reduced, thereby reducing the static power consumption of the power failure detection circuit. At the same time, the amount of large-capacity capacitors and power devices used can be reduced, thereby reducing the standby power consumption of the whole machine and saving material costs and installation space.

[0071] This invention uses an analog circuit structure consisting of a current-limiting resistor, a rectifier bridge, a voltage divider resistor network, an RC filter circuit, and transistors / optocouplers to achieve power failure detection. It does not require the addition of a dedicated detection chip or complex control algorithm, and can be directly ported to existing smart meter hardware platforms. The circuit structure is simple, the implementation cost is low, the reliability is high, and it is easy to mass-produce and maintain.

[0072] By arranging the high-voltage power failure detection unit between the phase line and the neutral line and supporting multi-phase input, this invention can be applied to single-phase meters, three-phase meters, and different metering topologies such as manganese copper sampling and current transformer sampling. This enables a single power failure detection circuit to be compatible with multiple product forms, facilitating serialized design and unified maintenance.

[0073] Optocouplers are used to provide electrical isolation between the signal processing unit and the MCU side, and energy storage capacitors are used to maintain the power supply to the MCU side for a short time. This ensures that the MCU port can stably collect effective level changes during power failure, and also improves the anti-interference capability and safety of the entire power failure detection circuit in harsh electromagnetic environments such as lightning strikes and power grid disturbances.

[0074] Example 2

[0075] A smart meter includes an AC input terminal, a metering unit, non-volatile memory, and a microcontroller unit (MCU).

[0076] The AC input terminal is used to connect at least one AC input power source, the metering unit is used to measure the power consumption corresponding to the AC input power source, and the non-volatile memory is used to store the metering data.

[0077] The MCU is electrically connected to the metering unit and the non-volatile memory, and is also electrically connected to the judgment unit of the smart meter power failure detection circuit according to any one of claims 1 to 9.

[0078] The MCU is configured to: when it detects that the I / O port level output by the power-down detection circuit has switched from the first level to the second level, trigger the non-volatile memory to write and save the current metering data before the AC input power is completely de-energized.

[0079] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A power failure detection circuit for a smart meter, applied in a smart meter including at least one AC input power supply and a microcontroller unit (MCU), characterized in that, include: A high-voltage power failure detection unit, whose input terminal is connected between at least one phase line and neutral line of the AC input power supply, is used to rectify and sample the AC voltage between the phase line and neutral line to obtain a detection voltage VH corresponding to the amplitude of the AC voltage. A signal processing unit has its input terminal electrically connected to the output terminal of the high-voltage power failure detection unit and its output terminal electrically connected to the judgment unit. The signal processing unit includes a voltage divider resistor network, a filter capacitor connected to the voltage divider resistor network, and a switching device driven by the output terminal of the filter capacitor. The voltage divider resistor network and the filter capacitor form an RC filter circuit, which is used to divide and smooth the detection voltage VH output by the high-voltage power failure detection unit, so as to generate a reference voltage that varies with the detection voltage VH at the control terminal of the switching device. When the reference voltage is higher than a preset conduction threshold, the switching device is turned on; when the reference voltage is lower than the preset conduction threshold, the switching device is turned off. The judgment unit includes a pull-up resistor connected to the output terminal of the switching device and an I / O port of the MCU connected to the pull-up resistor. It is used to collect the output level of the switching device, collect a first level when the switching device is turned on, collect a second level when the switching device is turned off, and determine that the AC input power supply has lost power based on the signal level switching from the first level to the second level. The reference ground of the signal processing unit is connected to the neutral line, and is electrically isolated from the DC bus ground where the DC bus capacitor that provides DC power to the MCU is located, so as to block the leakage current of the DC bus capacitor from flowing into the signal processing unit through the rectifier unit.

2. The power failure detection circuit for a smart meter according to claim 1, characterized in that, The high-voltage power failure detection unit includes a current-limiting resistor and a rectifier bridge connected in series between the phase line and the neutral line. The detection voltage VH is taken from the DC output terminal of the rectifier bridge and the neutral line.

3. The smart meter power failure detection circuit according to claim 1, characterized in that, The voltage divider resistor network includes a first voltage divider resistor and a second voltage divider resistor connected in series. One end of the filter capacitor is connected to the connection node of the first voltage divider resistor and the second voltage divider resistor, and the other end is connected to the neutral line. The time constant τ of the RC filter circuit formed by the filter capacitor and the second voltage divider resistor satisfies: The power frequency is greater than one power frequency cycle of the AC input power supply and less than the preset power failure judgment time threshold, so as to ensure that the switching state of the switching device is completed within the preset power failure judgment time threshold while filtering out short-term voltage fluctuations.

4. The power failure detection circuit for a smart meter according to claim 1, characterized in that, The switching device is an NPN transistor. The base of the NPN transistor is connected to the output terminal of the filter capacitor, the emitter is connected to the neutral line, and the collector is connected to the power supply terminal of the MCU via the pull-up resistor. The I / O port of the MCU is connected to the collector node and is used to acquire the level signal formed by the on / off state of the NPN transistor.

5. The smart meter power failure detection circuit according to claim 1, characterized in that, The judgment unit further includes an optocoupler, the input terminal of which is connected to the output node of the switching device, and the output terminal is connected to the I / O port of the MCU via the pull-up resistor. The optocoupler is used to provide electrical isolation between the signal processing unit and the MCU.

6. The smart meter power failure detection circuit according to claim 1, characterized in that, The AC input power supply is a three-phase AC power supply. The high-voltage power failure detection unit includes at least two high-voltage power failure detection sub-units. The input terminal of each high-voltage power failure detection sub-unit is connected between the corresponding phase line and the neutral line. The output terminals of each high-voltage power failure detection sub-unit are combined after rectification to form the detection voltage VH, so as to trigger the output change of the signal processing unit when any phase line loses power.

7. The power failure detection circuit for a smart meter according to claim 1, characterized in that, The AC input power supply is connected to the power metering circuit via a sampling unit. The sampling unit is at least one of a manganese copper sampling resistor or a current transformer. The input terminal of the high-voltage power failure detection unit is connected to the front-end circuit between the sampling unit and the AC input power supply.

8. The smart meter power failure detection circuit according to any one of claims 1-7, characterized in that, When the AC input power supply fails, the I / O port of the MCU detects the change from the first level to the second level within a time period not exceeding a preset time threshold T_off. The time threshold T_off is less than the time required for the MCU to complete the storage of key metering data after the power failure.

9. The power failure detection circuit for a smart meter according to claim 5, characterized in that, The input terminal of the optocoupler is powered by a first DC power supply with the neutral line as the reference ground, and the output terminal is powered by a second DC power supply with the same reference ground as the MCU power supply. The power supply circuit of the second DC power supply is equipped with an energy storage capacitor, so that after the AC input power supply is powered off, it can still provide working voltage to the output terminal of the optocoupler and the pull-up resistor within a preset holding time, so as to ensure that the I / O port of the MCU continuously obtains effective level changes for power-off detection within the preset holding time.

10. A smart meter, characterized in that, Includes AC input terminals, metering unit, non-volatile memory, and microcontroller unit (MCU). The AC input terminal is used to connect at least one AC input power source, the metering unit is used to measure the power consumption corresponding to the AC input power source, and the non-volatile memory is used to store the metering data. The MCU is electrically connected to the metering unit and the non-volatile memory, and is also electrically connected to the judgment unit of the smart meter power failure detection circuit according to any one of claims 1 to 9. The MCU is configured to: when it detects that the I / O port level output by the power-down detection circuit has switched from the first level to the second level, trigger the non-volatile memory to write and save the current metering data before the AC input power is completely de-energized.