Compensation circuit for magnetic sensors and vehicle systems

By acquiring and processing temperature and stress signals to generate a compensation electrical signal, the sensitivity and temperature drift problems of magnetic sensors under temperature and stress changes are solved, thereby improving the detection accuracy and stability of magnetic sensors.

CN115752549BActive Publication Date: 2025-11-14SEMIMENT TECH (SHANGHAI) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211565019.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2025-11-14
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

Existing magnetic sensors exhibit changes in sensitivity and temperature drift coefficient when temperature and stress vary. Current compensation methods often sacrifice room temperature accuracy, making them difficult to effectively correct.

Method used

The system acquires signals using a temperature acquisition unit and a stress acquisition unit, processes the signals using an algorithm to generate a compensation electrical signal, uses a compensation adjustment unit to compensate the input current, and combines N-type and P-type diffusion resistor components to acquire stress signals. The system then uses a weighted sum difference algorithm to calculate the compensation electrical signal.

Benefits of technology

It achieves correction of the sensitivity and temperature drift coefficient of the magnetic sensor, improves detection accuracy, reduces magnetic sensitivity drift, and reduces the influence of stress offset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115752549B_ABST
    Figure CN115752549B_ABST
Patent Text Reader

Abstract

This invention provides a compensation circuit for a magnetic sensor and a vehicle system. The compensation circuit includes a temperature acquisition unit, a stress acquisition unit, a processing unit, and a compensation adjustment unit. The temperature acquisition unit acquires the temperature signal from the magnetic sensor. The stress acquisition unit acquires the stress signal from the magnetic sensor. The processing unit is electrically connected to the temperature and stress acquisition units and processes the temperature and stress signals to generate a compensation electrical signal. One end of the compensation adjustment unit is electrically connected to the processing unit, and the other end is electrically connected between the magnetic sensor and the power supply terminal. It compensates the input current to the magnetic sensor through the compensation electrical signal. The vehicle system includes the magnetic sensor compensation circuit. Thus, by acquiring the temperature and stress signals from the magnetic sensor and generating a compensation electrical signal after processing, the compensation adjustment unit compensates the input current of the magnetic sensor according to the compensation electrical signal, thereby improving the detection accuracy of the magnetic sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of magnetic sensor technology, and more specifically, to a compensation circuit for a magnetic sensor and a vehicle system. Background Technology

[0002] Magnetic sensors have a wide range of applications, including automotive systems, particularly for detecting the position of car seats and seat belts, controlling airbag systems and anti-lock braking systems (ABS), and detecting vehicle speed. A magnetic sensor consists of a Hall effect device and a control current IC. The Hall effect device is a magnetoelectric conversion device made of semiconductor material. When a control current IC is connected to the input of the Hall effect device, and a magnetic field B passes through the magnetic sensing surface of the Hall effect device, a Hall potential VH is generated at the output of the Hall effect device. The magnitude of the Hall potential VH is proportional to the product of the control current IC and the magnetic field B, as expressed by the formula: VH = KHICBsinX.

[0003] During normal operation, the sensitivity and temperature drift coefficient of a magnetic sensor will change. This is because the expansion or contraction of the substrate package on the Hall element causes stress changes, which in turn lead to variations in the sensor's sensitivity and temperature drift coefficient. These variations are related to the temperature change characteristics of the amplifier within the magnetic sensor.

[0004] In related technologies, magnetic sensors employ analog compensation correction methods by adjusting gain (i.e., sensitivity) and frequency to correct sensitivity and temperature drift coefficients. For example, using a variable-temperature resistor can cause a shift in sensitivity, but this often comes at the cost of sacrificing room-temperature accuracy. Therefore, a new type of magnetic sensor is needed to address these issues. Summary of the Invention

[0005] In view of the deficiencies in the prior art, the purpose of this invention is to provide a magnetic sensor temperature and stress compensation circuit.

[0006] A compensation circuit for a magnetic sensor according to the present invention is used for compensating the input current of the magnetic sensor, comprising:

[0007] Temperature acquisition unit is used to acquire temperature signals from the magnetic sensor;

[0008] The stress acquisition unit is used to acquire stress signals from the magnetic sensor.

[0009] The processing unit, electrically connected to the temperature acquisition unit and the stress acquisition unit, is used to perform algorithmic processing on the temperature signal and the stress signal to generate a compensation electrical signal; and

[0010] The compensation adjustment unit has one end electrically connected to the processing unit and the other end electrically connected between the magnetic sensor and the power supply terminal VCC for supplying power to the magnetic sensor. It is used to compensate the current input to the magnetic sensor through the compensation electrical signal.

[0011] Preferably, the stress acquisition unit includes an N-type diffusion resistor assembly and a P-type diffusion resistor assembly; one end of the N-type diffusion resistor assembly and one end of the P-type diffusion resistor assembly are selectively connected to the processing unit, and the other ends of the N-type diffusion resistor assembly and the other ends of the P-type diffusion resistor assembly are both grounded.

[0012] Preferably, the compensation circuit includes a first conversion unit and a second conversion unit, wherein the first conversion unit includes a first comparator COMP1 for performing analog-to-digital conversion on the temperature signal; and the second conversion unit includes a second comparator COMP2 for performing analog-to-digital conversion on the stress signal.

[0013] The first input terminal of the first comparator COMP1 is electrically connected to the temperature acquisition unit, and the output terminal of the first comparator COMP1 is electrically connected to the processing unit; the first input terminal of the second comparator COMP2 is electrically connected to the second input terminal of the first comparator COMP1 and the temperature acquisition unit, the second input terminal of the second comparator COMP2 selectively selects the N-type diffusion resistor component and the P-type diffusion resistor component, and the output terminal of the second comparator COMP2 is electrically connected to the processing unit.

[0014] Preferably, the N-type diffusion resistor assembly includes two n-type diffusion resistors connected in series, and the two n-type diffusion resistors are arranged perpendicularly to each other;

[0015] The P-type diffusion resistor includes two P-type diffusion resistors connected in series, and the two P-type diffusion resistors are arranged perpendicularly to each other.

[0016] Preferably, the compensation circuit includes a first comparator COMP1 and a second comparator COMP2; the processing unit includes an algorithm processing subunit and a programming control subunit electrically connected to the algorithm processing subunit; the algorithm processing subunit includes a weighting algorithm module and a difference algorithm module, wherein the input terminal of the weighting algorithm module is electrically connected to the output terminal of the first comparator COMP1 and the output terminal of the second comparator COMP2, respectively, and the output terminal of the weighting algorithm module is electrically connected to the input terminal of the difference algorithm module; the output terminal of the difference algorithm module is electrically connected to the compensation adjustment unit.

[0017] The weighting algorithm module performs weighted calculations on the temperature signal and the stress signal based on the weighting coefficient presets provided by the programming control subunit to generate a continuous-time signal. Furthermore, the difference algorithm module performs difference calculations on the continuous-time signal based on the temperature coefficient presets and stress coefficient presets provided by the programming control subunit to generate the compensation electrical signal.

[0018] Preferably, the compensation electrical signal includes a gain compensation electrical signal; the compensation adjustment unit includes a gain adjustment subunit electrically connected to the difference algorithm module, wherein the gain adjustment subunit compensates the input current to the magnetic sensor according to the gain compensation electrical signal.

[0019] Preferably, the compensation electrical signal includes a gain compensation electrical signal and an offset compensation electrical signal; the compensation adjustment unit includes a gain adjustment subunit and an offset adjustment subunit electrically connected to the difference algorithm module, wherein the gain adjustment subunit compensates the input current to the magnetic sensor according to the gain compensation electrical signal, and the offset adjustment subunit adjusts the output current of the magnetic sensor according to the offset compensation electrical signal.

[0020] Preferably, the compensation circuit further includes a third conversion unit and a fourth conversion unit; the third conversion unit is electrically connected between the difference algorithm module and the gain adjustment subunit, and is used to perform digital-to-analog conversion on the gain compensation electrical signal; the fourth conversion unit is electrically connected between the difference algorithm module and the offset adjustment subunit, and is used to perform digital-to-analog conversion on the offset compensation electrical signal.

[0021] Preferably, the difference algorithm module uses a piecewise linear difference algorithm to calculate the difference between the continuous time signals.

[0022] According to a vehicle system provided by the present invention, the vehicle system includes a magnetic sensor and a power supply terminal VCC electrically connected to the magnetic sensor, and further includes a compensation circuit electrically connected between the input terminal of the magnetic sensor and the power supply terminal VCC, for compensating the input current of the magnetic sensor.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] 1. This invention acquires the temperature signal of a magnetic sensor through a temperature sensor and the stress signal of a magnetic sensor through a stress sensor. The processing unit processes the temperature signal and the stress signal to obtain a compensation electrical signal. The compensation adjustment unit then compensates the input current to the magnetic sensor based on the compensation electrical signal, thereby correcting the sensitivity and temperature drift coefficient of the magnetic sensor and improving the detection accuracy of the magnetic sensor.

[0025] 2. This invention uses vertically distributed p-type diffusion resistors to generate a gap reference voltage that is proportional to mechanical stress and has smaller stress drift, resulting in lower stress deviation compared to commonly used n-type diffusion resistors or n-type polysilicon resistors. The method of compensating for the magnetic sensitivity drift of the stress sensor during packaging by using digital circuits to compensate for temperature and stress parameters can reduce the magnetic sensitivity drift by at least 2-3 times. Attached Figure Description

[0026] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0027] Figure 1 This is a partial block diagram of the vehicle system of the present invention;

[0028] Figure 2 This is another partial block diagram of the vehicle system of the present invention;

[0029] Figure 3 for Figure 2 The diagram shown is a partial circuit diagram of the compensation circuit for the magnetic sensor in the vehicle system of the present invention.

[0030] Explanation of reference numerals in the attached figures:

[0031] 1. Temperature acquisition unit 14. P-type diffusion resistor assembly

[0032] 2. Stress acquisition unit 15. Integrator

[0033] 3. Processing Unit 16, Bandgap Reference Source Module

[0034] 4. Compensation and adjustment unit 17. Magnetic sensor

[0035] 5. First conversion unit 100, compensation circuit

[0036] 6. Second conversion unit 300, algorithm processing subunit

[0037] 7. Programming Control Subunit 301, Weighted Algorithm Module

[0038] 8. Third conversion unit 302, interpolation algorithm module

[0039] 9. Fourth conversion unit 303, gain adjustment register

[0040] 10. Signal processing circuit 304, offset adjustment register

[0041] 11. First op-amp OTA 401, gain adjustment subunit

[0042] 12. Second op-amp OTA 402, offset adjustment subunit

[0043] 13. N-type diffusion resistor assembly Detailed Implementation

[0044] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0045] like Figure 1 As shown, the present invention provides a vehicle system, the vehicle system including a magnetic sensor 17 and a power supply terminal VCC electrically connected to the magnetic sensor 17, and further including a compensation circuit 100, the compensation circuit 100 being electrically connected between the input terminal of the magnetic sensor 17 and the power supply terminal VCC, for compensating the input current of the magnetic sensor 17.

[0046] Reference Figure 1 and Figure 2 As shown, the compensation circuit 100 includes:

[0047] Temperature acquisition unit 1 is used to acquire the temperature signal of magnetic sensor 17;

[0048] Stress acquisition unit 2 is used to acquire the packaging stress signal of magnetic sensor 17;

[0049] Processing unit 3 is electrically connected to the temperature acquisition unit 1 and the stress acquisition unit 2, and is used to perform algorithm processing on the temperature signal and the stress signal to generate a compensation electrical signal;

[0050] The compensation adjustment unit 4 has one end electrically connected to the processing unit 3 and the other end electrically connected between the magnetic sensor 17 and the power supply terminal for supplying power to the magnetic sensor 17, and is used to compensate the current input to the magnetic sensor 17 through the compensation electrical signal.

[0051] The magnetic sensor compensation circuit 100 provided by this invention acquires a temperature signal from the magnetic sensor 17 from a temperature acquisition unit 1 and a stress signal from the magnetic sensor 17 from a stress acquisition unit 2, wherein the stress signal is the packaging stress of the magnetic sensor 17. The temperature signal and stress signal are further input to a processing unit 3 and processed by an algorithm to generate a compensation electrical signal adapted to the temperature and stress. This compensation adjustment unit 4 then compensates the input current of the magnetic sensor 17 based on the compensation electrical signal, thereby correcting the sensitivity and temperature drift coefficient of the magnetic sensor and improving the accuracy of the detection signal output by the magnetic sensor. It should be noted that the compensation electrical signal in this embodiment can be a compensation current.

[0052] The composition and structure of each unit are further explained below:

[0053] like Figure 3 As shown, in some embodiments, the stress acquisition unit 2 includes an N-type diffusion resistor assembly 13 and a P-type diffusion resistor assembly 14. One end of the N-type diffusion resistor assembly 13 and one end of the P-type diffusion resistor assembly 14 are selectively connected to the processing unit 3, and the other ends of the N-type diffusion resistor assembly 13 and the P-type diffusion resistor assembly 14 are both grounded.

[0054] Existing technologies measure stress parameters using n-type polycrystalline silicon or n-type diffused resistors. These types of resistors or semiconductor devices have high piezoelectric Hall coefficients, and their measured values ​​exhibit significant sensitivity shifts as stress increases, affecting measurement accuracy. This technical solution uses N-type diffused resistor assembly 13 and P-type diffused resistor assembly 14 to collect the packaging stress of the magnetic sensor 17. When the packaging stress changes, the resistance values ​​of the N-type and P-type diffused resistor assemblies 13 and 14 change at different rates. The processing unit 3 acquires the resistance values ​​of these two resistor assemblies and calculates the difference. This difference reflects the stress change in the magnetic sensor 17, thus solving the sensitivity shift problem associated with using a single resistor to measure stress. Furthermore, the difference is used to calculate a compensation electrical signal, resulting in a more accurate compensation current output.

[0055] In some embodiments, the N-type diffusion resistor assembly 13 includes two n-type diffusion resistors connected in series, the two n-type diffusion resistors being arranged perpendicularly to each other; the P-type diffusion resistor includes two p-type diffusion resistors connected in series, the two p-type diffusion resistors being arranged perpendicularly to each other.

[0056] Both the N-type diffusion resistor assembly 13 and the P-type diffusion resistor assembly 14 use two diffusion resistors connected in series, and the two resistors are set perpendicular to each other, so that the collected stress signal can reflect the stress changes in multiple directions of the magnetic sensor 17, and can more comprehensively reflect the overall packaging stress changes of the magnetic sensor 17.

[0057] Combination Figure 1 , Figure 3 As shown, in some embodiments, the compensation circuit 100 includes a first conversion unit 5 and a second conversion unit 6, wherein the first conversion unit 5 includes a first comparator COMP1 for performing analog-to-digital conversion on the temperature signal; and the second conversion unit 6 includes a second comparator COMP2 for performing analog-to-digital conversion on the stress signal.

[0058] The first input terminal of the first comparator COMP1 is electrically connected to the temperature acquisition unit 1, and the output terminal of the first comparator COMP1 is electrically connected to the processing unit 3; the first input terminal of the second comparator COMP2 is electrically connected to the second input terminal of the first comparator COMP1 and the temperature acquisition unit 1, the second input terminal of the second comparator COMP2 selectively selects the N-type diffusion resistor component 13 and the P-type diffusion resistor component 14, and the output terminal of the second comparator COMP2 is electrically connected to the processing unit 3.

[0059] Temperature acquisition unit 1 provides reference current to the second input terminal of first comparator COMP1 and the first input terminal of second comparator COMP2. The first input terminal of first comparator COMP1 acquires the analog temperature signal of temperature acquisition unit 1, and the second input terminal of second comparator COMP2 acquires the analog stress signal of stress acquisition unit 2. Finally, after analog-to-digital conversion, the corresponding digital signal is generated and output to processing unit 3, thus realizing the acquisition and conversion of analog signals.

[0060] In some embodiments, the processing unit 3 includes an algorithm processing subunit 300 and a programming control subunit 7 electrically connected to the algorithm processing subunit 300; the algorithm processing subunit 300 includes a weighting algorithm module 301 and a difference algorithm module 302, wherein the input terminal of the weighting algorithm module 301 is electrically connected to the output terminal of the first comparator COMP1 and the output terminal of the second comparator COMP2, respectively, and the output terminal of the weighting algorithm module 301 is electrically connected to the input terminal of the difference algorithm module 302; the output terminal of the difference algorithm module 302 is electrically connected to the compensation adjustment unit 4. The weighting algorithm module 301 performs weighted calculations on the temperature signal and the stress signal according to the weighting coefficient preset values ​​provided by the programming control subunit 7 to generate a continuous-time signal, and the difference algorithm module 302 performs difference calculations on the continuous-time signal according to the temperature coefficient preset values ​​and stress coefficient preset values ​​provided by the programming control subunit 7 to generate the compensation electrical signal.

[0061] In this embodiment, the weighted algorithm module 301 performs weighted calculations on the temperature signal and the stress signal to generate a continuous-time signal. Specifically, the weighted algorithm module 301 multiplies the temperature signal code value input to the first comparator COMP1 and the stress signal code value input to the second comparator COMP2 by the corresponding weighting coefficient pre-values ​​using a multiplier unit, and then performs a summation operation to obtain a continuous-time signal associated with temperature and stress.

[0062] Further, the difference algorithm module 302 performs difference calculation on the continuous-time signal based on the temperature coefficient preset value and stress coefficient preset value provided by the programming control subunit 7, thereby generating the compensation electrical signal. Specifically, the difference algorithm module 302 includes a multiplier, which combines the temperature coefficient preset value and stress coefficient preset value to correct the weighted temperature and stress code values, obtaining the sensitivity signal of the magnetic sensor 17 at all temperatures, which is one type of compensation electrical signal.

[0063] By weighting and subtracting the temperature and stress signals, subsequent digital logic resources are saved, thereby reducing the area occupied by the compensation circuit 100 and facilitating the deployment of other components.

[0064] In some embodiments, the difference algorithm module 302 includes a multiplier and an adder. The multiplier combines the temperature coefficient preset and the stress coefficient preset to correct the weighted temperature and stress code values, thereby obtaining the sensitivity signal of the magnetic sensor 17 at all temperatures. The adder combines the weighting coefficient preset to correct the offset amount, thereby generating the final offset signal, which is one of the compensation electrical signals. The offset signal is used to adjust and compensate the magnetic sensor 17.

[0065] In some embodiments, the difference algorithm module 302 employs a piecewise linear difference algorithm to calculate the difference between the continuous-time signals. This results in more accurate sensitivity and offset signals acquired by the magnetic sensor 17 across the entire temperature range.

[0066] In some embodiments, the compensation electrical signal includes a gain compensation electrical signal, and the compensation adjustment unit 4 includes a gain adjustment subunit 401 electrically connected to the difference algorithm module 302, wherein the gain adjustment subunit 401 compensates the input current input to the magnetic sensor 17 according to the gain compensation electrical signal.

[0067] The gain compensation electrical signal is generated based on the sensitivity signal of the processing unit 3. The gain adjustment subunit 401 generates a compensation current based on the gain compensation electrical signal, thereby compensating for the input current of the magnetic sensor 17.

[0068] The compensation electrical signal also includes an offset compensation electrical signal; the compensation adjustment unit 4 further includes an offset adjustment subunit 402 electrically connected to the difference algorithm module 302, the offset adjustment subunit 402 adjusting the output current of the magnetic sensor 17 according to the offset compensation electrical signal. The offset compensation electrical signal is generated based on the offset signal, and the offset compensation electrical signal is converted from digital to analog to obtain an offset compensation analog signal. The compensated output signal of the magnetic sensor 17 is amplified by the first operational amplifier OTA11, filtered and denoised by the signal processing circuit 10, and added to the offset compensation analog signal by the adder 18. After addition, it is amplified again by the second operational amplifier OTA12, finally obtaining a high-precision, low-temperature drift Hall output signal.

[0069] In some embodiments, the processing unit 3 further includes a gain adjustment register 303 and an offset adjustment register 304. The input terminals of the gain adjustment register 303 and the offset adjustment register 304 are electrically connected to the output terminals of the difference algorithm module 302. The output terminal of the gain adjustment register 303 is electrically connected to the input terminal of the gain adjustment subunit 401 and is used to store the gain compensation electrical signal. The output terminal of the offset adjustment register 304 is electrically connected to the input terminal of the offset adjustment subunit 402 and is used to store the offset compensation electrical signal.

[0070] In some embodiments, the compensation circuit 100 further includes a third conversion unit 8 and a fourth conversion unit 9; the third conversion unit 8 is electrically connected between the difference algorithm module 302 and the gain adjustment subunit 401, that is, electrically connected between the gain adjustment register 303 and the gain adjustment subunit 401, and is used to perform digital-to-analog conversion on the gain compensation electrical signal. The fourth conversion unit 9 is electrically connected between the difference algorithm module 302 and the offset adjustment subunit 402, that is, electrically connected between the offset adjustment register 304 and the offset adjustment subunit 402, and is used to perform digital-to-analog conversion on the offset compensation electrical signal.

[0071] The third conversion unit 8 and the fourth conversion unit 9 convert the digital gain compensation electrical signal and offset compensation electrical signal into corresponding analog signals, respectively, so that the gain adjustment subunit 401 and the offset adjustment subunit 402 can complete the adjustment according to the analog signals.

[0072] like Figure 3As shown, in some embodiments, the temperature acquisition unit 1 includes a bandgap reference source module 16 and an integrator 15; the bandgap reference source module 16 includes PMOS transistors M1, M2, M3, M4, M5, and M6, resistors R1, R2, R3, R4, R5, and R6, NPN transistors N1, NPN transistors N2, NPN transistors N3, NPN transistors N4, NPN transistors N5, NPN transistors N6, PNP transistors N7 and NNP transistors N8, and current mirrors I1, I2, I3, I4, I5, I6, and I7.

[0073] The sources of PMOS transistors M1, M2, and M3 are connected to VDD. The drain of PMOS transistor M1 is connected to the collector of NPN transistor N1. The drain of PMOS transistor M2 is connected to the collector of NPN transistor N2. The drain of PMOS transistor M3 is connected to the collector of NPN transistor N3. The gate of PMOS transistor M1 is connected to the collector of NPN transistor N2. The gate of PMOS transistor M2 is connected to the gate of PMOS transistor M3. The gate and drain of PMOS transistor M3 are shorted. The bases of NPN transistors N1, NPN transistor N2, and NPN transistor N3 are connected together. The emitters of NPN transistors N1 and NPN transistor N3 are grounded. One end of NPN transistor N2 is connected to one end of resistor R1, and the other end of resistor R1 is grounded.

[0074] The sources of PMOS transistors M4, M5, and M6 are all electrically connected to VDD. The drain of PMOS transistor M4 is electrically connected to the collector of NPN transistor N4, the drain of PMOS transistor M5 is electrically connected to the collector of NPN transistor N5, and the drain of PMOS transistor M6 is electrically connected to the collector of NPN transistor N6. The gates of PMOS transistors M4, M5, and M6 are electrically connected. The gates and drains of PMOS transistor M5 and PMOS transistor M6 are short-circuited.

[0075] The bases of NPN transistors N4, NPN transistor N5, and NPN transistor N6 are electrically connected. The collector of NPN transistor N6 is shorted to its base. The emitter of NPN transistor N4 is connected to the emitter of PNP transistor N7. The base and collector of PNP transistor N7 are grounded. The emitter of NPN transistor N5 is connected to one end of resistor R2, and the other end of resistor R2 is grounded. The emitter of NPN transistor N6 is connected to the emitter of PNP transistor N8. The base and collector of PNP transistor N8 are grounded.

[0076] The input terminals of current mirrors I1, I2, I3, I4, I5, I6, and I7 are connected to VDD. The gates of current mirrors I1, I2, I3, I4, I5, I6, and I7 are electrically connected, and are also electrically connected to the gates of PMOS transistors M3 and M4.

[0077] The output terminal of current mirror I1 is electrically connected to one end of resistor R6 and to the reference voltage terminal Vbais. The other end of resistor R6 is grounded. The output terminals of current mirrors I2 and I5 are summed and connected to one end of resistor R3, the other end of which is grounded. The output terminals of current mirrors I3 and I6 are summed and connected to one end of resistor R4, the other end of which is grounded. The output terminals of current mirrors I4 and I7 are summed and connected to one end of resistor R5, the other end of which is grounded. One end of resistor R4 or one end of resistor R5 is selectively energized and connected to the input terminal of integrator 15.

[0078] The working principle of the bandgap reference source module 16 includes: the NPN transistor N2, NPN transistor N3, and resistor R1 are connected by the formula (V be3 -V be2 The positive temperature coefficient current is obtained by ) / R1. The NPN transistors N4 and N5, the PNP transistor N7, and the resistor R2 are obtained by formula V. be5 The negative temperature coefficient current is obtained from R2. The positive temperature coefficient current plus the negative temperature coefficient current is biased by current mirrors I1, I2, I3, I4, I5, I6, and I7. The outputs of current mirrors I2 and I5 are added together to output a zero temperature coefficient current. The outputs of current mirrors I3 and I6 are added together to output a positive temperature coefficient current, and the outputs of current mirrors I4 and I7 are added together to output a negative temperature coefficient current. The positive and negative temperature coefficient currents are processed by integrator 15 to generate a temperature signal from magnetic sensor 17. One end of the zero temperature coefficient current output resistor R3 is electrically connected to the second input terminal of the first comparator COMP1 and the first input terminal of the second comparator COMP2, respectively, to output reference currents to the first comparator COMP1 and the second comparator COMP2.

[0079] The integrator 15 is electrically connected to the signal processing unit 3 and receives the integration control signal. The comparator 15 inputs the voltage of resistor R4 to the inverting input of the integrator 15 and maintains it for a constant time period (timed rise); then it inputs the voltage of resistor R5 to the inverting input of the integrator 15, continuing this process until the output of the integrator 15 (timed fall) is lower than the voltage of resistor R3, at which point the comparator flips. The ratio of the rise time to the fall time is a temperature-related information, which is the temperature signal from the sensor.

[0080] In some embodiments, the gain adjustment subunit 401 includes a current mirror I8, a current mirror I9, and a current mirror I10. The gates of the current mirrors I8, I9, and I10 are connected to the output terminal of the third conversion unit 8. The input terminals of the current mirrors I8, I9, and I10 are connected to VCC. The output terminal of the current mirror I8 is electrically connected to one end of the N-type diffusion resistor assembly 13. The output terminal of the current mirror I10 is electrically connected to one end of the P-type diffusion resistor assembly 14. The output terminal of the current mirror I10 is electrically connected between the magnetic sensor 17 and the power supply terminal VCC for supplying power to the magnetic sensor 17, thereby compensating for the input current of the magnetic sensor 17.

[0081] The current mirrors I8 and I10 supply power to the N-type diffusion resistor assembly 13 and the P-type diffusion resistor assembly 14, respectively. By adjusting the current in the current mirrors I8 and I10, the voltage of the N-type diffusion resistor assembly 13 and the P-type diffusion resistor assembly 14 is changed. According to Ohm's law, the resistance values ​​of the N-type diffusion resistor assembly 13 and the P-type diffusion resistor assembly 14 can be obtained. In this embodiment, the current mirror is a current-type DAC.

[0082] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A compensation circuit for a magnetic sensor, used for compensating the input current of a magnetic sensor (17), characterized in that, include: Temperature acquisition unit (1) is used to acquire temperature signals from magnetic sensor (17); The stress acquisition unit (2) is used to acquire the stress signal of the magnetic sensor (17); The processing unit (3) is electrically connected to the temperature acquisition unit (1) and the stress acquisition unit (2), and is used to perform algorithmic processing on the temperature signal and the stress signal to generate a compensation electrical signal; and The compensation adjustment unit (4) is electrically connected at one end to the processing unit (3) and at the other end to the magnetic sensor (17) and the power supply terminal VCC for supplying power to the magnetic sensor (17), and is used to compensate the current input to the magnetic sensor (17) through the compensation electrical signal. The compensation electrical signal includes a gain compensation electrical signal and an offset compensation electrical signal; the compensation adjustment unit (4) includes a gain adjustment subunit (401) and an offset adjustment subunit (402), wherein the gain adjustment subunit (401) compensates the input current to the magnetic sensor (17) according to the gain compensation electrical signal, and the offset adjustment subunit (402) adjusts the output current of the magnetic sensor (17) according to the offset compensation electrical signal; The stress acquisition unit (2) includes an N-type diffusion resistor assembly (13) and a P-type diffusion resistor assembly (14); one end of the N-type diffusion resistor assembly (13) and one end of the P-type diffusion resistor assembly (14) are selectively connected to the processing unit (3), and the other end of the N-type diffusion resistor assembly (13) and the other end of the P-type diffusion resistor assembly (14) are both grounded.

2. The compensation circuit for the magnetic sensor according to claim 1, characterized in that, The compensation circuit (100) includes a first conversion unit (5) and a second conversion unit (6), wherein the first conversion unit (5) includes a first comparator COMP1 for performing analog-to-digital conversion on the temperature signal; and the second conversion unit (6) includes a second comparator COMP2 for performing analog-to-digital conversion on the stress signal. The first input terminal of the first comparator COMP1 is electrically connected to the temperature acquisition unit (1), and the output terminal of the first comparator COMP1 is electrically connected to the processing unit (3); the first input terminal of the second comparator COMP2 is electrically connected to the second input terminal of the first comparator COMP1 and the temperature acquisition unit (1), the second input terminal of the second comparator COMP2 selectively selects the N-type diffusion resistor component (13) and the P-type diffusion resistor component (14), and the output terminal of the second comparator COMP2 is electrically connected to the processing unit (3).

3. The compensation circuit for the magnetic sensor according to claim 1, characterized in that: The N-type diffusion resistor assembly (13) includes two n-type diffusion resistors connected in series, and the two n-type diffusion resistors are arranged perpendicular to each other; The P-type diffusion resistor (14) includes two p-type diffusion resistors connected in series, and the two p-type diffusion resistors are arranged perpendicular to each other.

4. The compensation circuit for the magnetic sensor according to claim 1, characterized in that, The compensation circuit (100) includes a first comparator COMP1 and a second comparator COMP2; the processing unit (3) includes an algorithm processing subunit (300) and a programming control subunit (7) electrically connected to the algorithm processing subunit (300); the algorithm processing subunit (300) includes a weighting algorithm module (301) and a difference algorithm module (302), wherein the input terminal of the weighting algorithm module (301) is electrically connected to the output terminal of the first comparator COMP1 and the output terminal of the second comparator COMP2, respectively, and the output terminal of the weighting algorithm module (301) is electrically connected to the input terminal of the difference algorithm module (302); the output terminal of the difference algorithm module (302) is electrically connected to the compensation adjustment unit (4). The weighting algorithm module (301) performs weighted calculations on the temperature signal and the stress signal based on the weighting coefficient pre-values ​​provided by the programming control subunit (7) to generate a continuous time signal. Furthermore, the difference algorithm module (302) performs difference calculations on the continuous time signal based on the temperature coefficient pre-values ​​and stress coefficient pre-values ​​provided by the programming control subunit (7) to generate the compensation electrical signal.

5. The compensation circuit for the magnetic sensor according to claim 4, characterized in that, The compensation circuit (100) further includes a third conversion unit (8) and a fourth conversion unit (9); the third conversion unit (8) is electrically connected between the difference algorithm module (302) and the gain adjustment subunit (401) and is used to perform digital-to-analog conversion on the gain compensation electrical signal; the fourth conversion unit (9) is electrically connected between the difference algorithm module (302) and the offset adjustment subunit (402) and is used to perform digital-to-analog conversion on the offset compensation electrical signal.

6. The compensation circuit for the magnetic sensor according to claim 4, characterized in that, The difference algorithm module (302) uses a piecewise linear difference algorithm to calculate the difference of the continuous time signal.

7. A vehicle system comprising a magnetic sensor (17) and a power supply terminal VCC electrically connected to the magnetic sensor (17), characterized in that, It also includes a compensation circuit (100) as described in any one of claims 1-6, the compensation circuit (100) being electrically connected between the input terminal of the magnetic sensor (17) and the power supply terminal VCC, for compensating the input current of the magnetic sensor (17).

Citation Information

Patent Citations

  • Vertical hall sensor circuit comprising stress compensation circuit

    US20140009221A1