Fluxgate digital current sensor based on pulse amplitude detection method
Technical Field
The invention belongs to the field of direct current heavy current measurement, and particularly relates to a fluxgate digital direct current heavy current sensor based on a pulse amplitude detection method.
Background
Direct current large current measurement is widely applied to electric power, electric or electronic equipment, and is mainly used for functions of energy management, equipment monitoring protection and the like. The types of sensors for realizing direct current heavy current measurement at present mainly include: the device comprises a direct current shunt, a Hall current sensor and a fluxgate current sensor.
The direct current shunt is manufactured according to the principle that when direct current passes through a resistor, voltage is generated at two ends of the resistor, and has the advantages of high precision, high response speed and low cost. The resistance-type current divider is suitable for low-frequency and small-amplitude current measurement.
The Hall current sensor is made up according to Hall effect principle, and is used for ampere's law, i.e. a magnetic field which is directly proportional to current is produced around current-carrying conductor, and the Hall device is used for measuring said magnetic field, so that it possesses the advantages of high accuracy, good linearity, wide frequency band, quick response and strong overload capacity, etc.
The fluxgate current sensor measures a weak magnetic field by utilizing the nonlinear relation between the magnetic induction intensity and the magnetic field intensity of a high-permeability magnetic core in a measured magnetic field under the saturation excitation of an alternating magnetic field. This physical phenomenon appears to the measured ambient magnetic field as a "gate" through which the corresponding magnetic flux is modulated and generates an induced electromotive force. The magnetic field generated by the current is measured by utilizing the phenomenon, so that the aim of measuring the current is indirectly fulfilled.
The fluxgate current sensor has the advantages of high precision, good linearity, wide frequency band, fast response, strong overload capacity, small temperature drift, high sensitivity, no magnetic leakage, no position deviation and the like. The disadvantages are complex circuit design, high requirement for raw materials and high cost.
The fluxgate current sensor is widely applied to the fields of industry, medical treatment, precise test, measurement and the like such as new energy electric vehicles, charging piles, solar photovoltaic power generation, high-speed rail vehicles, smart grids, precise direct current large current measuring instruments, precise direct current large current sources and the like as a direct current large current precise measurement and feedback element.
However, due to the monopoly of foreign core technologies, the current precision fluxgate current sensors widely used in China almost all depend on imports. Based on the self-oscillation fluxgate technology, the fluxgate current sensor is a main method for realizing the fluxgate current sensor with the advantages of simple circuit structure, independence of sensitivity with excitation frequency and magnetic core parameters and the like.
With the maturity of the fluxgate technology and the improvement of the processing technology of the magnetic raw material, the fluxgate current sensor based on the self-excited oscillation magnetic circuit adopting the pulse width detection method and the pulse amplitude detection method is applied.
Disclosure of Invention
In order to solve the above problems, the present invention provides a fluxgate digital current sensor based on a pulse amplitude detection method.
In order to achieve the purpose, the technical scheme is as follows: a fluxgate digital current sensor based on a pulse amplitude detection method comprises a probe unit, an excitation unit, a signal processing unit, a main control unit and an output unit;
the probe unit comprises an annular magnetic core, an excitation coil and a primary side induction coil wound on the annular magnetic core, and Is used for converting a primary side current Ip to be measured into a current Is of the excitation coil;
the excitation unit is connected with the probe unit and comprises a switch MOS tube and a MOS bridge type drive circuit, and is used for generating a sine wave drive signal to apply sine excitation current with angular frequency omega to the excitation coil and generating an excitation magnetic field He;
The signal processing unit Is connected with the probe unit and comprises a signal amplifying circuit, the exciting coil current Is converted into sampling voltage through current-voltage conversion and signal amplification through a sampling resistor Rs, and the sampling voltage Is sent to an ADC (analog to digital converter) interface of the main control unit;
the main control unit is respectively connected with the excitation unit and the signal processing unit and is used for finishing signal detection, excitation unit switch control and measurement signal sampling and processing, and calculating the current Ip to be measured through sampling voltage;
the output unit is connected with the main control unit and provides a CAN bus communication interface for outputting the measured current Ip.
In some embodiments, further comprising the steps of:
s1, powering on the system, initializing the software part and the hardware part and starting the operation;
s2, the exciting unit self-oscillates to generate sine exciting current with angular frequency omega to form exciting magnetic field HeThe magnetic core is magnetized to saturation in a reciprocating way, and the current Ip to be measured flows through the induction coil to generate an environmental magnetic field Ho;
s3, the signal processing unit converts the current Is measured by the exciting coil in the step S2 into a measured voltage Us through a sampling resistor RS, and the measured voltage Us Is amplified and conditioned by an amplifying circuit and then Is sent to an ADC port of the main control unit;
s4, the main control unit respectively samples the voltage signals Us + and Us-of the step S3 in the positive half cycle and the negative half cycle of the sine excitation signal, according to the working principle of a pulse amplitude value counting method, when Ip has no current flowing, Us + is Us-, when Ip has current flowing, the difference of the sampling voltages in the positive half cycle and the negative half cycle is in a linear relation with the current to be measured Ip, | Us + is Us- | and the current to be measured Ip is calculated;
s5, the master control unit sends the measurement data to the host device through the output unit, and repeats the steps S4 to S5.
In some embodiments, the device further comprises a voltage comparator CMP, the positive pole and the negative pole of the voltage comparator CMP are respectively connected to the sampling resistor RS and the reference voltage reference circuit, and the output of the voltage comparator CMP is connected to the switching MOS transistor, and is used for adjusting the reference voltage to adjust the oscillation frequency, generating a sinusoidal excitation current with an angular velocity ω, and generating an excitation magnetic field HeMagnetic induction B inside the magnetic core.
B=u(Ho+He)=u(Ho+Hm sinwt)
u is a permeability constant, HoThe ambient magnetic field intensity of the current of the measured primary side wire on the annular magnetic core is measured; heA magnetic field strength generated for the excitation coil; hmIs the excitation magnetic field intensity amplitude; omega is the frequency of the field angle of excitation; the induced electromotive force in the coil is:
therefore, the induced electromotive force includes the ambient magnetic field HoAnd an excitation magnetic field HeThe information of (a); when no current flows through the primary side wire to be measured, Ip is 0, and the environmental magnetic field is zero HoThe output induced electromotive force only contains the excitation field H at 0eThe induced electromotive force output by the excitation coil only contains odd harmonics of an excitation waveform, the positive and negative waveforms are symmetrical up and down, and the detected currents Is + and Is-in the positive half period and the negative half period are equal, so that Us + Is Us-, and the amplitudes of the two half periods of the output waveform are the same. When the current flows through the primary side wire to be measured (Ip is not equal to 0), the ambient magnetic field is not zero (H)oNot equal to 0), the output induced electromotive force includes an excitation magnetic field HeInformation and ambient magnetic field HoAnd the ambient magnetic field HoIs an even harmonic of the frequency of the excitation signal in the frequency domain, in the positive half-cycle, HoAnd HeThe same direction, the magnetic core is saturated in advance after superposition, and in the negative half period, HoAnd HeThe directions are opposite, the magnetic core is subjected to hysteresis saturation after superposition, so that the waveform of the exciting current Iex is asymmetric, the amplitude of an output waveform is asymmetric, Us + is not equal to Us-, and the difference value | Us + Us- | of the amplitude and the measured current Ip are in a linear comparison relationship, so that the difference value of the induced electromotive force output of two half-cycles is measured, namely the current Ip of the measured wire can be calculated through a pulse amplitude detection method.
In some embodiments, the sampling resistor Rs converts the current measurement into a voltage measurement Us that is amplified by a signal amplification circuit; the signal amplification circuit comprises two operational Amplifiers (AMP) for two-stage amplification, wherein the amplification times are respectively 5 times and 10 times, when the internal current of 50A is measured, a signal Uout2 with the amplification times of 50 times is sampled in two stages, when the current of more than 50A is measured, an output signal Uout1 with the amplification time of 5 times in the first stage is sampled, and the main control unit performs automatic gear switching according to the measurement signal; the reference voltage reference circuit provides bias voltage for the positive pole of the operational amplifier, and measures induced electromotive force of the positive half period and the negative half period of the exciting coil under the condition of using a single power supply for power supply.
In some embodiments, the main control unit is configured to perform detection, current sampling, and data processing functions, and performs digital detection by software timing capture, two timer input capture ports of the MCU are respectively connected to an output of the excitation power supply comparator and the excitation coil, and trigger detection corresponding to a positive half cycle and a negative half cycle of an excitation sine wave, and after triggering, sampling pulse amplitudes Us + and Us-in the cycle by starting the ADC of the MCU, and performing digital filtering to remove an interference signal, where the pulse amplitude difference | Us + -Us- | is proportional to a magnetic field generated by a current to be detected, so that a current Ip passing through the magnetic ring can be detected by using the amplitude difference.
The beneficial effect of this application does: the fluxgate current sensor based on the pulse amplitude detection method of the self-oscillation magnetic circuit solves the problems of measurement precision and temperature drift of the traditional Hall current sensor, solves the problems of realization technology and cost of the fluxgate current sensor, and is a novel sensor which can be produced and applied in batches and can accurately measure direct current large current and small current. The circuit has the advantages of relatively simple structure, high precision, good linearity, wide frequency band, fast response, strong overload capacity, small temperature drift, high sensitivity, no magnetic leakage and no position deviation.
Drawings
In order to be clearer
The technical solutions in the embodiments of the present invention will be described in the following with reference to the accompanying drawings.
FIG. 1 is a schematic block diagram of an embodiment of the present invention;
FIG. 2 is a schematic flow diagram of an embodiment of the present invention;
FIG. 3 is a structural schematic of an embodiment of the present invention;
FIG. 4 is a hardware block diagram schematic of an embodiment of the invention;
FIG. 5 is a schematic diagram of the hardware of an embodiment of the invention;
FIG. 6 is a diagram of positive half-cycle pickup pulse capture according to an embodiment of the present invention;
FIG. 7 is a graph of a negative half cycle pickoff capture wave of an embodiment of the invention;
FIG. 8 is a graph of the measurement of the positive half cycle output pulse of an embodiment of the present invention;
fig. 9 is a graph of the measurement of the negative half cycle output pulse of an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1 to 9, a fluxgate digital current sensor based on a pulse amplitude detection method includes the following steps;
s1, powering on the system, initializing the software part and the hardware part and starting the operation;
s2, the exciting unit 102 self-oscillates to generate a sinusoidal exciting current with an angular frequency omega to form an exciting magnetic field HeThe magnetic core is magnetized to saturation in a reciprocating way, and the current Ip to be measured flows through the induction coil to generate an environmental magnetic field Ho;
s3, the signal processing unit 103 converts the current Is measured by the exciting coil in the step S2 into a measured voltage Us through a sampling resistor RS, and the measured voltage Us Is amplified and conditioned by an amplifying circuit and then Is sent to an ADC port of the main control unit 104;
s4, the main control unit 105 samples the voltage signals Us + and Us-in step S3 respectively in the positive half cycle and the negative half cycle of the sinusoidal excitation signal, according to the working principle of the pulse amplitude value counting method, when Ip has no current flowing, Us + is Us-, when Ip has current flowing, the difference between the sampling voltages in the positive half cycle and the negative half cycle, | Us + is Us- | is in linear relation with the current to be measured Ip, and calculates the current to be measured Ip;
s5, the master control unit 104 transmits the measurement data to the host device through the output unit 105, and repeats steps S4 to S5.
Specifically, the product structure of the embodiment of the invention as shown in fig. 3 comprises: the product comprises an upper product cover 301, a coil 302, a magnetic core sheath 303, a coil output terminal 304, a coil framework 305, a circuit board 306, an output terminal 307, a magnetic core 308, a product bottom cover 309 and an output connector 310.
The hardware schematic block diagram of the product of the embodiment of the invention is shown in fig. 4, and comprises five parts, namely a probe unit 101, an excitation unit 102, a signal processing unit 103, a main control unit 104 and an output unit 105.
The hardware part of the product of the embodiment of the invention is shown in a schematic diagram in fig. 5 and comprises an excitation unit 102 and a signal processing unit 103.
Further, as shown in fig. 5, the bridge driving circuit of the excitation unit 102 of this embodiment is composed of 4 MOS transistors U6 and U7, the feedback switch MOS transistor is MOS transistor Q2, the comparator circuit CMP is integrated inside the MCU, the reference voltage reference circuit is a reference source, the reference voltage is generated by the DAC inside the MCU to be 0.5V, and the generated excitation positive ripple has a frequency of 2.2 KHz.
Further, as shown in fig. 5, the signal processing unit 103 of this embodiment converts the current Is into a voltage Us measurement through a sampling resistor R16, the voltage reference circuit Is Q1, and provides a high-precision reference voltage of 2.048V, the signal amplification circuit Is U4, U4A Is 5 times amplified for the first stage, and U4B Is 10 times amplified for the second stage, so as to form signal measurements of two gears of 5 times and 50 times.
Further, in this embodiment, as shown in fig. 5, 501 is a system power supply input terminal for supplying power to the excitation driving circuit; 502 is an excitation feedback switch MOS source control end which is connected with an output port of an MCU internal voltage comparator; 503 is the positive pole of the voltage comparator inside the MCU and the negative pole of the 0.5V voltage comparator generated inside the MCU, and generates an excitation square wave of 2.2K; 504 is the reference detection of the amplifying circuit, and is connected with an ADC port of the MCU to monitor the validity of data; 505 is the software detection excitation coil negative half-cycle capture input, fig. 7 measured waveform; the measured waveform of FIG. 6 is captured at the input for 506 the positive half cycle of the software detection excitation coil; 507 and 508 are small current and large current signal amplification output ends which are connected with an ADC input port of the MCU.
Further, as shown in fig. 8 and fig. 9, fig. 8 shows a 508 signal output waveform when no current passes through the measuring wire (Ip ═ 0), and fig. 9 shows a 508 signal output waveform when a 20A current is applied to the measuring wire (Ip ═ 20A). From fig. 8 and fig. 9, it can be derived that when Ip ≠ 0, the pulse amplitudes of the output signals in the positive and negative half-cycles are the same, and when Ip ≠ 0, the pulse amplitudes of the output signals in the positive and negative half-cycles have a difference, which can be reflected as the value of the measured current Ip.
Further, the main control unit 104 of the embodiment adopts an automobile-grade 16-bit microcontroller MC9S12 series MCU with a built-in 12-bit ADC, a voltage comparator and a CAN bus.
Further, the output unit 105 of the present embodiment uses the car type fault protection CAN transceiver TCAN1051V to provide reliable hardware support for establishing communication between the MCU and the CAN host.