Sensor amplification circuit, sensor system, and sensor amplification circuit calibration method
Patent Information
- Application Number
- JP2024549359
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-25
- Filing Date
- 2023-09-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-09-25
AI Technical Summary
Conventional sensor amplifier circuits always perform linearity correction on the output signal of magnetic sensors, regardless of necessity, leading to slow response speed and increased errors, especially in low magnetic field regions where nonlinearity is small.
A sensor amplifier circuit that includes a nonlinear correction circuit which only operates in high magnetic field regions, switching between states to correct nonlinear distortion, thereby improving linearity while maintaining high responsiveness by not performing unnecessary corrections in low magnetic field regions.
The solution enhances linearity correction in high magnetic field regions while ensuring high responsiveness and reducing errors in low magnetic field regions, expanding the dynamic range of the magnetic sensor circuit.
Smart Images

Figure 2024071016000001
Abstract
Description
Sensor amplifier circuit, sensor system, and method for calibrating a sensor amplifier circuit
[0001] The present disclosure relates to a sensor amplifier circuit, and more particularly to a sensor amplifier circuit for amplifying an output signal of a magnetic sensor circuit, a sensor system, and a method for calibrating the sensor amplifier circuit.
[0002] The magnetic elements that make up the magnetic sensor circuit have hysteresis and nonlinear characteristics, so the sensor amplifier circuit that amplifies the output signal of the magnetic sensor circuit is required to have the function of correcting the output signal of the magnetic sensor circuit and improving its linearity.
[0003] Japanese Patent Application Laid-Open Publication No. 2015-212634 (Patent Document 1) discloses a magnetic sensor configured to calculate magnetic flux density from the output voltage of a magnetic detection element, and to calculate and output a voltage that has a linear relationship with the calculated magnetic flux density.
[0004] Japanese Patent Application Laid-Open Publication No. 2018-115928 (Patent Document 2) discloses a signal correction method for a current sensor, which includes a step of correcting a newly acquired differential output voltage so that it is approximately linear with respect to the magnetic field to be measured using a plurality of calculated fitting coefficients, and acquiring a corrected output voltage.
[0005] JP 2015-212634 A JP 2018-115928 A
[0006] Depending on the magnitude of the magnetic field input to the magnetic sensor circuit, the nonlinear distortion occurring in the output of the magnetic sensor circuit may be small. In such cases, the sensor amplifier circuit does not necessarily need to perform processing to correct the nonlinear distortion. However, conventional sensor amplifier circuits always perform processing to correct the nonlinear distortion in the output signal of the magnetic sensor circuit, regardless of whether or not it is necessary to correct the nonlinear distortion. This has resulted in problems such as a slow response speed of the sensor amplifier circuit.
[0007] The present disclosure has been made to solve such problems, and its purpose is to improve linearity while ensuring high responsiveness in a sensor amplifier circuit for amplifying the output of a magnetic sensor circuit.
[0008] The sensor amplifier circuit of the present disclosure is a sensor amplifier circuit for amplifying an output signal from a magnetic sensor circuit, and includes a first operational amplifier that amplifies the output signal from the magnetic sensor circuit and a correction circuit that corrects nonlinear distortion contained in the output signal, wherein the magnetic sensor circuit outputs a first signal having a magnitude corresponding to a magnetic field of a first range in a first magnetic field region where a magnetic field of a first range is applied, and outputs a second signal having a magnitude corresponding to a magnetic field of a second range in a second magnetic field region where a magnetic field of a second range larger than the magnetic field of the first range is applied, and the correction circuit is configured to switch from a first state that does not correct the nonlinear distortion contained in the output signal to a second state that corrects the nonlinear distortion contained in the output signal, and the correction circuit switches from the first state to the second state when the output signal from the magnetic sensor circuit changes from the first signal to the second signal.
[0009] The sensor amplifier circuit according to the present disclosure can improve linearity while ensuring high responsiveness.
[0010] 1 is a schematic configuration diagram of a sensor system using a sensor amplifier circuit according to the present embodiment; FIG. 2 is a diagram showing the relationship between a waveform showing the characteristics of the output voltage of a magnetic sensor circuit relative to a magnetic field and a first approximate straight line; FIG. 3 is a diagram for explaining the relationship between magnetic field regions (high magnetic field region and low magnetic field region) and the presence or absence of linearity correction; FIG. 4 is a diagram showing the waveform of a linearity error; FIG. 5 is a diagram showing the relationship between a waveform showing the characteristics of the output voltage of a magnetic sensor circuit relative to a magnetic field and a first approximate straight line and a second approximate straight line; FIG. 6 is a block diagram showing the configuration of a control device used for calibrating a sensor amplifier circuit;
[0011] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference numerals, and description thereof will not be repeated.
[0012] 1 is a schematic configuration diagram of a sensor system 10 using a sensor amplifier circuit 100 according to the present embodiment. Referring to FIG. 1, the sensor system 10 includes a magnetic sensor circuit 50 and the sensor amplifier circuit 100.
[0013] The magnetic sensor circuit 50 has a configuration in which four sensor elements 51 to 54 are bridge-connected. In the example of Fig. 1, each of the sensor elements 51 to 54 is a tunneling magnetoresistive (TMR) element, and is a magnetic sensor whose resistance value changes in response to the detected magnetic field. By using TMR elements as the sensor elements 51 to 54, it is possible to provide the sensor system 10 with a highly sensitive and highly accurate sensing function.
[0014] Note that, as long as the resistance value of the element changes in response to the physical quantity to be detected, other resistance elements may be used as the sensor elements 51 to 54. For example, instead of the TMR elements, giant magneto-resistance (GMR) elements, anisotropic magneto-resistance (AMR) elements, or the like may be employed.
[0015] The sensor elements 51 and 52 are connected in series between a pair of power supply terminals 5a and 5b. The sensor elements 53 and 54 are also connected in series between the pair of power supply terminals 5a and 5b. The magnetic sensor circuit 50 operates when a predetermined voltage is applied to the power supply terminals 5a and 5b, and generates a voltage difference between a pair of signal output terminals 5c and 5d in response to the detected magnetic field. The signal output terminal 5c is a connection node between the sensor elements 51 and 52, and the signal output terminal 5d is a connection node between the sensor elements 53 and 54.
[0016] The signal output terminals 5c and 5d are connected to the input terminals T1 and T2, respectively, of the sensor amplifier circuit 100. That is, the differential voltage between the pair of output signals of the magnetic sensor circuit 50 is provided as an input to the sensor amplifier circuit 100.
[0017] In addition to input terminals T1 and T2, sensor amplifier circuit 100 includes output terminal T3, operational amplifiers 111 and 112, correction circuit 150, readout circuit 120, and non-volatile memory 130. Readout circuit 120 is configured, for example, by an analog circuit. Non-volatile memory 130 is configured, for example, by a read-only memory (ROM) or a flash memory.
[0018] The non-inverting input terminal and the inverting input terminal of the operational amplifier 111 are connected to the input terminals T1 and T2, respectively. A pair of output signals from the magnetic sensor circuit 50 are input to the non-inverting input terminal and the inverting input terminal of the operational amplifier 111. An offset adjustment voltage V1 is applied to the operational amplifier 111. The output terminal of the operational amplifier 111 is connected to the inverting input terminal of the operational amplifier 112. An offset adjustment voltage V2 is applied to the inverting input terminal of the operational amplifier 112. The output terminal of the operational amplifier 112 is connected to the output terminal T3 of the sensor amplifier circuit 100. A resistor Ry is connected between the inverting input terminal and the output terminal of the operational amplifier 112 to determine the reference amplification factor of the operational amplifier 112.
[0019] The output terminal of the operational amplifier 111 is connected to a node N1. The inverting input terminal of the operational amplifier 112 is connected to a node N2. A resistor Rx is connected between the nodes N1 and N2.
[0020] The correction circuit 150 includes comparators 161 to 16n, resistors R1 to Rn, and switches SW1 to SWn.
[0021] The inverting input terminals of the comparators 161 to 16n are connected to the output terminal of the operational amplifier 111 at a node N1. Reference voltages Vr1 to Vrn are applied to the non-inverting input terminals of the comparators 161 to 16n, respectively. The switches SW1 to SWn are turned on and off according to the on and off states of the outputs of the comparators 161 to 16n, respectively.
[0022] The switches SW1 to SWn are each disposed between a node N2 and a node N3, and the resistors R1 to Rn are each connected between the switches SW1 to SWn and the node N2.
[0023] The operational amplifier 111 uses a preset gain (amplification factor) to amplify the output signal from the magnetic sensor circuit 50. The operational amplifier 111 performs offset adjustment on the output signal from the magnetic sensor circuit 50 using an offset setting value determined based on the voltage V1. The output signal from the operational amplifier 111 is output from an output terminal T3 via an operational amplifier 112.
[0024] The sensor amplifier circuit 100 corrects nonlinear distortion of the signal using the correction circuit 150. This nonlinear distortion is caused by the output characteristics of the magnetic sensor circuit 50. The output signal from the operational amplifier 111 is affected by the nonlinear distortion caused by the output characteristics of the magnetic sensor circuit 50, and therefore has nonlinear distortion. The correction circuit 150 corrects such nonlinear distortion. Hereinafter, correcting nonlinear distortion is also referred to as "linearity correction." The correction circuit 150 switches between a first state in which linearity correction is not performed and a second state in which linearity correction is performed, depending on the magnitude of the output signal from the operational amplifier 111.
[0025] The values of reference voltages Vr1 to Vrn used in correction circuit 150 satisfy the relationship Vr1<Vr2< ... <Vrn. Nonvolatile memory 130 stores the values of reference voltages Vr1 to Vrn for each of the corresponding comparators 161 to 16n. The values of reference voltages Vr1 to Vrn stored in nonvolatile memory 130 are an example of various set values. Readout circuit 120 reads the values of reference voltages Vr1 to Vrn from nonvolatile memory 130 and sets the read values in the corresponding comparators 161 to 16n.
[0026] When the output of the operational amplifier 111 exceeds the reference voltage Vr1, the comparator 161 switches the switch SW1 from off to on. This forms a first negative feedback circuit that returns from the output terminal of the operational amplifier 112 to the input terminal of the operational amplifier 112 via the switch SW1 and the resistor R1. The correction circuit 150 corrects the output signal of the operational amplifier 111 using a gain determined by the resistor R1. As a result, nonlinear distortion in the output signal of the magnetic sensor circuit 50 is corrected.
[0027] When the output of the operational amplifier 111 exceeds the reference voltage Vr2, the comparator 162 switches the switch SW2 from off to on. This forms a loop of a second negative feedback circuit that returns from the output terminal of the operational amplifier 112 to the input terminal of the operational amplifier 112 via the switch SW2 and the resistor R2, in addition to the first negative feedback circuit. This also switches the magnitude of the gain of the correction circuit 150 used for linearity correction.
[0028] When the output of the operational amplifier 111 exceeds the reference voltage Vrn, the comparator 16n switches the switch SWn from off to on. This forms a loop including the first negative feedback circuit, the second negative feedback circuit, and so on, as well as an nth negative feedback circuit that returns from the output terminal of the operational amplifier 112 to the input terminal of the operational amplifier 112 via the switch SWn and the resistor R2. This also switches the magnitude of the gain of the correction circuit 150 used for linearity correction.
[0029] Therefore, as the output signal of the operational amplifier 111 increases, the feedback signal returning from the output terminal of the operational amplifier 112 to the input terminal via the negative feedback circuit of the operational amplifier 112 increases, and the amount of correction used for linearity correction increases.
[0030] In this way, by setting the reference voltages Vr1 to Vrn to different values, it is possible to set multiple correction points in the correction circuit 150. The more correction points there are, the more finely the linearity can be adjusted. By finely adjusting the linearity, it is possible to bring the output of the operational amplifier 111 closer to the target characteristics.
[0031] When the output of the operational amplifier 111 is equal to or lower than the reference voltage Vr1, the outputs of all the comparators 161 to 16n are turned off. At this time, the negative feedback circuit of the operational amplifier 112 is opened, and no correction is performed by the correction circuit 150.
[0032] 1 shows an example of the correction circuit 150 configured by connecting the following components in parallel: "switch SW1, resistor R1," "switch SW2, resistor R2," ... "switch SWn, resistor Rn." However, the correction circuit 150 may also be configured such that these components are connected in series and a signal for turning on and off the switch is input to the switch of each component.
[0033] (Linearity Correction) Next, linearity correction according to this embodiment will be described with reference to Fig. 2 and Fig. 3. Fig. 2 is a diagram showing the relationship between a waveform W1 indicating the characteristics of the output voltage of the magnetic sensor circuit 50 with respect to a magnetic field and a first approximate line L1. Fig. 3 is a diagram for explaining the relationship between magnetic field regions (high magnetic field region and low magnetic field region) and whether or not linearity correction is performed.
[0034] As shown by waveform W1 in FIG. 2, the output of the magnetic sensor circuit 50 has hysteresis and nonlinear characteristics. This waveform W1 is obtained by measuring the output voltage of the magnetic sensor circuit 50 while changing the magnitude of the magnetic field. A first approximate straight line L1 is a line that represents the ideal output characteristic of the magnetic sensor circuit 50 with respect to the magnetic field. By using the measurement results of the output voltage of the magnetic sensor circuit 50 with respect to the magnetic field, a linear function for drawing such an ideal straight line can be calculated. In particular, the first approximate straight line L1 is derived using all measurement results in the magnetic field range (-N to +N) (mT: millitesla).
[0035] If the output from the magnetic sensor circuit 50 is corrected based on the first approximate straight line L1, the error between the first approximate straight line L1 and the output of the magnetic sensor circuit 50 will be large in the portion of the waveform W1 indicated by the circle F1. If this problem is solved by not using the curved portion where the error is large, the dynamic range of the magnetic sensor circuit 50 that can be used as a sensor will be narrowed.
[0036] Generally, there may be a magnetic field range in which the error between the output signal from the magnetic sensor circuit and the approximation line is small. For example, in a low magnetic field range where the absolute value of the magnetic field is within a certain range, the error is small. If the output signal is subjected to linearity correction, including in such a low magnetic field range, not only will the response speed of the sensor amplifier circuit decrease, but the error will actually increase.
[0037] Therefore, as shown in Figure 3, the sensor amplifier circuit 100 is configured so that, within the magnetic field range of -N to +N that is the target of sensing by the magnetic sensor circuit 50, the correction circuit 150 does not operate in the magnetic field range of the low magnetic field region (-B ≦ magnetic field ≦ +A), and the correction circuit 150 operates in the magnetic field range of the high magnetic field region (-N ≦ magnetic field < -B, +A < magnetic field ≦ +N).
[0038] As shown in Figure 3, in high magnetic field regions, the nonlinearity of the waveform W1 increases due to the influence of the characteristics of the magnetic sensor circuit 50. In other words, in high magnetic field regions, the linearity of the magnetic sensor circuit 50 deteriorates. The gain setting value and offset setting value of the operational amplifier 111 are calculated based on the second approximate line L2. The second approximate line L2 is derived using the measurement results of the output voltage of the magnetic sensor circuit 50 in low magnetic field regions. Therefore, in low magnetic field regions, the error between the output of the magnetic sensor circuit 50 and the output of the operational amplifier 111 is small, but in high magnetic field regions, the error between the output of the magnetic sensor circuit 50 and the output of the operational amplifier 111 is large.
[0039] Therefore, in the high magnetic field region, the sensor amplifier circuit 100 corrects the linearity by operating the correction circuit 150. As a result, the sensor amplifier circuit 100 makes the output characteristics of the operational amplifier 111 approach the second approximate straight line L2, which is an ideal straight line.
[0040] 1 and 3, the linearity correction of the sensor amplifier circuit 100 will be further described. Note that, to obtain the waveform W1 as shown in FIGS. 2 and 3, the output voltage of the magnetic sensor circuit 50 may be measured, or the output of the sensor system 10 including the magnetic sensor circuit 50 and the sensor amplifier circuit 100 ("OUT" of the output terminal T3) may be measured.
[0041] The operational amplifier 111 performs gain correction and offset adjustment so that the output signal from the magnetic sensor circuit 50 follows the second approximate line L2. A voltage corresponding to the boundary value between the magnetic field range of the low magnetic field region and the magnetic field range of the high magnetic field region is applied to the comparator 161 as a reference voltage Vr1. In the low magnetic field region, the switches SW1 to SWn of the correction circuit 150 are turned off. Therefore, in the low magnetic field region, the output signal of the operational amplifier 111 is not corrected by the correction circuit 150 and is input to the output terminal T3 via the operational amplifier 112.
[0042] In a high magnetic field region, at least one of the switches SW1 to SWn of the correction circuit 150 is turned on. Therefore, in a high magnetic field region, the output signal of the operational amplifier 111 is corrected by the correction circuit 150 and then input to the output terminal T3 via the operational amplifier 112.
[0043] In the correction circuit 150, each time the output voltage of the operational amplifier 111 reaches a predetermined reference voltage set in each of the comparators 161 to 16n, each of the switches SW1 to SWn is turned on. This applies an offset in a direction that decreases the output voltage of the operational amplifier 111. As a result, in the high magnetic field region, the output voltage of the operational amplifier 111 changes stepwise at each correction point so as to follow an ideal linear output (second approximate straight line L2). In Figure 3, the zigzag line in the high magnetic field region represents the stepwise change in the output voltage of the operational amplifier 111 at each correction point.
[0044] In this way, when the output voltage of the operational amplifier 111 is a voltage corresponding to a low magnetic field region, the correction circuit 150 turns off all of the switches SW1 to SWn and does not perform linearity correction. At this time, the sensor amplifier circuit 100 simply amplifies the output voltage from the magnetic sensor circuit 50 in the operational amplifier 111 with a gain that matches the full scale required for the sensor. When the output of the operational amplifier 111 is a voltage corresponding to a high magnetic field region, the correction circuit 150 automatically switches the magnitude of the gain for linearity correction. This automatically adjusts the gain at each correction point.
[0045] To improve the sensor detection accuracy through linearity correction, it is necessary to provide more correction points and perform more precise linearity correction. However, in this case, it is necessary to increase the number of comparators 161 to 16n. Increasing the number of comparators 161 to 16n increases the circuit size, which can hinder the miniaturization of the entire device. Therefore, the number of comparators 161 to 16n is appropriately selected taking into consideration the required sensor detection accuracy and the allowable size of the sensor amplifier circuit 100.
[0046] (Calibration Procedure) Next, the calibration procedure for the sensor amplifier circuit 100 will be described using Figures 4 and 5. More specifically, the procedure for determining the magnetic field range of the magnetic field region, the magnetic field range of the high magnetic field region, and the second approximate line L2 will be described. Figure 4 is a diagram showing a waveform W2 of the linearity error. Figure 5 is a diagram showing the relationship between a waveform W1 indicating the characteristics of the output voltage of the magnetic sensor circuit 50 with respect to the magnetic field, the first approximate line L1, and the second approximate line L2.
[0047] The linearity error (%) is calculated by calculating the difference between the first approximate line L1 and the waveform W1 shown in Figure 2. The waveform W2 (see Figure 4) shows the relationship between the magnetic field and the linearity error thus calculated. As shown in Figure 4, the maximum and minimum values of the linearity error are identified from the linearity error waveform W2.
[0048] The magnetic field corresponding to the minimum value of the linearity error is set as the boundary magnetic field +A, and the magnetic field corresponding to the maximum value of the linearity error is set as the boundary magnetic field -B. At this time, the magnetic field range of the low magnetic field region is set as "-B ≦ magnetic field ≦ +A", and the magnetic field range of the high magnetic field region is set as "-N ≦ magnetic field < -B, +A < magnetic field ≦ +N". In this way, the magnetic field ranges of the low magnetic field region and the high magnetic field region are set based on the first approximate straight line L1.
[0049] Depending on the type of magnetic sensor circuit, the waveform of the linearity error may be symmetrical with respect to the X-axis relative to the waveform W2. This embodiment can also be applied to such magnetic sensor circuits.
[0050] 5 is derived as an ideal straight line of the sensor output signal versus the magnetic field, similar to the first approximate straight line L1. As explained above, the first approximate straight line L1 is derived using all measurement results in the magnetic field range (-N to +N) (mT). In contrast, the second approximate straight line L2 is derived using only measurement results in the low magnetic field range (-B to +A) (mT).
[0051] Therefore, the second approximate line L2 more accurately approximates the output characteristics of the magnetic sensor circuit 50 in the low magnetic field region than the first approximate line L1. As also shown in Figure 5, the second approximate line L2 more accurately reflects the output characteristics of the magnetic sensor circuit 50 in the low magnetic field region than the first approximate line L1.
[0052] Therefore, the accuracy of the output signal of the operational amplifier 111 in the low magnetic field region can be improved by designing the gain correction value and offset adjustment value of the operational amplifier 111 based on the second approximate straight line L2 rather than designing the gain correction value and offset adjustment value of the operational amplifier 111 based on the first approximate straight line L1. For this reason, the gain correction value and offset adjustment value of the operational amplifier 111 are designed based on the second approximate straight line L2.
[0053] Therefore, the sensor amplifier circuit 100 has high accuracy in the output signal of the operational amplifier 111 in the low magnetic field region. Therefore, there is no need to operate the correction circuit 150 in the low magnetic field region. If the correction circuit 150 were to operate in the low magnetic field region, unnecessary linearity correction would be added, which could actually reduce the accuracy of the output signal of the operational amplifier 111. In fact, not operating the correction circuit 150 in the low magnetic field region has the advantage of increasing the response speed of the sensor amplifier circuit 100 in the low magnetic field region. For this reason, the sensor amplifier circuit 100 does not operate the correction circuit 150 in the low magnetic field region.
[0054] In contrast, the sensor amplifier circuit 100 operates the correction circuit 150 in the high magnetic field region. As a result, as already explained with reference to FIG. 3, the output voltage of the operational amplifier 111 changes stepwise at each correction point so as to follow an ideal linear output (second approximate straight line L2). Therefore, the sensor amplifier circuit 100 according to this embodiment can improve linearity while maintaining high responsiveness.
[0055] (Controller) FIG. 6 is a block diagram showing the configuration of a controller 500 used to calibrate the sensor amplifier circuit 100. As shown in FIG.
[0056] The control device 500 is typically configured by a computer (computing device) and includes a processor 501, a RAM (Random Access Memory) 502, a ROM (Read Only Memory) 503, and a communication interface 504. The control device 500 uses the RAM as a working area and executes various processes according to programs stored in the ROM 503.
[0057] The control device 500 is connected to the nonvolatile memory 130 via an interface 504. The control device 500 is connected to the measurement device 400 via an interface 504.
[0058] The control device 500 executes various processes for calibrating the sensor amplifier circuit 100. First, the control device 500 controls the measurement device 400 to measure the output voltage of the magnetic sensor circuit 50 while changing the magnetic field (measurement process). Second, the control device 500 determines various setting values for the sensor amplifier circuit 100 using the measurement results (determination process). Third, the control device 500 writes the determined setting values to the non-volatile memory 130 (write process). The control device 500 executes at least the first to third processes described above.
[0059] Next, a procedure for calibrating the sensor amplifier circuit 100, which is implemented by the control device 500, will be described with reference to a flowchart.
[0060] 7 is a flowchart showing a procedure for measuring the output voltage from the magnetic sensor circuit 50 in response to a magnetic field. By using the measurement results based on this flowchart, the control device 500 can obtain the waveform W1 shown in FIG. 2. The process based on this flowchart is executed by the control device 500. The process will be described below in accordance with the flowchart. Note that an example will be described in which the output voltage of the magnetic sensor circuit 50 is measured to obtain the waveform W1. However, instead of measuring the output voltage of the magnetic sensor circuit 50 to obtain the waveform W1, the output of the sensor system 10 including the magnetic sensor circuit 50 and the sensor amplifier circuit 100 ("OUT" of the output terminal T3) may be measured.
[0061] First, the control device 500 controls the measuring device 400 so that a +N (mT) magnetic field is applied to the magnetic sensor circuit 50 (step S1). Next, the control device 500 causes the measuring device 400 to measure the output voltage of the magnetic sensor circuit 50 (step S2). The measuring device 400 measures the output voltage of the magnetic sensor circuit 50 in response to the +N (mT) magnetic field. The measuring device 400 transmits the measurement results to the control device 500. The control device 500 stores the measurement results. Similarly, the measuring device 400 transmits the measurement results to the control device 500 each time a measurement is taken, and the control device 500 stores the measurement results.
[0062] Next, the control device 500 controls the measuring device 400 so that the magnetic field applied to the magnetic sensor circuit 50 decreases by M (mT) from +N (mT) (step S2). Here, the magnitude of M (mT) is the amount of change in the magnetic field when measuring the output voltage of the magnetic sensor circuit 50 while changing the magnetic field. Under the control of the control device 500, the measuring device 400 measures the output voltage of the magnetic sensor circuit 50 while decreasing the magnetic field from +N (mT) by M (mT).
[0063] Next, the control device 500 determines whether the magnetic field applied to the magnetic sensor circuit 50 is less than −N (mT), which is the lower limit of the magnetic field range width (step S4). The control device 500 repeats the processes of steps S1 to S3 until the magnetic field applied to the magnetic sensor circuit 50 is less than −N (mT).
[0064] When the magnetic field applied to the magnetic sensor circuit 50 becomes less than -N (mT), the measuring device 400 measures the output voltage of the magnetic sensor circuit 50 while increasing the magnetic field from -N (mT) in increments of M (mT). To achieve this, the control device 500 controls the measuring device 400 so that the magnetic field applied to the magnetic sensor circuit 50 increases by M (mT) from +N (mT) (step S5). Next, the control device 500 causes the measuring device 400 to measure the output voltage of the magnetic sensor circuit 50 (step S6). At this time, the measuring device 400 measures the output voltage of the magnetic sensor circuit 50 for a magnetic field of -N+M (mT).
[0065] Next, the control device 500 determines whether the magnetic field applied to the magnetic sensor circuit 50 exceeds +N (mT), which is the upper limit of the magnetic field range width (step S7). The control device 500 repeats the processes of steps S5 to S7 until the magnetic field applied to the magnetic sensor circuit 50 exceeds +N (mT). If the magnetic field applied to the magnetic sensor circuit 50 exceeds +N (mT), which is the upper limit of the magnetic field range width, the control device 500 ends the process based on this flowchart. By executing the processes of steps S1 to S7, the control device 500 acquires data for plotting the waveform W1 shown in FIG. 2.
[0066] 8 and 9 are flowcharts showing the procedure for determining various setting values of the sensor amplifier circuit 100. By executing processing based on this flowchart, the gain setting value and offset setting value of the operational amplifier 111, as well as the setting value of the correction circuit 150, are determined. The setting values of the correction circuit 150 include the values of the reference voltages Vr1 to Vrn of the comparators 161 to 16n. The processing based on this flowchart is executed by the control device 500. The processing will be described below according to the flowchart.
[0067] First, the control device 500 calculates a first approximate equation for identifying the first approximate line L1 from the measurement results of the output voltage of the magnetic sensor circuit 50 in the range of ±N (mT) (step S11). The control device 500 calculates the first approximate equation using, for example, the least squares method. The first approximate equation is a linear function in the form of "output voltage = slope × X (input magnetic field) + offset." The control device 500 may use the calculated first approximate equation to display the first approximate line L1 (see FIG. 2) on a monitor or the like.
[0068] Next, the control device 500 calculates a linearity error from the measurement results of the output voltage of the magnetic sensor circuit 50 in the range of ±N (mT) and the value calculated using the first approximation formula (step S12). The control device 500 may use the calculated linearity error to display a waveform W2 of the linearity error (see FIG. 4) on a monitor or the like.
[0069] Next, the control device 500 determines whether or not there are any maximum and minimum values in the linearity error waveform W2 (step S13). The maximum and minimum values are illustrated in FIG.
[0070] If the linearity error waveform W2 has maximum and minimum values, the control device 500 determines whether the maximum and minimum values are in a magnetic field range other than 0±1 (mT) (step S14). The control device 500 sets the boundary magnetic fields +A and -B (see FIG. 4) based on the maximum and minimum values only if they are in a magnetic field range other than 0±1 (mT). The hysteresis characteristics of the magnetic sensor circuit 50 are strong near 0 (mT). Therefore, the control device 500 does not set the boundary magnetic fields +A and -B if the maximum and minimum values are only in the magnetic field range of 0±1 (mT).
[0071] Therefore, if the linearity error waveform W2 does not have any maximum or minimum values (NO in step S13), or if the maximum and minimum values exist only in the magnetic field range of 0±1 (mT) (NO in step S14), the control device sets the entire range of ±N (mT) as the magnetic field range of the low magnetic field region (step S26). As a result, the high magnetic field region is not set in the range of ±N (mT).
[0072] As already explained, sensor amplifier circuit 100 according to this embodiment performs linearity correction in the low magnetic field region but does not perform linearity correction in the high magnetic field region. Therefore, if the entire magnetic field range of ±N (mT) is set as the low magnetic field region, sensor amplifier circuit 100 does not operate correction circuit 150 in the entire magnetic field range of ±N (mT).
[0073] Next, the control device 500 determines the gain setting value and the offset setting value of the operational amplifier 111 based on the first approximate straight line L1 according to the first approximate equation (step S27).
[0074] In step S14, when the control device 500 determines that there are local maximum and minimum values in the magnetic field range other than 0±1 (mT), the control device 500 sets boundary magnetic fields +A and −B. However, before setting the boundary magnetic fields +A and −B, the control device 500 determines the number of local minimum and maximum values that exist in the magnetic field range other than 0±1 (mT).
[0075] There is not necessarily one minimum value and one maximum value in the magnetic field range other than 0±1 (mT). Depending on the relationship between the hysteresis characteristics of the magnetic sensor circuit 50 and the first approximation formula, there may be multiple minimum values or multiple maximum values in the magnetic field range other than 0±1 (mT). If there is only one minimum value in the magnetic field range other than 0±1 (mT) (YES in step S15), the control device 500 sets the magnitude of the magnetic field corresponding to that minimum value as the boundary magnetic field + A (mT) (step S16).
[0076] If there are multiple minimum values in a magnetic field range other than 0±1 (mT) (NO in step S15), the control device 500 sets the magnetic field magnitude corresponding to the minimum value closest to +N (mT) shown in Figure 4 as the boundary magnetic field +A (mT) (step S17).
[0077] If only one maximum value exists in the magnetic field range other than 0±1 (mT) (YES in step S18), the control device 500 sets the magnetic field magnitude corresponding to that maximum value as the boundary magnetic field −B (mT) (step S19). If multiple maximum values exist in the magnetic field range other than 0±1 (mT) (NO in step S18), the control device 500 sets the magnetic field magnitude corresponding to the maximum value closest to −N (mT) shown in Figure 4 among the multiple maximum values as the boundary magnetic field −B (mT) (step S20).
[0078] Next, the control device 500 sets the magnetic field ranges of the low magnetic field region and the high magnetic field region based on the boundary magnetic fields +A and -B (step S21). More specifically, the control device 500 sets "-B ≦ magnetic field ≦ +A" as the magnetic field range of the low magnetic field region. The control device 500 sets "-N ≦ magnetic field < -B, +A < magnetic field ≦ +N" as the magnetic field range of the high magnetic field region.
[0079] Next, the control device 500 calculates a second approximate equation for identifying the second approximate line L2 from the measurement results of the output voltage of the magnetic sensor circuit 50 in the low magnetic field region (step S22). The control device 500 calculates the second approximate equation using, for example, the least squares method. Like the first approximate equation, the second approximate equation is a linear function in the form of "output voltage = slope × X (input magnetic field) + offset." The control device 500 may use the calculated second approximate equation to display the second approximate line L2 (see FIG. 3) on a monitor or the like.
[0080] Next, the control device 500 determines the gain setting value and offset setting value of the operational amplifier 111 based on the second approximate line L2 that conforms to the second approximate equation (step S23). More specifically, the control device 500 first derives the slope and offset of the second approximate line L2. Next, the control device 500 determines the gain setting value and offset setting value from the full scale required for the sensing function of the magnetic sensor circuit 50 and the voltage value when the magnetic field is 0 (mT). In this way, the gain setting value is determined based on the output characteristics of the magnetic sensor circuit 50 in the low magnetic field region.
[0081] Next, the control device 500 determines the setting values of the correction circuit 150 based on the measurement results of the output voltage of the magnetic sensor circuit 50 in the high magnetic field region and the second approximate line L2 (step S24). As a result, the reference voltages Vr1 to Vrn of the comparators 161 to 16n are determined as the setting values of the correction circuit 150.
[0082] Next, the control device 500 stores the setting value of the correction circuit 150 in the nonvolatile memory 130 (step S25), and ends the processing based on this flowchart. Note that the control device 500 may also store the setting value determined in step S23 or step S27 in the nonvolatile memory 130.
[0083] 7 and 8, the calibration procedure for the sensor amplification circuit 100 has been described. Here, the procedure for calibrating the sensor amplification circuit 100 by the control device 500, which is an example of a computer, has been described. However, at least a part of each of the above procedures may be manually performed by a person involved in the calibration, instead of by the control device 500.
[0084] In the above description, an example has been described in which the magnetic field range of the low magnetic field region is set to "-B ≦ magnetic field ≦ +A" and the magnetic field range of the high magnetic field region is set to "-N ≦ magnetic field < -B, +A < magnetic field ≦ +N". However, the control device 500 may set the magnetic field ranges of the low magnetic field region and the high magnetic field region based on only one of the boundary magnetic fields +A and -B shown in FIG.
[0085] For example, the control device 500 may set "-A≦magnetic field≦+A" as the magnetic field range of the low magnetic field region. Alternatively, the control device 500 may set "-B≦magnetic field≦+B" as the magnetic field range of the low magnetic field region. After determining the magnetic field range of the low magnetic field region, the control device 500 may set the range of ±N (mT) excluding the magnetic field range of the low magnetic field region as the magnetic field range of the high magnetic field region.
[0086] An arbitrary magnetic field belonging to the magnetic field range of the low magnetic field region may be selected, and the second approximation formula may be calculated using the measurement result of the output voltage of the magnetic sensor circuit 50 within that range.
[0087] It should be noted that when determining the boundary magnetic field from the measurement results (calibration data) of the output voltages of the multiple magnetic sensor circuits 50, it is not necessary to set the magnetic field range of the low magnetic field region based on the magnetic fields of the local maximum and minimum points. For example, the magnetic field range of the low magnetic field region may be set to a range wider than the magnetic field range of the low magnetic field region set based on the magnetic fields of the local maximum and minimum points.
[0088] (Comparison with Conventional Sensor Amplification Circuits) As described above, the sensor amplification circuit 100 does not operate the correction circuit 150 in low magnetic field regions, but operates the correction circuit 150 in high magnetic field regions. Conventionally, sensor amplification circuits that constantly perform linearity correction on signals output from a sensor are known. In such conventional sensor amplification circuits, for example, a calculation unit that performs calculations for linearity correction is mounted within the sensor amplification circuit.
[0089] In such conventional sensor amplifier circuits, the calculation unit must be configured with a large-scale digital circuit, which increases the chip area and results in a large sensor amplifier circuit. In addition, the linearity correction calculation process takes time, which reduces responsiveness.
[0090] If linearity correction is always performed on the output from the sensor, the problem of further reduced responsiveness will occur. One possible way to improve responsiveness is to increase the operating frequency of the calculation unit. However, the higher the operating frequency of the calculation unit, the greater the new problem of increased current consumption and high-frequency noise. Furthermore, if linearity correction is always performed on the output from the sensor, there is a risk that unnecessary calculations will be performed on outputs that do not actually require correction. This could result in larger output errors.
[0091] In the sensor amplifier circuit 100 according to this embodiment, the correction circuit 150 does not operate in low magnetic field regions, thereby improving responsiveness compared to conventional sensor amplifier circuits that constantly perform linearity correction on the output from the sensor. Moreover, in the sensor amplifier circuit 100, the output from the magnetic sensor circuit 50 is accurately amplified in low magnetic field regions based on the second approximate line L2 corresponding to the low magnetic field region. Therefore, in the sensor amplifier circuit 100, accuracy does not decrease even if the correction circuit 150 does not operate. Furthermore, because the correction circuit 150 is configured as an analog circuit, response speed can be improved compared to when the correction circuit 150 is configured as a digital circuit.
[0092] The following further describes the effects achieved by the sensor amplifier circuit 100 according to this embodiment. In the low magnetic field region, the sensor amplifier circuit 100 simply amplifies the output signal of the magnetic sensor circuit 50 using the operational amplifier 111, and the linearity performance of the magnetic sensor circuit 50 is used as is. This reduces error factors and improves the accuracy of the sensor output for magnetic fields in the low magnetic field region.
[0093] In a strong magnetic field region, the sensor amplifier circuit 100 corrects the linearity of the sensor output using the correction circuit 150. This allows the range in which the linearity of the relationship between the magnetic field and the output voltage is maintained to be widened, thereby widening the dynamic range of the magnetic sensor circuit 50.
[0094] The sensor amplifier circuit 100 amplifies the output of the magnetic sensor circuit 50 based on the measurement results of the output voltage of the magnetic sensor circuit 50 in low magnetic field regions. Therefore, in high magnetic field regions, the error between the second approximate line L2 and the output of the magnetic sensor circuit 50 becomes large. However, by operating the correction circuit 150, the sensor amplifier circuit 100 can perform linearity correction to approximate the output characteristics of an ideal sensor, even in high magnetic field regions. As a result, the dynamic range of the magnetic sensor circuit 50 that can be used as a sensor can be expanded. In this way, the sensor amplifier circuit 100 is highly versatile because it can correct linearity regardless of the characteristics of the magnetic sensor circuit 50 alone.
[0095] The sensor amplifier circuit 100 operates the correction circuit 150 only in a high magnetic field region, thereby widening the dynamic range that can be used as a sensor of the magnetic sensor circuit 50.
[0096] The correction circuit 150 is composed of an analog circuit, and the circuit operation is automatically and immediately determined depending on the magnitude of the applied voltage. As such, the correction circuit 150 does not perform any arithmetic processing, such as a feedback routine, and therefore has excellent response speed.
[0097] The "operational amplifier 111" and the "operational amplifier 112" in the embodiments correspond to the "first operational amplifier" and the "second operational amplifier" in the present disclosure, respectively. The "low magnetic field region" and the "high magnetic field region" in the embodiments correspond to the "first magnetic field region" and the "second magnetic field region" in the present disclosure.
[0098] As shown in Figure 3, the magnetic sensor circuit 50 outputs a first signal corresponding to a magnetic field in a first range (-B ≦ magnetic field ≦ +A) in a low magnetic field region (first magnetic field region) where a magnetic field in a first range is applied, and outputs a second signal corresponding to a magnetic field in a second range (-N ≦ magnetic field < -B, +A < magnetic field ≦ +N) where a magnetic field stronger than the magnetic field in the first range is applied.
[0099] The correction circuit 150 is configured to switch from a first state (all switches SW1 to SWn are off) in which the nonlinear distortion contained in the output signal of the magnetic sensor circuit 50 is not corrected to a second state (any of the switches SW1 to SWn is on) in which the nonlinear distortion contained in the output signal of the magnetic sensor circuit 50 is corrected. The correction circuit 150 switches from the first state to the second state when the output signal from the magnetic sensor circuit 50 changes from a first signal corresponding to the magnetic field in the first range to a second signal corresponding to the magnetic field in the second range.
[0100] When the first signal is input, the operational amplifier 111 outputs a signal based on the gain setting value and the offset setting value. Because the voltage of this signal is lower than the reference voltage Vr1 of the correction circuit 150, all of the switches SW1 to SWn of the correction circuit 150 remain in the off state.
[0101] When the second signal is input, the operational amplifier 111 outputs a signal based on the gain setting value and the offset setting value. Because the voltage of this signal is higher than any of the reference voltages Vr1 to Vrn of the correction circuit 150, at least one of the switches SW1 to SWn of the correction circuit 150 changes from off to on. In this way, the correction circuit 150 detects that the output signal from the magnetic sensor circuit 50 has changed from the first signal to the second signal based on the change in the magnitude of the output signal from the operational amplifier 111.
[0102] As shown in FIGS. 7 and 8, the calibration method for the sensor amplifier circuit 100 includes steps of measuring the output voltage of the magnetic sensor circuit in response to a magnetic field (steps S1 to S7), calculating a first relational expression (first approximation expression) that expresses the relationship between the magnetic field and the output voltage of the magnetic sensor circuit as a linear function using the measurement results from the measuring step (step S11), and determining the maximum values (maximum value, minimum value) of the linearity error based on the first relational expression and the measurement results from the measuring step (steps S13, S14, S15). The method includes a step of determining the boundary between the first range and the second range using the maximum value of the linearity error (steps S15, S18), a step of calculating a second relational expression (step S22) that expresses the relationship between the magnetic field and the output voltage of the magnetic sensor circuit as a linear function using the measurement results in the first magnetic field region from the measurement results in the measuring step, and a step of determining the gain and offset of the first operational amplifier using the second relational expression (step S23).
[0103] (Modification of Sensor System) Fig. 10 is a schematic configuration diagram of a sensor system 11 according to a modification. The sensor system 11 includes a magnetic sensor circuit 50 and a sensor amplifier circuit 101. The sensor amplifier circuit 101 includes a correction circuit 151. The sensor system 11 according to the modification differs from the sensor systems 11 described so far in the configuration of the correction circuit. In the correction circuit 151 according to the modification, enable switches ESW1 to ESWn are added to the components of the correction circuit 150.
[0104] The enable switch ESW1 is disposed between the comparator 161 and the switch SW1. The enable switch ESW2 is disposed between the comparator 162 and the switch SW2. The enable switch ESWn is disposed between the comparator 16n and the switch SWn.
[0105] The readout circuit 120 controls the on / off of the enable switches ESW1 to ESWn. As already explained, the relationship Vr1<Vr2< ... <Vrn holds for the values of the reference voltages Vr1 to Vrn used in the correction circuit 150. In other words, the linearity correction point is determined based on the relationship Vr1<Vr2< ... <Vrn.
[0106] When linearity correction is not performed, the readout circuit 120 turns off all of the enable switches ESW1 to ESWn. When linearity correction is performed at a correction point determined by one of the comparators 161 to 16n, the readout circuit 120 turns on the enable switch connected to the corresponding comparator among the enable switches ESW1 to ESWn and turns off the other enable switches.
[0107] When the readout circuit 120 performs linearity correction at a correction point determined by any two of the comparators 161 to 16n, it turns on the enable switches ESW1 to ESWn that are connected to the corresponding two comparators and turns off the other enable switches.
[0108] Thus, in this modification, the readout circuit 120 can perform linearity correction using one of the comparators 161 to 16n, and can also perform linearity correction using multiple of the comparators 161 to 16n. Therefore, this modification provides the sensor system 11 and the sensor amplifier circuit 101 that allow for the free selection of a comparator with a convenient voltage range. Furthermore, this modification employs the enable switches ESW1 to ESWn, thereby preventing the comparators 161 to 16n from malfunctioning. For example, it is possible to prevent the switch SW1 from turning on due to the malfunction of the comparator 161, even if the voltage at the node N1 is equal to or lower than the reference voltage Vr1.
[0109] Information that determines the timing for turning on and off the enable switches ESW1 to ESWn is stored as one of the setting values in the nonvolatile memory 130. More specifically, registers used to control the enable switches ESW1 to ESWn are stored separately for the enable switches ESW1 to ESWn in the nonvolatile memory 130. The readout circuit 120 controls the on and off of the enable switches ESW1 to ESWn based on the setting values read out from the nonvolatile memory 130.
[0110] The reference voltages Vr1 to Vrn function as threshold voltages that determine the correction operation of the correction circuit 151. In a modified example, a certain voltage range is set for each of the reference voltages Vr1 to Vrn. In this case, it is conceivable to set the same voltage range (0.5 V) for each reference voltage, such as "2.5 V < Vr1 < 3.0 V," "2.8 V < Vr2 < 3.3 V," and so on. In this case, when the voltage of the node N1 is 3.0 V, the readout circuit 120 turns on only the enable switch ESW2 and turns off the other enable switches.
[0111] Here, it is assumed that the resolution required for adjusting the threshold voltage is 0.1 V. If an adjustment range of 0.1 V increments is required for all voltages observable at node N1 from 0 V to 5 V, 50 adjustment patterns are required. In this case, the nonvolatile memory 130 requires a 6-bit register area for each reference voltage. Therefore, to accommodate reference voltages Vr1 to Vrn, the nonvolatile memory 130 requires a register area of "6 bits x N."
[0112] In contrast, consider the case where the same voltage step (e.g., 0.5 V) is set for each of the reference voltages Vr1 to Vrn. Assume that the resolution required for adjusting the threshold voltage is 0.1 V. In this case, the number of reference voltage adjustment patterns is limited to five, so the number of bits of the register area required for one reference voltage is three. To accommodate the reference voltages Vr1 to Vrn, the nonvolatile memory 130 only needs a register area of "3 bits x N." Therefore, by setting the same voltage step (e.g., 0.5 V) for each of the reference voltages Vr1 to Vrn, the capacity required for the nonvolatile memory 130 can be reduced.
[0113] 10 shows an example of the correction circuit 151 configured by connecting the respective components of "switch SW1, resistor R1," "switch SW2, resistor R2," ... "switch SWn, resistor Rn" in parallel. However, the correction circuit 151 may also be configured such that these components are connected in series and a signal for turning on or off the switch of each component is input via a corresponding enable switch.
[0114] [Aspects] (Item 1) A sensor amplifier circuit according to one aspect is a sensor amplifier circuit for amplifying an output signal from a magnetic sensor circuit, and includes a first operational amplifier that amplifies the output signal from the magnetic sensor circuit, and a correction circuit that corrects nonlinear distortion contained in the output signal, wherein the magnetic sensor circuit outputs a first signal having a magnitude corresponding to a magnetic field of a first range in a first magnetic field region where a magnetic field of a first range is applied, and outputs a second signal having a magnitude corresponding to a magnetic field of a second range in a second magnetic field region where a magnetic field of a second range larger than the magnetic field of the first range is applied, and the correction circuit is configured to switch from a first state that does not correct nonlinear distortion contained in the output signal to a second state that corrects nonlinear distortion contained in the output signal, and the correction circuit switches from the first state to the second state when the output signal from the magnetic sensor circuit changes from the first signal to the second signal.
[0115] (Item 2) In the sensor amplifier circuit described in item 1, the correction circuit automatically switches from the first state to the second state when the output signal from the magnetic sensor circuit changes from the first signal to the second signal.
[0116] (Item 3) In the sensor amplifier circuit described in item 1 or 2, the correction circuit detects that the output signal from the magnetic sensor circuit has changed from a first signal to a second signal based on a change in the magnitude of the output signal from the first operational amplifier.
[0117] (4) In the sensor amplifier circuit described in any one of paragraphs 1 to 3, the first operational amplifier amplifies the output signal from the magnetic sensor circuit based on a predetermined gain, and the gain is a value determined based on the output characteristics of the magnetic sensor circuit in the first magnetic field region.
[0118] (5) The sensor amplification circuit described in any one of paragraphs 1 to 4 further comprises a memory in which the setting value of the correction circuit is stored, and a readout circuit that reads out the setting value stored in the memory and sets the setting value in the correction circuit.
[0119] (Item 6) In the sensor amplifier circuit described in any one of items 1 to 5, the magnetic sensor circuit has four sensor elements bridge-connected, and the first operational amplifier amplifies the differential voltage of a pair of output signals from the magnetic sensor circuit.
[0120] (Item 7) In the sensor amplifier circuit described in any one of items 1 to 6, the magnetic sensor circuit includes a magnetic sensor element, and the magnetic sensor element is composed of a tunneling magnetoresistive (TMR) element.
[0121] (Item 8) The sensor amplifier circuit described in any one of items 1 to 7 further includes a second operational amplifier, wherein the output terminal of the first operational amplifier is connected to the inverting input terminal of the second operational amplifier, and the correction circuit includes a first negative feedback circuit and a second negative feedback circuit connected in parallel between the output terminal of the second operational amplifier and the inverting input terminal of the second operational amplifier, as well as a first comparator and a second comparator, wherein the first negative feedback circuit has a first resistor and a first switch that opens and closes the first negative feedback circuit, and the second negative feedback circuit has a second resistor and a second switch that opens and closes the second negative feedback circuit, and the first comparator closes the first switch when the output voltage of the first operational amplifier reaches a first reference voltage, and the second comparator closes the second switch when the output voltage of the first operational amplifier reaches a second reference voltage that is greater than the first reference voltage.
[0122] (Item 9) A sensor system includes the magnetic sensor circuit and the sensor amplifier circuit described in any one of items 1 to 8.
[0123] (Item 10) A method for calibrating a sensor amplifier circuit described in any one of items 1 to 8, comprising the steps of measuring the output voltage of the magnetic sensor circuit in response to a magnetic field, calculating a first relational expression that expresses the relationship between the magnetic field and the output voltage of the magnetic sensor circuit as a linear function using the measurement results from the measuring step, determining the maximum value of the linearity error based on the first relational expression and the measurement results from the measuring step, determining the boundary between the first range and the second range using the maximum value of the linearity error, calculating a second relational expression that expresses the relationship between the magnetic field and the output voltage of the magnetic sensor circuit as a linear function using the measurement results in the first magnetic field region from the measurement results from the measuring step, and determining the gain and offset of the first operational amplifier using the second relational expression.
[0124] The embodiments disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims, not by the description of the above embodiments, and is intended to include all modifications within the meaning and scope of the claims.
[0125] 5a, 5b power supply terminals, 5c, 5d signal output terminals, 10, 11 sensor system, 50 magnetic sensor circuit, 51, 52, 53, 54 sensor element, 100, 101 sensor amplifier circuit, 111, 112 operational amplifier, 120 readout circuit, 130 non-volatile memory, 150, 151 correction circuit, 161 to 16n comparator, 190 output amplifier, 400 measuring device, 500 control device, 501 processor, 502 RAM, 503 ROM, 504 interface, ESW1 to ESWn enable switch, F1 circle frame, L1 first approximate straight line, L2 second approximate straight line, R1 to Rn, Rx, Ry resistance, SW1 to SWn switch, T1, T2 input terminal, T3 output terminal, V1, V2 voltage, Vr1 to Vrn Reference voltage, W1, W2 waveform.
Claims
1. A sensor amplifier circuit for amplifying an output signal from a magnetic sensor circuit, a first operational amplifier for amplifying an output signal from the magnetic sensor circuit; a correction circuit for correcting nonlinear distortion contained in the output signal; the magnetic sensor circuit outputs a first signal having a magnitude corresponding to a magnetic field of a first range in a first magnetic field region where a magnetic field of the first range is applied, and outputs a second signal having a magnitude corresponding to a magnetic field of the second range in a second magnetic field region where a magnetic field of a second range larger than the magnetic field of the first range is applied; the correction circuit is configured to switch from a first state in which the nonlinear distortion included in the output signal is not corrected to a second state in which the nonlinear distortion included in the output signal is corrected; The correction circuit switches from the first state to the second state when the output signal from the magnetic sensor circuit changes from the first signal to the second signal.
2. The sensor amplifier circuit of claim 1 , wherein the correction circuit automatically switches from the first state to the second state when an output signal from the magnetic sensor circuit changes from the first signal to the second signal.
3. 3. The sensor amplifier circuit according to claim 1, wherein the correction circuit detects a change in the output signal from the magnetic sensor circuit from the first signal to the second signal based on the output signal from the first operational amplifier.
4. The first operational amplifier amplifies an output signal from the magnetic sensor circuit based on a predetermined gain, The sensor amplifier circuit according to claim 1 , wherein the gain is a value determined based on an output characteristic of the magnetic sensor circuit in the first magnetic field region.
5. A memory in which the setting values of the correction circuit are stored; The sensor amplifier circuit according to claim 1 , further comprising: a readout circuit that reads out the setting value stored in the memory and sets the setting value in the correction circuit.
6. The magnetic sensor circuit has four sensor elements connected in a bridge configuration. The sensor amplifier circuit of claim 1 , wherein the first operational amplifier amplifies a differential voltage between a pair of output signals from the magnetic sensor circuit.
7. the magnetic sensor circuit includes a magnetic sensor element; 2. The sensor amplifier circuit according to claim 1, wherein the magnetic sensor element is configured by a Tunneling Magneto-Resistive (TMR) element.
8. Further comprising a second operational amplifier; an output terminal of the first operational amplifier and an inverting input terminal of the second operational amplifier are connected; The correction circuit includes: a first negative feedback circuit and a second negative feedback circuit connected in parallel between an output terminal of the second operational amplifier and an inverting input terminal of the second operational amplifier; a first comparator and a second comparator; the first negative feedback circuit includes a first resistor and a first switch that opens and closes the first negative feedback circuit; the second negative feedback circuit has a second resistor and a second switch that opens and closes the second negative feedback circuit; The first comparator closes the first switch when the output voltage of the first operational amplifier reaches a first reference voltage; 2. The sensor amplifier circuit of claim 1, wherein the second comparator closes the second switch when the output voltage of the first operational amplifier reaches a second reference voltage that is greater than the first reference voltage.
9. A sensor system comprising the magnetic sensor circuit and sensor amplifier circuit described in claim 1.
10. A method for calibrating a sensor amplifier circuit according to any one of claims 1 to 8, comprising: measuring an output voltage of the magnetic sensor circuit in response to a magnetic field; calculating a first relational expression that expresses a relationship between a magnetic field and an output voltage of the magnetic sensor circuit as a linear function using a measurement result from the measuring step; determining a maximum value of a linearity error based on the first relational expression and a measurement result from the measuring step; determining a boundary between the first range and the second range using the maximum value of the linearity error; calculating a second relational expression expressing a relationship between a magnetic field and an output voltage of the magnetic sensor circuit as a linear function using a measurement result in the first magnetic field region among the measurement results in the measuring step; determining a gain and an offset of the first operational amplifier using the second relationship.