A single core fluxgate current sensor based on pulse modulation phase detection method
By using pulse modulation phase detection method and temperature compensation technology in a single core fluxgate current sensor, the contradiction between accuracy and cost of existing fluxgate current sensors is solved, and high-precision and low-cost detection results are achieved. And the reliability of the sensor is improved through epoxy resin encapsulation.
Patent Information
- Application Number
- CN202410814075.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-24
AI Technical Summary
Existing fluxgate current sensors are difficult to balance between high accuracy and low cost. Especially in the fields of micro current detection and Internet of Things monitoring, there are problems of poor measurement accuracy and structural complexity.
A single-core fluxgate current sensor based on the pulse modulation phase detection method is used. The MCU module drives the oscillation winding and the self-oscillation and signal output winding to achieve the positive and negative alternating flux saturation state of the magnetic core. Combined with the temperature sensing circuit and Epoxy resin encapsulation improves measurement accuracy and impact resistance.
A fluxgate current sensor with simple structure, low cost and high detection accuracy is realized, which enhances the current measurement accuracy and measurement range, and improves the sensor's reliability and impact resistance through temperature compensation and epoxy resin packaging.
Smart Images

Figure CN118376827B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fluxgate current sensors, and in particular to a single-core fluxgate current sensor based on a pulse modulation phase detection method. Background Art
[0002] Fluxgate current sensors have ultra-high measurement accuracy and good temperature stability and have been used in industrial detection and automation engineering fields.
[0003] Currently, relatively mature fluxgate current sensors generally include the following two modes: AC / DC zero flux magnetic modulation sensor mode and single core fluxgate current sensor mode.
[0004] Among them, the AC / DC zero flux magnetic modulation sensor mode uses a fluxgate probe composed of multiple windings (4 groups or more) and multiple ring cores. The sensor has a complex structure and circuit, which affects reliability and is not suitable for fields requiring high-level micro current detection. For example, the Chinese invention patent: CN107340418B - a quasi-digital frequency modulation fluxgate current sensor, which uses a dual fluxgate probe, and the self-excitation magnetic circuit is connected to the dual fluxgate probe (the first magnetic core and the second magnetic core are connected in parallel). The above method increases the complexity of the overall structure of the sensor, and the positive pole of the operational amplifier is connected to a +10V constant voltage DC voltage source, and the negative pole of the power supply is connected to a -10V constant voltage DC voltage source, which also increases the complexity of the circuit, resulting in a significant increase in the manufacturing cost of the sensor and limited use occasions.
[0005] The single-core fluxgate current sensor mode, especially the single-core fluxgate current sensor based on the pulse width detection method and pulse amplitude detection method of the self-excited oscillation magnetic circuit, due to the hysteresis characteristics of the transformer and the eddy current effect, the excitation source will couple into the feedback winding and interfere with the sensor, affecting the measurement range and measurement accuracy of the sensor, and it is easily disturbed by the external magnetic field brought by the excitation source, resulting in poor detection accuracy, making it difficult to be widely promoted in the field of Internet of Things monitoring.
[0006] Therefore, there is an urgent need to provide a fluxgate current sensor with a simple structure, low manufacturing cost, high detection accuracy, and easy popularization and use. Summary of the invention
[0007] The purpose of the present invention is to solve the deficiencies in the prior art and to provide a fluxgate current sensor which has a simple structure and hardware circuit, low manufacturing cost, high detection accuracy and is easy to promote and use.
[0008] The object of the present invention is achieved through the following technical solution: a single-core fluxgate current sensor based on a pulse modulation phase detection method, comprising:
[0009] The fluxgate probe includes a magnetic core, on which an oscillation winding FC and a self-excited oscillation and signal output winding SE are arranged;
[0010] MCU module, oscillation winding FC, self-excited oscillation and signal output winding SE are all connected to the MCU module;
[0011] The MCU module extracts the waveform information of the self-excited oscillation and signal output winding SE, generates a PWM pulse signal through PID control and outputs it to the oscillation winding FC; the magnetic flux generated in the magnetic core by the self-excited oscillation and signal output winding SE is superimposed with the magnetic flux generated in the magnetic core by the oscillation winding FC, so that the magnetic core is in a state of alternating positive and negative magnetic flux saturation.
[0012] Preferably, the signal output wave output by the self-excited oscillation and signal output winding SE is sent to the comparator built into the MCU module after synchronous amplification by the operational amplifier built into the MCU module, and the signal output wave is shaped by the comparator; then the timer / counter built into the MCU module is used to generate a PWM signal detection module, and the PWM signal detection module detects and extracts the period, frequency, and duty cycle information of the signal output wave. The MCU module performs PID control on the drive voltage of the oscillation winding FC according to the period, frequency, and duty cycle information of the signal.
[0013] Preferably, the MCU module includes an MCU chip, the two ends of the self-excited oscillation and signal output winding SE are respectively connected to the OAP_INP pin and the OAP_INIM pin on the MCU chip, and the two ends of the oscillation winding FC are respectively connected to the PWM_IO1 pin and the PWM_IO2 pin on the MCU chip.
[0014] Preferably, a temperature sensing circuit is connected to the ADCx_IN0 pin on the MCU chip, and the temperature sensing circuit includes a first branch, a thermistor, and a capacitor C4. One end of the first branch is connected to the ADCx_IN0 pin, and the other end of the first branch is connected to the positive voltage power supply end. One end of the thermistor and the capacitor C4 are both connected to the first branch, and the other ends of the thermistor and the capacitor C4 are both connected to the digital ground; the thermistor is used to detect the ambient temperature of the environment in which the magnetic core is located.
[0015] Preferably, the temperature of the magnetic core is detected by a temperature sensing circuit to obtain the actual value of the ambient temperature of the environment in which the magnetic core is located, and the temperature current offset value is calculated by the following formula:
[0016] ;
[0017] In the formula, is the temperature current offset value, The excitation current is detected by the fluxgate current sensor without temperature compensation. It is the difference between the actual measured value of the ambient temperature of the environment in which the core is located and the reference temperature value.
[0018] Preferably, a second branch is connected to the GPIO1 pin on the MCU chip, an end of the second branch away from the GPIO1 pin is connected to the positive voltage power supply end, and a light emitting diode LED and a resistor R5 are provided on the second branch.
[0019] Preferably, the MCU chip is connected to the interface circuit, which includes an RS485 chip, the D pin on the RS485 chip is connected to the TXD pin on the MCU chip, the DE pin and RE pin on the RS485 chip are simultaneously connected to the EN pin on the MCU chip, and the R pin on the RS485 chip is connected to the RXD pin on the MCU chip; the GND pin on the RS485 chip and the GND pin on the communication interface are both connected to the digital ground; the A pin on the RS485 chip is connected to the A pin on the communication interface through a second branch, and a resistor R6 is provided on the second branch; the B pin on the RS485 chip is connected to the B pin on the communication interface through a third branch, and a resistor R7 is provided on the third branch; the second branch and the third branch are connected through a fourth branch, and a resistor R8 is provided on the fourth branch.
[0020] Preferably, a fifth branch is connected to the GPIO2 pin on the MCU chip, the fifth branch is connected to the base of the transistor Q, the emitter of the transistor Q is connected to the digital ground, and the collector of the transistor Q is connected to the IO pin on the communication interface.
[0021] As a preferred embodiment, after the fluxgate current sensor is powered on, the program first enters the initialization code, configures and maps the IO pin functions on the MCU chip, and reads the calibration parameter table for operation; then calls the timer and counter on the MCU chip to establish a PWM input module, and continuously obtains the period and duty cycle of the self-excited oscillation pulse through an interrupt mode;
[0022] The PWM pulse signal is synthesized through the timer and output to the oscillation winding FC, and the stack and timing interrupt are set; the detected current passes through the magnetic core; the self-excited oscillation pulse generated by the self-excited oscillation and signal output winding SE is subjected to periodic filtering processing, and the self-excited oscillation pulse is processed in sections to obtain the average amplitude in each section; the average value of the DC current or the effective value of the AC current is calculated through the segmented broken line fitting method.
[0023] Preferably, the magnetic core, circuit board and oscillation winding are all arranged in a packaging shell, and the packaging shell is provided with a magnetic core cavity for accommodating the magnetic core, an interface seat for fixing the communication interface, and a circuit board cavity for placing the circuit board. The magnetic core and circuit board are encapsulated in the packaging shell by epoxy resin potting glue.
[0024] The beneficial effects of the present invention are:
[0025] 1. The present invention adopts a structural mode of a single magnetic core and double windings, the overall structural complexity is low, the manufacturing cost is low, and it is easy to promote and use.
[0026] 2. In the present invention, the oscillation winding FC is driven by the MCU module for PID control, and the magnetic flux generated by the self-excited oscillation and signal output winding SE in the magnetic core is superimposed with the magnetic flux generated by the oscillation winding FC in the magnetic core, so that the magnetic core is in a state of alternating positive and negative magnetic flux saturation, so that the phase-frequency characteristic signal of the input excitation current (detected current) is further amplified, thereby improving the measurement accuracy and measurement range of the current.
[0027] 3. In the present invention, a temperature sensing circuit is introduced into the MCU module, and the temperature of the environment where the magnetic core is located is detected by the temperature sensing circuit. The temperature correction coefficient is calculated according to the temperature of the environment where the magnetic core is located, and the measured current value is corrected to improve the accuracy of the detection.
[0028] 4. The present invention encapsulates the sensor by epoxy resin potting glue to achieve insulation, waterproofing, oil resistance, and dust resistance of the circuit board, and improve the impact resistance of the sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a circuit diagram of the present invention.
[0030] Figure 2 is a schematic diagram of an interface circuit of the present invention.
[0031] Figure 3 It is a schematic diagram of the packaging structure of the sensor of the present invention.
[0032] Figure 4 for Figure 1 A partial enlarged view of the Q portion of the middle transistor.
[0033] In the figure: 1. packaging shell, 2. magnetic core, 3. circuit board, 4. interface seat. DETAILED DESCRIPTION
[0034] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0035] Those skilled in the art should understand that, in the disclosure of the present invention, the terms "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the above terms should not be understood as limiting the present invention.
[0036] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.
[0037] like Figure 1 to Figure 2 As shown, a single magnetic core fluxgate current sensor based on pulse modulation phase detection method includes:
[0038] The fluxgate probe includes a magnetic core, on which an oscillation winding FC and a self-excited oscillation and signal output winding SE are arranged;
[0039] MCU module, oscillation winding FC, self-excited oscillation and signal output winding SE are all connected to the MCU module;
[0040] The MCU module extracts the waveform information of the self-excited oscillation and signal output winding SE, generates a PWM pulse signal through PID control and outputs it to the oscillation winding FC; the magnetic flux generated in the magnetic core by the self-excited oscillation and signal output winding SE is superimposed with the magnetic flux generated in the magnetic core by the oscillation winding FC, so that the magnetic core is in a state of alternating positive and negative magnetic flux saturation.
[0041] When the ammeter is tested, the wire carrying the detected current Is passes through the magnetic core.
[0042] The fluxgate probe in the present invention adopts a dual-winding design in which an oscillation winding FC and a self-excited oscillation and signal output winding SE are wound on a single magnetic core. Both the oscillation winding FC and the self-excited oscillation and signal output winding SE have the function of excitation windings, and the self-excited oscillation and signal output winding SE serves as both an excitation winding and a modulation signal winding.
[0043] Among them, the fluxgate probe of the dual-winding structure in the present invention adopts an amorphous nanocrystalline magnetic core with good temperature stability and low loss, the saturation magnetic flux density (Bs) is 1.25T, and the low coercive force (HC) is 3.56A / m. The self-excited oscillation and signal output winding SE and the oscillation winding FC are wound together on the same magnetic core. The oscillation winding FC adopts a sheath wire with a cross-section of 0.7 square millimeters, and the number of turns wound on the magnetic core is 5 turns; the self-excited oscillation and signal output winding SE adopts an enameled wire with a diameter of 0.15mm, and is wound evenly on the magnetic core in the same direction for 90 turns. The period of the self-excited oscillation signal in the self-excited oscillation and signal output winding SE is 1 / 2.5KHz-1 / 33kHz, and the corresponding current detection range is 0-40mA.
[0044] The present invention utilizes the timer and counter inside the MCU module to generate a PWM pulse signal, which is output to the oscillation winding FC. The MCU module performs PID control driving on the self-excited oscillation and signal output winding SE through the PID closed-loop control feedback principle, and utilizes the small signal excitation frequency phase modulation technology to modulate the self-excited oscillation signal of the fluxgate probe into a phase-frequency characteristic signal of a high-order harmonic. In the present invention, the oscillation winding FC is driven by a bidirectional symmetrical current, and the self-excited oscillation and signal output winding SE, the oscillation winding FC, and the excitation signal of the detected current jointly modulate the magnetic permeability of the magnetic core.
[0045] When the fluxgate probe is working, the magnetic flux generated by the self-excited oscillation and signal output winding SE in the magnetic core is superimposed with the magnetic flux generated by the oscillation winding FC in the magnetic core, so that the magnetic core is in a state of alternating positive and negative magnetic flux saturation. When the magnetic core is in a state of magnetic flux saturation, the impedance of the winding is the lowest, and the excitation current in the self-excited oscillation and signal output winding SE and the oscillation winding FC increases rapidly. The transformer effect of the sudden current and the transformer effect generated when the current increases rapidly make the self-excited oscillation and signal output winding SE synchronously strengthen or amplify the oscillation harmonics with the same frequency as the excitation current under low impedance conditions, thereby realizing the modulation of the self-excited oscillation signal of the self-excited oscillation and signal output winding SE, so that its phase-frequency response characteristic signal to the input excitation current (detected current) is further amplified, thereby improving the measurement accuracy and measurement range of the current.
[0046] In the present invention, the characteristics of phase enhancement of oscillation harmonics of the same frequency can well reflect the phase correlation of the external input detected current to the signal output waveform of the self-excited oscillation and signal output winding SE; by obtaining the period and duty cycle characteristics of the signal output wave (rectangular wave) of the self-excited oscillation and signal output winding SE, the information of the detected current can be calculated.
[0047] The signal output wave of the self-excited oscillation and signal output winding SE is sent to the comparator built into the MCU module after synchronous amplification by the operational amplifier built into the MCU module, and the signal output wave is shaped by the comparator. By adjusting the signal amplitude of the signal output wave and selecting different internal reference voltages, the waveform transformation and shaping of the entire signal output wave is realized, and then the PWM signal detection module is generated by the timer / counter built into the MCU module. The PWM signal detection module detects and extracts the period, frequency, duty cycle and other information of the signal output wave and calculates the current information of the detected current; at the same time, the MCU module performs PID control on the driving voltage of the oscillation winding FC according to the period, frequency and duty cycle information of the signal. Among them, the calculation of the current information (current value) of the detected current through the period, frequency, duty cycle and other information of the signal output wave belongs to the prior art in this field.
[0048] Specifically, the MCU module includes an MCU chip, which is a chip produced by National Technology Co., Ltd., model N32G032F6. The two ends of the self-excited oscillation and signal output winding SE are respectively connected to the OAP_INP pin and the OAP_INIM pin on the MCU chip, and the two ends of the oscillation winding FC are respectively connected to the PWM_IO1 pin and the PWM_IO2 pin on the MCU chip.
[0049] The VCC pin on the MCU chip is connected to the positive voltage supply terminal (VCC terminal) through the sixth branch, and capacitors C2 and C3 are provided between the sixth branch and the digital low, and capacitors C2 and C3 are connected in parallel. The GND pin on the MCU chip is connected to the digital ground.
[0050] When the sensor is actually used, temperature changes will affect the electrical properties of the magnetic core itself, such as magnetic permeability, loss, saturation magnetic induction intensity and other characteristics. The above characteristics are all functions of temperature, so temperature will affect the electrical properties of the magnetic core itself and thus affect the measurement accuracy of the sensor. In the present invention, a temperature sensing circuit is introduced into the MCU module, and the temperature of the environment where the magnetic core is located is detected by the temperature sensing circuit, and the temperature correction coefficient is calculated according to the temperature of the environment where the magnetic core is located, and the measured current value is corrected to improve the accuracy of the detection.
[0051] The temperature sensing circuit is connected to the ADCx_IN0 pin on the MCU chip. The temperature sensing circuit includes a first branch, a thermistor, and a capacitor C4. One end of the first branch is connected to the ADCx_IN0 pin, and the other end of the first branch is connected to the positive voltage supply end. A resistor R3 is provided on the first branch. One end of the thermistor and the capacitor C4 are both connected to the first branch, and the other ends of the thermistor and the capacitor C4 are both connected to the digital ground. The thermistor is used as a temperature detection element to detect the ambient temperature of the environment in which the magnetic core is located. The thermistor in this embodiment adopts an NTC thermistor.
[0052] The core temperature is detected by the temperature sensing circuit to obtain the actual value of the ambient temperature of the environment where the core is located, and the temperature current offset value is calculated by the following formula:
[0053] ;
[0054] In the formula, is the temperature current offset value, The excitation current detected by the fluxgate current sensor without temperature compensation, T∆T is the difference between the actual value of the ambient temperature of the environment where the magnetic core is located and the reference temperature value. Among them, 25 degrees Celsius is used as the reference temperature value in the present invention.
[0055] The phase-frequency characteristic parameters and duty cycle accumulated by the fluxgate sensor , using the linear equation, obtain the measured current value that meets the accuracy requirements through direct calculation or calculation by successive approximation method;
[0056] Duty cycle cumulative value The calculation formula is as follows:
[0057] ;
[0058] is the linear coefficient of the sensor winding circuit, ( It is related to the magnetic core, self-oscillation and signal output winding SE), measured under 25 degrees Celsius ambient conditions. It is the detected current value after temperature compensation.
[0059] By correcting the current detection value, the detection result is made more accurate and reliable.
[0060] The GPIO1 pin on the MCU chip is connected to a second branch, and the end of the second branch away from the GPIO1 pin is connected to the positive voltage supply end (VCC end). The second branch is provided with a light-emitting diode LED and a resistor R5. The light-emitting diode LED is used as a working indicator of the sensor, and can be set to long-on, slow flash, fast flash, etc. through programming to display the working status of the sensor.
[0061] According to actual use requirements, the present invention can connect an interface circuit on the MCU chip to realize communication between the sensor and a third party through the interface circuit, and can also connect a level output circuit on the MCU chip.
[0062] The interface circuit includes an RS485 chip, the D pin on the RS485 chip is connected to the TXD pin on the MCU chip, the DE pin and RE pin on the RS485 chip are simultaneously connected to the EN pin on the MCU chip, and the R pin on the RS485 chip is connected to the RXD pin on the MCU chip; the GND pin on the RS485 chip and the GND pin on the communication interface are both connected to the digital ground; the A pin on the RS485 chip is connected to the A pin on the communication interface through the second branch, and a resistor R6 is provided on the second branch; the B pin on the RS485 chip is connected to the B pin on the communication interface through the third branch, and a resistor R7 is provided on the third branch; the second branch and the third branch are connected through the fourth branch, and a resistor R8 is provided on the fourth branch. The VDD pin on the RS485 chip is connected to the positive voltage power supply end (VCC end), and a filter capacitor C5 is provided between the VDD pin on the RS485 chip and the digital ground.
[0063] The level output circuit includes a fifth branch connected to the GPIO2 pin on the MCU chip, the fifth branch is connected to the base of the transistor Q, the emitter of the transistor Q is connected to the digital ground, and the collector of the transistor Q is connected to the IO pin on the communication interface.
[0064] When the sensor is in use, perform the following steps:
[0065] After the fluxgate current sensor is powered on, the program first enters the initialization code, configures and maps the IO pin functions on the MCU chip, and reads the calibration parameter table for operation; then calls the timer and counter on the MCU chip to establish a PWM input module, and continuously obtains the period and duty cycle of the self-excited oscillation pulse through interruption;
[0066] The PWM pulse signal is synthesized through the timer and output to the oscillation winding FC, and the stack and timing interrupt are set; the detected current passes through the magnetic core; the self-excited oscillation pulse generated in the self-excited oscillation and signal output winding SE is subjected to periodic filtering processing, and the self-excited oscillation pulse is processed in sections to obtain the average amplitude in each section; the average value of the DC current or the effective value of the AC current is calculated through the segmented broken line fitting method.
[0067] like Figure 3As described above, the present invention encapsulates the sensor through an encapsulation shell 1 and epoxy resin potting glue. The magnetic core 2, the circuit board 3 and are all arranged in the encapsulation shell 1. The encapsulation shell is provided with a magnetic core cavity for accommodating the magnetic core, an interface seat 4 for fixing the communication interface, and a circuit board cavity for placing the circuit board 3. The magnetic core 2 is fixed in the magnetic core cavity, and the circuit board is fixed in the circuit board cavity. The magnetic core 2 and the circuit board 3 are encapsulated in the encapsulation shell by epoxy resin potting glue. The sensor is encapsulated by epoxy resin potting glue to achieve insulation, waterproofing, oil resistance, and dust resistance of the circuit board, and improve the impact resistance of the sensor.
[0068] The present invention is not limited to the above-mentioned optimal implementation mode. Anyone can derive other various forms of products under the inspiration of the present invention. However, no matter what changes are made in the shape or structure, all technical solutions that are the same or similar to those of the present application fall within the protection scope of the present invention.
Claims
1. A single-core fluxgate current sensor based on pulse modulation phase detection method, characterized in that: include: The fluxgate probe includes a magnetic core, on which an oscillation winding FC and a self-excited oscillation and signal output winding SE are arranged; MCU module, oscillation winding FC, self-excited oscillation and signal output winding SE are all connected to the MCU module; The MCU module extracts the waveform information of the self-excited oscillation and signal output winding SE, generates a PWM pulse signal through PID control and outputs it to the oscillation winding FC; the magnetic flux generated in the magnetic core by the self-excited oscillation and signal output winding SE is superimposed with the magnetic flux generated in the magnetic core by the oscillation winding FC, so that the magnetic core is in a positive and negative alternating magnetic flux saturation state; After the fluxgate current sensor is powered on, the program first enters the initialization code, configures and maps the IO pin functions on the MCU chip, and reads the calibration parameter table for operation; then calls the timer and counter on the MCU chip to establish a PWM input module, and continuously obtains the period and duty cycle of the self-excited oscillation pulse through interrupts; The PWM pulse signal is synthesized through the timer and output to the oscillation winding FC, and the stack and timing interrupt are set; the detected current passes through the magnetic core; the self-excited oscillation pulse generated in the self-excited oscillation and signal output winding SE is subjected to periodic filtering processing, and the self-excited oscillation pulse is processed in sections to obtain the average amplitude in each section; the average value of the DC current or the effective value of the AC current is calculated through the segmented broken line fitting method.
2. A single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 1, characterized in that: The signal output wave output by the self-excited oscillation and signal output winding SE is synchronously amplified by the built-in operational amplifier of the MCU module and then sent to the built-in comparator of the MCU module, and the signal output wave is shaped by the comparator; the built-in timer / counter of the MCU module is then used to generate a PWM signal detection module, which detects and extracts the period, frequency, and duty cycle information of the signal output wave. The MCU module performs PID control on the drive voltage of the oscillation winding FC according to the period, frequency, and duty cycle information of the signal.
3. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 1, characterized in that: The MCU module includes an MCU chip, two ends of the self-excited oscillation and signal output winding SE are respectively connected to the OAP_INP pin and the OAP_INIM pin on the MCU chip, and two ends of the oscillation winding FC are respectively connected to the PWM_IO1 pin and the PWM_IO2 pin on the MCU chip.
4. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 3, characterized in that: A temperature sensing circuit is connected to the ADCx_IN0 pin on the MCU chip. The temperature sensing circuit includes a first branch, a thermistor, and a capacitor C4. One end of the first branch is connected to the ADCx_IN0 pin, and the other end of the first branch is connected to the positive voltage power supply end. One end of the thermistor and the capacitor C4 are both connected to the first branch, and the other ends of the thermistor and the capacitor C4 are both connected to the digital ground. The thermistor is used to detect the ambient temperature of the environment in which the magnetic core is located.
5. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 4, characterized in that: The core temperature is detected by the temperature sensing circuit to obtain the actual value of the ambient temperature of the environment where the core is located, and the temperature current offset value is calculated by the following formula: ; In the formula, is the temperature current offset value, The excitation current is detected by the fluxgate current sensor without temperature compensation. It is the difference between the actual measured value of the ambient temperature of the environment where the magnetic core is located and the reference temperature value; Fluxgate sensor obtains the cumulative value of duty cycle , use the linear equation to calculate and obtain the measured current value that meets the accuracy requirements; Duty cycle cumulative value The calculation formula is as follows: ; in, is the linear coefficient of the sensor winding circuit, It is the detected current value after temperature compensation.
6. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 3, characterized in that: The GPIO1 pin on the MCU chip is connected to a second branch, one end of the second branch away from the GPIO1 pin is connected to the positive voltage power supply end, and a light emitting diode LED and a resistor R5 are arranged on the second branch.
7. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 3, characterized in that: The MCU chip is connected to the interface circuit, which includes an RS485 chip, the D pin on the RS485 chip is connected to the TXD pin on the MCU chip, the DE pin and the RE pin on the RS485 chip are simultaneously connected to the EN pin on the MCU chip, and the R pin on the RS485 chip is connected to the RXD pin on the MCU chip; the GND pin on the RS485 chip and the GND pin on the communication interface are both connected to the digital ground; the A pin on the RS485 chip is connected to the A pin on the communication interface through a second branch, and a resistor R6 is provided on the second branch; the B pin on the RS485 chip is connected to the B pin on the communication interface through a third branch, and a resistor R7 is provided on the third branch; the second branch and the third branch are connected through a fourth branch, and a resistor R8 is provided on the fourth branch.
8. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 3, characterized in that: The GPIO2 pin on the MCU chip is connected to a fifth branch, the fifth branch is connected to the base of the transistor Q, the emitter of the transistor Q is connected to the digital ground, and the collector of the transistor Q is connected to the IO pin on the communication interface.
9. The single-core fluxgate current sensor based on pulse modulation phase detection method according to claim 7, characterized in that: It also includes a circuit board. The magnetic core, the circuit board and the oscillation winding are all arranged in a packaging shell. The packaging shell is provided with a magnetic core cavity for accommodating the magnetic core, an interface seat for fixing the communication interface, and a circuit board cavity for placing the circuit board. The magnetic core and the circuit board are encapsulated in the packaging shell by epoxy resin potting glue.
