A ground detection method and device based on discrete components and a storage medium

By using a grounding detection method based on discrete components and combining withstand voltage capacitors and short-circuit resistors, high precision and safety of motor grounding detection are achieved. This solves the safety hazards of optocoupler circuits in motors, is adaptable to various types of motors and voltage scenarios, and features high reliability and low cost.

CN122283525APending Publication Date: 2026-06-26XIKUO ELECTRONIC TECH (TAIZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610575076.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing grounding detection circuits pose safety hazards in motors, especially when the casing is energized when not grounded, which could lead to electric shock accidents. Furthermore, the current-limiting resistor design of optocoupler grounding detection circuits makes it difficult to balance detection effectiveness and safety.

Method used

A grounding detection method based on discrete components is adopted. Physical isolation between equipment ground wire and signal ground wire is achieved through withstand voltage capacitors. The signal identification value is calculated by frequency and duration weighting. Combined with multi-level signal conversion and current and voltage limits within preset range, the current and voltage are dynamically adjusted to adapt to different loads and electromagnetic environments. A withstand voltage capacitor connected in series with a short-circuit resistor is used for rapid discharge.

Benefits of technology

It achieves high-precision grounding detection under different power grid voltages and electromagnetic environments, avoids false alarms and missed alarms, ensures stable circuit operation, reduces costs, is compatible with various types of motors, and has high reliability and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122283525A_ABST
    Figure CN122283525A_ABST
Patent Text Reader

Abstract

This application relates to the field of circuit detection technology, disclosing a grounding detection method, device, and storage medium based on discrete components for isolation. The method includes: converting a single-phase first AC power to a first DC power via a rectifier bridge, and stepping down to obtain a second DC power for signal identification; acquiring a first voltage signal from the equipment ground wire and a second voltage signal from the signal ground wire using a withstand voltage capacitor, and calculating a first voltage difference signal; converting this into a first current signal within a set current range, and then into a third voltage signal within a set voltage range; identifying the grounding signal, calculating the signal frequency value and average duration value, and then obtaining duration and frequency reference values ​​and weighting them to calculate the signal identification value; if the value is within the reference identification range, adjusting the first current value inversely and then discharging the withstand voltage capacitor; otherwise, an alarm is triggered. This application achieves isolation detection through discrete components, improving the safety and accuracy of grounding detection, and is suitable for the grounding monitoring needs of equipment such as motors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of circuit testing technology, and in particular to a grounding detection method, device and storage medium based on isolation achieved by discrete components. Background Technology

[0002] Motors are common industrial products used in daily production and life. The IPM module or switching transistor of a motor often relies on the casing for heat dissipation, resulting in the pins being too close to the casing. If the control board of motor products lacks a grounding detection circuit, and the user accidentally touches a leaking casing, there is a high risk of electric shock.

[0003] In motor control products, the AC power circuit path is: live wire - detection circuit - chassis - PE, forming a current loop from the live wire to the PE, allowing the grounding detection circuit to monitor the grounding status. However, when the user does not perform a grounding operation, the line between the chassis and the PE will be broken, and the AC power circuit will change to: live wire - detection circuit - chassis. If the user touches the chassis at this time, a current path of live wire - detection circuit - chassis - human body - PE will be formed, leading to an electric shock accident.

[0004] Existing grounding detection circuits typically employ optocouplers. However, igniting the diode in an optocoupler requires at least 1.25mA of current. Therefore, the current-limiting resistor in the optocoupler grounding detection circuit cannot be designed to be too large, otherwise it will be unable to effectively detect the grounding status. Consequently, when using an optocoupler grounding detection circuit, if the motor is not grounded, the casing may become live, posing a safety hazard. Summary of the Invention

[0005] To improve the safety of motors with grounding detection function, this application provides a grounding detection method, device and storage medium based on discrete components to achieve isolation.

[0006] Firstly, this application provides a grounding detection method based on discrete components to achieve isolation, employing the following technical solution:

[0007] A grounding detection method based on discrete components for isolation includes the following steps:

[0008] The first AC power is converted into the first DC power using a rectifier bridge, wherein the first AC power is single-phase; the first DC power is stepped down to obtain the second DC power, which is used to provide power for signal identification.

[0009] The first voltage signal on the ground wire of the equipment is acquired by collecting the first voltage signal on the first DC signal ground wire, and the first voltage difference signal is calculated based on the first voltage signal and the second voltage signal.

[0010] The charging process based on the voltage-resistant capacitor converts the first voltage difference signal into a first current signal, and the current value of the first current signal is within a preset set current range;

[0011] The first current signal is converted into a third voltage signal, and the voltage value of the third voltage signal is within a preset set voltage range;

[0012] A ground signal is identified from the third voltage signal, and a signal frequency value and an average duration value of the ground signal are calculated;

[0013] A duration reference value is calculated according to the average duration value and a preset set duration value;

[0014] A frequency reference value is calculated according to the signal frequency value and a preset set frequency value;

[0015] A signal identification value is calculated by weighting according to the duration reference value and the frequency reference value;

[0016] If the signal identification value is within a set reference identification range, the ground signal is identified, the value of the first current signal is inversely related to the signal identification value, and then the voltage-resistant capacitor is discharged; otherwise, a ground fault alarm is issued.

[0017] By using the above scheme, the device ground wire and the signal ground wire are physically isolated by using the voltage-resistant capacitor, and the detection does not need to involve the live wire, thereby cutting off the electric shock circuit of the ungrounded case from the source, solving the safety contradiction of the optocoupler circuit, and accurately identifying the ground abnormality such as indirect grounding of the human body by weighting the frequency and the duration to calculate the signal identification value, thereby avoiding misjudgment and missed judgment; the current and the voltage are limited in a preset range through multi-stage signal conversion, the voltage fluctuation of the power grid is adapted, and the anti-interference is strong; after identifying the normal grounding, the current is dynamically adjusted and the capacitor is discharged, thereby ensuring long-term stable operation of the circuit and adapting to complex scenes; a small number of discrete components are used for building, no special chip is relied on, the cost is low, the structure is simple, and no specific motor model or power supply specification is bound, a plurality of types of motors and voltage scenes can be quickly adapted through parameter adjustment, and the portability is high.

[0018] Further, the method further includes the following steps:

[0019] Real-time collection of running electrical parameters of the motor, the running electrical parameters including a rated power value, a real-time working current value and a rated voltage value of the motor;

[0020] Based on the collected rated power value P and rated voltage value U, the rated working current reference value of the motor is calculated by the formula I n =P / (U×cosφ), wherein cosφ is the power factor of the motor;

[0021] The real-time working current value I real is compared with the rated working current reference value I nThe current deviation coefficient K is obtained. i =I real / I n ;

[0022] According to the current deviation coefficient K i Dynamically adjust the preset current range:

[0023] When Kᵢ≤a1, the motor is determined to be in a light-load operating state, and the upper and lower limits of the set current range are adjusted downwards by the preset ratio accordingly;

[0024] When a1 < Kᵢ < a2, the motor is determined to be in normal load operation state, and the set current range remains unchanged;

[0025] When Kᵢ≥a2, the motor is determined to be in a heavy-load operation state, and the upper and lower limits of the set current range are adjusted upwards by the preset ratio accordingly.

[0026] After adjustment, update the set current range.

[0027] By adopting the above scheme, the upper and lower limits of the set current range are lowered under light load to improve the sensitivity of identifying minor grounding anomalies and avoid missed detection; the range remains unchanged under normal load to ensure detection consistency and reduce false alarms; the limit is raised under heavy load to filter electromagnetic interference and voltage fluctuations, prevent false triggering of fault alarms, and adapt to the detection needs of motors under full load conditions.

[0028] Furthermore, the method also includes the following steps:

[0029] Obtain the magnetic field strength value within a set range around the motor equipment;

[0030] By comparing the magnetic field strength value with a preset threshold range, the level of the on-site magnetic field environment is determined.

[0031] Adjust the voltage range proportionally according to the positive correlation between the on-site magnetic field environment level and the set adjustment ratio.

[0032] The voltage range is updated after adjustment.

[0033] The above scheme adjusts the voltage range in low magnetic field environments to narrow the judgment interval and capture weak grounding signals, avoiding missed detections; it keeps the range unchanged in medium magnetic field environments to ensure stable detection and reduce false alarms; and it increases the range in high magnetic field environments to filter strong interference signals and prevent false triggering of fault alarms, thus adapting to the detection needs of all magnetic field scenarios.

[0034] Furthermore, the method also includes the following steps:

[0035] Obtain the real-time operating frequency value f of the current single-phase power supply;

[0036] Based on the real-time operating frequency value f and the preset standard operating frequency f0, calculate the frequency deviation rate Δf = |f - f0| / f0;

[0037] The weighting parameter of the signal frequency value in the calculation of the signal identification value is adjusted based on the inverse correlation of the frequency deviation rate Δf; the weighting parameter of the signal frequency value is updated after adjustment.

[0038] The above scheme adjusts the weights when the grid frequency is stable to enhance the role of frequency characteristics and improve judgment accuracy; maintains weight balance when there are slight fluctuations to ensure judgment stability; and adjusts the weights when there are large fluctuations to reduce the influence of interference characteristics and avoid misjudgment, thus adapting to different grid frequency states.

[0039] Furthermore, the method also includes the following steps:

[0040] Two independent voltage sampling circuits are used to synchronously acquire the third voltage signal, obtaining V1 and V2 respectively;

[0041] The difference between V1 and V2 is calculated as ΔV = |V1 - V2|;

[0042] By comparing ΔV with the set difference ΔV0, the weighting parameters of the signal frequency value are dynamically adjusted.

[0043] If ΔV>ΔV0, it is determined that the third voltage signal is severely interfered with, and the minimum adjustment unit Δω of the weight parameter is adjusted from the default value to the first range value.

[0044] If ΔV≤ΔV0, the third voltage signal is determined to be stable, and the minimum adjustment unit Δω is kept at the default value.

[0045] When ΔV≤ΔV0, calculate the average value of the two sampled values ​​V_avg=(V1+V2) / 2, and use V_avg as the effective third voltage signal; when ΔV>ΔV0, directly output the sampled value that has the smaller deviation from the effective value of the previous moment among the two sampled values.

[0046] Using the above scheme, dual-channel synchronous acquisition accurately identifies signal interference through the difference ΔV. When there is strong interference, the output sampled value has a smaller deviation from the previous value, and when there is weak interference, the average value is taken. This effectively filters noise and errors, provides high-quality data for grounding signal identification, and reduces judgment bias caused by data distortion.

[0047] Furthermore, the method for discharging the withstand voltage capacitor also includes the following steps:

[0048] A short-circuit resistor is connected in series with a voltage-resistant capacitor. This resistor controls the conduction of an electronic switch that is connected in parallel with the short-circuit resistor and the voltage-resistant capacitor, forming a short-circuit loop from the positive terminal of the voltage-resistant capacitor, the electronic switch, to HGND. At the same time, the short-circuit resistor allows the voltage-resistant capacitor to discharge rapidly through the short-circuit path.

[0049] Obtain the real-time voltage value Vc of the withstand voltage capacitor C103;

[0050] When the real-time voltage value Vc of the withstand voltage capacitor drops below the set ratio of the rated withstand voltage value of the withstand voltage capacitor, the discharge is determined to be complete. If it is a short-circuit fast discharge mode, the electronic switch is turned off to restore the normal detection state of the circuit.

[0051] When the collected Vc value is lower than the corresponding set threshold for N consecutive sampling cycles, the discharge is determined to be complete, the control unit stops the discharge control signal, and waits for the next grounding detection cycle; where N is greater than or equal to 3.

[0052] By adopting the above solution, the impedance of the short-circuit loop is significantly reduced, enabling rapid charge release and preventing high voltage residue in the capacitor from causing component aging or breakdown.

[0053] Furthermore, the method also includes the following steps:

[0054] The short-circuit resistor includes multiple discharge resistors with different resistance values ​​connected in series, including at least low-resistance resistors, medium-resistance resistors and high-resistance resistors, and each discharge resistor is controlled to be switched on and off by an independent electronic switch.

[0055] The initial discharge voltage Vc0 of the withstand voltage capacitor and the real-time voltage change rate ΔVc / Δt during the discharge process are collected in real time.

[0056] The discharge resistance value is dynamically adjusted based on the initial voltage Vc0 and the real-time voltage change rate ΔVc / Δt:

[0057] If Vc0 ≥ the first rated withstand voltage and ΔVc / Δt < the fast discharge threshold Sf, the current discharge rate is determined to be too slow, and the electronic switch is controlled to connect the low resistance resistor.

[0058] If the second rated withstand voltage value < Vc0 < the first rated withstand voltage value and ΔVc / Δt is not in the range of the medium-speed discharge threshold Sm, the control electronic switch is turned on to connect the medium resistance resistor.

[0059] If Vc0 ≤ the second rated withstand voltage and ΔVc / Δt ≥ Sl, it is determined that the current discharge speed is too fast, and the electronic switch is controlled to connect the high resistance resistor.

[0060] Using the above scheme, the high-voltage stage is connected to achieve rapid discharge with low resistance, avoiding the safety risks of high voltage residue; the medium-voltage stage is maintained with medium resistance to maintain stable discharge, balancing efficiency and component stress; the low-voltage stage is slowly discharged with high resistance to eliminate interference and over-discharge risks, ensuring that the capacitor discharge is controllable across the entire voltage range.

[0061] Furthermore, the method also includes the following steps:

[0062] The third voltage signal is acquired in real time, and the signal fluctuation amplitude within each detection cycle is calculated.

[0063] When a grounding signal is detected, but the signal fluctuation amplitude is detected to be greater than the preset fluctuation amplitude threshold for M consecutive cycles, it is determined that the signal stability has decreased, triggering the signal flipping mechanism:

[0064] Reverse the direction of the first DC current, or reverse the direction of the third voltage signal;

[0065] If the signal fluctuation amplitude is less than or equal to the preset fluctuation amplitude threshold within M consecutive detection cycles, the signal is determined to have stabilized, the flipping mechanism is automatically exited, and the original signal determination logic is restored.

[0066] If the system remains unstable for M+K consecutive cycles, a manual calibration prompt will be triggered.

[0067] Using the above scheme, when the grounding signal fluctuation exceeds the threshold, the direction of the reverse DC current or the third voltage is used to cancel directional interference, such as unidirectional electromagnetic noise, and stabilize the signal identification; the mechanism automatically exits after the fluctuation recovers to avoid misjudgment after the interference disappears and to ensure the reliability of the detection.

[0068] Secondly, this application provides a grounding detection device based on discrete components to achieve isolation, employing the following technical solution:

[0069] A grounding detection device based on discrete components for isolation includes a processor that executes the steps of the grounding detection method based on discrete components for isolation as described in any one of the preceding claims.

[0070] Thirdly, this application provides a storage medium, which adopts the following technical solution:

[0071] A storage medium storing a program that, when executed by a processor, implements the steps of the grounding detection method based on discrete components for isolation as described in any one of the preceding claims. Attached Figure Description

[0072] Figure 1 This is a grounding detection circuit diagram.

[0073] Figure 2 It is the positive half-cycle, and the circuit diagram where HGND is equivalent to PE / N.

[0074] Figure 3 It is the negative half-cycle, and HGND is equivalent to the circuit diagram of L.

[0075] Figure 4 This is the voltage diagram of HGND to PE / N.

[0076] Figure 5 This is a step diagram of a grounding detection method that achieves isolation based on discrete components.

[0077] Figure 6This is a flowchart illustrating the steps for dynamically adjusting the preset current range based on the motor's operating electrical parameters. Detailed Implementation

[0078] The embodiments of this application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.

[0079] This application discloses a grounding detection circuit that achieves isolation based on discrete components, referring to... Figure 1 ,

[0080] The equipment ground PE, i.e., test point TP115, is connected to the signal processing circuit through one end of the withstand voltage capacitor C103. The other end of the withstand voltage capacitor C103 is connected in series with the current limiting resistor R110 and then splits into two paths: one path is connected to the anode of diode D102, and the cathode of diode D102 is connected to the signal ground HGND; the other path is connected to one end of the high-frequency filter capacitor C102, and the other end of the high-frequency filter capacitor C102 is grounded to HGND.

[0081] The connection point between the current-limiting resistor R110 and the high-frequency filter capacitor C102, i.e., the test point TP111, is connected to the base of the transistor Q102 after being connected in series with the resistor R111. The collector of the transistor Q102 is connected to the 3.3V power supply after being connected in series with the pull-up resistor R103. The emitter is connected in series with the current-limiting resistor R104 and outputs the ground detection signal PE_CHECK. At the same time, the emitter is connected to the signal ground HGND through a hidden loop.

[0082] The entire circuit uses the signal ground HGND as the common ground, and the 3.3V power supply provides the working voltage for the transistor switching circuit. It forms an independent power supply loop with the external rectified DC power supply (first DC power and second DC power). Electrical isolation between the device ground and the signal ground is achieved through the withstand voltage capacitor C103.

[0083] From the perspective of the AC power grid, PE and N are equivalent. Treating PE as 0 potential, and setting the negative terminal of the energy storage capacitor after the AC current passes through the rectifier bridge to HGND, there is a voltage difference between HGND and PE.

[0084] When the AC current is in the positive half-cycle, the HGND of the energy storage capacitor after the rectifier bridge is connected to the PE or neutral line N, such as Figure 2 As shown.

[0085] When the AC current is in the negative half-cycle, the HGND of the energy storage capacitor after the rectifier bridge is connected to the live wire L, such as Figure 3 As shown.

[0086] Therefore, during the positive half-cycle, the voltage of HGND to PE can be considered as the voltage of PE to PE, which is obviously 0V; during the negative half-cycle, the voltage of HGND to PE can be considered as the voltage of L to PE. In the negative half-cycle, L is a sinusoidal -310V, therefore the voltage of HGND to PE is 0~-310V. Figure 4 As shown.

[0087] Based on the above analysis of the voltage signal, the specific working process of the detection circuit within the AC cycle is as follows:

[0088] Positive Half-cycle: The potential difference between the device ground (PE) and the signal ground (HGND) makes the voltage across capacitor C103 the same, and no current flows to the base of transistor Q102, so transistor Q102 is cut off. At this time, the PE_CHECK signal is pulled up to 3.3V through R103, and the output is high. Simultaneously, current flows through diode D102 and current-limiting resistor R110 to replenish the charge of voltage-limiting capacitor C103, preparing for the next cycle.

[0089] In the negative half-cycle: the HGND potential is lower than the potential of the withstand capacitor C103, causing C103 to discharge and generate current. The path is: withstand capacitor C103 → current-limiting resistor R110 → base of transistor Q102 → emitter → HGND, and transistor Q102 conducts. The PE_CHECK signal is grounded through the conducting transistor Q102, outputting a 0V low level.

[0090] Grounding status determination logic:

[0091] When the grounding is good: PE_CHECK is 3.3V in the positive half-cycle and 0V in the negative half-cycle. The output signal shows a stable 50% duty cycle, which is synchronized with the AC cycle. Detecting this pattern indicates that the grounding is normal.

[0092] When not grounded: there is no effective potential difference between PE and HGND, the withstand voltage capacitor C103 has no charging or discharging current, the transistor Q102 is always cut off, PE_CHECK is always 3.3V or remains 0V due to no signal input, depending on the initial state of the circuit, indicating a grounding fault.

[0093] Poor grounding, such as grounding through the human body: weakened potential difference transmission, insufficient charging in the positive half-cycle or incomplete discharging in the negative half-cycle, causing the PE_CHECK high / low level duty cycle to deviate from 50%. If the duty cycle increases, the grounding is determined to be poor by the abnormal duty cycle.

[0094] The circuit controls the switching state of the transistor by charging and discharging the withstand voltage capacitor C103 during the AC cycle, and converts the grounding state into the level change of the PE_CHECK signal. By identifying the duty cycle of the signal, it can accurately determine whether the grounding is good or whether there are abnormalities such as poor contact, thus realizing low-cost and high-reliability isolated grounding detection.

[0095] A grounding detection method based on discrete components for isolation, based on the above detection circuit, referring to... Figure 5 It includes the following steps:

[0096] The first AC power is converted into a first DC power of approximately 310V using a rectifier bridge. The first AC power is a single-phase power. The first DC power is then stepped down to obtain a second DC power of 3.3V, which is used to provide power for signal identification.

[0097] The first voltage signal on the equipment ground line PE is acquired by collecting the first voltage signal through the withstand voltage capacitor, and the second voltage signal on the first DC signal ground line HGND is obtained. The first voltage difference signal is calculated based on the first voltage signal and the second voltage signal, reflecting the potential difference between PE and HGND.

[0098] Based on the charging process of the withstand voltage capacitor C103, the first voltage difference signal ΔV forms a charging and discharging current through R110, namely the first current signal I1, which is calculated by the formula I1=ΔV / R110.

[0099] The preset current range is 10μA-50μA (within the human body safe current threshold). By initially setting R110=1.5MΩ, it is ensured that I1≈147μA when ΔV=220V. Note: In reality, through the voltage division of R110 and the capacitive reactance of C103, I1 will eventually stabilize within the safe range. This is just an example to avoid safety risks to the human body or equipment caused by excessive current.

[0100] When the first current signal I1 flows through R111 (20KΩ), a third voltage signal = I1 × R111 is generated across R111. In this embodiment, the preset voltage range is 0.2V-1V, which is compatible with the conduction threshold of transistor Q102 of 0.7V. When I1 = 10μA, the third voltage signal = 0.2V, and Q102 is off. When I1 = 50μA, the third voltage signal = 1V, and Q102 is on, ensuring that the change of the third voltage signal can effectively control the switching state of the transistor.

[0101] The change in the third voltage signal, i.e., the on / off state of Q102, is acquired by acquiring the PE_CHECK pin to identify the ground signal:

[0102] When the grounding is good, the third voltage signal changes with the AC cycle, with the positive half-cycle ≈0V and the negative half-cycle ≈1V, forming a periodic pulse signal.

[0103] Calculate the signal frequency value f of the grounding signal, which is the reciprocal of the period of the pulse signal, and should normally be 50Hz;

[0104] Calculate the average duration value t_avg, which is the average duration of a single pulse. Normally it should be 10ms, corresponding to half a cycle of 50Hz AC.

[0105] Duration reference value T_ref: The preset duration value t0=10ms is calculated as T_ref=|t_avg-t0| / t0, which reflects the degree to which the pulse duration deviates from the ideal value, with a range of 0-1;

[0106] Frequency reference value F_ref: The preset frequency value is f0=50Hz. The calculation is F_ref=|f-f0| / f0, which reflects the degree to which the signal frequency deviates from the power grid frequency, with a range of 0-1.

[0107] The signal identification value Q is calculated by weighting the duration reference value T_ref and the frequency reference value F_ref. The formula is: Q=α×T_ref+(1-α)×F_ref; where α is the weighting coefficient, preset to 0.5 and can be dynamically adjusted, and the value range of Q is 0-1; the reference identification range is set to 0-0.3, which indicates that the signal characteristics deviate little from the normal grounding state.

[0108] If Q∈[0,0.3], a grounding signal is detected:

[0109] Adjust the first current signal I1 according to the inverse correlation of Q: the smaller Q is, the more stable the signal, so increase R110. For example, when Q=0, adjust it to 2MΩ and decrease I1 to 110μA; the larger Q is, the larger the signal fluctuation is, so decrease R110. For example, when Q=0.3, adjust it to 1MΩ and increase I1 to 220μA to ensure that I1 is always within the safe range and the signal is stable.

[0110] The electronic switch connected in parallel with C103 is turned on to quickly discharge C103 to below 5% of its rated voltage, preparing for the next testing cycle.

[0111] If Q∈(0.3, 1], no valid grounding signal was detected:

[0112] A grounding fault alarm is triggered using a buzzer or LED light. At the same time, a fault code is sent to the host computer via a communication interface, such as RS485, indicating that the equipment is grounding abnormal.

[0113] Parameter description:

[0114] Setting current range: 10μA-50μA, according to GB / T13870.1-2008 Human body current safety threshold;

[0115] Voltage setting range: 0.2V-1V, compatible with the base conduction voltage of transistors;

[0116] Reference identification range: 0-0.3, determined through statistical analysis of 1000 experiments, covering 95% of normal grounding scenarios;

[0117] Discharge cutoff conditions: C103 voltage ≤ 100V, i.e. 5% of the 2000V rated withstand voltage, for 3 consecutive sampling cycles, each cycle being 10ms. A duration reference value is calculated based on the average duration value and the preset duration value.

[0118] The above solution utilizes high-voltage capacitors to physically isolate the equipment ground wire from the signal ground wire, eliminating the need for live wires and cutting off the electric shock circuit at its source when the circuit is not grounded, thus resolving safety issues associated with optocoupler circuits. By calculating signal identification values ​​using frequency and duration weighting, it accurately identifies grounding anomalies, such as indirect grounding by a human body, avoiding false positives and false negatives. Through multi-stage signal conversion, current and voltage are limited to preset ranges, adapting to grid voltage fluctuations and exhibiting strong anti-interference capabilities. Upon identifying a normal grounding, it dynamically adjusts the current and discharges the capacitor, ensuring long-term stable circuit operation and adapting to complex scenarios. Built with a small number of discrete components, it does not rely on dedicated chips, resulting in low cost and a simple structure. It can be quickly adapted to various types of motors and voltage scenarios through parameter adjustments, demonstrating high portability.

[0119] Reference Figure 6 It also includes the step of dynamically adjusting the set current range based on the motor's electrical parameters. The specific method also includes the following steps:

[0120] The motor's operating electrical parameters are collected in real time, including the motor's rated power, real-time operating current, and rated voltage. The rated power is pre-stored in the control unit using parameters from the motor's nameplate, the real-time operating current is collected by a current sampling resistor connected in series in the motor's power supply circuit, and the rated voltage is consistent with the voltage specification of the first AC power supply.

[0121] Based on the collected rated power value P and rated voltage value U, using formula I n =P / (U×cosφ) calculates the rated operating current reference value of the motor, where cosφ is the power factor of the motor; where cosφ is the power factor of the motor, the value range is 0.75-0.9, and is preset according to the motor type, 0.75-0.85 for asynchronous motors and 0.85-0.9 for synchronous motors.

[0122] Compare the real-time operating current value I real Compared with the rated operating current reference value I n The current deviation coefficient K is obtained. i =I real / I n ;

[0123] According to the current deviation coefficient K i Dynamically adjust the preset current range:

[0124] When Kᵢ≤a1, the motor is determined to be in a light-load operating state, and the upper and lower limits of the set current range are adjusted downwards by a preset ratio accordingly. In this embodiment, for example, a1=0.5. When Kᵢ≤0.5, the motor is determined to be in a light-load operating state, and the upper limit of the set current range is adjusted downwards by 15%-20%, and the lower limit is adjusted downwards by 10%-15%, in order to improve the sensitivity of grounding detection under light load and avoid overlooking minor grounding anomalies.

[0125] When a1 < Kᵢ < a2, the motor is determined to be in normal load operation, and the set current range remains unchanged. In this embodiment, for example, a2 = 1.2, when 0.5 < Kᵢ < 1.2, the motor is determined to be in normal load operation, and the set current range remains unchanged, ensuring the stability of detection under normal operating conditions.

[0126] When Kᵢ≥a2, the motor is determined to be in a heavy-load operating state, and the upper and lower limits of the set current range are adjusted upwards by a preset ratio accordingly. In this embodiment, when Kᵢ≥1.2, the motor is determined to be in a heavy-load operating state, and the upper limit of the set current range is adjusted upwards by 10%-15% and the lower limit by 5%-10% to resist the influence of grid voltage fluctuations and electromagnetic interference on the detection current signal under heavy load, and to avoid false triggering of ground fault alarms.

[0127] After adjustment, update the set current range.

[0128] Using the above scheme, the current setting range can be dynamically adjusted according to the motor load: under light load, the upper and lower limits are lowered to improve the sensitivity of identifying minor grounding anomalies and avoid missed detection; under normal load, the original range is maintained to ensure detection consistency and reduce false alarms; under heavy load, the limit is raised to filter electromagnetic interference and voltage fluctuations and prevent false alarms, thereby adapting to the detection needs of the motor under full load conditions.

[0129] In this embodiment, the set voltage range is dynamically adjusted according to the magnetic field environment level. The specific method also includes the following steps:

[0130] The magnetic field strength value B within a set range around the motor is collected in real time by a magnetic field sensor. After collecting data for 5 consecutive sampling cycles, the average value B_avg is calculated to smooth out instantaneous magnetic field fluctuations and serve as the basis for determining the current environmental magnetic field strength.

[0131] Based on the magnetic field characteristics of the motor's operating environment, the preset magnetic field strength threshold range is as follows:

[0132] Low magnetic field environment threshold: B_avg≤50μT, such as a household motor in an unloaded state and in a scenario without other strong magnetic devices;

[0133] Medium magnetic field environment threshold: 50μT<B_avg≤200μT, such as industrial scenarios where the motor is running under normal load and there are no high-power equipment nearby;

[0134] High magnetic field environment threshold: B_avg>200μT, such as when the motor is running under heavy load or when there are strong magnetic equipment such as welding machines / transformers nearby.

[0135] Compare B_avg with the above threshold range to output the corresponding magnetic field environment level: low level L, medium level M, high level H.

[0136] Based on the aforementioned grounding detection method, the initial voltage range of the third voltage signal is set to 0.2V-1V, which is compatible with the conduction threshold of transistor Q102 to ensure effective signal switching during normal grounding. The lower limit is V_low=0.2V and the upper limit is V_high=1V.

[0137] The adjustment ratio is set according to the positive correlation with the magnetic field environment level:

[0138] Low magnetic field environment L: Adjust the ratio to -20% to narrow the range;

[0139] Medium magnetic field environment M: Adjustment ratio is 0%, maintain range;

[0140] High magnetic field environment H: Adjustment ratio is +30%, expanding the range.

[0141] Based on the determined magnetic field environment level, update the set voltage range using the following formula:

[0142] Low magnetic field environment: V_low'=V_low×(1+adjustment ratio)=0.2V×0.8=0.16V; V_high'=V_high×(1+adjustment ratio)=1V×0.8=0.8V. Adjusted range: 0.16V-0.8V, narrowing the judgment interval and improving the ability to capture weak signals.

[0143] Medium magnetic field environment: V_low'=0.2V, V_high'=1V, keep the original range to ensure detection consistency.

[0144] High magnetic field environment: V_low'=0.2V×1.3=0.26V; V_high'=1V×1.3=1.3V. Adjusted range: 0.26V-1.3V, expanding the judgment range and filtering strong interference signals.

[0145] The voltage range is updated after adjustment.

[0146] The above scheme narrows the voltage range in low magnetic field environments, accurately capturing weak grounding signals by tightening the judgment interval and reducing missed detections; it maintains the original voltage range in medium magnetic field environments to ensure stable detection results and reduce the probability of false alarms; and it expands the voltage range in high magnetic field environments to effectively filter strong electromagnetic interference signals and avoid false triggering of fault alarms, thus adapting to the grounding detection needs of all magnetic field scenarios.

[0147] In this embodiment, the step of dynamically adjusting the signal frequency value weighting parameter based on the single-phase electrical operating frequency and filtering the first current signal further includes the following steps:

[0148] The AC voltage signal of the current single-phase power is collected by a voltage transformer, and the zero-crossing signal is extracted by the zero detection circuit. The time interval T between two adjacent zero crossings is calculated. According to the formula f=1 / (2T), the real-time operating frequency value is calculated, where f is the operating frequency of the single-phase power. The sampling period is set to 0.5-1 seconds to ensure the frequency detection response speed.

[0149] The preset standard operating frequency f0, such as 50Hz or 60Hz, is set according to the regional power grid standard. The frequency deviation rate Δf = |f-f0| / f0 is then calculated.

[0150] The weighting parameter ωf of the signal frequency value in the signal identification value calculation is based on the frequency deviation rate Δf inverse correlation adjustment:

[0151] When Δf≤2%, the power grid frequency is stable, and the judgment frequency has little impact on signal recognition. ωf is increased to 0.6-0.7, with a weight range of 0-1, to enhance the weight of signal frequency characteristics in grounding judgment and improve detection accuracy under stable operating conditions.

[0152] When 2% < Δf < 5%, the power grid frequency fluctuates slightly, and the impact of the frequency is considered moderate. Therefore, ωf is kept at 0.5, which is the default value. This balances the judgment weights of frequency and duration characteristics and ensures the detection stability under fluctuating conditions.

[0153] When Δf ≥ 5%, the power grid frequency fluctuates significantly, indicating that the frequency significantly interferes with the signal. Therefore, ωf is reduced to 0.3-0.4 to decrease the weight of the frequency characteristics affected by the interference and avoid misleading the grounding determination results.

[0154] The weight parameters of the adjusted and updated signal frequency values ​​are then used.

[0155] Using the above scheme, the frequency feature weights can be dynamically adjusted according to the power grid frequency status: when the power grid frequency is stable, the weights are increased to strengthen the influence of frequency features on the judgment results and improve detection accuracy; when the frequency fluctuates slightly, the weights are kept balanced to ensure the stability of the judgment results; when the frequency fluctuates significantly, the weights are decreased to reduce interference from the frequency features and avoid misjudgment, thereby adapting to the detection needs of different power grid frequency statuses.

[0156] To improve the quality of the third voltage signal, the specific method also includes the following steps:

[0157] Two independent voltage sampling circuits, containing the same type of voltage divider resistors, filter capacitors and AD converters, are used to synchronously and in parallel acquire the third voltage signal to obtain two sampled values ​​V1 and V2. The sampling frequency is set to 500Hz-1kHz to ensure the complete capture of signal details.

[0158] Calculate the difference between the two sampled values ​​ΔV = |V1 - V2|, and preset the difference value ΔV0, which is 2%-5% of the full scale of the third voltage signal, and is determined according to the accuracy level of the AD converter;

[0159] Based on the comparison between the difference value ΔV and the set difference value ΔV0, the smallest adjustment unit Δω for dynamically adjusting the signal frequency value weight parameter is:

[0160] If ΔV>ΔV0, it is determined that the third voltage signal is severely interfered with, such as electromagnetic noise or circuit drift. In this case, the minimum adjustment unit Δω is increased from the default value of 0.05 to 0.1-0.15 to speed up the adjustment response speed of the weight parameters, so that ωf can quickly adapt to signal fluctuations and avoid weight lag caused by excessive adjustment precision.

[0161] If ΔV≤ΔV0, the third voltage signal is considered to be stable. The minimum adjustment unit Δω is kept at the default value of 0.05 to fine-tune the weight parameters with high precision, ensuring the smoothness of ωf adjustment and avoiding sudden changes in signal recognition value due to excessive adjustment amplitude.

[0162] When ΔV≤ΔV0, calculate the average value of the two sampled values ​​V_avg=(V1+V2) / 2, and use V_avg as the effective third voltage signal; when ΔV>ΔV0, directly output the sampled value with the smaller deviation from the effective value of the previous moment. For example, if |V1-V_prev|<|V2-V_prev|, output V1; otherwise, output V2 to reduce the influence of interference signals on subsequent processing.

[0163] The above scheme uses dual-circuit synchronous acquisition of the third voltage signal. By calculating the difference ΔV between the sampled values, the signal interference state can be accurately identified: in the event of strong interference, the sampled value with the smaller deviation from the previous effective value is prioritized for output; in the event of weak interference, the average of the two sampled values ​​is taken as the effective signal. This design can effectively filter noise and data errors, providing high-quality data input for grounding signal identification and significantly reducing judgment bias caused by data distortion.

[0164] In this embodiment, the step of discharging the withstand voltage capacitor further includes the following steps:

[0165] Discharge circuit hardware configuration: In this embodiment, the withstand voltage capacitor is C103, and its series short-circuit resistor is R110, an adjustable resistor used to limit the charging and discharging current of C103 under normal conditions; the electronic switch connected in parallel with R110 and C103 is an N-channel MOSFET Q103. The gate of Q103 is connected to the discharge control pin GPIO port through the current limiting resistor R112, the source is directly connected to the signal ground HGND, and the drain is connected to the connection node between the positive terminal of C103 and R110, forming a complete short-circuit discharge circuit.

[0166] Meanwhile, a voltage divider sampling circuit is connected in parallel across C103, consisting of R113 and R114 with a voltage division ratio of 1000:1. The AD sampling pin connected to the sampling node is used to acquire the real-time voltage value Vc of C103 in real time, avoiding damage caused by directly acquiring high-voltage signals.

[0167] The specific steps for rapid short-circuit discharge are as follows:

[0168] When the grounding is determined to be normal by the signal identification value, that is, the signal identification value is within the reference identification range, or when a grounding fault is detected and an emergency discharge of charge is required, the short-circuit fast discharge mode is triggered, and the discharge control pin outputs a high level of 3.3V, driving the MOSFET Q103 to conduct.

[0169] After Q103 is turned on, two paths are formed:

[0170] Main discharge path: C103 positive terminal → Q103 drain terminal → Q103 source terminal → HGND. This path directly short-circuits C103, and its impedance is only the on-resistance of Q103, which greatly reduces the discharge circuit impedance.

[0171] Resistor short-circuit path: When Q103 is turned on, it shorts the two ends of R110. One end of R110 is connected to the positive terminal of C103, and the other end is connected to the subsequent signal processing circuit. The drain-source path of Q103 covers the potential difference across R110, avoiding the current limitation of R110 that would slow down the discharge speed.

[0172] Through the above short-circuit design, the high-voltage charge stored in C103 is quickly released through a low-resistance path. The initial discharge current can be controlled within 2A. When Vc=2000V, I=Vc / R conduction≈2500A. In reality, through the circuit parasitic inductance and MOSFET current limitation, it eventually stabilizes within a safe range, ensuring that the charge is initially released within 50-100ms.

[0173] The real-time voltage value Vc of C103 is acquired in real time through a voltage divider sampling circuit. The sampling period is synchronized with the grounding detection period and is set to 100ms. After each sampling, the actual voltage is converted by the voltage divider ratio, i.e., Vc = sampling voltage × 1000.

[0174] The preset discharge completion judgment condition is: Vc drops to less than 5% of the rated withstand voltage of C103, that is, Vc≤100V. According to the C103 parameter setting, to avoid residual charge affecting the next detection, it is also necessary to meet the condition that Vc≤100V for N consecutive sampling cycles (N≥3, N=3 in this embodiment) to filter out false judgments caused by instantaneous voltage fluctuations.

[0175] When Vc≤100V is detected for 3 consecutive sampling cycles, the discharge is considered complete.

[0176] When the discharge control pin outputs a low level of 0V, Q103 is cut off, and the short circuit circuit is broken.

[0177] R110 restores the connection circuit, and C103 returns to the normal charging and discharging circuit, waiting for the next ground detection cycle, that is, to recharge through the potential difference between PE and HGND.

[0178] If an abnormality occurs during the discharge process, such as Vc still being greater than 100V for 10 consecutive sampling cycles, a discharge fault prompt will be triggered, and the LED indicator will flash to notify the maintenance personnel to check Q103 or the voltage divider sampling circuit.

[0179] This embodiment achieves rapid discharge of the withstand voltage capacitor through a short-circuit loop design, and ensures complete discharge by combining multi-cycle voltage monitoring. This not only guarantees circuit safety and detection accuracy, but also adapts to the cyclic requirements of high-frequency grounding detection, making it particularly suitable for equipment such as industrial motors that require frequent monitoring of grounding status.

[0180] Furthermore, the method for dynamically adjusting the discharge resistor based on the real-time status of the withstand voltage capacitor to control the discharge rate also includes the following steps:

[0181] In a short-circuit fast discharge circuit, a resistor network consisting of at least three discharge resistors of different values ​​is connected in series. This network includes at least low-resistance, medium-resistance, and high-resistance resistors, such as R111=1kΩ, R112=5kΩ, and R113=10kΩ. Each resistor branch is controlled by an independent PNP electronic switch. By combining the conduction states of different resistor branches, the discharge resistance value can be adjusted in a stepped manner, resulting in seven possible resistance values: 1kΩ, 5kΩ, 6kΩ, 10kΩ, 11kΩ, 15kΩ, and 16kΩ.

[0182] The initial discharge voltage Vc0 of the withstand voltage capacitor C103 is acquired in real time, which is the voltage value at the moment of discharge start, and the real-time voltage change rate ΔVc / Δt during the discharge process is obtained. The voltage difference between two consecutive sampling periods is used for calculation. The sampling period is consistent with the grounding detection period and is set to 100ms.

[0183] Preset discharge rate threshold ranges include: fast discharge threshold Sf, medium discharge threshold Sm, and slow discharge threshold Sl. Fast discharge threshold Sf: When Vc0 ≥ 60% of the rated withstand voltage, ΔVc / Δt ≥ 50V / 100ms is required; Medium discharge threshold Sm: When 30% of the rated withstand voltage < Vc0 < 60% of the rated withstand voltage, 30V / 100ms ≤ ΔVc / Δt < 50V / 100ms is required; Slow discharge threshold Sl: When Vc0 ≤ 30% of the rated withstand voltage, ΔVc / Δt < 30V / 100ms is required.

[0184] The discharge resistance value is dynamically adjusted based on the initial voltage Vc0 and the real-time voltage change rate ΔVc / Δt:

[0185] If Vc0 ≥ 60% of the rated withstand voltage and ΔVc / Δt < Vf, it is determined that the current discharge speed is too slow. The electronic switch is controlled to connect the low resistance branch, such as only R111 = 1kΩ, to reduce the discharge resistance and speed up the discharge speed, ensuring that the charge is released quickly under high voltage.

[0186] If 30% of the rated withstand voltage < Vc0 < 60% of the rated withstand voltage and ΔVc / Δt is not in the Vm range, by turning on a combination of medium resistance resistors, such as R111+R112=6kΩ, the resistance value is adjusted to stabilize the discharge speed in the medium speed range, so as to avoid the current surge caused by the speed being too fast or the inefficiency caused by the speed being too slow.

[0187] If Vc0≤30% of the rated withstand voltage and ΔVc / Δt≥Sl, it is determined that the current discharge rate is too fast. The electronic switch is controlled to connect the high resistance branch, such as only R113=10kΩ, to increase the discharge resistance to slow down the discharge rate and prevent interference caused by sudden current changes in the low voltage stage.

[0188] After each adjustment, ΔVc / Δt is resampled every 2 sampling cycles until the discharge rate enters the target threshold range and remains stable. Then, when Vc drops below 5% of the rated withstand voltage and remains so for N≥3 cycles, all electronic switches of the resistor branches are disconnected to complete the discharge process.

[0189] The discharge resistor adjustment status is fed back to the short-circuit fast discharge mode control steps to achieve real-time matching between the discharge speed and the capacitor voltage status, ensuring the safety and efficiency of the discharge process.

[0190] Using the above scheme, the high-voltage stage is connected to achieve rapid discharge with low resistance, avoiding the safety risks of high voltage residue; the medium-voltage stage is maintained with medium resistance to maintain stable discharge, balancing efficiency and component stress; the low-voltage stage is slowly discharged with high resistance to eliminate interference and over-discharge risks, ensuring that the capacitor discharge is controllable across the entire voltage range.

[0191] To improve the stability of grounding signal identification in complex electromagnetic environments, the specific method also includes the following steps:

[0192] The hardware module includes a signal acquisition unit and a direction flipping execution unit:

[0193] Signal acquisition unit: The third voltage signal is filtered by the filter capacitor C102 and then acquired through a 12-bit AD sampling channel. The sampling frequency is 1kHz, and the signal is sampled 10 times in a single detection cycle to ensure data integrity.

[0194] Direction reversal execution unit: The first DC power 310V is reversed through a bidirectional rectifier bridge module, and the control relay K1 switches the input polarity of the rectifier bridge;

[0195] The direction reversal of the third voltage signal is achieved by an inverting circuit composed of an operational amplifier, and whether to connect to the inverting path is controlled by an analog switch;

[0196] This embodiment also includes a red LED indicator and a buzzer for fault indication and audio alarm.

[0197] The parameter configuration instructions are as follows:

[0198] Detection cycle: 10ms, synchronized with the power grid frequency to ensure accurate signal feature extraction;

[0199] Fluctuation amplitude threshold: ΔVth=0.15V, set based on the normal operating range of the third voltage signal of 0.2V-1V, covering 95% of normal fluctuation scenarios;

[0200] Fluctuation judgment period M: 5, 5 consecutive periods, 50ms in total, to filter instantaneous pulse interference;

[0201] The number of continuous unstable alarm cycles K is 10, with a total of 15 cycles and a total of 150ms, to avoid frequent alarms.

[0202] Based on the above hardware configuration, the signal switching steps are as follows:

[0203] Within each detection cycle (10ms), the third voltage signal is sampled 10 times consecutively. After removing the maximum and minimum values, 8 valid values ​​are taken. The signal fluctuation amplitude ΔV within this cycle is calculated: ΔV = maximum valid value of the third voltage signal within this cycle - minimum valid value of the third voltage signal within this cycle. For example, if the 8 valid values ​​within a certain cycle are 0.72V, 0.75V, 0.73V, 0.74V, 0.76V, 0.75V, 0.73V, and 0.74V, then ΔV = 0.76V - 0.72V = 0.04V < ΔVth, and the signal is determined to be stable within this cycle.

[0204] When a grounding signal has been identified by the signal identification value (signal identification value ∈ [0, 0.3]), but ΔV > ΔVth = 0.15V is satisfied for M = 5 consecutive cycles, it is determined that the signal stability has decreased. For example, the unidirectional electromagnetic interference generated by the motor brush spark causes the third voltage signal to fluctuate between 0.6V and 0.9V, ΔV = 0.3V.

[0205] The trigger signal toggle mechanism executes toggle operations according to the following priority:

[0206] Prioritize flipping the third voltage signal: Control the analog switch to turn on the inverting circuit, and reverse the voltage direction of the third voltage signal. For example, if the original third voltage signal is 0.8V, the output after inversion is 1.4V-0.8V=0.6V, where 1.4V is the symmetrical midpoint voltage of the third voltage signal, which is preset by the circuit voltage divider to cancel the offset of unidirectional interference.

[0207] If the third voltage signal is still unstable after flipping, and ΔV > ΔVth for three consecutive cycles: control relay K1 switches the polarity of the bidirectional rectifier bridge, reverses the current direction of the first DC 310V, changes the charging and discharging polarity of C103, and eliminates the continuous interference related to the current direction from the source, such as the positive electromotive force generated by the parasitic inductance of the grounding circuit.

[0208] After the flip mechanism is triggered, the fluctuation range of the third voltage signal is continuously monitored: if ΔV≤ΔVth=0.15V is satisfied for M=5 consecutive cycles, and if the interference source disappears, the fluctuation range of the third voltage signal is reduced to 0.75V-0.85V, ΔV=0.1V, and the signal is determined to have returned to stability.

[0209] Immediately control the analog switch / relay to reset, exit the flip-flop mechanism, and restore the original signal judgment logic. That is, the third voltage signal participates in the frequency and duration calculation in the original direction to avoid misjudging normal signals in the flip-flop state, such as preventing the inverted third voltage signal from being mistakenly identified as a ground fault.

[0210] If, after the flipping mechanism is triggered, ΔV > ΔVth = 0.15V is still satisfied for M+K=15 consecutive cycles, and poor contact is caused by oxidation of the grounding terminal, it is determined to be a systemic fault.

[0211] Manual calibration prompt is triggered: the red LED indicator flashes at a frequency of 2Hz, the buzzer emits an intermittent alarm (3 beeps per group, 2 seconds apart), and at the same time, a fault code 0x0A is sent to the host computer via the UART interface, indicating that the signal is continuously unstable, prompting maintenance personnel to check the grounding loop connection status or replace the filter components.

[0212] By reversing the signal direction to cancel directional interference, this passive anti-interference method, compared to traditional filtering circuits, improves adaptability to strong electromagnetic environments in industrial settings. The reversal automatically stops once the interference disappears, avoiding signal distortion caused by prolonged reversal and ensuring continuous grounding detection. Short-term interference is automatically handled, with manual intervention only triggered by systemic faults, reducing maintenance costs while preventing missed fault detection.

[0213] This application also discloses a grounding detection device based on discrete components for isolation, including a processor, wherein the processor executes the steps of the grounding detection method based on discrete components for isolation as described in any of the above embodiments.

[0214] This application also discloses a storage medium storing a program that, when executed by a processor, implements the steps of the grounding detection method based on discrete components for isolation as described above.

Claims

1. A grounding detection method based on discrete components for isolation, characterized in that, Includes the following steps: The first AC power is converted into the first DC power using a rectifier bridge, wherein the first AC power is single-phase; the first DC power is stepped down to obtain the second DC power, which is used to provide power for signal identification. The first voltage signal on the ground wire of the equipment is acquired by collecting the first voltage signal on the first DC signal ground wire, and the first voltage difference signal is calculated based on the first voltage signal and the second voltage signal. The charging process based on the withstand voltage capacitor converts the first voltage difference signal into a first current signal, and the current value of the first current signal is within a preset set current range. Based on the conversion of the first current signal into a third voltage signal, the voltage value of the third voltage signal is within a preset set voltage range; Identify the grounding signal from the third voltage signal, and calculate the signal frequency and average duration of the grounding signal. A duration reference value is calculated based on the average duration value and the preset duration value; The frequency reference value is calculated based on the signal frequency value and the preset setting frequency value; The signal identification value is calculated by weighting the duration reference value and the frequency reference value; If the signal identification value is within the set reference identification range, a grounding signal is detected. The value of the first current signal is adjusted according to the inverse correlation of the signal identification value, and then the withstand voltage capacitor is discharged; otherwise, a grounding fault alarm is issued.

2. The grounding detection method based on discrete components for isolation according to claim 1, characterized in that, The method also includes the following steps: The motor's operating electrical parameters are collected in real time, including the motor's rated power, real-time operating current, and rated voltage. Based on the collected rated power value P and rated voltage value U, using formula I n =P / (U×cosφ) calculates the reference value of the rated operating current of the motor, where cosφ is the power factor of the motor; Compare the real-time operating current value I real Compared with the rated operating current reference value I n The current deviation coefficient K is obtained. i =I real / I n ; According to the current deviation coefficient K i Dynamically adjust the preset current range: When Kᵢ≤a1, the motor is determined to be in a light-load operating state, and the upper and lower limits of the set current range are adjusted downwards by the preset ratio accordingly; When a1 < Kᵢ < a2, the motor is determined to be in normal load operation state, and the set current range remains unchanged; When Kᵢ≥a2, the motor is determined to be in a heavy-load operation state, and the upper and lower limits of the set current range are adjusted upwards by the preset ratio accordingly. After adjustment, update the set current range.

3. The grounding detection method based on discrete components for isolation according to claim 1, characterized in that, The method also includes the following steps: Obtain the magnetic field strength value within a set range around the motor equipment; By comparing the magnetic field strength value with a preset threshold range, the level of the on-site magnetic field environment is determined. Adjust the voltage range proportionally according to the positive correlation between the on-site magnetic field environment level and the set adjustment ratio. The voltage range is updated after adjustment.

4. The grounding detection method based on discrete components for isolation according to claim 1, characterized in that, The method also includes the following steps: Obtain the real-time operating frequency value f of the current single-phase power supply; Based on the real-time operating frequency value f and the preset standard operating frequency f0, calculate the frequency deviation rate Δf = |f - f0| / f0; The weighting parameter of the signal frequency value in the calculation of the signal identification value is adjusted based on the inverse correlation of the frequency deviation rate Δf; the weighting parameter of the signal frequency value is updated after adjustment.

5. The grounding detection method based on discrete components for isolation according to claim 1, characterized in that, The method also includes the following steps: Two independent voltage sampling circuits are used to synchronously acquire the third voltage signal, obtaining V1 and V2 respectively; The difference between V1 and V2 is calculated as ΔV = |V1 - V2|; By comparing ΔV with the set difference ΔV0, the weighting parameters of the signal frequency value are dynamically adjusted. If ΔV>ΔV0, it is determined that the third voltage signal is severely interfered with, and the minimum adjustment unit Δω of the weight parameter is adjusted from the default value to the first range value. If ΔV≤ΔV0, the third voltage signal is determined to be stable, and the minimum adjustment unit Δω is kept at the default value. When ΔV≤ΔV0, calculate the average value of the two sampled values ​​V_avg=(V1+V2) / 2, and use V_avg as the effective third voltage signal; when ΔV>ΔV0, directly output the sampled value that has the smaller deviation from the effective value of the previous moment among the two sampled values.

6. The grounding detection method based on discrete components for isolation according to claim 1, characterized in that, The method for discharging a voltage-resistant capacitor also includes the following steps: A short-circuit resistor is connected in series with a voltage-resistant capacitor. This resistor controls the conduction of an electronic switch that is connected in parallel with the short-circuit resistor and the voltage-resistant capacitor, forming a short-circuit loop from the positive terminal of the voltage-resistant capacitor, the electronic switch, to HGND. At the same time, the short-circuit resistor allows the voltage-resistant capacitor to discharge rapidly through the short-circuit path. Obtain the real-time voltage value Vc of the withstand voltage capacitor C103; When the real-time voltage value Vc of the withstand voltage capacitor drops below the set ratio of the rated withstand voltage value of the withstand voltage capacitor, the discharge is determined to be complete. If it is a short-circuit fast discharge mode, the electronic switch is turned off to restore the normal detection state of the circuit. When the collected Vc value is lower than the corresponding set threshold for N consecutive sampling cycles, the discharge is determined to be complete, the control unit stops the discharge control signal, and waits for the next grounding detection cycle; where N is greater than or equal to 3.

7. The grounding detection method based on discrete components for isolation according to claim 6, characterized in that, The method also includes the following steps: The short-circuit resistor includes multiple discharge resistors with different resistance values ​​connected in series, including at least low-resistance resistors, medium-resistance resistors and high-resistance resistors, and each discharge resistor is controlled to be switched on and off by an independent electronic switch. The initial discharge voltage Vc0 of the withstand voltage capacitor and the real-time voltage change rate ΔVc / Δt during the discharge process are collected in real time. The discharge resistance value is dynamically adjusted based on the initial voltage Vc0 and the real-time voltage change rate ΔVc / Δt: If Vc0 ≥ the first rated withstand voltage and ΔVc / Δt < the fast discharge threshold Sf, the current discharge rate is determined to be too slow, and the electronic switch is controlled to connect the low resistance resistor. If the second rated withstand voltage value < Vc0 < the first rated withstand voltage value and ΔVc / Δt is not in the range of the medium-speed discharge threshold Sm, the control electronic switch is turned on to connect the medium resistance resistor. If Vc0 ≤ the second rated withstand voltage and ΔVc / Δt ≥ Sl, it is determined that the current discharge speed is too fast, and the electronic switch is controlled to connect the high resistance resistor.

8. The grounding detection method based on discrete components for isolation according to claim 1, characterized in that, The method also includes the following steps: The third voltage signal is acquired in real time, and the signal fluctuation amplitude within each detection cycle is calculated. When a grounding signal is detected, but the signal fluctuation amplitude is detected to be greater than the preset fluctuation amplitude threshold for M consecutive cycles, it is determined that the signal stability has decreased, triggering the signal flipping mechanism: Reverse the direction of the first DC current, or reverse the direction of the third voltage signal; If the signal fluctuation amplitude is less than or equal to the preset fluctuation amplitude threshold within M consecutive detection cycles, the signal is determined to have stabilized, the flipping mechanism is automatically exited, and the original signal determination logic is restored. If the system remains unstable for M+K consecutive cycles, a manual calibration prompt will be triggered.

9. A grounding detection device based on discrete components for isolation, characterized in that, Includes a processor, wherein the steps of the ground detection method based on discrete components for isolation as described in any one of claims 1-8 are executed.

10. A storage medium, characterized in that, The storage medium stores a program that, when executed by a processor, implements the steps of the grounding detection method based on discrete components for isolation as described in any one of claims 1-8.