Electric leakage protection circuit based on commercial power
By using a leakage current protection circuit based on mains power, and combining a detection circuit with real-time voltage and a reference voltage to control the on/off state of the LED circuit, the problem of leakage current protection circuit failure during lamp installation is solved, achieving highly accurate leakage current detection and safety assurance.
Patent Information
- Application Number
- CN202520291059.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Priority Date
- 2024-11-01
- Filing Date
- 2025-02-21
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2035-02-21
AI Technical Summary
Existing technology carries the risk of leakage protection circuit failure during lamp installation, especially when there is poor contact at the input end, which still poses a risk of electric shock to the operator.
Design a leakage current protection circuit based on mains power. By combining the real-time voltage of the mains output pin and the reference voltage with the detection circuit, and using an amplifier, comparator and switching transistor to control the on/off state of the LED circuit, accurate leakage current detection can be achieved.
It improves the accuracy of leakage current detection, ensures that the LED circuit is powered on when needed, avoids the risk of electric shock in the event of leakage current, and ensures operational safety.
Smart Images

Figure CN223785742U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of LED technology, and in particular to a leakage protection circuit based on mains power. Background Technology
[0002] Currently, fluorescent lamps can be powered directly from AC mains. When AC mains input is selected, the AC mains voltage is typically 220V / 50Hz or other voltages.
[0003] In the lighting field, lamps are divided into two types: single-ended input and double-ended input. Single-ended input means that all the AC input terminals are located at the same end, while double-ended input means that they are located at both ends of the lamp. Since many lamp holders still retain double-ended input interfaces, double-ended input lamps are generally used when replacing or installing existing lamps.
[0004] During the installation of lamp tubes, operators typically insert one end of the lamp tube into the lamp holder first, and then insert the other end. This may result in partial connection. Since the operator's hand needs to hold the end of the lamp tube, if the human body accidentally touches the conductive metal end, electric shock may easily occur, affecting operational safety. Therefore, it is particularly important to implement leakage protection for lamp tubes.
[0005] Current technology primarily uses a switching transistor connected to the power input terminal to detect the current flowing through it, thereby determining whether leakage current exists and achieving leakage protection. However, this technology is not effective in all situations; when there is poor contact at the input terminal, the leakage protection circuit will fail, and the operator will still be at risk of electric shock. Utility Model Content
[0006] The technical problem to be solved by this utility model is to provide a leakage protection circuit based on mains power, which can realize leakage protection.
[0007] To address the aforementioned technical problems, this utility model provides a leakage current protection circuit based on mains power, comprising: a power supply circuit, a step-down circuit, an LED circuit, and a detection circuit; the input terminal of the power supply circuit is connected to mains power, and the output terminal of the power supply circuit is respectively connected to the input terminal of the step-down circuit and the input terminal of the LED circuit, for rectifying the output power of the mains power to supply power to the step-down circuit and the LED circuit; the output terminal of the step-down circuit is connected to the detection circuit, for stepping down the power supply output by the power supply circuit to output a reference voltage to the detection circuit; the detection circuit is respectively connected to the output pin of the mains power and the LED circuit, for controlling the operating state of the LED circuit according to the real-time voltage of the mains power output and the reference voltage output by the step-down circuit.
[0008] As an improvement to the above solution, the detection circuit includes a second comparator, a second switch, and a third switch; the real-time sampling terminal of the second comparator is connected to the output pin of the mains power supply to detect the real-time voltage of the mains power supply; the reference sampling terminal of the second comparator is connected to the output terminal of the step-down circuit to obtain a reference voltage; the output terminal of the second comparator is connected to the second switch to control the on / off state of the second switch according to the real-time voltage and the reference voltage; the second switch is connected to the third switch to control the on / off state of the third switch, and the third switch controls the working state of the LED circuit.
[0009] As an improvement to the above solution, the detection circuit includes an amplifier, a second comparator, a second switch, and a third switch; the detection terminal of the amplifier is connected to the output pin of the mains power supply to amplify the real-time voltage of the mains power supply; the real-time sampling terminal of the second comparator is connected to the output terminal of the amplifier to obtain the amplified real-time voltage; the reference sampling terminal of the second comparator is connected to the output terminal of the step-down circuit to obtain a reference voltage; the output terminal of the second comparator is connected to the second switch to control the on / off state of the second switch according to the amplified real-time voltage and the reference voltage; the second switch is connected to the third switch to control the on / off state of the third switch, and the third switch controls the working state of the LED circuit.
[0010] As an improvement to the above solution, when the second switch and the third switch are turned on, the power supply circuit, the LED circuit and the detection circuit form an LED loop, and the LED circuit works; when the second switch and the third switch are turned off, the LED circuit is disconnected from the detection circuit, and the LED circuit does not work.
[0011] As an improvement to the above scheme, the control electrode of the second switch is connected to the output terminal of the second comparator, the first electrode of the second switch is connected to the output terminal of the step-down circuit, and the second electrode of the second switch is connected to the control electrode of the third switch; the first electrode of the third switch is connected to the power supply circuit, and the second electrode of the third switch is connected to the output terminal of the LED circuit.
[0012] As an improvement to the above scheme, the detection circuit further includes a first voltage divider circuit, and the reference sampling terminal of the second comparator is connected to the output terminal of the step-down circuit through the first voltage divider circuit.
[0013] As an improvement to the above solution, the detection circuit further includes a second voltage divider circuit, and the detection terminal of the amplifier is connected to the output pin of the mains power through the second voltage divider circuit.
[0014] As an improvement to the above scheme, the second voltage divider circuit includes a third diode and at least two voltage divider resistors connected in series, and the detection terminal of the amplifier is connected between the voltage divider resistors.
[0015] As an improvement to the above solution, the leakage protection circuit based on mains power further includes a filter circuit; the input terminal of the filter circuit is connected to the output terminal of the power supply circuit, and is used to filter the output power of the power supply circuit; the output terminal of the filter circuit is connected to the input terminal of the LED circuit, and is used to output the filtered output power to the LED circuit.
[0016] As an improvement to the above solution, the LED circuit includes a driver module and an LED module connected to each other, wherein the driver module is used to drive the LED module with a constant current.
[0017] The beneficial effects of implementing this utility model are as follows:
[0018] This utility model, a leakage protection circuit based on mains power, uses the electrical signal before rectification as the detection target and combines the real-time voltage of the mains output pin with the reference voltage. Using voltage factors as the judgment basis, it achieves accurate leakage detection from the voltage perspective, greatly improving the accuracy of detection. This effectively controls the on / off state of the LED circuit, plays a role in preventing leakage, and ensures human safety.
[0019] Furthermore, this utility model introduces control components such as amplifiers, comparators, and switching transistors into the leakage protection circuit based on mains power, realizing layer-by-layer comparison of electrical signals and flexible switching of circuits, thereby more accurately controlling the on / off state of the LED circuit with high accuracy. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the leakage current protection circuit based on mains power of this utility model;
[0021] Figure 2 This is a circuit diagram of an embodiment of the leakage current protection circuit based on mains power of this utility model;
[0022] Figure 3 This is a circuit diagram of an embodiment of the step-down circuit in the leakage current protection circuit based on mains power of this utility model;
[0023] Figure 4 This is a circuit diagram of another embodiment of the step-down circuit in the leakage protection circuit based on mains power of this utility model;
[0024] Figure 5 This is another structural schematic diagram of the leakage current protection circuit based on mains power of this utility model;
[0025] Figure 6This is another structural schematic diagram of the leakage current protection circuit based on mains power according to this utility model. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this utility model clearer, the following will describe this utility model in further detail with reference to the accompanying drawings. It is hereby declared that the terms "up," "down," "left," "right," "front," "back," "inner," and "outer," etc., appearing or about to appear in this document, are based solely on the accompanying drawings and are not intended to specifically limit this utility model.
[0027] See Figure 1 , Figure 1 The specific structure of the leakage current protection circuit based on mains power of this utility model is shown, which includes a power supply circuit 1, a step-down circuit 2, an LED circuit 3, and a detection circuit 4. Specifically:
[0028] The input terminal of power supply circuit 1 is connected to the mains power, and the output terminal of power supply circuit 1 is connected to the input terminal of step-down circuit 2 and the input terminal of LED circuit 3 respectively, which is used to rectify the output power of the mains power to output power to step-down circuit 2 and LED circuit 3.
[0029] The output of step-down circuit 2 is connected to detection circuit 4 and is used to step down the power supply output from power supply circuit 1 to output a reference voltage to detection circuit 4.
[0030] The detection circuit 4 is connected to the output pin of the mains power supply and the LED circuit 3 respectively, and is used to control the working state of the LED circuit 3 according to the real-time voltage of the mains power supply and the reference voltage output by the step-down circuit 2.
[0031] It should be noted that the leakage protection circuit based on mains power of this utility model can be applied to mains power, and at the same time, the leakage protection circuit of this utility model can realize leakage protection of mains power.
[0032] In existing technologies, leakage current protection circuits typically detect the rectified electrical signal to achieve leakage current protection. Unlike existing technologies, this invention's leakage current protection circuit, based on mains power, uses the pre-rectified electrical signal as the detection target and voltage as the judgment criterion, achieving accurate leakage current detection from a voltage perspective and significantly improving detection accuracy.
[0033] The power supply circuit 1, the step-down circuit 2, the LED circuit 3, and the detection circuit 4 are described in detail below with reference to specific embodiments:
[0034] I. Power Supply Circuit 1
[0035] like Figure 2As shown, in this embodiment, the power supply circuit 1 includes a rectifier bridge BD1 and input ports F1 and F2. The two AC input terminals of the rectifier bridge BD1 are connected to the mains power, the negative terminal of the DC output is connected to the step-down circuit 2 and the LED circuit 3, and the positive terminal of the DC output is grounded.
[0036] II. Step-down circuit 2
[0037] like Figure 2 As shown, in this embodiment, the step-down circuit 2 includes a voltage divider resistor group (second resistor R2, third resistor R3, fourth resistor R4 and fifth resistor R5), a first capacitor C1 and a first Zener diode D1; wherein, one end of the second resistor R2 is connected to the power supply circuit 1, and the other end is grounded through the third resistor R3, the fourth resistor R4 and the fifth resistor R5 in sequence; the fifth resistor R5 is connected in parallel with the first capacitor C1 and the first Zener diode D1 respectively; the positive terminal of the first Zener diode D1 is grounded and the negative terminal is connected to the detection circuit 4.
[0038] Therefore, the step-down circuit 2 can step down the power supply output from the power supply circuit 1 and convert it into a 5V reference voltage for use by the detection circuit 4.
[0039] In other embodiments, different numbers and resistance values of resistors can be selected for voltage reduction according to actual needs.
[0040] like Figure 3 As shown, in this embodiment, the voltage divider resistor group includes five resistors connected in series (first resistor R1, second resistor R2, third resistor R3, fourth resistor R4 and fifth resistor R5).
[0041] In other embodiments, voltage reduction can be achieved using a step-down chip.
[0042] like Figure 4 As shown, in this embodiment, the step-down circuit 2 includes a step-down chip U2, an eleventh diode D11, a twelfth diode D12, a third inductor L3, a fourth inductor L4, a sixteenth capacitor C16, a seventeenth capacitor C17, a second polarity capacitor CE2, a third polarity capacitor CE3, a fourth polarity capacitor CE4, a fortieth resistor R40, a forty-first resistor R41, and a current-limiting resistor RS1, wherein:
[0043] The ground pin GND of the step-down chip U2 is connected to the negative terminal of the twelfth diode D12. The clock pin SCL and the power supply pin VCC are respectively connected to the negative terminal of the eleventh diode D11. The open-drain pin DRAI N is connected to the power supply circuit 1 through the third inductor L3. The chip select pin CS is connected to the negative terminal of the twelfth diode D12 through the current limiting resistor RS1.
[0044] The positive terminal of the twelfth diode D12 is grounded, and the negative terminal is connected to the detection circuit 4 through the fourth inductor L4 and to the negative terminal of the eleventh diode D11 through the seventeenth capacitor C17. The positive terminal of the eleventh diode D11 is connected to the detection circuit 4.
[0045] One end of the 40th resistor R40 is connected to the detection circuit 4, and the other end is grounded. The 40th resistor R40, the 16th capacitor C16, and the second polarity capacitor CE2 are connected in parallel.
[0046] The forty-first resistor R41 is connected in parallel with the third inductor L3; the positive terminal of the fourth polarity capacitor CE4 is connected to the open-drain pin DRAIN, and the negative terminal is grounded; the positive terminal of the third polarity capacitor CE3 is connected to power supply circuit 1, and the negative terminal is grounded.
[0047] It should be noted that when connected to mains power, the voltage after rectification by the first rectifier bridge DB1 matches the working state of the buck chip U2; therefore, the buck chip U2 can work normally, playing the role of bucking constant current and supplying a constant reference voltage to the detection circuit 4.
[0048] Therefore, in applications, different step-down circuits 2 can be used to step down the power output of power supply circuit 1 according to actual needs, and no restrictions are imposed here.
[0049] III. LED Circuit 3
[0050] like Figure 2 As shown, in this embodiment, the LED circuit 3 includes a driving module 32 and an LED module 31 connected to each other, wherein the driving module 32 is used to drive the LED module 31 with a constant current. Specifically:
[0051] LED module 31 includes multiple light-emitting diodes (LED1...LEDN) connected in series.
[0052] The drive module 32 includes a drive chip U1, a second inductor L2, a thirteenth diode D13, a tenth capacitor C10, an eighteenth polarized capacitor C18, a nineteenth capacitor C19, a twentieth capacitor C20, an eighth resistor R8, a seventeenth resistor R17, an eighteenth resistor R18, and a forty-first resistor R41. Wherein:
[0053] The overvoltage protection pin OVP of the driver chip U1 is connected to the detection circuit 4 through the forty-first resistor R41; the power input pin VI N is connected to the positive terminal of the LED module through the eighth resistor R8; the open-drain pin DRA IN is connected to the positive terminal of the LED module through the thirteenth diode D13 and to the negative terminal of the LED module through the second inductor L2; the compile pin I SP is connected to the detection circuit 4 through the seventeenth resistor R17 and the eighteenth resistor R18 respectively.
[0054] One end of the twentieth capacitor C20 is connected to the positive terminal of the LED module, and the other end is connected to the detection circuit 4;
[0055] The positive terminal of the eighteenth polarity capacitor C18 is connected to the positive terminal of the LED module, the negative terminal of the eighteenth polarity capacitor C18 is connected to the negative terminal of the LED module and is connected to the detection circuit 4 through the tenth capacitor C10. The eighteenth polarity capacitor C18 and the nineteenth capacitor C19 are connected in parallel.
[0056] Therefore, when connected to mains power, the LED module can be driven by constant current through the driver chip U1 to ensure that the LED module can be used normally.
[0057] IV. Detection Circuit 4
[0058] like Figure 2 and 5 As shown, in some implementations, the detection circuit 4 may include an amplifier U1C, a second comparator U1B, a second switch Q2, and a third switch Q3; wherein, the detection terminal of the amplifier U1C is connected to the output pin of the mains power supply to amplify the real-time voltage of the mains power supply; the real-time sampling terminal of the second comparator U1B is connected to the output terminal of the amplifier U1C to obtain the amplified real-time voltage; the reference sampling terminal of the second comparator U1B is connected to the output terminal of the step-down circuit 2 to obtain the reference voltage; the output terminal of the second comparator U1B is connected to the second switch Q2 to control the on / off state of the second switch Q2 according to the amplified real-time voltage and the reference voltage; the second switch Q2 is connected to the third switch Q3 to control the on / off state of the third switch Q3, and the third switch Q3 controls the working state of the LED circuit 3.
[0059] It should be noted that when the second switch Q2 and the third switch Q3 are turned on, the power supply circuit 1, the LED circuit 3 and the detection circuit 4 form an LED loop, and the LED circuit 3 works; when the second switch Q2 and the third switch Q3 are turned off, the LED circuit 3 is disconnected from the detection circuit 4, and the LED circuit 3 does not work.
[0060] Furthermore, the control electrode of the second switch Q2 is connected to the output terminal of the second comparator U1 B, the first electrode of the second switch Q2 is connected to the output terminal of the step-down circuit 2, and the second electrode of the second switch Q2 is connected to the control electrode of the third switch Q3; the first electrode of the third switch Q3 is connected to the power supply circuit 1, and the second electrode of the third switch Q3 is connected to the output terminal of the LED circuit 3.
[0061] For example, when the second comparator U1B outputs a low level, the second switch Q2 and the third switch Q3 are turned on, so that the power supply circuit 1, the LED circuit 3 and the detection circuit 4 form an LED circuit, and the LED circuit 3 works.
[0062] When the second comparator U1B outputs a high level, the second switch Q2 and the third switch Q3 are turned off, so that the LED circuit 3 is disconnected from the detection circuit 4, and the LED circuit 3 does not work.
[0063] It should be noted that the output level of the second comparator UIB can affect the on / off state of the second switch Q2, but the specific logic affecting this state can be set according to the actual situation. For example, it can be set so that the second switch Q2 is turned on when the second comparator UIB outputs a low level; or it can be set so that the second switch Q2 is turned on when the second comparator UIB outputs a high level.
[0064] Furthermore, the detection circuit 4 also includes a first voltage divider circuit 41 and / or a second voltage divider circuit 42, wherein the reference sampling terminal of the second comparator U1 B is connected to the output terminal of the step-down circuit 2 through the first voltage divider circuit 41, and the detection terminal of the amplifier U1 C is connected to the output pin of the mains power through the second voltage divider circuit 42.
[0065] The second voltage divider circuit 42 includes a third diode D3 connected in series and at least two voltage divider resistors (such as the forty-second resistor R42, the twenty-fifth resistor R25, and the twenty-ninth resistor R29). The detection terminal of the amplifier U1 C is connected between the voltage divider resistors.
[0066] like Figure 6 As shown, in other embodiments, amplifier U1C can be omitted to further simplify the circuit structure of detection circuit 4. In this case, detection circuit 4 may include a second comparator U1B, a second switch Q2, and a third switch Q3. The real-time sampling terminal of the second comparator U1B is connected to the output pin of the mains power supply to detect the real-time voltage of the mains power supply; the reference sampling terminal of the second comparator U1B is connected to the output terminal of the step-down circuit 1 to obtain a reference voltage; the output terminal of the second comparator U1B is connected to the second switch Q2 to control the on / off state of the second switch Q2 based on the real-time voltage and the reference voltage; the second switch Q2 is connected to the third switch Q3 to control the on / off state of the third switch Q3, and the third switch Q3 controls the operating state of the LED circuit 3.
[0067] Similarly, when the second comparator U1B outputs a low level, the second switch Q2 and the third switch Q3 are turned on, so that the power supply circuit 1, the LED circuit 3 and the detection circuit 4 form an LED circuit, and the LED circuit 3 works.
[0068] When the second comparator U1B outputs a high level, the second switch Q2 and the third switch Q3 are turned off, so that the LED circuit 3 is disconnected from the detection circuit 4, and the LED circuit 3 does not work.
[0069] like Figure 2As shown, in this embodiment, the detection circuit 4 includes an amplifier U1C, a second comparator U1B, a second switch Q2, a third switch Q3, a third diode D3, a twenty-fourth resistor R24, a twenty-fifth resistor R25, a twenty-eighth resistor R28, a twenty-ninth resistor R29, a thirty-sixth resistor R36, a thirty-seventh resistor R37, a thirty-eighth resistor R38, a forty-second resistor R42, and a forty-third resistor R43, wherein:
[0070] The non-inverting input of amplifier U1C is connected to the mains output pin via resistor R25 (25th), resistor R42 (42nd), and diode D3 (3rd), and grounded via resistor R29 (29th). The inverting input of amplifier U1C is grounded via resistor R37 (37th), and connected to the inverting input of second comparator U1B via resistor R38 (38th). The output of amplifier U1C is connected to the inverting input of second comparator U1B.
[0071] The non-inverting input of the second comparator U1B is connected to the step-down circuit 2 through the twenty-fourth resistor R24, and grounded through the twenty-eighth resistor R28; the output of the second comparator U1B is connected to the gate of the second switch Q2 through the thirty-sixth resistor R36.
[0072] The source of the second switch Q2 is connected to the step-down circuit 2, the drain of the second switch Q2 is connected to the gate of the third switch Q3 through the forty-third resistor R43, the source of the third switch Q3 is grounded, and the drain of the third switch Q3 is connected to the LED circuit 3.
[0073] Furthermore, the leakage protection circuit based on mains power of the present invention also includes a filter circuit 6. The input terminal of the filter circuit 6 is connected to the output terminal of the power supply circuit 1 and is used to filter the output power of the power supply circuit 1. The output terminal of the filter circuit 6 is connected to the input terminal of the LED circuit 3 and is used to output the filtered output power to the LED circuit 3.
[0074] like Figure 2 In this embodiment, the filter circuit 6 includes a first inductor L1, a third capacitor C3, and a fourth capacitor C4; wherein, one end of the third capacitor C3 is connected to the power supply circuit 1, and the other end is grounded; one end of the fourth capacitor C4 is connected to the positive terminal of the LED circuit 3, and the other end is grounded; one end of the first inductor L1 is connected to the power supply circuit 1, and the other end is connected to the positive terminal of the LED circuit 3.
[0075] Therefore, the power supply voltage output by the power supply circuit 1 can be filtered by the filter circuit 6 to supply power to the LED circuit 3.
[0076] In this embodiment, the amplifier U1C functions to amplify signals, ensuring the comparison voltage of the second comparator U1B even when the input resistance changes slightly. When the voltage at the inverting input terminal of the second comparator U1B is greater than the voltage at the non-inverting input terminal, it outputs a low level. When the second switch Q2 receives a low level, it conducts. At this time, the gate of the third switch Q3 receives a 5V voltage and conducts, and the LED circuit 3 conducts. That is, the power supply output by the power supply circuit 1 flows successively from the negative DC output terminal of the rectifier bridge BD1 through the first inductor L1, light-emitting diodes (LED1... LEDN), the second inductor L2, the open-drain pin DRAIN, the drive chip U1, the programming pin ISP, and the third switch Q3, and finally returns to the positive DC output terminal of the rectifier bridge BD1 to form an LED loop.
[0077] The following further describes Figure 2 the leakage detection principle of the shown embodiment:
[0078] For example, the power supply voltage of the input power supply circuit 1 is 120V, 60HZ. After voltage division by the forty-second resistor R42, the twenty-fifth resistor R25, and the twenty-ninth resistor R29, the divided voltage point voltage V1 is obtained. The divided voltage point voltage V1 outputs an amplified voltage of 5.1V through the amplifier U1C. At this time, since 5.1V > 5V, the second comparator U2C outputs a low level, and the second switch Q2 and the third switch Q3 conduct.
[0079] Another example is that if one end of the input ports F1 and F2 of the power supply circuit 1 loses power and a person touches it at this time, since the resistance of the person is greater than 500Ω, after voltage division by the forty-second resistor R42, the twenty-fifth resistor R25, and the twenty-ninth resistor R29, the divided voltage point voltage V2 is obtained. V2 < V1. After the divided voltage point voltage V2 is amplified by the amplifier U1C, the amplified voltage obtained is less than 5V, and the second comparator U2C outputs a high level. The second switch Q2 and the third switch Q3 do not conduct, and the LED loop is cut off, playing a role in preventing electric leakage and ensuring the safety of people.
[0080] To sum up, the leakage protection circuit based on the mains electricity of the present utility model uses the electrical signal before rectification as the detection target, combines the real-time voltage of the output pins of the mains electricity and the reference voltage, uses the voltage factor as the judgment basis, and realizes precise detection of electric leakage from the voltage perspective, greatly improving the accuracy of detection. Thus, it effectively controls the on / off state of the LED circuit, plays a role in preventing electric leakage, and ensures the safety of people. Further, the leakage protection circuit based on the mains electricity of the present utility model introduces control elements such as amplifiers, comparators, and switching tubes, realizes layer-by-layer comparison of electrical signals and flexible switching of the circuit, and thus more precisely controls the on / off state of the LED circuit with high accuracy.
[0081] The above description is the preferred embodiment of this utility model. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this utility model, and these improvements and modifications are also considered to be within the protection scope of this utility model.
Claims
1. A leakage current protection circuit based on mains power, characterized in that, Includes power supply circuit, step-down circuit, LED circuit and detection circuit; The input terminal of the power supply circuit is connected to the mains power, and the output terminal of the power supply circuit is connected to the input terminal of the step-down circuit and the input terminal of the LED circuit respectively, for rectifying the output power of the mains power to output power to the step-down circuit and the LED circuit. The output terminal of the step-down circuit is connected to the detection circuit, and is used to step down the power supply output by the power supply circuit to output a reference voltage to the detection circuit. The detection circuit is connected to the output pin of the mains power supply and the LED circuit respectively, and is used to control the working state of the LED circuit according to the real-time voltage of the mains power supply and the reference voltage output by the step-down circuit.
2. The leakage current protection circuit based on mains power as described in claim 1, characterized in that, The detection circuit includes a second comparator, a second switch, and a third switch; The real-time sampling terminal of the second comparator is connected to the output pin of the mains power supply to detect the real-time voltage of the mains power supply output. The reference sampling terminal of the second comparator is connected to the output terminal of the buck circuit to obtain the reference voltage; The output of the second comparator is connected to the second switch and is used to control the on / off state of the second switch according to the real-time voltage and the reference voltage. The second switch is connected to the third switch and is used to control the on / off state of the third switch. The third switch controls the working state of the LED circuit.
3. The leakage current protection circuit based on mains power as described in claim 1, characterized in that, The detection circuit includes an amplifier, a second comparator, a second switch, and a third switch; The amplifier's detection terminal is connected to the mains power output pin to amplify the real-time voltage of the mains power output. The real-time sampling terminal of the second comparator is connected to the output terminal of the amplifier to obtain the amplified real-time voltage; The reference sampling terminal of the second comparator is connected to the output terminal of the buck circuit to obtain the reference voltage; The output of the second comparator is connected to the second switch and is used to control the on / off state of the second switch based on the amplified real-time voltage and the reference voltage. The second switch is connected to the third switch and is used to control the on / off state of the third switch. The third switch controls the working state of the LED circuit.
4. The leakage current protection circuit based on mains power as described in claim 2 or 3, characterized in that, When the second switch and the third switch are turned on, the power supply circuit, the LED circuit and the detection circuit form an LED circuit, and the LED circuit works. When the second and third switches are open, the LED circuit is disconnected from the detection circuit, and the LED circuit does not work.
5. The leakage current protection circuit based on mains power as described in claim 2 or 3, characterized in that, The control electrode of the second switch is connected to the output terminal of the second comparator, the first electrode of the second switch is connected to the output terminal of the step-down circuit, and the second electrode of the second switch is connected to the control electrode of the third switch. The first electrode of the third switch is connected to the power supply circuit, and the second electrode of the third switch is connected to the output terminal of the LED circuit.
6. The leakage current protection circuit based on mains power as described in claim 2 or 3, characterized in that, The detection circuit further includes a first voltage divider circuit, and the reference sampling terminal of the second comparator is connected to the output terminal of the step-down circuit through the first voltage divider circuit.
7. The leakage current protection circuit based on mains power as described in claim 3, characterized in that, The detection circuit also includes a second voltage divider circuit, and the detection terminal of the amplifier is connected to the output pin of the mains power through the second voltage divider circuit.
8. The leakage current protection circuit based on mains power as described in claim 7, characterized in that, The second voltage divider circuit includes a third diode and at least two voltage divider resistors connected in series, and the detection terminal of the amplifier is connected between the voltage divider resistors.
9. The leakage current protection circuit based on mains power as described in claim 1, characterized in that, It also includes a filter circuit; The input terminal of the filter circuit is connected to the output terminal of the power supply circuit, and is used to filter the output power of the power supply circuit. The output terminal of the filter circuit is connected to the input terminal of the LED circuit, and is used to output the filtered power supply to the LED circuit.
10. The leakage current protection circuit based on mains power as described in claim 1, characterized in that, The LED circuit includes a driver module and an LED module connected to each other, and the driver module is used to drive the LED module with a constant current.