A primary and secondary power supply switching system and method with power supply priority
By adjusting the voltage difference between the main and auxiliary power supplies through the MCU main control circuit and voltage competition mechanism, the power supply priority of the three-phase smart energy meter can be flexibly configured, which solves the problem of insufficient adaptability caused by the fixed power supply priority in the existing technology and improves the power supply stability and flexibility of the equipment in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU LINYANG ENERGY CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-26
AI Technical Summary
The existing three-phase smart energy meters have fixed main and auxiliary power switching logic, which cannot flexibly adjust the power supply priority according to complex application scenarios. This results in insufficient adaptability of the equipment in complex environments and an inability to balance power supply stability and energy distribution strategies.
By dynamically intervening through the MCU main control circuit, the output voltage difference between the main and auxiliary power supplies is adjusted using a voltage competition mechanism to achieve flexible configuration of power supply priority. Two independent power supply circuits are constructed, and the output voltage of the main and auxiliary power supplies is dynamically adjusted through a switching circuit to achieve switching of power supply priority.
It enhances the equipment's adaptability to complex environments, ensures the continuity and flexibility of power supply, reduces circuit losses, lowers hardware costs, improves operational reliability, and avoids interference from power switching on metering accuracy and communication stability.
Smart Images

Figure CN122292641A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart meter technology, specifically to a main and auxiliary power supply switching circuit with configurable power supply priority, which is particularly suitable for application scenarios where the output priority of the main and auxiliary power supplies can be flexibly set and on-demand switching can be supported. Background Technology
[0002] Three-phase smart meters, as core terminals for energy metering, data acquisition, and remote communication in power systems, play an irreplaceable role in diverse scenarios such as power distribution in industrial and commercial parks, power supply in residential communities, and grid-connected metering of new energy sources. With the deepening of smart grid construction and the increasing demands for refined power marketing management, the continuous stability of the power supply system for smart meters has become a key indicator for evaluating equipment performance. It directly determines not only the accuracy of metering data but also the response efficiency of remote commands and the overall reliability of operation.
[0003] To ensure power continuity, most high-level three-phase smart meters on the market currently employ a dual-power supply architecture combining a main power supply and an auxiliary power supply. However, existing power switching logic is mostly limited to a fixed design pattern, typically pre-setting the auxiliary power supply as the absolute priority. This fixed switching logic exhibits significant limitations in practical applications. Lacking a mechanism to flexibly adjust power supply priority according to specific application scenarios, it makes it difficult for the device to adapt to the personalized power supply strategy requirements of different sites. In complex power operating environments, this non-configurable power priority design limits the meter's adaptability to changing operating conditions, failing to simultaneously ensure power supply stability and achieve optimal energy distribution strategies.
[0004] Therefore, developing a power management system that can support flexible setting of primary and secondary power supply priorities, has efficient and uninterrupted switching capabilities, and has high operational reliability has become a key issue that urgently needs to be addressed in the field of smart meter technology. Summary of the Invention
[0005] This invention addresses the shortcomings of existing three-phase smart energy meters that have fixed main and auxiliary power switching logic and cannot flexibly adjust power supply priority according to complex application scenarios. It provides a main and auxiliary power switching system and method with configurable power supply priority. By dynamically intervening through the MCU main control circuit, the output voltage difference between the main power supply and the auxiliary power supply is changed. By utilizing the voltage competition mechanism, the logical configuration of power supply priority is realized without adding complex mechanical switches.
[0006] The technical solution of this invention is: In a first aspect, the present invention provides a main power supply and auxiliary power supply switching system with configurable power supply priority, including a main power supply, an auxiliary power supply, a switching circuit and an output power supply; Both the main power supply and the auxiliary power supply are connected to the output power supply; The switching circuit includes an MCU main control circuit and a main-auxiliary switching control circuit; the MCU main control circuit is electrically connected to the main-auxiliary switching control circuit and is used to output a logic level signal to control the conduction or cutoff state of the main-auxiliary switching control circuit; the main-auxiliary switching control circuit is electrically connected to the feedback loop of the main power supply and is used to adjust the feedback parameters of the main power supply according to the conduction or cutoff state, so that a preset voltage difference is formed between the output voltages of the main power supply and the auxiliary power supply. The output power supply switches according to the priority determined by the preset voltage difference.
[0007] Furthermore, the main-auxiliary switching control circuit includes resistors R1-R6, optocoupler U2, and MOSFET Q1; One end of the resistor R1 is connected to the signal output terminal of the MCU main control circuit, and the other end of the resistor R1 is connected to the cathode of the light-emitting diode on the input side of the optocoupler U2. The anode of the light-emitting diode is connected to the MCU power supply. The collector of the phototransistor on the output side of the optocoupler U2 is connected to the module power supply in the output power supply. The emitter of the phototransistor is connected to ground after series with resistors R2 and R3, and the connection point of resistors R2 and R3 serves as voltage divider node A. The voltage divider node A is electrically connected to the gate of MOSFET Q1. The source of MOSFET Q1 is grounded, and the drain is connected to the voltage divider node B between resistors R4 and R5. The other end of resistor R4 is grounded, and the other end of resistor R5 is connected to one end of resistor R6 to form voltage divider node C. The voltage divider node C is connected to the voltage feedback circuit of the main power supply, and the other end of resistor R6 is connected to the first module output power supply of the main power supply.
[0008] Furthermore, the switching circuit performs the following steps: When the MCU main control circuit outputs a low-level signal to the main-auxiliary switching control circuit, both the optocoupler U2 and the MOSFET Q1 are in the conducting state. The voltage divider node B is grounded through the MOSFET Q1 and bypassed by the resistor R4. The output voltage of the first module of the main power supply is increased to be higher than the output voltage of the second module of the auxiliary power supply, thereby increasing the output voltage of the first main circuit of the main power supply to be higher than the output voltage of the second main circuit of the auxiliary power supply. At this time, the main power supply gives priority to power supply. When the MCU main control circuit outputs a high-level signal to the main-auxiliary switching control circuit, the optocoupler U2 and MOS transistor Q1 are both in the off state, the resistors R4 and R5 are in series, the output voltage of the first module of the main power supply is reduced to be lower than the output voltage of the second module of the auxiliary power supply, and then the output voltage of the first main circuit of the main power supply is reduced to be lower than the output voltage of the second main circuit of the auxiliary power supply. At this time, the auxiliary power supply is given priority.
[0009] Furthermore, the main power supply and auxiliary power supply are two independent and physically isolated power supply circuits; wherein, The main power supply includes a first AC input, a first bridge rectifier circuit, a first power chip control circuit, a first switching transformer, a first main circuit half-wave rectifier circuit, a first module half-wave rectifier circuit, a first main circuit output power supply, a first module output power supply, a first voltage feedback circuit, and a first optocoupler isolation. The first AC input, the first bridge rectifier circuit, and the first power chip control circuit are connected in series. The output terminal of the first power chip control circuit is connected to the input terminals of the first main circuit half-wave rectifier circuit and the first module half-wave rectifier circuit through the first switching transformer. The output terminals of the first main circuit half-wave rectifier circuit and the first module half-wave rectifier circuit are connected in series to the first main circuit output power supply and the first module output power supply, respectively. The output terminal of the first main circuit output power supply is connected to the main circuit power supply of the output power supply, and the output terminal of the first module output power supply is connected to the module power supply of the output power supply. The auxiliary power supply includes a second AC input, a second bridge rectifier circuit, a second power chip control circuit, a second switching transformer, a second main circuit half-wave rectifier circuit, a second module half-wave rectifier circuit, a second main circuit output power supply, a second module output power supply, a second voltage feedback circuit, and a second optocoupler isolation. The second AC input, the second bridge rectifier circuit, and the second power chip control circuit are connected in series. The output terminal of the second power chip control circuit is connected to the input terminals of the second main circuit half-wave rectifier circuit and the second module half-wave rectifier circuit through the second switching transformer. The output terminals of the second main circuit half-wave rectifier circuit and the second module half-wave rectifier circuit are connected in series to the second main circuit output power supply and the second module output power supply, respectively. The output terminal of the second main circuit output power supply is connected to the main circuit power supply of the output power supply, and the output terminal of the second module output power supply is connected to the module power supply of the output power supply.
[0010] Furthermore, the first voltage feedback circuit, the first optocoupler isolation, and the first power chip control circuit constitute the feedback loop of the main power supply. The input terminal of the first voltage feedback circuit is connected to the output terminal of the main-auxiliary switching control circuit. The output terminal of the first voltage feedback circuit is connected to the feedback control terminal of the power chip control circuit through the first optocoupler isolation. The first voltage feedback circuit is connected to the output power of the first module. The input terminal of the second voltage feedback circuit is connected to the output terminal of the second module output power supply, and the output terminal of the second voltage feedback circuit is connected to the feedback control terminal of the second power chip control circuit through the second optocoupler isolation.
[0011] Furthermore, the output power supply includes a module power supply, a module power supply, a main circuit power supply, and an MCU power supply; the module power supply is formed by the first module output power supply of the main power supply and the second module output power supply of the auxiliary power supply connected in parallel; the main circuit power supply is formed by the first main circuit output power supply of the main power supply and the second main circuit output power supply of the auxiliary power supply connected in parallel; the module power supply and the main circuit power supply are stepped down and then connected to the module power supply and the MCU power supply, respectively; the output of the MCU power supply is connected to the MCU main control circuit of the switching circuit.
[0012] Secondly, the present invention provides a main and auxiliary power supply switching method with configurable power supply priority. The method constructs two independent and physically isolated power supply circuits. The MCU main control circuit of the switching circuit executes logic drive on the main and auxiliary switching control circuit to dynamically adjust the output voltage of the main power supply, so that a preset voltage difference is generated between the output voltage of the main power supply and the auxiliary power supply. The logic switching of power supply priority is executed through a physical voltage competition mechanism.
[0013] Furthermore, specifically including: Configure power output priority: The MCU main control circuit sends a priority setting command to the main-auxiliary switching control circuit according to the system preset instructions or real-time operating conditions. When the auxiliary power supply is set to prioritize power supply, the main power supply is controlled to enter standby mode, and the auxiliary power supply takes over the power supply of the energy meter load. When the auxiliary power supply fails to supply power, the main power supply switches to the power supply mode. When the main power supply is set to prioritize power supply, the auxiliary power supply is controlled to enter standby mode, and the main power supply takes over the load power supply of the energy meter. When the main power supply fails to supply power, the auxiliary power supply switches to the power supply mode.
[0014] Furthermore, when the main power supply is set to prioritize power supply, the MCU main control circuit outputs a low-level signal, causing the LED on the input side of optocoupler U2 to generate current and conduct, and the phototransistor on the output side to enter the saturation conduction state. At this time, the potential of voltage divider node A rises. When it exceeds the turn-on voltage threshold of MOSFET Q1, MOSFET Q1 conducts and resistor R5 is directly grounded. At this time, resistors R5 and R6 divide the first module output power of the main power supply. At this time, the output voltage of the main power supply is higher than the output voltage of the auxiliary power supply, realizing the priority power supply of the main power supply.
[0015] Furthermore, when the auxiliary power supply is set to prioritize power supply, the MCU main control circuit outputs a high-level signal, which turns off the LED on the input side of optocoupler U2 and the phototransistor on the output side is in an open-circuit state. At this time, the potential of voltage divider node A is pulled down to the reference zero position through resistor R3, MOSFET Q1 is turned off, and resistors R4 and R5 are connected in series and together with R6 to divide the first module output power of the main power supply. At this time, the output voltage of the main power supply is lower than the output voltage of the auxiliary power supply, thus realizing the priority power supply of the auxiliary power supply.
[0016] The beneficial effects of this invention are: In this invention, the MCU main control circuit can define the priority of the main and auxiliary power supplies, enabling the energy meter to adapt to various complex field power supply environments. For example, when the main line power is sufficient, the main power supply is prioritized to reduce the loss of the auxiliary power supply, while the auxiliary power supply is prioritized when the main line voltage fluctuates greatly or is under a specific management mode. This greatly improves the survivability and flexibility of the equipment in the power distribution network.
[0017] In this invention, a dynamic voltage difference competition mechanism between the main and auxiliary power supplies is utilized to achieve electronic rapid switching by adjusting the impedance of the feedback loop without adding complex mechanical switches. This effectively avoids the interference of power switching transients on the metering accuracy and communication stability of the electricity meter, and ensures the continuity and integrity of power data.
[0018] In this invention, the main-auxiliary switching control circuit has a simple and reliable structural design. Complex priority management can be achieved with a small number of general-purpose electronic components. This not only reduces hardware costs and facilitates the miniaturization of the electricity meter, but also reduces circuit losses and improves the reliability of the whole machine operation.
[0019] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0020] The above and other objects, features and advantages of the present invention will become more apparent from the more detailed description of exemplary embodiments of the invention in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the invention.
[0021] Figure 1 This is a schematic block diagram of the main / auxiliary power supply switching system with configurable power priority according to the present invention. Figure 2 This is a schematic block diagram of the main / auxiliary switching control circuit of the present invention. Detailed Implementation
[0022] Preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0023] See Figure 1 The present invention provides a main power supply and auxiliary power supply switching system with configurable power supply priority, including a main power supply, an auxiliary power supply, a switching circuit and an output power supply; Both the main power supply and the auxiliary power supply are connected to the output power supply; The switching circuit includes an MCU main control circuit 25 and a main-auxiliary switching control circuit 26. The MCU main control circuit 25 is electrically connected to the main-auxiliary switching control circuit 26 and is used to output a logic level signal to control the on or off state of the main-auxiliary switching control circuit 26. The main-auxiliary switching control circuit 26 is electrically connected to the feedback loop of the main power supply and is used to adjust the feedback parameters of the main power supply according to the on or off state, so that a preset voltage difference is formed between the output voltages of the main power supply and the auxiliary power supply. The output power supply switches according to the priority determined by the preset voltage difference.
[0024] In this embodiment, the main power supply and auxiliary power supply are two independent switching power supply circuits, and the main and auxiliary switching control circuit 26 is driven and controlled by the MCU main control circuit 25 in the switching circuit.
[0025] When both the main power supply and auxiliary power supply are powered on simultaneously, and the auxiliary power supply is set to prioritize power supply, the main power supply is in standby mode, and the energy meter is powered by the auxiliary power supply. When the auxiliary power supply fails, the main power supply automatically switches to power supply mode.
[0026] See Figure 2 The main-auxiliary switching control circuit 26 includes resistors R1-R6, optocoupler U2, and MOSFET Q1; One end of the resistor R1 is connected to the signal output terminal of the MCU main control circuit 25, and the other end of the resistor R1 is connected to the cathode of the light-emitting diode on the input side of the optocoupler U2. The anode of the light-emitting diode is connected to the MCU power supply 24. The collector of the phototransistor on the output side of the optocoupler U2 is connected to the module power supply 22 in the output power supply. The emitter of the phototransistor is connected to ground after series with resistors R2 and R3, and the connection point of resistors R2 and R3 serves as voltage divider node A. The voltage divider node A is electrically connected to the gate of MOSFET Q1. The source of MOSFET Q1 is grounded, and the drain is connected to the voltage divider node B between resistors R4 and R5. The other end of resistor R4 is grounded, and the other end of resistor R5 is connected to one end of resistor R6 to form voltage divider node C. The voltage divider node C is connected to the first voltage feedback circuit 9 of the main power supply, and the other end of resistor R6 is connected to the first module output power supply 8 of the main power supply.
[0027] In this embodiment, the switching circuit performs the following steps: When the MCU main control circuit 25 outputs a low-level signal to the main-auxiliary switching control circuit 26, both the optocoupler U2 and the MOSFET Q1 are in the on state. The voltage divider node B is grounded through the MOSFET Q1 and bypassed by the resistor R4. The voltage of the first module output power supply 8 of the main power supply is increased to be higher than the voltage of the second module output power supply 18 of the auxiliary power supply, thereby increasing the voltage of the first main circuit output power supply 7 of the main power supply to be higher than the voltage of the second main circuit output power supply 17 of the auxiliary power supply. At this time, the main power supply has priority in power supply. In this embodiment, the voltage of node C is determined by the first voltage feedback circuit 9 and is a fixed voltage. Therefore, the voltage of node B is different. According to the voltage divider principle, the voltage of the first module output power supply 8 is different, and the main circuit output power supply voltage will increase as the module output power supply voltage increases. When the MCU main control circuit 25 outputs a high-level signal to the main-auxiliary switching control circuit 26, the optocoupler U2 and the MOS transistor Q1 are both in the off state, the resistors R4 and R5 are in series, the voltage of the first module output power supply 8 of the main power supply is reduced to a voltage lower than that of the second module output power supply 18 of the auxiliary power supply, and then the voltage of the first main circuit output power supply 7 of the main power supply is reduced to a voltage lower than that of the second main circuit output power supply 17 of the auxiliary power supply. At this time, the auxiliary power supply is given priority.
[0028] In one example, the main power supply and auxiliary power supply are two independent and physically isolated power supply circuits; wherein, The main power supply includes a first AC input 1, a first bridge rectifier circuit 2, a first power chip control circuit 3, a first switching transformer 4, a first main circuit half-wave rectifier circuit 5, a first module half-wave rectifier circuit 6, a first main circuit output power supply 7, a first module output power supply 8, a first voltage feedback circuit 9, and a first optocoupler isolation 10. The first AC input 1, the first bridge rectifier circuit 2, and the first power chip control circuit 3 are connected in series. The output terminal of the first power chip control circuit 3 is connected to the input terminals of the first main circuit half-wave rectifier circuit 5 and the first module half-wave rectifier circuit 6 through the first switching transformer 4. The output terminals of the first main circuit half-wave rectifier circuit 5 and the first module half-wave rectifier circuit 6 are connected in series to the first main circuit output power supply 7 and the first module output power supply 8, respectively. The output terminal of the first main circuit output power supply 7 is connected to the main circuit power supply 23 of the output power supply, and the output terminal of the first module output power supply 8 is connected to the module power supply 21 of the output power supply. The auxiliary power supply includes a second AC input 11, a second bridge rectifier circuit 12, a second power chip control circuit 13, a second switching transformer 14, a second main circuit half-wave rectifier circuit 15, a second module half-wave rectifier circuit 16, a second main circuit output power supply 17, a second module output power supply 18, a second voltage feedback circuit 19, and a second optocoupler isolation 20. The second AC input 11, the second bridge rectifier circuit 12, and the second power chip control circuit 13 are connected in series. The output terminal of the second power chip control circuit 13 is connected to the input terminals of the second main circuit half-wave rectifier circuit 15 and the second module half-wave rectifier circuit 16 through the second switching transformer 14. The output terminals of the second main circuit half-wave rectifier circuit 15 and the second module half-wave rectifier circuit 16 are connected in series to the second main circuit output power supply 17 and the second module output power supply 18, respectively. The output terminal of the second main circuit output power supply 17 is connected to the main circuit power supply 23 of the output power supply, and the output terminal of the second module output power supply 18 is connected to the module power supply 21 of the output power supply.
[0029] The first voltage feedback circuit 9, the first optocoupler isolation 10 and the first power chip control circuit 3 constitute the feedback loop of the main power supply. The input terminal of the first voltage feedback circuit 9 is connected to the output terminal of the main-auxiliary switching control circuit 26. The output terminal of the first voltage feedback circuit 9 is connected to the feedback control terminal of the power chip control circuit 3 through the first optocoupler isolation 10. The first voltage feedback circuit 9 is connected to the first module output power supply 8. The input terminal of the second voltage feedback circuit 19 is connected to the output terminal of the second module output power supply 18, and the output terminal of the second voltage feedback circuit 19 is connected to the feedback control terminal of the second power chip control circuit 13 through the second optocoupler isolation 10.
[0030] In one example, the output power supply includes a module power supply 21, a module power supply 22, a main circuit power supply 23, and an MCU power supply 24. The module power supply 21 is formed by connecting the first module output power supply 8 of the main power supply and the second module output power supply 18 of the auxiliary power supply in parallel. The main circuit power supply 23 is formed by connecting the first main circuit output power supply 7 of the main power supply and the second main circuit output power supply 17 of the auxiliary power supply in parallel. The module power supply 21 and the main circuit power supply 23 are stepped down and then connected to the module power supply 22 and the MCU power supply 24, respectively. The output of the MCU power supply 24 is connected to the MCU main control circuit 25 of the switching circuit.
[0031] The present invention also provides a method for switching between main and auxiliary power supplies with configurable power priority. The method constructs two independent and physically isolated power supply circuits. The MCU main control circuit 25 of the switching circuit executes logic drive on the main and auxiliary switching control circuit 26 to dynamically adjust the output voltage of the main power supply, so that a preset voltage difference is generated between the output voltage of the main power supply and the auxiliary power supply. The logic switching of power supply priority is executed through a physical voltage competition mechanism.
[0032] In one example, the switching method specifically includes: Configure power output priority: The MCU main control circuit 25 sends a priority setting command to the main-auxiliary switching control circuit 26 according to the system preset instructions or real-time operating conditions. When the auxiliary power supply is set to prioritize power supply, the main power supply is controlled to enter standby mode, and the auxiliary power supply takes over the power supply of the energy meter load. When the auxiliary power supply fails to supply power, the main power supply switches to the power supply mode. When the main power supply is set to prioritize power supply, the auxiliary power supply is controlled to enter standby mode, and the main power supply takes over the load power supply of the energy meter. When the main power supply fails to supply power, the auxiliary power supply switches to the power supply mode.
[0033] Specifically, when the main power supply is set to prioritize power supply, the MCU main control circuit 25 outputs a low-level signal, causing the light-emitting diode on the input side of the optocoupler U2 to generate current and conduct, and the phototransistor on the output side to enter the saturation conduction state. At this time, the potential of the voltage divider node A rises. When it is higher than the turn-on voltage threshold of the MOSFET Q1, the MOSFET Q1 conducts and the resistor R5 is directly grounded. At this time, the resistors R5 and R6 divide the voltage of the first module output power supply 8 of the main power supply. At this time, the voltage of the main power supply output is higher than the output voltage of the auxiliary power supply, realizing the priority power supply of the main power supply.
[0034] Specifically, when the auxiliary power supply is set to prioritize power supply, the MCU main control circuit 25 outputs a high-level signal, which turns off the light-emitting diode on the input side of the optocoupler U2 and the phototransistor on the output side is in an open-circuit state. At this time, the potential of the voltage divider node A is pulled down to the reference zero position through the resistor R3, the MOSFET Q1 is turned off, and the resistors R4 and R5 are connected in series and together with R6 to divide the voltage of the first module output power supply 8 of the main power supply. At this time, the output voltage of the main power supply is lower than the output voltage of the auxiliary power supply, thus realizing the priority power supply of the auxiliary power supply.
[0035] In this embodiment, when the main power supply has priority, node B is directly grounded, and the voltage is the reference zero point. When the auxiliary power supply has priority, since Q1 is off, the voltage at node B is the voltage across R4 after the voltage is divided by R4 and R5 at node C.
[0036] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A main / auxiliary power supply switching system with configurable power priority, characterized in that, Includes main power supply, auxiliary power supply, switching circuit and output power supply; Both the main power supply and the auxiliary power supply are connected to the output power supply; The switching circuit includes an MCU main control circuit (25) and a main-auxiliary switching control circuit (26); the MCU main control circuit (25) is electrically connected to the main-auxiliary switching control circuit (26) and is used to output a logic level signal to control the on or off state of the main-auxiliary switching control circuit (26); the main-auxiliary switching control circuit (26) is electrically connected to the feedback loop of the main power supply and is used to adjust the feedback parameters of the main power supply according to the on or off state, so that a preset voltage difference is formed between the output voltage of the main power supply and the auxiliary power supply; The output power supply switches according to the priority determined by the preset voltage difference.
2. The main / auxiliary power supply switching system with configurable power priority according to claim 1, characterized in that, The main-auxiliary switching control circuit (26) includes resistors R1-R6, optocoupler U2, and MOSFET Q1; One end of the resistor R1 is connected to the signal output terminal of the MCU main control circuit (25), and the other end of the resistor R1 is connected to the cathode of the light-emitting diode on the input side of the optocoupler U2. The anode of the light-emitting diode is connected to the MCU power supply (24). The collector of the phototransistor on the output side of the optocoupler U2 is connected to the module power supply (22) in the output power supply. The emitter of the phototransistor is connected in series with resistors R2 and R3 and then grounded. The connection point of resistors R2 and R3 serves as voltage divider node A. The voltage divider node A is electrically connected to the gate of MOS transistor Q1. The source of MOS transistor Q1 is grounded, and the drain is connected to the voltage divider node B between resistors R4 and R5. The other end of resistor R4 is grounded, and the other end of resistor R5 is connected to one end of resistor R6 to form voltage divider node C. The voltage divider node C is connected to the voltage feedback circuit (9) of the main power supply. The other end of resistor R6 is connected to the first module output power supply (8) of the main power supply.
3. The main / auxiliary power supply switching system with configurable power priority as described in claim 2, characterized in that, The switching circuit performs the following steps: When the MCU main control circuit (25) outputs a low-level signal to the main-auxiliary switching control circuit (26), the optocoupler U2 and the MOS transistor Q1 are both in the conducting state. The voltage divider node B is grounded through the MOS transistor Q1 with the bypass resistor R4. The voltage of the first module output power supply (8) of the main power supply is increased to a voltage higher than that of the second module output power supply (18) of the auxiliary power supply. Then, the voltage of the first main circuit output power supply (7) of the main power supply is increased to a voltage higher than that of the second main circuit output power supply (17) of the auxiliary power supply. At this time, the main power supply gives priority to power supply. When the MCU main control circuit (25) outputs a high-level signal to the main-auxiliary switching control circuit (26), the optocoupler U2 and the MOS transistor Q1 are both in the off state, the resistors R4 and R5 are in series, the voltage of the first module output power supply (8) of the main power supply is reduced to a voltage lower than the voltage of the second module output power supply (18) of the auxiliary power supply, and then the voltage of the first main circuit output power supply (7) of the main power supply is reduced to a voltage lower than the second main circuit output power supply (17) of the auxiliary power supply. At this time, the auxiliary power supply is given priority.
4. The main / auxiliary power supply switching system with configurable power priority according to claim 1, characterized in that, The main power supply and auxiliary power supply are two independent and physically isolated power supply circuits; among them, The main power supply includes a first AC input (1), a first bridge rectifier circuit (2), a first power chip control circuit (3), a first switching transformer (4), a first main circuit half-wave rectifier circuit (5), a first module half-wave rectifier circuit (6), a first main circuit output power supply (7), a first module output power supply (8), a first voltage feedback circuit (9), and a first optocoupler isolation (10); the first AC input (1), the first bridge rectifier circuit (2), and the first power chip control circuit (3) are connected in series, and the first power chip control circuit... (3) The output terminal is connected to the input terminals of the first main circuit half-wave rectifier circuit (5) and the first module half-wave rectifier circuit (6) respectively through the first switching transformer (4). The output terminals of the first main circuit half-wave rectifier circuit (5) and the first module half-wave rectifier circuit (6) are connected in series to the first main circuit output power supply (7) and the first module output power supply (8) respectively. The output terminal of the first main circuit output power supply (7) is connected to the main circuit power supply (23) of the output power supply. The output terminal of the first module output power supply (8) is connected to the module power supply (21) of the output power supply. The auxiliary power supply includes a second AC input (11), a second bridge rectifier circuit (12), a second power chip control circuit (13), a second switching transformer (14), a second main circuit half-wave rectifier circuit (15), a second module half-wave rectifier circuit (16), a second main circuit output power supply (17), a second module output power supply (18), a second voltage feedback circuit (19), and a second optocoupler isolation (20); the second AC input (11), the second bridge rectifier circuit (12), and the second power chip control circuit (13) are connected in series, and the second power chip control circuit... The output terminal of circuit (13) is connected to the input terminals of the second main circuit half-wave rectifier circuit (15) and the second module circuit half-wave rectifier circuit (16) respectively through the second switching transformer (14). The output terminals of the second main circuit half-wave rectifier circuit (15) and the second module circuit half-wave rectifier circuit (16) are connected in series to the second main circuit output power supply (17) and the second module circuit output power supply (18) respectively. The output terminal of the second main circuit output power supply (17) is connected to the main circuit power supply (23) of the output power supply, and the output terminal of the second module circuit output power supply (18) is connected to the module circuit power supply (21) of the output power supply.
5. The main / auxiliary power supply switching system with configurable power priority according to claim 4, characterized in that, The first voltage feedback circuit (9), the first optocoupler isolation (10) and the first power chip control circuit (3) constitute the feedback loop of the main power supply. The input terminal of the first voltage feedback circuit (9) is connected to the output terminal of the main-auxiliary switching control circuit (26). The output terminal of the first voltage feedback circuit (9) is connected to the feedback control terminal of the power chip control circuit (3) through the first optocoupler isolation (10). The first voltage feedback circuit (9) is connected to the first module output power supply (8). The input terminal of the second voltage feedback circuit (19) is connected to the output terminal of the second module output power supply (18), and the output terminal of the second voltage feedback circuit (19) is connected to the feedback control terminal of the second power chip control circuit (13) through the second optocoupler isolation (10).
6. The main / auxiliary power supply switching system with configurable power priority according to claim 1, characterized in that, The output power supply includes a module power supply (21), a module power supply (22), a main circuit power supply (23), and an MCU power supply (24). The module power supply (21) is formed by the first module output power supply (8) of the main power supply and the second module output power supply (18) of the auxiliary power supply connected in parallel. The main circuit power supply (23) is formed by the first main circuit output power supply (7) of the main power supply and the second main circuit output power supply (17) of the auxiliary power supply connected in parallel. The module power supply (21) and the main circuit power supply (23) are stepped down and then connected to the module power supply (22) and the MCU power supply (24), respectively. The output of the MCU power supply (24) is connected to the MCU main control circuit (25) of the switching circuit.
7. A method for switching between primary and secondary power supplies with configurable power priority, characterized in that, This method constructs two independent and physically isolated power supply circuits. The MCU main control circuit (25) of the switching circuit executes logic drive on the main and auxiliary switching control circuit (26) to dynamically adjust the output voltage of the main power supply, so that a preset voltage difference is generated between the output voltage of the main power supply and the auxiliary power supply. The logic switching of power supply priority is executed through the physical voltage competition mechanism.
8. The main / auxiliary power supply switching method with configurable power priority according to claim 7, characterized in that, Specifically, it includes: Configure power output priority. The MCU main control circuit (25) sends a priority setting command to the main-auxiliary switching control circuit (26) according to the system preset instructions or real-time operating conditions. When the auxiliary power supply is set to prioritize power supply, the main power supply is controlled to enter standby mode, and the auxiliary power supply takes over the power supply of the energy meter load. When the auxiliary power supply fails to supply power, the main power supply switches to the power supply mode. When the main power supply is set to prioritize power supply, the auxiliary power supply is controlled to enter standby mode, and the main power supply takes over the load power supply of the energy meter. When the main power supply fails to supply power, the auxiliary power supply switches to the power supply mode.
9. The main / auxiliary power supply switching method with configurable power supply priority according to claim 8, characterized in that, When the main power supply is set to prioritize power supply, the MCU main control circuit (25) outputs a low-level signal, causing the light-emitting diode on the input side of the optocoupler U2 to generate current and conduct, and the phototransistor on the output side to enter the saturation conduction state; at this time, the potential of the voltage divider node A rises, and when it is higher than the turn-on voltage threshold of the MOS transistor Q1, the MOS transistor Q1 conducts and the resistor R5 is directly grounded. At this time, the resistors R5 and R6 divide the first module output power supply (8) of the main power supply. At this time, the voltage of the main power supply output power supply is higher than the output voltage of the auxiliary power supply, realizing the priority power supply of the main power supply.
10. The main / auxiliary power supply switching method with configurable power supply priority according to claim 8, characterized in that, When the auxiliary power supply is set to prioritize power supply, the MCU main control circuit (25) outputs a high-level signal, which turns off the light-emitting diode on the input side of the optocoupler U2 and the phototransistor on the output side is in an open circuit state. At this time, the potential of the voltage divider node A is pulled down to the reference zero position through the resistor R3, the MOS transistor Q1 is turned off, and the resistors R4 and R5 are connected in series and together with R6 to divide the first module output power supply (8) of the main power supply. At this time, the output voltage of the main power supply is lower than the output voltage of the auxiliary power supply, thus realizing the priority power supply of the auxiliary power supply.