A zero fire line connection reverse alarm circuit

CN122525448APending Publication Date: 2026-08-07BEYOND INFINITY (HANGZHOU) DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEYOND INFINITY (HANGZHOU) DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-07-07
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

比较小的且是塑料外壳的设备多使用两相线,体型比较大或者有金属外壳的设备多使用火线、零线和地线的三线制插头,由于一些老旧的房屋和一些不规范的建筑在建设时没有按标准布设地线

Benefits of technology

本发明在零火线接反情况下每个周期波都会发生的反向波,通过软件检测的方法检测到多次反向波从而判断出零火线接反并发出告警;实时监测零火线接线状态,及时发现接反情况;基于现有无地线报警电路改进,结构简单、成本低;可通过软件灵活设置判断逻辑,适应性强;适用于各类电器设备,提升用电安全性;此外,通过增加输入保护单元,提高了电路在恶劣电网环境下的可靠性;增加供电电源模块使电路可独立工作,无需外部电源;多模式报警模块实现了不依赖CPU的硬件级报警,增强了安全性;自检模块可定期验证电路功能,符合IEC 60730等安全标准;通讯接口模块支持远程监控,适用于物联网场景;电压异常检测模块在同一电路上扩展了过压/欠压监测功能,提升了性价比;自动切换或保护输出模块实现了“检测-纠正”闭环,保障无人值守情况下的用电安全。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122525448A_ABST
    Figure CN122525448A_ABST
Patent Text Reader

Abstract

The application discloses a zero fire line reverse connection alarm circuit and belongs to the technical field of electronic appliance safety; the zero fire line reverse connection alarm circuit comprises an alternating current input end L, an alternating current input end N, a rectifier diode D, a filter capacitor C, a voltage reduction resistor R3, an isolation optocoupler U, a load resistor R2, a current limiting resistor R1 and a CPU detection end Vout; when the zero fire line is not reversely connected, the Vout outputs a constant low level; when the zero fire line is reversely connected, the Vout outputs a high-low level change signal synchronized with a commercial power cycle; and a CPU identifies the pulse mode through software to judge the zero fire line reverse connection and send an alarm. The application can selectively integrate multiple function modules: an input protection unit improves surge resistance; a power supply module enables the circuit to work independently; a multi-mode alarm module realizes a hardware level sound-light or relay output; a self-checking module periodically verifies the circuit function; and a communication interface module supports remote monitoring. The application has the advantages of simple structure, low cost, expandable function, high safety and the like and is suitable for zero fire line reverse connection detection and protection of various electric appliances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electronic and electrical equipment, and relates to the safety of various industrial electrical equipment or household appliances, especially to a neutral and live wire reverse connection alarm circuit. Background Technology

[0002] Currently, there are two types of alternating current (AC) power we use: three-phase 380 volts and the most commonly used two-phase 220 volts. Households and offices typically use two-phase 220 volt AC power. In homes and common offices, 220 volt AC power wall sockets generally have two wires – a live wire and a neutral wire – or three wires – a live wire, a neutral wire, and a ground wire. Smaller devices with plastic casings often use two-phase wires, while larger devices or those with metal casings often use three-wire plugs (live, neutral, and ground). Because some older houses and non-standard buildings did not have proper grounding during construction, appliances lacking a ground wire, or those using two-wire extension cords, are more prone to accidents when leakage occurs, potentially causing fatalities. In some cases, switches typically disconnect the live wire; however, if the live and neutral wires are reversed, the switch disconnects the neutral wire, and the live wire remains energized, potentially leading to a catastrophic accident. Summary of the Invention

[0003] This invention addresses the shortcomings of the prior art by providing a reverse neutral and live wire alarm circuit. When the neutral and live wires are reversed, a reverse wave will occur in each cycle. Multiple reverse waves are detected by software detection method, thereby determining that the neutral and live wires are reversed and issuing an alarm.

[0004] To achieve the above objectives, the present invention provides the following technical solution: A reverse connection alarm circuit includes an AC input terminal L, an AC input terminal N, a rectifier diode D, a first resistor R1, a second resistor R2, a third resistor R3, a filter capacitor C, a ground terminal E, an isolation optocoupler U, and a CPU detection terminal Vout. The AC input terminal L and AC input terminal N are used to connect to the mains live wire and neutral wire, respectively. The positive terminal of the rectifier diode D is connected to the AC input terminal L. The negative terminal of the rectifier diode D is connected to one end of the filter capacitor C and one end of the third resistor R3, with the other end of the filter capacitor C connected to the AC input terminal N. The other end of the third resistor R3 is connected to pin 1 of the isolation optocoupler U. Pin 3 of the isolation optocoupler U is connected to the ground terminal E. Pin 4 of the isolation optocoupler U is connected to the working ground A. Pin 6 of the isolation optocoupler U is connected to one end of the first resistor and one end of the second resistor, with the other end of the first resistor connected to the CPU detection terminal Vout, and connected to the CPU detection terminal Vout through a load resistor R2 and a signal output current-limiting resistor R1. The other end of the second resistor R2 is connected to the voltage Vcc terminal.

[0005] As a further preferred embodiment of the neutral and live wire reversed alarm circuit of the present invention, when the neutral and live wires are not reversed, the positive half-cycle of the AC input terminal L charges the filter capacitor C through the rectifier diode D, so that the filter capacitor C maintains a voltage. Since the ground terminal E and the AC input terminal N are at the same potential, this voltage goes through the third resistor R3 to pins 1 and 3 of the isolation optocoupler U, so that the LED of the optocoupler is always lit and the output tube is turned on. The pin 6 of the isolation optocoupler U outputs a low potential, so that Vout maintains a low output potential; that is, when the grounding is normal and the neutral and live wires are not reversed, a low potential is always output.

[0006] As a further preferred embodiment of the neutral and live wire reverse connection alarm circuit of the present invention, when the neutral and live wires are reversed, since the AC input terminal L and the ground terminal E are at the same potential, point B, i.e., the AC input terminal N, is connected to the live wire. During the positive half-cycle, since the rectifier diode D is reversed, it is not conducting. During the negative half-cycle, the AC input terminal N charges the filter capacitor C through the rectifier diode D, and this charging voltage is the half-wave voltage. When the next positive half-cycle arrives, the half-wave voltage on the filter capacitor C and the positive half-cycle voltage of the AC input terminal N are superimposed and pass through the third resistor R3, pin 1 of the isolation optocoupler U, and pin 3 of the isolation optocoupler U to the ground terminal E. When pins 1 and 3 of the isolation optocoupler U meet the conduction condition, the internal LED lights up, and pin 6 of the isolation optocoupler U outputs a low level. When the negative half-cycle arrives again, since the AC input terminal L and the ground terminal E are at the same potential, pin 1 of the isolation optocoupler U... When pin 3 is not conducting, pin 6 of the isolation optocoupler U outputs a low level, i.e., Vout outputs a low level; the AC input terminal N charges the filter capacitor C again through the rectifier diode, and so on; based on the above logic relationship of the high and low level changes of Vout output, it can be determined that the live and neutral wires are reversed.

[0007] As a further preferred embodiment of the neutral-live wire reverse connection alarm circuit of the present invention, the first resistor R1 is a signal output current limiting resistor, the second resistor R2 is a load resistor for the output of the isolation optocoupler U, and the third resistor R3 is a step-down resistor.

[0008] As a further preferred embodiment of the neutral-live wire reverse connection alarm circuit of the present invention, it also includes a power supply module, the input terminal of which is connected in parallel with the AC input terminals L and N, and the output terminal provides the circuit with DC operating voltage Vcc and operating ground A.

[0009] As a further preferred embodiment of the neutral and live wire reversed alarm circuit of the present invention, it also includes a multi-mode alarm output module. The input terminal of the module is connected to pin 6 of the isolation optocoupler U, and the output terminal drives at least one alarm device. The alarm device includes one or more of LED indicator lights, buzzers, and relay dry contacts. When the neutral and live wires are reversed, the periodic signal output from pin 6 of the isolation optocoupler U drives the alarm device to emit an audible and visual alarm or output a switching signal.

[0010] As a further preferred embodiment of the neutral-live wire reverse connection alarm circuit of the present invention, it also includes a self-test and fault diagnosis module. The module includes an analog switch or an N-type MOSFET, the drain of which is connected to the positive terminal of the filter capacitor C, the source of which is connected to the working ground A, and the gate of which is connected to the self-test control terminal of the CPU. The CPU controls the analog switch to be turned on for a short time to discharge the charge on the filter capacitor C, and then detects whether a short pulse appears in Vout. If it appears, the detection circuit is determined to be normal.

[0011] As a further preferred embodiment of the neutral-live wire reverse connection alarm circuit of the present invention, it also includes a communication interface module, which is connected to the CPU detection terminal Vout and is used to send the neutral-live wire reverse connection status to an external receiving device in a wired or wireless manner; the wired manner includes RS485 and CAN, and the wireless manner includes Wi-Fi, Bluetooth, and Zigbee.

[0012] As a further preferred embodiment of the neutral-live wire reverse connection alarm circuit of the present invention, it also includes a voltage abnormality detection module. The module includes a series voltage divider circuit composed of a sixth resistor and a seventh resistor. One end of the sixth resistor is connected to the positive terminal of the filter capacitor C, and the other end is connected to the seventh resistor and the ADC input terminal of the CPU. The other end of the seventh resistor is grounded. The CPU determines whether the input AC voltage is over-voltage or under-voltage based on the voltage divider value.

[0013] As a further preferred embodiment of the neutral-live wire reversed alarm circuit of the present invention, it also includes an automatic switching or protection output module. The module includes a double-pole double-throw relay or an AC contactor, the control terminal of which is connected to the CPU detection terminal Vout. When the CPU determines that the neutral and live wires are reversed, it controls the relay to operate, swapping the live wire and the neutral wire at the output terminal, or cutting off the load power supply.

[0014] The present invention has the following beneficial effects: This invention detects the reverse wave that occurs in each cycle when the live and neutral wires are reversed. Multiple reverse waves are detected through software detection, thus determining the reversed connection and issuing an alarm. It monitors the live and neutral wire connection status in real time to promptly detect reversed connections. Based on an improvement on existing groundless alarm circuits, it features a simple structure and low cost. The judgment logic can be flexibly set via software, making it highly adaptable. It is suitable for various electrical devices, improving electrical safety. Furthermore, the addition of an input protection unit enhances the circuit's reliability in harsh power grid environments. The addition of a power supply module allows the circuit to operate independently without an external power source. The multi-mode alarm module achieves hardware-level alarms independent of the CPU, enhancing safety. The self-test module periodically verifies circuit functionality, complying with safety standards such as IEC 60730. The communication interface module supports remote monitoring, suitable for IoT scenarios. The voltage anomaly detection module extends overvoltage / undervoltage monitoring functionality on the same circuit, improving cost-effectiveness. The automatic switching or protection output module implements a "detection-correction" closed loop, ensuring electrical safety in unattended situations. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the principle of the neutral and live wire reverse connection alarm circuit of the present invention. Detailed Implementation

[0016] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] A reverse connection alarm circuit for neutral and live wires, such as Figure 1 As shown, the device includes an AC input terminal L, an AC input terminal N, a rectifier diode D, a first resistor R1, a second resistor R2, a third resistor R3, a filter capacitor C, a ground terminal E, an isolation optocoupler U, and a CPU detection terminal Vout. The AC input terminals L and N are connected to the mains power live wire and neutral wire, respectively. The positive terminal of the rectifier diode D is connected to the AC input terminal L. The negative terminal of the rectifier diode D is connected to one end of the filter capacitor C and one end of the third resistor R3, with the other end of the filter capacitor C connected to the AC input terminal N. The other end of the third resistor R3 is connected to pin 1 of the isolation optocoupler U. Pin 3 of the isolation optocoupler U is connected to the ground terminal E. Pin 4 of the isolation optocoupler U is connected to the working ground A. Pin 6 of the isolation optocoupler U is connected to one end of the first resistor and one end of the second resistor, with the other end of the first resistor connected to the CPU detection terminal Vout, and then connected to the CPU detection terminal Vout through the load resistor R2 and the signal output current-limiting resistor R1. The other end of the second resistor R2 is connected to the voltage Vcc terminal.

[0018] like Figure 1 As shown in the diagram, under normal circumstances, terminal L is connected to the mains live wire L; N is connected to the neutral wire; D is a rectifier diode; C is a filter capacitor; R3 is a step-down resistor; U is an isolation optocoupler; point E is the ground wire; A is the working ground; R2 is the load resistor of U output; R1 is the signal output current limiting resistor; Vout is the output terminal connected to the CPU detection.

[0019] When the live and neutral wires are correctly connected, the optocoupler U remains continuously conducting, and the Vout output is a stable low level. When the live and neutral wires are reversed, U will turn on and off once each in each mains power cycle (50Hz), and the Vout output will change accordingly between high and low levels. The CPU identifies this change pattern through high-frequency sampling, determines that the live and neutral wires are reversed, and issues an alarm via sound and light, display, or communication.

[0020] When the live and neutral wires are not reversed, the positive half-cycle of the AC input terminal L charges the filter capacitor C through the rectifier diode D, keeping the filter capacitor C at voltage. Since the ground terminal E and the AC input terminal N are at the same potential, this voltage passes through the third resistor R3 to pins 1 and 3 of the isolation optocoupler U, causing the LED of the optocoupler to stay lit and the output tube to conduct. Pin 6 of the isolation optocoupler U outputs a low potential, thus keeping Vout at a low output potential; that is, when the grounding is normal and the live and neutral wires are not reversed, the output potential is always low.

[0021] When the live and neutral wires are reversed, since the AC input terminal L and the ground terminal E are at the same potential, point B, i.e., the AC input terminal N, is connected to the live wire. During the positive half-cycle, the rectifier diode D is reversed and therefore not conducting. During the negative half-cycle, the AC input terminal N charges the filter capacitor C through the rectifier diode D, and this charging voltage is the half-wave voltage. When the next positive half-cycle arrives, the half-wave voltage on the filter capacitor C and the positive half-cycle voltage of the AC input terminal N are superimposed and pass through the third resistor R3, pin 1 of the isolation optocoupler U, and pin 3 of the isolation optocoupler U to the ground terminal E. When pins 1 and 3 of the isolation optocoupler U meet the conduction condition, the internal LED lights up, causing pin 6 of the isolation optocoupler U to output a low level. When the negative half-cycle arrives again, since the AC input terminal L and the ground terminal E are at the same potential, pins 1 and 3 of the isolation optocoupler U are not conducting, and pin 6 of the isolation optocoupler U outputs a low level, i.e., Vout outputs a low level. The AC input terminal N charges the filter capacitor C again through the rectifier diode, and this cycle repeats. The logic relationship of the high and low level changes of the Vout output can be used to determine that the live and neutral wires are reversed.

[0022] Add an input protection unit and a power supply module: exist Figure 1 Based on the core circuit shown, the following modules are added to enhance reliability and independent operation capability: Input protection unit: A slow-blow fuse F (250V / 0.1A) is connected in series between the AC input terminal L and the positive terminal of the rectifier diode D, and a varistor MOV (model 14D471K) is connected in parallel between L and N. The fuse F blows in the event of overcurrent or short circuit, and the varistor absorbs surge voltage.

[0023] Power supply module: Employs a non-isolated RC step-down design. An RC step-down circuit is connected in parallel between fuse F and terminals L and N. This circuit consists of two 0.47µF / 275V capacitors connected in series, followed by a rectifier bridge (or half-wave rectification), then a 5.1V Zener diode and a 470µF filter capacitor, outputting 5V DC as Vcc and providing ground A. This module powers the entire circuit (including the CPU, optocoupler output, indicator lights, etc.), allowing the circuit to operate independently without an external DC power supply.

[0024] Multi-mode alarm output module: To enable direct alarm response in case of CPU failure or CPU-independent operation, a multi-mode alarm output module is added. This module's input is connected to pin 6 of the isolation optocoupler U, and its output drives one or more of the following alarm devices: LED blinking indicator: Uses PNP transistor Q1 (such as 8550). The base is connected to pin 6 of U through a 10kΩ resistor, the emitter is grounded, the collector is connected to the LED cathode through a 220Ω resistor, and the LED anode is connected to Vcc. When the live and neutral wires are reversed, pin 6 of U outputs a periodic high level, Q1 conducts periodically, and the LED blinks at a frequency of approximately 50Hz (visually constantly lit).

[0025] Buzzer driver: Use an NPN transistor (such as 8050) to drive an active buzzer, also connected to pin 6 of U, to emit a continuous beeping sound.

[0026] Relay dry contact output: A monostable circuit consisting of diodes, resistors, and capacitors (e.g., using NE555 or discrete components) is added to convert the pulse signal into a continuous engagement, driving the relay output passive contact for use by external control systems.

[0027] Self-test and fault diagnosis module: To periodically verify the integrity of the detection circuit, a self-test module is added. An N-channel MOSFET (such as 2N7002) is connected in parallel between the positive terminal of the filter capacitor C and the working ground A, with its gate connected to a self-test control I / O port (SELF_TEST) of the CPU. During normal operation, this MOSFET is off. During the self-test, the CPU first reads the current Vout status (which should be no pulse), then controls the MOSFET to turn on briefly (e.g., 20ms) to discharge the charge on capacitor C, and then turns it off. If the detection circuit is normal at this time, because capacitor C is discharged, it will be recharged in the subsequent AC half-cycle, simulating the charge superposition process during reverse connection, and a brief pulse should appear on Vout. If the CPU detects this pulse, it determines that the circuit is normal; otherwise, it issues a fault alarm. This self-test can be executed automatically upon power-on or triggered by a user button.

[0028] Communication interface module: To enable remote monitoring, a communication interface module is added. The reverse connection status (0 or 1) obtained by the CPU detection terminal Vout after logical judgment is sent in one of the following ways: Wired RS485: The CPU's UART is connected to the optocoupler-isolated MAX485 chip, which transmits the status to the monitoring host via twisted pair cable.

[0029] Wireless Wi-Fi: The CPU connects to the ESP8266 module via UART to send alarm information to the cloud or mobile APP via MQTT or HTTP protocol.

[0030] Bluetooth: Uses a BLE module (such as HC-08) to broadcast status signals.

[0031] The power supply for the communication module can be provided by the power supply module.

[0032] Voltage Anomaly Detection Module: Based on the core circuit, this module utilizes the voltage at the positive terminal of the filter capacitor C (proportional to the peak value of the AC input) for overvoltage / undervoltage detection. A voltage divider circuit is formed by adding a sixth resistor R6 (100kΩ) and a seventh resistor R7 (10kΩ): one end of R6 is connected to the positive terminal of C, and the other end is connected to R7 and the CPU's ADC input terminal; the other end of R7 is grounded. The CPU samples the ADC value at a fixed period and determines whether the input voltage is too high or too low (e.g., exceeding 264V or falling below 180V) based on a preset threshold. To improve anti-interference, a 0.1µF capacitor can be connected in parallel at the ADC input terminal. This module enables the same circuit to simultaneously perform neutral / live wire reverse connection detection and voltage anomaly monitoring, improving cost-effectiveness.

[0033] Automatic Switching or Protection Output Module: To achieve automatic correction or safe disconnection, an automatic switching or protection output module is added. This module includes a double-pole double-throw relay (or AC contactor) with its normally open / normally closed contacts connected to the power output terminal. The relay coil is controlled by the CPU (driven by an NPN transistor). Under normal wiring, the relay does not operate, L_in is connected to L_out, and N_in is connected to N_out. When the CPU detects a reverse pulse between the live and neutral wires for three consecutive cycles, it drives the relay to engage, swapping the live and neutral wires at the output terminal to achieve automatic correction; or it drives a normally closed AC contactor to disconnect the load power supply until manually reset. To prevent arcing, the switching action should avoid current zero crossing (the CPU can achieve this through an AC zero-crossing detection circuit), or an RC snubber circuit should be connected in parallel with the relay contacts.

[0034] The modules in the above embodiments can be selectively combined according to actual needs, and all fall within the protection scope of this invention.

[0035] This invention is not limited to the specific embodiments described above. Any ordinary changes and substitutions made by those skilled in the art within the scope of the technical solution of this invention should be included within the protection scope of this invention.

[0036] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. All such modifications, equivalent substitutions, improvements, etc., should be included within the protection scope of the present invention.

Claims

1. A reverse connection alarm circuit for neutral and live wires, characterized in that: It includes an AC input terminal L, an AC input terminal N, a rectifier diode D, a first resistor R1, a second resistor R2, a third resistor R3, a filter capacitor C, a ground terminal E, an isolation optocoupler U, and a CPU detection terminal Vout. The AC input terminals L and N are used to connect to the mains power live wire and neutral wire, respectively. The positive terminal of the rectifier diode D is connected to the AC input terminal L. The negative terminal of the rectifier diode D is connected to one end of the filter capacitor C and one end of the third resistor R3, with the other end of the filter capacitor C connected to the AC input terminal N. The other end of the third resistor R3 is connected to pin 1 of the isolation optocoupler U. Pin 3 of the isolation optocoupler U is connected to the ground terminal E. Pin 4 of the isolation optocoupler U is connected to the working ground A. Pin 6 of the isolation optocoupler U is connected to one end of the first resistor R1 and one end of the second resistor R2, with the other end of the first resistor R1 connected to the CPU detection terminal Vout, and the other end of the second resistor R2 connected to the voltage Vcc terminal.

2. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: When the live and neutral wires are not reversed, the positive half-cycle of the AC input terminal L charges the filter capacitor C through the rectifier diode D, keeping the filter capacitor C at voltage. Since the ground terminal E and the AC input terminal N are at the same potential, this voltage keeps the LED inside the isolation optocoupler U lit and the output tube conducting through the third resistor R3. The pin 6 of the isolation optocoupler U outputs a low potential, thus keeping Vout at a low output potential.

3. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: When the live and neutral wires are reversed, the AC input terminal L is at the same potential as the ground terminal E, and the AC input terminal N is connected to the live wire. During the negative half-cycle, the AC input terminal N charges the filter capacitor C through the rectifier diode D, generating a half-wave voltage. During the next positive half-cycle, the half-wave voltage on the filter capacitor C is superimposed with the positive half-cycle voltage of the AC input terminal N, causing the isolation optocoupler U to conduct, and its pin 6 outputs a low level. During the negative half-cycle, the isolation optocoupler U is cut off, and its pin 6 outputs a high level. This process repeats, and Vout outputs a high-low level change signal synchronized with the mains power cycle. The CPU detects this signal and determines that the live and neutral wires are reversed.

4. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: The first resistor R1 is a signal output current limiting resistor, the second resistor R2 is the load resistor of the isolation optocoupler U output, and the third resistor R3 is a step-down resistor.

5. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: It also includes a power supply module, whose input is connected in parallel to the AC input terminals L and N, and whose output provides the circuit with a DC operating voltage Vcc and a working ground A.

6. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: It also includes a multi-mode alarm output module, the input of which is connected to pin 6 of the isolation optocoupler U, and the output of which drives at least one alarm device; the alarm device includes one or more of LED indicator lights, buzzers, and relay dry contacts; when the live and neutral wires are reversed, the periodic signal output from pin 6 of the isolation optocoupler U drives the alarm device to emit an audible and visual alarm or output a switching signal.

7. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: It also includes a self-test and fault diagnosis module, which contains an analog switch or an N-type MOSFET. Its drain is connected to the positive terminal of the filter capacitor C, its source is connected to the working ground A, and its gate is connected to the CPU's self-test control terminal. The CPU controls the analog switch to conduct briefly to discharge the charge on the filter capacitor C, and then detects whether a brief pulse appears in Vout. If it appears, the detection circuit is determined to be normal.

8. The alarm circuit for reverse connection of live and neutral wires according to claim 1, characterized in that: It also includes a communication interface module, which is connected to the CPU detection terminal Vout and is used to send the reversed neutral and live wire status to an external receiving device via wired or wireless means; the wired means include RS485 and CAN, and the wireless means include Wi-Fi, Bluetooth, and Zigbee.

9. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: It also includes a voltage anomaly detection module, which contains a series voltage divider circuit composed of a sixth resistor and a seventh resistor. One end of the sixth resistor is connected to the positive terminal of the filter capacitor C, and the other end is connected to the seventh resistor and the ADC input terminal of the CPU. The other end of the seventh resistor is grounded. The CPU determines whether the input AC voltage is over-voltage or under-voltage based on the voltage divider value.

10. The neutral / live wire reverse connection alarm circuit according to claim 1, characterized in that: It also includes an automatic switching or protection output module, which contains a double-pole double-throw relay or AC contactor, whose control terminal is connected to the CPU detection terminal Vout; when the CPU determines that the live and neutral wires are reversed, it controls the relay to operate, swapping the live and neutral wires at the output terminal, or cutting off the load power supply.