Line leakage current measuring system based on single-chip microcomputer and control method thereof
By combining zero-sequence current transformer, preprocessing circuit and feedback amplifier circuit, using the operational amplifier of the microcontroller and the ADC channel for signal processing, the problem of high cost and insufficient accuracy in the prior art is solved, and low-cost and high-precision leakage current measurement is achieved.
Patent Information
- Application Number
- CN202510290367.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, leakage current measurement systems based on microcontrollers have problems of high cost and insufficient accuracy, and it is difficult to meet the low-cost and high-precision measurement needs.
The zero-sequence current transformer is used to combine pre-processing circuits and feedback amplifier circuits to collect current information in real time through the zero-sequence current transformer, and signal processing is performed using the microcontroller's operational amplifier and ADC channels. Combined with linearity compensation and calibration technology, high-precision leakage current measurement is achieved.
It realizes low-cost and high-precision leakage current measurement, simple structure, strong anti-interference ability, short dynamic response time, and meets the requirements of fast reaction.
Smart Images

Figure CN120275859A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of line detection mechanisms, and more specifically, to a line leakage current measurement system based on a single-chip microcomputer and its control method. Background Art
[0002] The main ways to obtain the signal of leakage current are the direct method and the isolation method. Usually, the current transformer simultaneously obtains the conduction current induction values of the live wire and the neutral wire. This way can save the number of current transformer arrangements. Theoretically, the magnitudes of the conduction currents on the live wire and the neutral wire should be the same, and the flowing directions are exactly opposite. According to the principle of current magnetic field, the magnetic field generated by the wires with opposite conduction directions and the same current should be zero on the induction value of the current transformer. If unfortunately there is a leakage at a certain electrical appliance, this will cause the conduction currents of the live wire and the neutral wire flowing through the current transformer to be inconsistent. At this time, the induction value on the current transformer is the actual magnitude of the leakage current.
[0003] The application of combining a single-chip microcomputer with a zero-sequence current transformer to measure current is very common in the power system, especially in realizing zero-sequence current protection. The zero-sequence current protection of the power system implemented by the single-chip microcomputer: In this application, the single-chip microcomputer detects the zero-sequence current in the power system through the zero-sequence current transformer. When the zero-sequence current exceeds the preset threshold, the single-chip microcomputer will send a signal or cut off the main circuit power supply to protect the safe and stable operation of the power system.
[0004] A common method is to directly measure the residual current using the ADC channel of the single-chip microcomputer: This is a design idea of a leakage detection circuit. The sensing part uses a zero-sequence current transformer to sense the zero-sequence current in the circuit, and the control part processes and judges the sensed zero-sequence current through the single-chip microcomputer to achieve leakage detection and protection. The single-chip microcomputer samples the zero-sequence current signal through the ADC channel and calculates the leakage current value. This method is convenient, simple and direct, but because no more preprocessing is done on the sampled signal, the measurement accuracy is relatively low, and the highest can only reach 5%. This method with good simplicity and economy still has a market. However, for occasions where more precise numerical settings are required.
[0005] Another method is to obtain the conduction currents of the live wire and the neutral wire through linear Hall induction, and then convert them into voltage signals through a sampling resistor and directly input them into the ADC channel of the single-chip microcomputer. The single-chip microcomputer calculates the leakage current value through comprehensive calculation. This method can obtain a higher measurement accuracy, up to 0.5 - 3%, but the cost is relatively high. After comprehensively analyzing the above two major schemes, neither can meet the requirements of high precision and low cost applications.
[0006] In view of the above factors of the above-mentioned solutions, and the market equipment requires a low-cost and high-precision measurement solution. If improving the accuracy on the existing solution becomes the first choice. The primary constraint for improving accuracy is how to amplify the original signal with as little distortion as possible during acquisition, and how to improve the processing of the input signal of the operational amplifier is the key consideration target. However, the sampling circuit and the good pre-processing circuit of the sampling signal can only improve the accuracy to about 1% - 3%. Subsequently, it is necessary to utilize the high-resolution ADC built into the microcontroller, tap the sufficient computing power of the microcontroller to perform linearity compensation processing on the input signal, and cooperate with calibration processing to finally obtain a high-precision leakage current measurement value with a low-cost domestic operational amplifier plus the ADC built into the microcontroller.
[0007] Currently, a test circuit applied to chip open-circuit and short-circuit tests and leakage current tests is disclosed on the Chinese Patent Network, with the publication number CN214473744U, which is applied to the field of chip test technology. It is connected to the PC end through the microcontroller main control circuit; the power supply module is electrically connected to the microcontroller main control circuit, the ADC module, the constant current and constant voltage source module, the first switch switching circuit, and the second switch switching circuit respectively; the constant current and constant voltage source module is connected to the microcontroller main control circuit; the ADC module is connected to the constant current and constant voltage source module and the microcontroller main control circuit respectively; the first switch switching circuit is connected to the ADC module and the microcontroller main control circuit respectively; the second switch switching circuit is connected to the first switch switching circuit, the microcontroller main control circuit, and the chip socket to be tested respectively, realizing automatic open-circuit and short-circuit tests and leakage current tests in the same circuit device, and improving the test efficiency and accuracy by testing each pin on the chip without moving the chip.
[0008] Although the test circuit applied to chip open-circuit and short-circuit tests and leakage current tests in the above patent has the advantage of improving the test efficiency by testing each pin on the chip without moving the chip, the system structure is complex and the cost is relatively high. Summary of the Invention
[0009] In order to overcome the problem of relatively high cost in the traditional leakage current detection system in the prior art, the present invention now provides a microcontroller-based line leakage current measurement system and its control method with the advantages of simple structure and low cost.
[0010] A leakage current measurement system based on a single-chip microcomputer and its control method of the present invention include a zero-sequence current transformer for collecting leakage current in a circuit and a host computer for recording and processing the collected leakage current information. The output end of the zero-sequence current transformer is provided with a pre-processing circuit for pre-processing the collected leakage current signal. The signal output end of the pre-processing circuit is provided with a feedback amplification circuit for amplifying and feedback-processing the pre-processed leakage current signal. The power input end of the feedback amplification circuit is provided with a power supply circuit for supplying electrical energy to the feedback amplification circuit. The signal output end of the feedback amplification circuit is electrically connected to the signal input end of the host computer.
[0011] Preferably, the pre-processing circuit includes an access terminal SV8, a resistor R2, a diode D21, and a diode D22. One end of the zero-sequence current transformer is electrically connected to the 1-pin of the access terminal SV8, and the other end of the zero-sequence current transformer is electrically connected to the 2-pin of the access terminal SV8. The 1-pin of the access terminal SV8 is electrically connected to the positive electrode of the diode D21, the negative electrode of the diode D22, and one end of the resistor R2 respectively. The 2-pin of the access terminal SV8 is electrically connected to the negative electrode of the diode D21, the positive electrode of the diode D22, and the other end of the resistor R2 respectively.
[0012] Preferably, the feedback amplification circuit includes a single-chip microcomputer U1, a resistor R3, a resistor R110, a resistor R111, a resistor R115, a resistor R116, a capacitor C9, a capacitor C56, a capacitor C78, and a capacitor C79. One end of the resistor R110 is electrically connected to one end of the resistor R2. One end of the resistor R111 is electrically connected to the other end of the resistor R2. The other end of the resistor R111 is electrically connected to one end of the capacitor C56 and the 3-pin of the single-chip microcomputer U1 respectively. The other end of the capacitor C56 is connected to one end of the capacitor C9, and the other end of the capacitor C56 is grounded. The other end of the capacitor C9 is electrically connected to the other end of the resistor R110, one end of the resistor R115, and one end of the resistor R116 respectively. The other end of the resistor R116 is electrically connected to one end of the capacitor C78 and the 2-pin of the single-chip microcomputer U1 respectively. The other end of the resistor R115 is electrically connected to the 1-pin of the single-chip microcomputer U1, the other end of the capacitor C78, and one end of the resistor R3 respectively. The other end of the resistor R3 is electrically connected to one end of the capacitor C79 and the signal input end of the host computer respectively. The other end of the capacitor C79 is grounded.
[0013] Preferably, the power supply circuit includes a resistor R113, a resistor R114, a resistor R118, a capacitor C77, a capacitor C80, and a diode D24. One end of the resistor R118 is electrically connected to the other end of the resistor R111. The other end of the resistor R118 is respectively electrically connected to the 6th pin and the 7th pin of the single-chip microcomputer U1. The 5th pin of the single-chip microcomputer U1 is respectively electrically connected to one end of the resistor R113, one end of the resistor R114, and one end of the capacitor C77. The other end of the resistor R113 is respectively electrically connected to one end of the capacitor C80 and the negative electrode of the diode D24. The other end of the resistor R113 is connected to VCC. The other end of the resistor R114 is respectively electrically connected to the other end of the capacitor C77 and the other end of the capacitor C80. The other end of the resistor R114 is grounded. The positive electrode of the diode D24 is electrically connected to one end of the resistor R3.
[0014] Preferably, the control method is as follows: 1) First, install the zero-sequence current transformer at the positions of the live wire and the neutral wire in the circuit.
[0015] 2) During operation, connect the power input terminal of the power supply circuit to an independent power supply. Then, the power supply circuit provides electrical energy for the feedback amplification circuit, and the zero-sequence current transformer will collect the current information in the live wire and the neutral wire in real time.
[0016] 3) Under normal conditions, the magnitudes of the currents conducted on the live wire and the neutral wire are the same, and the flowing directions are exactly opposite. According to the principle of current magnetic field, the magnetic field generated by the wires with opposite conduction directions and the same current magnitude is zero as the induction value on the zero-sequence current transformer.
[0017] 4) However, when a fault occurs in the circuit and a leakage current is generated, the magnitudes of the currents in the live wire and the neutral wire detected by the zero-sequence current transformer are inconsistent. At this time, the induction value on the zero-sequence current transformer is the actual magnitude of the leakage current.
[0018] 5) When the zero-sequence current transformer detects a leakage current in the circuit, the zero-sequence current transformer will send the collected leakage current signal to the pre-processing circuit, and the pre-processing circuit will convert the collected leakage current signal into a voltage signal and send it to the feedback amplification circuit.
[0019] 6) When the feedback amplification circuit receives the voltage signal, the feedback amplification circuit will raise the received voltage signal as a whole, filter out the high-frequency interference components in the voltage signal, and then send the processed voltage signal to the host computer.
[0020] Preferably, during operation, the other end of the resistor R113 in the power supply circuit is connected to VCC, and the other end of the resistor R118 outputs 1 / 2VCC to supply power to the feedback amplification circuit.
[0021] Preferably, when working, the signal collected by the zero-sequence current transformer forms a loop through the resistor R2, and at the same time, the induced current is converted into a voltage signal. The voltage across the resistor R2 serves as the signal input source of the feedback amplification circuit.
[0022] Preferably, the resistor R115 and the resistor R110 form a feedback amplification circuit, and the amplification factor is determined by the resistor R115 and the resistor R110. The 1 / 2VCC power supply obtained by the feedback amplification circuit is used as the bias voltage and is superimposed on the input end of the feedback amplification circuit through the resistor R118, so as to raise the overall negative voltage in the signal, enabling the ADC channel of the single-chip microcomputer U1 to normally convert to digital.
[0023] Preferably, the single-chip microcomputer U1 is set with a timer TIMER to synchronously sample the AC cycle of 20 ms, and more than 100 times are sampled in each cycle, which is equivalent to sampling the induction conversion value of the zero-sequence current transformer once every 100 microseconds.
[0024] The host computer screens the collected data, calculates the sum of squares, takes the root mean square after averaging, adds the proportional coefficient to obtain the corresponding leakage current measurement value, and compares it with the pre-set safety threshold. If it exceeds the safety threshold, it will quickly respond and execute safety operations.
[0025] The single-chip microcomputer U1 used is of the model AD8542R with a relatively low cost, and the VCC is an independent power supply of 3.3V DC.
[0026] Since the induction value of the zero-sequence current transformer is an AC signal, and the single-chip microcomputer in the present invention is powered by an independent DC power supply and cannot process negative voltage signals, while the sampling obtained by the transformer is an AC signal with positive and negative voltage signals, the circuit needs to process the signal. The present invention uses the operational amplifier in the single-chip microcomputer to first generate a stable 1 / 2VCC, and this 1 / 2VCC serves as the bias voltage for measuring the leakage current signal of the operational amplifier, thereby raising the overall voltage of the input signal, eliminating the negative voltage, and enabling the operational amplifier to measure the full-cycle sampling signal value.
[0027] Generating 1 / 2VCC power supply through an operational amplifier has relatively high power supply stability and small output impedance, which changes the impedance problem caused by resistor voltage division and can reduce the influence amplitude of the subsequent-stage signal. Additionally, a small capacitor needs to be connected in parallel before the 1 / 2VCC power supply enters the next stage to improve the waveform of the 1 / 2VCC power supply. The sampling circuit converts the tiny circuit into a voltage signal through a sampling resistor, and the operational amplifier performs signal conditioning and amplification on the collected voltage signal by superimposing a bias voltage. The conditioned voltage signal is sampled through the analog-to-digital converter (ADC) of the single-chip microcomputer and converted into a digital signal. The single-chip microcomputer program can calculate the actual current value based on the sampled digital signal and perform further processing or storage. To improve the measurement accuracy, the host computer can use the linearity compensation method to match the corresponding coefficient according to the measured value for compensation. This method can obtain relatively high measurement accuracy. Additionally, with the calibration of the measurement system, the present invention can obtain high-precision leakage current measurement values even with a low-cost single-power-supply operational amplifier. At the same time, the present invention gives full play to the high-speed response capabilities of the single-chip microcomputer and the operational amplifier, and the comprehensive dynamic response time does not exceed 10 ms, so it can fully meet the requirements of the leakage current measurement system for rapid response.
[0028] The power supply circuit of the present invention is powered by 3.3V DC, with rail-to-rail input and output and a gain-bandwidth product of 1 MHz, and has relatively high economic indicators.
[0029] The power supply VCC of the operational amplifier is 3.3V direct current. First, a high-precision 1 / 2VCC power supply is obtained using a voltage-dividing resistor and a feedback circuit. If the accuracy of the voltage-dividing resistor is 0.1%, then the output 1 / 2VCC power supply can obtain an accuracy of approximately 0.2%. This reference voltage is mainly used to set the quiescent operating point of the operational amplifier so that when there is no input signal, the output can be stabilized near 1 / 2VCC. In this way, when the input signal fluctuates, the output signal can also fluctuate near this reference voltage, thus avoiding the output exceeding the power supply range. The main function of capacitor C77 is filtering and anti-interference. It can filter out the high-frequency interference components in the power supply and prevent these interference signals from affecting the operation of the operational amplifier.
[0030] The weak current signal obtained by the zero-sequence current transformer is connected to terminal SV8, forms a loop through resistor R2, and at the same time converts the induced current into a voltage signal. The voltage across resistor R2 is the signal input source of the operational amplifier. Resistor R115 and resistor R110 form a feedback amplification circuit, and the amplification factor is determined by resistor R115 and resistor R110. The 1 / 2VCC power supply obtained by the operational amplifier is used as the bias voltage and is superimposed on the input terminal of the operational amplifier through resistor R118, so as to raise the negative voltage in the signal as a whole, so that the ADC channel of the single-chip microcomputer can normally convert to digital. The function of capacitor C78 is lead compensation to ensure the phase margin of the operational amplifier loop. Capacitor C56 is to improve stability and reduce power supply noise, and the function of capacitor C9 is filtering and anti-interference, filtering out the high-frequency interference components in the signal to prevent these interference signals from affecting the output of the operational amplifier. Resistor R3 and capacitor C78 also improve stability and reduce noise.
[0031] The present invention has the following beneficial effects: the circuit structure is simple, the cost is low, the anti-interference ability is strong, and the measurement accuracy is high. Brief Description of the Drawings
[0032] Appendix Figure 1 is the circuit schematic diagram of the present invention.
[0033] Appendix Figure 2 is the schematic diagram of the preprocessing circuit of the present invention.
[0034] Appendix Figure 3 is the schematic diagram of the feedback amplification circuit of the present invention.
[0035] Appendix Figure 4 is the schematic diagram of the power supply circuit of the present invention. Specific Embodiments
[0036] The technical solutions of the present invention will be further specifically described below through embodiments in conjunction with the drawings.
[0037] Embodiment: According to Appendix Figure 1 , Appendix Figure 2 , Appendix Figure 3 and Appendix Figure 4The present invention will be further described. A line leakage current measurement system based on a single-chip microcomputer in this example includes a zero-sequence current transformer for collecting the leakage current in the line and a host computer for recording and processing the collected leakage current information. The output end of the zero-sequence current transformer is provided with a pre-processing circuit for pre-processing the collected leakage current signal. The signal output end of the pre-processing circuit is provided with a feedback amplification circuit for amplifying and feedback-processing the pre-processed leakage current signal. The power input end of the feedback amplification circuit is provided with a power supply circuit for supplying electric energy to the feedback amplification circuit. The signal output end of the feedback amplification circuit is electrically connected to the signal input end of the host computer.
[0038] The pre-processing circuit includes an access terminal SV8, a resistor R2, a diode D21, and a diode D22. One end of the zero-sequence current transformer is electrically connected to the 1-pin of the access terminal SV8, and the other end of the zero-sequence current transformer is electrically connected to the 2-pin of the access terminal SV8. The 1-pin of the access terminal SV8 is electrically connected to the positive electrode of the diode D21, the negative electrode of the diode D22, and one end of the resistor R2 respectively. The 2-pin of the access terminal SV8 is electrically connected to the negative electrode of the diode D21, the positive electrode of the diode D22, and the other end of the resistor R2 respectively.
[0039] The feedback amplification circuit includes a single-chip microcomputer U1, a resistor R3, a resistor R110, a resistor R111, a resistor R115, a resistor R116, a capacitor C9, a capacitor C56, a capacitor C78, and a capacitor C79. One end of the resistor R110 is electrically connected to one end of the resistor R2. One end of the resistor R111 is electrically connected to the other end of the resistor R2. The other end of the resistor R111 is electrically connected to one end of the capacitor C56 and the 3-pin of the single-chip microcomputer U1 respectively. The other end of the capacitor C56 is connected to one end of the capacitor C9, and the other end of the capacitor C56 is grounded. The other end of the capacitor C9 is electrically connected to the other end of the resistor R110, one end of the resistor R115, and one end of the resistor R116 respectively. The other end of the resistor R116 is electrically connected to one end of the capacitor C78 and the 2-pin of the single-chip microcomputer U1 respectively. The other end of the resistor R115 is electrically connected to the 1-pin of the single-chip microcomputer U1, the other end of the capacitor C78, and one end of the resistor R3 respectively. The other end of the resistor R3 is electrically connected to one end of the capacitor C79 and the signal input end of the host computer respectively. The other end of the capacitor C79 is grounded.
[0040] The described power supply circuit includes resistor R113, resistor R114, resistor R118, capacitor C77, capacitor C80, and diode D24. One end of resistor R118 is electrically connected to the other end of resistor R111. The other end of resistor R118 is electrically connected to pin 6 and pin 7 of microcontroller U1 respectively. Pin 5 of microcontroller U1 is electrically connected to one end of resistor R113, one end of resistor R114, and one end of capacitor C77 respectively. The other end of resistor R113 is electrically connected to one end of capacitor C80 and the negative electrode of diode D24 respectively. The other end of resistor R113 is connected to VCC. The other end of resistor R114 is electrically connected to the other end of capacitor C77 and the other end of capacitor C80 respectively. The other end of resistor R114 is grounded. The positive electrode of diode D24 is electrically connected to one end of resistor R3.
[0041] The described control method is as follows: 1) First, install the zero-sequence current transformer at the positions of the live wire and the neutral wire in the circuit. 2) During operation, connect the power input terminal of the power supply circuit to an independent power supply. Then, the power supply circuit provides electrical energy for the feedback amplifier circuit, and the zero-sequence current transformer will collect the current information in the live wire and the neutral wire in real time. 3) Under normal conditions, the magnitudes of the currents conducted on the live wire and the neutral wire are the same, and the flowing directions are exactly opposite. According to the current magnetic field principle, the magnetic field generated by the wires with opposite conduction directions and the same current magnitude is zero for the induction value on the zero-sequence current transformer. 4) However, when a fault occurs in the circuit and leakage current is generated, the magnitudes of the currents in the live wire and the neutral wire detected by the zero-sequence current transformer are inconsistent. At this time, the induction value on the zero-sequence current transformer is the actual magnitude of the leakage current. 5) After the zero-sequence current transformer detects the presence of leakage current in the circuit, the zero-sequence current transformer will send the collected leakage current signal to the pre-processing circuit, and the pre-processing circuit will convert the collected leakage current signal into a voltage signal and send it to the feedback amplifier circuit. 6) When the feedback amplifier circuit receives the voltage signal, the feedback amplifier circuit will raise the received voltage signal as a whole, filter out the high-frequency interference components in the voltage signal, and then send the processed voltage signal to the host computer.
[0042] During operation, the other end of resistor R113 in the power supply circuit is connected to VCC, and the other end of resistor R118 outputs 1 / 2VCC to supply power to the feedback amplifier circuit.
[0043] During operation, the signal collected by the zero-sequence current transformer forms a loop through resistor R2, and at the same time, the induced current is converted into a voltage signal. The voltage across resistor R2 is used as the signal input source of the feedback amplifier circuit.
[0044] The resistor R115 and the resistor R110 form a feedback amplifier circuit. The amplification factor is determined by the resistor R115 and the resistor R110. The 1 / 2VCC power supply obtained by the feedback amplifier circuit is used as the bias voltage and is superimposed on the input end of the input feedback amplifier circuit through the resistor R118, so as to raise the negative voltage in the signal as a whole, so that the ADC channel of the single-chip microcomputer U1 can normally convert to digital.
[0045] The single-chip microcomputer U1 is set to sample synchronously with the AC cycle of 20ms by the timer TIMER, and more than 100 times are collected in each cycle, which is equivalent to collecting the induction conversion value of the zero-sequence current transformer once every 100 microseconds.
[0046] The host computer screens the collected data, calculates the sum of squares, takes the root mean square after averaging, adds the proportional coefficient to obtain the corresponding leakage current measurement value, and compares it with the pre-set safety threshold. If it exceeds the safety threshold, it will quickly respond and execute safety operations.
[0047] The above are only specific embodiments of the present invention, but the structural features of the present invention are not limited thereto. Any changes or modifications made by those skilled in the art within the scope of the present invention are covered by the patent scope of the present invention.
Claims
1. A line leakage current measurement system based on a single-chip microcomputer, comprising a zero-sequence current transformer for collecting the leakage current in the line and a host computer for recording and processing the collected leakage current information, characterized in that, The output end of the zero-sequence current transformer is provided with a pre-processing circuit for pre-processing the collected leakage current signal. The signal output end of the pre-processing circuit is provided with a feedback amplification circuit for amplifying and feedback-processing the leakage current signal after pre-processing. The power input end of the feedback amplification circuit is provided with a power supply circuit for supplying electrical energy to the feedback amplification circuit. The signal output end of the feedback amplification circuit is electrically connected to the signal input end of the host computer.
2. The line leakage current measurement system based on a single-chip microcomputer according to claim 1, characterized in that The pre-processing circuit includes an access terminal SV8, a resistor R2, a diode D21, and a diode D22. One end of the zero-sequence current transformer is electrically connected to the 1-pin of the access terminal SV8, and the other end of the zero-sequence current transformer is electrically connected to the 2-pin of the access terminal SV8. The 1-pin of the access terminal SV8 is electrically connected to the positive electrode of the diode D21, the negative electrode of the diode D22, and one end of the resistor R2 respectively. The 2-pin of the access terminal SV8 is electrically connected to the negative electrode of the diode D21, the positive electrode of the diode D22, and the other end of the resistor R2 respectively.
3. A line leakage current measurement system based on a single-chip microcomputer according to claim 2, characterized in that, The feedback amplification circuit includes a single-chip microcomputer U1, a resistor R3, a resistor R110, a resistor R111, a resistor R115, a resistor R116, a capacitor C9, a capacitor C56, a capacitor C78, and a capacitor C79. One end of the resistor R110 is electrically connected to one end of the resistor R2. One end of the resistor R111 is electrically connected to the other end of the resistor R2. The other end of the resistor R111 is electrically connected to one end of the capacitor C56 and the 3-pin of the single-chip microcomputer U1 respectively. The other end of the capacitor C56 is connected to one end of the capacitor C9, and the other end of the capacitor C56 is grounded. The other end of the capacitor C9 is electrically connected to the other end of the resistor R110, one end of the resistor R115, and one end of the resistor R116 respectively. The other end of the resistor R116 is electrically connected to one end of the capacitor C78 and the 2-pin of the single-chip microcomputer U1 respectively. The other end of the resistor R115 is electrically connected to the 1-pin of the single-chip microcomputer U1, the other end of the capacitor C78, and one end of the resistor R3 respectively. The other end of the resistor R3 is electrically connected to one end of the capacitor C79 and the signal input end of the host computer respectively. The other end of the capacitor C79 is grounded.
4. The line leakage current measurement system based on a single-chip microcomputer according to claim 3, characterized in that, The power supply circuit described above includes resistor R113, resistor R114, resistor R118, capacitor C77, capacitor C80, and diode D24. One end of resistor R118 is electrically connected to the other end of resistor R111. The other end of resistor R118 is electrically connected to pin 6 and pin 7 of microcontroller U1 respectively. Pin 5 of microcontroller U1 is electrically connected to one end of resistor R113, one end of resistor R114, and one end of capacitor C77 respectively. The other end of resistor R113 is electrically connected to one end of capacitor C80 and the negative electrode of diode D24 respectively. The other end of resistor R113 is connected to VCC. The other end of resistor R114 is electrically connected to the other end of capacitor C77 and the other end of capacitor C80 respectively. The other end of resistor R114 is grounded. The positive electrode of diode D24 is electrically connected to one end of resistor R3.
5. A control method applicable to the line leakage current measurement system based on a single-chip microcomputer described in claim 1, characterized in that, The control method described above is as follows: First, install the zero-sequence current transformer at the positions of the live wire and the neutral wire in the circuit. During operation, connect the power input terminal of the power supply circuit to an independent power supply. Then, the power supply circuit provides electrical energy for the feedback amplification circuit. The zero-sequence current transformer will collect the current information in the live wire and the neutral wire in real time. Under normal conditions, the magnitudes of the currents conducted on the live wire and the neutral wire are the same, and the flowing directions are exactly opposite. According to the current magnetic field principle, the magnetic field generated by the wires with opposite conduction directions and the same current magnitude is zero for the induction value on the zero-sequence current transformer. However, when a fault occurs in the circuit and leakage current is generated, the magnitudes of the currents in the live wire and the neutral wire detected by the zero-sequence current transformer are inconsistent. At this time, the induction value on the zero-sequence current transformer is the actual magnitude of the leakage current. When the zero-sequence current transformer detects the existence of leakage current in the circuit, the zero-sequence current transformer will send the collected leakage current signal to the pre-processing circuit. The pre-processing circuit will convert the collected leakage current signal into a voltage signal and send it to the feedback amplification circuit. When the feedback amplification circuit receives the voltage signal, the feedback amplification circuit will raise the received voltage signal as a whole and filter out the high-frequency interference components in the voltage signal. Then, it will send the processed voltage signal to the host computer.
6. The control method of a line leakage current measurement system based on a single-chip microcomputer according to claim 5, characterized in that During operation, the other end of resistor R113 in the power supply circuit is connected to VCC, and the other end of resistor R118 outputs 1 / 2VCC to supply power to the feedback amplification circuit.
7. A control method for a line leakage current measurement system based on a single-chip microcomputer according to claim 5, characterized in that, During operation, the signal collected by the zero-sequence current transformer forms a loop through resistor R2, and at the same time, the induced current is converted into a voltage signal. The voltage across resistor R2 is used as the signal input source of the feedback amplification circuit.
8. The control method of a line leakage current measurement system based on a single-chip microcomputer according to claim 6, characterized in that, Resistor R115 and resistor R110 form a feedback amplification circuit. The amplification factor is determined by resistor R115 and resistor R110. The 1 / 2VCC power supply obtained by the feedback amplification circuit is used as the bias voltage and is superimposed on the input end of the feedback amplification circuit through resistor R118. In this way, the negative voltage in the signal is raised as a whole, so that the ADC channel of microcontroller U1 can be normally converted into a digital signal.
9. The control method of a line leakage current measurement system based on a single-chip microcomputer according to claim 3, characterized in that, The single-chip microcomputer U1 is set to use the timer TIMER to synchronize the AC cycle for sampling every 20 ms, and more than 100 times are collected in each cycle, which is equivalent to sampling the induction conversion value of the zero-sequence current transformer once every 100 microseconds.
10. The control method of a line leakage current measurement system based on a single-chip microcomputer according to claim 1, characterized in that, The host computer screens the collected data, calculates the sum of squares, takes the root mean square after averaging, adds the proportional coefficient to obtain the corresponding measured leakage current value, and compares it with the pre-set safety threshold. If the safety threshold is exceeded, a safety operation is quickly responded and executed.