Rotation angle sensor and semiconductor device

The rotation angle sensor employs a linear analog circuit with magnetic sensor elements and control circuits to simplify the calculation process, achieving a compact design by avoiding complex digital calculations.

JP2024139920APending Publication Date: 2024-10-10SEIKO INSTR INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023050869
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-10

AI Technical Summary

Technical Problem

Conventional rotation angle sensors require complex digital calculation and nonlinear vector rotation processing, leading to a large circuit scale and difficulty in area savings.

Method used

A rotation angle sensor utilizing a linear analog circuit with magnetic sensor elements, current sources, signal generation, comparison, and control circuits to determine rotation angles through simple linear calculations.

Benefits of technology

The proposed solution allows for a compact configuration by eliminating the need for complex digital calculations, reducing circuit size and enabling efficient area utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024139920000001_ABST
    Figure 2024139920000001_ABST
Patent Text Reader

Abstract

To provide a rotation angle sensor and a semiconductor device having relatively simple configuration.SOLUTION: A rotation angle sensor comprises: a first magnetic sensor element (11) detecting flux density in a first direction; a second magnetic sensor element (12) detecting flux density in a second direction intersecting the first direction; a first current source (81) supplying power source to the first magnetic sensor element; a second current source (82) supplying power source to the second magnetic sensor element; a signal generation circuit (25) adding or subtracting a signal according to output of the first magnetic sensor element and a signal according to output of the second magnetic sensor element to generate a signal; a comparator (40) comparing the signal generated by the signal generation circuit to a predetermined voltage; a shift register circuit (50) holding the result obtained by comparison using the comparator; and a control circuit (60) controlling, according to a value held by the shift register circuit, a signal value according to output of the first magnetic sensor element and a signal value according to output of the second magnetic sensor element.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a rotation angle sensor and a semiconductor device. [Background technology]

[0002] In the past, there was a technique for determining the rotation angle of a magnet by arranging two magnetic sensors at mutually orthogonal angular positions within the magnetic field created by the magnet and determining the rotation angle of the magnet based on the Hall electromotive forces obtained from the two magnetic sensors. For example, a rotation angle sensor as exemplified in Patent Document 1 is known as a device using this technique. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2004-191101 A Summary of the Invention [Problem to be solved by the invention]

[0004] The rotation angle sensor according to the conventional technology has a vector rotation calculation circuit that performs nonlinear vector rotation calculation processing including multiplication, and an angle calculation digital circuit that performs complex digital calculation processing. Therefore, the rotation angle sensor according to the conventional technology has a problem that the circuit scale is large and it is difficult to reduce the area.

[0005] The present invention has been made in view of the above circumstances, and has an object to provide a rotation angle sensor and a semiconductor device having a relatively simple configuration using a linear analog circuit. [Means for solving the problem]

[0006] A rotation angle sensor according to one embodiment of the present invention includes a first magnetic sensor element that detects magnetic flux density in a first direction, a second magnetic sensor element that detects magnetic flux density in a second direction intersecting the first direction, a first current source that supplies power to the first magnetic sensor element, a second current source that supplies power to the second magnetic sensor element, a signal generation circuit that generates a signal by adding or subtracting a signal corresponding to an output of the first magnetic sensor element and a signal corresponding to the output of the second magnetic sensor element, a comparator that compares the signal generated by the signal generation circuit with a predetermined voltage, a shift register that holds the result of the comparison by the comparator, and a control circuit that controls the value of the signal corresponding to the output of the first magnetic sensor element and the value of the signal corresponding to the output of the second magnetic sensor element according to the value held by the shift register. Effect of the Invention

[0007] According to the present invention, it is possible to provide a rotation angle sensor and a semiconductor device having a relatively simple configuration using a linear analog circuit. [Brief description of the drawings]

[0008] [Figure 1] 2 is a functional configuration diagram showing an example of a functional configuration of the semiconductor device according to the first embodiment; [Diagram 2] 2 is a circuit diagram showing an example of a circuit configuration of a voltage-current converter according to the first embodiment. FIG. [Diagram 3] 2 is a circuit diagram showing an example of a circuit configuration of an adding / subtracting unit according to the first embodiment. FIG. [Figure 4] 2 is a functional configuration diagram showing an example of a functional configuration of a control circuit according to the first embodiment; FIG. [Diagram 5] FIG. 4 is a diagram for explaining an angle determination process according to the first embodiment. [Figure 6] 4 is a first flowchart showing an example of a determination process performed by the rotation angle sensor according to the first embodiment. [Figure 7] 5 is a second flowchart showing an example of a determination process performed by the rotation angle sensor according to the first embodiment. [Figure 8]13 is a third flowchart showing an example of a determination process performed by the rotation angle sensor according to the first embodiment. [Figure 9] 4 is a fourth flowchart showing an example of a determination process performed by the rotation angle sensor according to the first embodiment. [Figure 10] 4 is a first timing chart showing timing of a determination process performed by the rotation angle sensor according to the first embodiment. [Figure 11] 6 is a second timing chart showing timing of the determination process by the rotation angle sensor according to the first embodiment. [Figure 12] 5 is a diagram showing an example of coefficients used by the rotation angle sensor according to the first embodiment. FIG. [Figure 13] 4 is a diagram showing an example of an output value of the decoder circuit according to the first embodiment; FIG. [Figure 14] FIG. 11 is a diagram illustrating a modification of a voltage-current converter according to a modification of the first embodiment. [Figure 15] FIG. 11 is a functional configuration diagram showing an example of a functional configuration of a semiconductor device according to a second embodiment. [Figure 16] 10 is a circuit diagram showing an example of a circuit configuration of a voltage-current converter according to a second embodiment. FIG. [Figure 17] FIG. 11 is a circuit diagram showing a modified example of the circuit configuration of the current source according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] [Embodiment] A rotation angle sensor and a semiconductor device according to the aspects of the present invention will be described in detail below with reference to the accompanying drawings, showing preferred embodiments. The aspects of the present invention are not limited to these embodiments, and include various modifications or improvements. In other words, the components described below include those that a person skilled in the art can easily imagine and those that are substantially the same, and the components described below can be appropriately combined. In addition, various omissions, substitutions, or modifications of the components can be made without departing from the gist of the present invention. In addition, in the following drawings, the scale and number of each structure may be different from the scale and number of the actual structure in order to make each structure easier to understand.

[0010] [First embodiment] First, the first embodiment will be described with reference to FIGS.

[0011] [Function configuration] FIG. 1 is a functional configuration diagram showing an example of the functional configuration of the semiconductor device according to the first embodiment. With reference to the figure, an example of the functional configuration of the semiconductor device 1 will be described. The semiconductor device 1 is formed on a semiconductor substrate 2. The semiconductor device 1 is included in a semiconductor device having a function as a rotation angle sensor. The semiconductor device 1 includes a first magnetic sensor element 11, a second magnetic sensor element 12, a first current source 81, a second current source 82, a voltage-current conversion unit 20, an addition-subtraction unit 30, a comparator 40, a shift register circuit 50, a control circuit 60, and a decoder circuit 70. In the following description, a configuration including the voltage-current conversion unit 20 and the addition-subtraction unit 30 may be referred to as a signal generating circuit 26. In addition, in the description made with reference to the figure, the direction of magnetic flux density, etc. may be described using a three-dimensional orthogonal coordinate system of X-axis, Y-axis, and Z-axis.

[0012] The object to be measured by the semiconductor device 1 is magnetic flux density B. The semiconductor device 1 measures two-dimensional magnetic flux density B by having a first magnetic sensor element 11 and a second magnetic sensor element 12 whose detection axes are orthogonal to each other. Specifically, the semiconductor device 1 obtains a direction angle θ of the magnetic flux density B. The direction angle θ of the magnetic flux density B is an angle with respect to a reference direction vector (0 degrees). It is preferable that the detection axes of the first magnetic sensor element 11 and the second magnetic sensor element 12 are orthogonal or approximately orthogonal to each other. However, this embodiment is not limited to this example. The semiconductor device 1 can obtain the direction angle θ of the magnetic flux density B based on the first magnetic sensor element 11 and the second magnetic sensor element 12 arranged at any angle that is not parallel by further performing vector calculation. Note that the approximately orthogonal range may be a range in which vector calculation is not required due to the magnetic sensor elements not being orthogonal or approximately orthogonal to each other.

[0013] In the following description, it is assumed that the semiconductor device 1 measures a two-dimensional magnetic flux density B on the XY plane. However, this embodiment is not limited to this example, and the semiconductor device 1 can also measure a two-dimensional magnetic flux density B on the YZ plane or the ZX plane. When measuring a two-dimensional magnetic flux density B on the YZ plane or the ZX plane, it is preferable to use a sensor with a different structure. However, when using sensors with different structures, there is a problem that it is difficult to align the sensitivity between the axes. When measuring a two-dimensional magnetic flux density B on the XY plane, both of the two magnetic sensor elements can be, for example, vertical Hall elements or magnetoresistance elements, that is, sensors with the same structure can be used. Therefore, it is preferable that the semiconductor device 1 measures a two-dimensional magnetic flux density B on the XY plane.

[0014] The first magnetic sensor element 11 detects a magnetic flux density Bx in a first direction (X direction). The magnetic flux density Bx is an X-direction component of the magnetic flux density B, and can also be called the magnetic flux density in the first direction. The first current source 81 supplies a current to the first magnetic sensor element 11. The first magnetic sensor element 11 outputs a first magnetic sensor element output signal Vx1, which is a signal proportional to the product of the detected magnetic flux density Bx and the current supplied from the first current source 81, to the voltage-current conversion unit 20. The first magnetic sensor element 11 and the first current source 81 are disposed between the VDD terminal 3 and the VSS terminal 4.

[0015] The second magnetic sensor element 12 detects a magnetic flux density By in a second direction (Y direction) different from the first direction. The magnetic flux density By is a Y-direction component of the magnetic flux density B, and can also be called the magnetic flux density in the second direction. The second current source 82 supplies a current to the second magnetic sensor element 12. The second magnetic sensor element 12 outputs a second magnetic sensor element output signal Vy1, which is a signal proportional to the product of the detected magnetic flux density By and the current supplied from the second current source 82, to the voltage-current conversion unit 20. The second magnetic sensor element 12 and the second current source 82 are arranged between the VDD terminal 3 and the VSS terminal 4.

[0016] Here, the first direction (X direction) and the second direction (Y direction) are directions that intersect with each other and are both parallel to the surface of the semiconductor substrate 2. Specifically, the directions that intersect with each other are preferably orthogonal or approximately orthogonal.

[0017] The voltage-current converter 20 obtains the first magnetic sensor element output signal Vx1 from the first magnetic sensor element 11, and obtains the second magnetic sensor element output signal Vy1 in the second direction from the second magnetic sensor element 12. The voltage-current converter 20 also obtains a first control signal Sa and a second control signal Sb from the control circuit 60. Here, the first magnetic sensor element output signal Vx1, which is the output of the first magnetic sensor element 11, and the second magnetic sensor element output signal Vy1, which is the output of the second magnetic sensor element 12, are both differential signals. The voltage-current converter 20 converts the received differential signal into a differential current. The first control signal Sa is a signal including a coefficient a used when converting the magnetic flux density Bx in the first direction, which is a differential signal, into a differential current. The second control signal Sb is a signal including a coefficient b used when converting the magnetic flux density By in the second direction, which is a differential signal, into a differential current. The voltage-current conversion unit 20 outputs to the addition / subtraction unit 30 a current signal Ix2 that corresponds to the output of the first magnetic sensor element 11 and the first control signal Sa, and a current signal Iy2 that corresponds to the output of the second magnetic sensor element 12 and the second control signal Sb.

[0018] The addition / subtraction unit 30 obtains Ix2, which is a current signal corresponding to the output of the first magnetic sensor element 11, and Iy2, which is a current signal corresponding to the output of the second magnetic sensor element 12, from the voltage / current conversion unit 20. The addition / subtraction unit 30 also obtains a polarity switching control signal Dcrs from the control circuit 60. The addition / subtraction unit 30 performs addition or subtraction based on the obtained Ix2 and Iy2. Information on whether to perform addition or subtraction is included in the polarity switching control signal Dcrs. The polarity switching control signal Dcrs may be, for example, a 1-bit binary signal indicating either addition or subtraction. The addition / subtraction unit 30 outputs a signal generated as a result of the addition / subtraction to the comparator 40 as an addition / subtraction signal Vs.

[0019] The comparator 40 obtains the addition / subtraction signal Vs from the addition / subtraction unit 30. The comparator 40 compares the voltage of the addition / subtraction signal Vs with a predetermined voltage. Here, the predetermined voltage may be an intermediate voltage of the power supply voltage in the case of a single power supply, or 0 [V (volts)] in the case of dual power supplies. That is, the comparator 40 determines whether the addition / subtraction signal Vs is greater than the intermediate value. The comparator 40 outputs the comparison result to the shift register circuit 50 as a comparator output signal Ds. The comparator output signal Ds may be a 1-bit binary signal. In the following description, a single power supply of VDD=5 [V] is used as an example, and the predetermined voltage is 2.5 [V].

[0020] The shift register circuit 50 is a serial-in, parallel-out (SIPO) type shift register. The shift register circuit 50 holds a comparator output signal Ds, which is a comparison result by the comparator 40. The number of bits of the shift register circuit 50 may be based on the resolution of the angle that the semiconductor device 1 can detect. The resolution of the angle that the semiconductor device 1 can detect may be, for example, 5 bits (2 to the power of 5=32 gradations, one gradation is 360 degrees / 32 gradations=11.25 degrees). The shift register circuit 50 operates based on a reference clock signal CLK. When the reference clock signal CLK is input, the data held by the shift register circuit 50 is shifted by one bit. The reference clock signal CLK is supplied not only to the shift register circuit 50 but also to the control circuit 60 and the decoder circuit 70. The shift register circuit 50, the control circuit 60, and the decoder circuit 70 operate in synchronization with the reference clock signal CLK. The shift register circuit 50 outputs the data it holds to the decoder circuit 70 in response to a latch signal (not shown) synchronized with the reference clock signal CLK. In the illustrated example, 5-bit data 5b is output to the decoder circuit 70. The shift register circuit 50 also outputs the data it holds to the control circuit 60 as a shift register hold value Sc in synchronization with the reference clock signal CLK. A connection point between the shift register circuit 50, the control circuit 60, and the decoder circuit 70 is illustrated as a node N1.

[0021] The control circuit 60 acquires the shift register hold value Sc from the shift register circuit 50. The control circuit 60 determines and outputs the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs based on the acquired shift register hold value Sc. Here, the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs provide suitable weighting coefficients for the magnetic flux density Bx in the first direction and the magnetic flux density By in the second direction. Here, in this embodiment, a phase shift process is performed by adding and subtracting the weighted magnetic flux density, and the phase-shifted angle vector signal is sequentially coded to perform a binary search to obtain absolute angle information. The control circuit 60 determines the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs based on the shift register hold value Sc. The first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs may, for example, satisfy the following formula (1).

[0022] Acosθ+Bsinθ=√(A+B)^2×cos(θ+Φ), Φ=arctan(B / A), coefficient A=√tanΦ / (√tanΦ+1 / √tanΦ), coefficient B=(1 / √tanΦ) / (√tanΦ+1 / √tanΦ), A+B=1...(1)

[0023] The control circuit 60 arbitrarily sets the phase angle Φ from the absolute angle θ by a combination of the coefficients A and B. That is, the control circuit 60 can also be said to control the value of a signal corresponding to the output of the first magnetic sensor element 11 and the value of a signal corresponding to the output of the second magnetic sensor element 12 according to the value held by the shift register circuit 50. Specifically, the control circuit 60 calculates a coefficient for controlling the current value output by the voltage-current conversion unit 20 according to the value held by the shift register circuit 50, and outputs the calculated coefficient to the voltage-current conversion unit 20. The voltage-current conversion unit 20 performs voltage-current conversion according to the coefficient acquired from the control circuit 60, thereby outputting the value of a signal corresponding to the output of the first magnetic sensor element 11 and the value of a signal corresponding to the output of the second magnetic sensor element 12.

[0024] The decoder circuit 70 outputs the value held in the shift register circuit 50. It can also be said that the decoder circuit 70 outputs a signal according to the angle formed by the magnetic flux density vector. In the following description, the output signal by the decoder circuit 70 may be referred to as an absolute angle output signal Do. The absolute angle output signal Do may be an analog signal or a multi-bit binary code signal. The output terminal by the decoder circuit 70 is illustrated as an output terminal To.

[0025] 2 is a circuit diagram showing an example of a circuit configuration of the voltage-current converter according to the first embodiment. An example of a detailed circuit configuration of the voltage-current converter 20 will be described with reference to the same figure. The voltage-current converter 20 includes a first differential pair 21 and a second differential pair 22. The voltage-current converter 20 includes the first differential pair 21 to convert a signal corresponding to the output of the first magnetic sensor element 11 into a current signal, and includes the second differential pair 22 to convert a signal corresponding to the output of the second magnetic sensor element 12 into a current signal. The first differential pair 21 and the second differential pair 22 can be said to be transconductor stages that convert a voltage signal into a current signal.

[0026] The first differential pair 21 includes a transistor 211, a transistor 212, and a current source 213. The first differential pair 21 acquires a first magnetic sensor element output signal Vx1, which is a differential signal proportional to the magnetic flux density Bx, via a terminal 201, and converts the acquired differential signal into a differential current Ix2. The first differential pair 21 acquires a first control signal Sa via a terminal 205, and changes the tail current based on the acquired first control signal Sa. In the illustrated example, the tail current is controlled to aIref based on the first control signal Sa. The first differential pair 21 controls the tail current to control the conversion coefficient from the voltage signal to the current signal. The converted differential current is output to the adder / subtractor 30 via a terminal 203.

[0027] The second differential pair 22 includes a transistor 221, a transistor 222, and a current source 223. The second differential pair 22 acquires a second magnetic sensor element output signal Vy1, which is a differential signal proportional to the magnetic flux density By, via a terminal 202, and converts the acquired differential signal into a differential current Iy2. The second differential pair 22 acquires a second control signal Sb via a terminal 202, and changes the tail current based on the acquired second control signal Sb. In the illustrated example, the tail current is controlled to bIref based on the second control signal Sb. The second differential pair 22 controls the tail current to control the conversion coefficient from the voltage signal to the current signal. The converted differential current is output to the adder / subtractor 30 via a terminal 204.

[0028] 3 is a circuit diagram showing an example of a circuit configuration of the adding / subtracting unit according to the first embodiment. An example of a detailed circuit configuration of the adding / subtracting unit 30 will be described with reference to the same figure. The adding / subtracting unit 30 includes a feedback differential pair 31, a current-voltage converter 32, a switch circuit 33, a resistor 91, and a resistor 92. By including the feedback differential pair 31, the current-voltage converter 32, the switch circuit 33, the resistor 91, and the resistor 92, the adding / subtracting unit 30 adds or subtracts a current signal based on the output of the first magnetic sensor element 11 and a current signal based on the output of the second magnetic sensor element 12.

[0029] The feedback differential pair 31 includes a current source 311, a current source 312, a transistor 313, a transistor 314, and a current source 315. The feedback differential pair 31 can be said to be a feedback differential pair that receives a feedback signal. The feedback differential pair 31 can also be said to be a feedback differential pair transconductor stage that converts a feedback voltage VFB, which is obtained by dividing the output voltage Vs by resistors 91 and 92, into a feedback current signal.

[0030] The switch circuit 33 is provided either between the terminal 301 and the feedback differential pair 31 or between the terminal 302 and the feedback differential pair 31. The switch circuit 33 switches the polarity of the voltage Vy2 or the voltage Vx2. By providing the switch circuit 33, the adder-subtractor unit 30 switches between addition and subtraction. Whether addition or subtraction is performed is based on a polarity switching control signal Dcrs output by the control circuit 60. In the illustrated example, the switch circuit 33 is provided between the terminal 302 and the feedback differential pair 31. That is, in the illustrated example, the switch circuit 33 switches the polarity of the voltage Vy2.

[0031] In the illustrated example, an example has been described in which the switch circuit 33 is provided in the adding / subtracting unit 30. However, the present embodiment is not limited to this example, and the switch circuit 33 may be provided in the voltage-current converting unit 20. In this case, the switch circuit 33 is provided either between the first differential pair 21 and the terminal 203 or between the second differential pair 22 and the terminal 204.

[0032] The current-voltage converter 32 includes a transistor 321, a transistor 322, a transistor 323, and a transistor 324. The current-voltage converter 32 can also be said to be a current mirror circuit that receives the difference between the sum of Ix2 and Iy2 and the feedback signal current Ifb. The current-voltage converter 32 converts the current signal into a voltage signal and outputs it. The output signal from the current-voltage converter 32 is input to the next-stage comparator 40 as an addition / subtraction signal Vs.

[0033] The resistors 91 and 92 divide the output voltage Vs with respect to the common-mode reference voltage VCM to generate a feedback signal VFB. The resistors 91 and 92 determine the closed-loop gain. The gain is determined by the ratio of the resistance values ​​of the resistors 91 and 92 to the current sources 213 and 223 and the current source 315.

[0034] Here, at least one of the resistance values ​​of the resistors 91 and 92 may be a variable resistor. The voltage division ratio may be adjusted by controlling the resistance value of either resistor. However, the present embodiment is not limited to this example, and the voltage division ratio may not be adjusted. For example, when the input magnetic flux density is known and constant, the resistance values ​​of the resistors 91 and 92 may be fixed values.

[0035] 4 is a functional configuration diagram showing an example of the functional configuration of the control circuit according to the first embodiment. With reference to the same figure, an example of the detailed functional configuration of the control circuit 60 will be described. The control circuit 60 includes a counter circuit 61 and a control signal decoder circuit 62.

[0036] The counter circuit 61 performs a count operation in response to the reference clock signal CLK. The counter circuit 61 outputs the result of the count operation as a count signal Sd to the control signal decoder circuit 62. For example, when the semiconductor device 1 calculates a rotation angle with a 5-bit resolution, the counter circuit 61 may output the count signal Sd at a point in time when 5 bits of clocks (e.g., 5 clocks) are counted. The count signal Sd is output to, for example, the decoder circuit 70. The decoder circuit 70 may perform a latch process based on the count signal Sd.

[0037] The control signal decoder circuit 62 calculates the values ​​of the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs according to the count signal Sd obtained from the counter circuit 61 and the shift register hold value Sc, and outputs the calculated values. The control signal decoder circuit 62 controls the values ​​of the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs based on the shift register hold value Sc, thereby controlling them to coefficients according to the angle narrowed down so far.

[0038] In the above example, the polarity switching control signal Dcrs is described as a 1-bit binary signal. However, the polarity switching control signal Dcrs is not limited to the example of a 1-bit binary signal, and may be a 6-bit signal as shown in the figure. The polarity switching control signal Dcrs has information of 2 or more bits, for example, when weighting the X-axis signal and the Y-axis signal and adding or subtracting them. In this case, the polarity switching control signal Dcrs holds information for controlling the positive and negative signs of each weighting coefficient circuit part. The process of weighting the X-axis signal and the Y-axis signal and adding or subtracting them will be described later.

[0039] [Angle determination processing operation] 5 is a diagram for explaining the angle determination process according to the first embodiment. With reference to the same figure, how the angle information is successively narrowed down when the angle vector of the magnetic field to be detected is 62 degrees will be explained. In the illustrated example, the case where the resolution is 5 bits (i.e., 11.25 degrees) will be explained.

[0040] The semiconductor device 1 first determines whether the angle vector of the magnetic field is in any one of the first to fourth quadrants. In the following description, such a determination may be referred to as a quadrant determination or a first determination. After it is determined whether the angle vector of the magnetic field is in any one of the first to fourth quadrants, the semiconductor device 1 sequentially determines detailed angles within the quadrants. In the following description, such a determination may be referred to as an intra-quadrant determination or a second determination.

[0041] When the angle vector of the magnetic field to be detected is 62 degrees, it is first determined that the magnetic field is in the first quadrant by quadrant determination. Specifically, two determinations are performed to determine the quadrant. For example, the first determination narrows down the location of the magnetic field to either the first or fourth quadrant, or the second or third quadrant. The second determination narrows down the location of the magnetic field to either the first or fourth quadrant.

[0042] In addition, the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs output from the control circuit 60 in the quadrant judgment may be the same regardless of the detection result, but the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs output from the control circuit 60 in the intra-quadrant judgment are determined according to the previous judgment result, i.e., the values ​​held in the shift register circuit 50.

[0043] Next, an in-quadrant determination is performed in the first quadrant. Specifically, it is determined whether the angle vector of the magnetic field to be detected is greater than or smaller than 45 degrees. Since 62 degrees is greater than 45 degrees, it is determined that the angle is between 90 degrees and 45 degrees. Next, it is determined whether the angle vector of the magnetic field to be detected is greater than or smaller than 67.5 degrees. Since 62 degrees is less than 67.5 degrees, it is determined that the angle is between 67.5 degrees and 45 degrees. Next, it is determined whether the angle vector of the magnetic field to be detected is greater than or smaller than 56.25 degrees. Since 62 degrees is greater than 56.25 degrees, it is determined that the angle is between 67.5 degrees and 56.25 degrees. In this way, the semiconductor device 1 narrows down the range of the angle vector by repeatedly comparing whether the addition / subtraction signal Vs is greater than or smaller than the intermediate value. In the illustrated example, the resolution is 5 bits, 2 bits are used for quadrant determination, and 3 bits are used for quadrant determination.

[0044] Next, an example of a determination process by the rotation angle sensor according to the first embodiment will be described with reference to Fig. 6 to Fig. 9. First, a specific example of quadrant determination will be described with reference to Fig. 6. Next, a specific example of in-quadrant determination in each quadrant will be described with reference to Fig. 6 to Fig. 9.

[0045] 6 is a first flowchart showing an example of a determination process by the rotation angle sensor according to the first embodiment. A specific example of quadrant determination will be described with reference to the drawing.

[0046] (Step S101) First, the semiconductor device 1 judges whether the voltage Vx=Cosθ corresponding to the magnetic flux density Bx in the X direction output from the first magnetic sensor element 11 is positive or negative. Specifically, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output from the addition / subtraction unit 30 becomes the voltage Vx=Cosθ, and the comparator 40 performs the judgment. If Vx=Cosθ>0, that is, if the comparator output signal Ds from the comparator 40 is "H", the semiconductor device 1 judges that it is the first or fourth quadrant, and proceeds to the process of step S102 (step S101; TRUE). If Vx=Cosθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 judges that it is the second or third quadrant, and proceeds to the process of step S103 (step S101; FALSE).

[0047] (Step S102) Next, the semiconductor device 1 judges whether the voltage Vy=Sinθ corresponding to the magnetic flux density By in the Y direction output from the second magnetic sensor element 12 is positive or negative. Specifically, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output from the addition / subtraction unit 30 becomes the voltage Vy=Sinθ, and performs the judgment by the comparator 40. If Vy=Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that it is the first quadrant and proceeds to the process of step S111 (step S102; TRUE). Also, if Vy=Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that it is the fourth quadrant and proceeds to the process of step S141 in FIG. 9 (step S102; FALSE).

[0048] (Step S103) Similarly, the semiconductor device 1 judges whether the voltage Vy=Sinθ corresponding to the magnetic flux density By in the Y direction output from the second magnetic sensor element 12 is positive or negative. Specifically, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output from the addition / subtraction unit 30 becomes the voltage Vy=Sinθ, and performs the judgment by the comparator 40. If Vy=Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that it is the second quadrant and proceeds to the process of step S121 in FIG. 7 (step S103; TRUE). Also, if Vy=Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that it is the third quadrant and proceeds to the process of step S131 in FIG. 8 (step S103; FALSE).

[0049] Next, a specific example of the in-quadrant determination will be described with reference to FIG. 6. A series of operations in the determination process in the case where the angle vector of the magnetic field to be detected is present in the first quadrant will be described.

[0050] (Step S111) This step is the third judgment overall and the first judgment in the in-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.5Cosθ-0.5Sinθ, and performs judgment by the comparator 40. If 0.5Cosθ-0.5Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ<45 degrees and proceeds to the process of step S113 (step S111; TRUE). If 0.5Cosθ-0.5Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ>45 degrees and proceeds to the process of step S112 (step S111; FALSE).

[0051] (Step S112) This step and step S113 are the fourth judgment overall, and the second judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.707Cosθ-0.293Sinθ, and performs judgment by the comparator 40. If 0.707Cosθ-0.293Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ<67.5 degrees, and proceeds to the process of step S115 (step S112; TRUE). Furthermore, if 0.707Cosθ-0.293Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 determines that θ>67.5 degrees, and proceeds to step S114 (step S112; FALSE).

[0052] (Step S113) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.293Cosθ-0.707Sinθ, and the comparator 40 performs a judgment. If 0.293Cosθ-0.707Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ<22.5 degrees and proceeds to step S117 (step S113; TRUE). If 0.293Cosθ-0.707Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ>22.5 degrees and proceeds to step S116 (step S113; FALSE).

[0053] (Step S114) This step and steps S115 to S117 are the fifth judgment overall, and the third judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.834Cosθ-0.166Sinθ, and performs judgment by the comparator 40. If 0.834Cosθ-0.166Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 67.5 degrees<θ<78.75 degrees, and ends the process (step S114; TRUE). Furthermore, if 0.834Cosθ-0.166Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 determines that 78.75 degrees<θ<90 degrees, and ends the process (step S114; FALSE).

[0054] (Step S115) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.598Cosθ-0.402Sinθ, and the comparator 40 performs a judgment. If 0.598Cosθ-0.402Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 45 degrees<θ<56.25 degrees, and ends the process (Step S115; TRUE). If 0.598Cosθ-0.402Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 56.25 degrees<θ<67.5 degrees, and ends the process (Step S115; FALSE).

[0055] (Step S116) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.402Cosθ-0.598Sinθ, and the comparator 40 performs a judgment. If 0.402Cosθ-0.598Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 22.5 degrees<θ<33.75 degrees, and ends the process (Step S116; TRUE). If 0.402Cosθ-0.598Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 33.75 degrees<θ<45 degrees, and ends the process (Step S116; FALSE).

[0056] (Step S117) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.166Cosθ-0.834Sinθ, and the comparator 40 performs a judgment. If 0.166Cosθ-0.834Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 0 degrees<θ<11.25 degrees, and ends the process (Step S117; TRUE). If 0.166Cosθ-0.834Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 11.25 degrees<θ<22.5 degrees, and ends the process (Step S117; FALSE).

[0057] In FIG. 6, as an example of a specific flow, a flow in the case where the direction angle θ of the magnetic flux density B is 62 degrees (that is, 56.25 degrees<θ<67.5 degrees) is shown by adding circles to branch destinations.

[0058] 7 is a second flowchart showing an example of the determination process by the rotation angle sensor according to the first embodiment. With reference to the same figure, a series of operations of the determination process when the angle vector of the magnetic field to be detected exists in the second quadrant will be described. In the illustrated example, the quadrant determination (steps S101 to S103) has already been described with reference to FIG. 6, so the description will be omitted.

[0059] (Step S121) This step is the third judgment overall, and the first judgment in the in-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.5Cosθ+0.5Sinθ, and performs judgment by the comparator 40. If 0.5Cosθ+0.5Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ<135 degrees and proceeds to the process of step S122 (step S121; TRUE). If 0.5Cosθ+0.5Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ>135 degrees and proceeds to the process of step S123 (step S121; FALSE).

[0060] (Step S122) This step and step S123 are the fourth judgment overall, and the second judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.707Cosθ+0.293Sinθ, and performs judgment by the comparator 40. If 0.707Cosθ+0.293Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>112.5 degrees, and proceeds to the process of step S124 (step S122; TRUE). Furthermore, if 0.707Cosθ+0.293Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is “L”, the semiconductor device 1 determines that θ<112.5 degrees, and proceeds to step S125 (step S122; FALSE).

[0061] (Step S123) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.293Cosθ+0.707Sinθ, and the comparator 40 performs a judgment. If 0.293Cosθ+0.707Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ<157.5 degrees and proceeds to step S126 (step S123; TRUE). If 0.293Cosθ+0.707Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ>157.5 degrees and proceeds to step S127 (step S123; FALSE).

[0062] (Step S124) This step and steps S125 to S127 are the fifth judgment overall, and the third judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.598Cosθ+0.402Sinθ, and performs judgment by the comparator 40. If 0.598Cosθ+0.402Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 123.75 degrees<θ<135 degrees, and ends the process (step S124; TRUE). Furthermore, if 0.598Cosθ+0.402Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 determines that 112.5 degrees<θ<123.75 degrees, and ends the process (step S124; FALSE).

[0063] (Step S125) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.834Cosθ+0.166Sinθ, and the comparator 40 performs a judgment. If 0.834Cosθ+0.166Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 101.25 degrees<θ<112.5 degrees, and ends the process (Step S125; TRUE). If 0.834Cosθ+0.166Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 90 degrees<θ<101.25 degrees, and ends the process (Step S125; FALSE).

[0064] (Step S126) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.166Cosθ+0.834Sinθ, and the comparator 40 performs a judgment. If 0.166Cosθ+0.834Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 168.75 degrees<θ<180 degrees, and ends the process (Step S126; TRUE). If 0.166Cosθ+0.834Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 157.5 degrees<θ<168.75 degrees, and ends the process (Step S126; FALSE).

[0065] (Step S127) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.402Cosθ+0.598Sinθ, and the comparator 40 performs a judgment. If 0.402Cosθ+0.598Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 146.25 degrees<θ<157.5 degrees, and ends the process (Step S127; TRUE). If 0.402Cosθ+0.598Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 135 degrees<θ<146.25 degrees, and ends the process (Step S127; FALSE).

[0066] In FIG. 7, as an example of a specific flow, a flow in the case where the direction angle θ of the magnetic flux density B is 117 degrees (that is, 112.5 degrees<θ<123.75 degrees) is shown by adding circles to branch destinations.

[0067] 8 is a third flowchart showing an example of the determination process by the rotation angle sensor according to the first embodiment. With reference to the same figure, a series of operations of the determination process when the angle vector of the magnetic field to be detected exists in the third quadrant will be described. In the illustrated example, the quadrant determination (steps S101 to S103) has already been described with reference to FIG. 6, so the description will be omitted.

[0068] (Step S131) ​​This step is the third judgment overall, and the first judgment in the in-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.5Cosθ-0.5Sinθ, and performs judgment by the comparator 40. If 0.5Cosθ-0.5Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>225 degrees, and proceeds to the process of step S133 (step S131; TRUE). If 0.5Cosθ-0.5Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ<225 degrees, and proceeds to the process of step S132 (step S131; FALSE).

[0069] (Step S132) This step and step S133 are the fourth judgment overall, and the second judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.293Cosθ-0.707Sinθ, and performs judgment by the comparator 40. If 0.293Cosθ-0.707Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>202.5 degrees, and proceeds to the process of step S134 (step S132; TRUE). Furthermore, if 0.293Cosθ-0.707Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 determines that θ<202.5 degrees, and proceeds to step S135 (step S132; FALSE).

[0070] (Step S133) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.707Cosθ-0.293Sinθ, and the comparator 40 performs a judgment. If 0.707Cosθ-0.293Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>247.5 degrees, and proceeds to the process of step S137 (step S133; TRUE). If 0.707Cosθ-0.293Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ<247.5 degrees, and proceeds to the process of step S136 (step S133; FALSE).

[0071] (Step S134) This step and steps S135 to S137 are the fifth judgment overall, and the third judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.402Cosθ-0.598Sinθ, and performs judgment by the comparator 40. If 0.402Cosθ-0.598Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 213.75 degrees<θ<225 degrees, and ends the process (step S134; TRUE). Furthermore, if 0.402Cosθ-0.598Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 determines that 202.5 degrees<θ<213.75 degrees, and ends the process (step S134; FALSE).

[0072] (Step S135) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.166Cosθ-0.834Sinθ, and the comparator 40 performs a judgment. If 0.166Cosθ-0.834Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 191.25 degrees<θ<202.5 degrees, and ends the process (Step S135; TRUE). If 0.166Cosθ-0.834Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 180 degrees<θ<191.25 degrees, and ends the process (Step S135; FALSE).

[0073] (Step S136) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.834Cosθ-0.166Sinθ, and the comparator 40 performs a judgment. If 0.834Cosθ-0.166Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 247.5 degrees<θ<258.75 degrees, and ends the process (Step S136; TRUE). If 0.834Cosθ-0.166Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 258.75 degrees<θ<270 degrees, and ends the process (Step S136; FALSE).

[0074] (Step S137) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.598Cosθ-0.402Sinθ, and the comparator 40 performs a judgment. If 0.598Cosθ-0.402Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 225 degrees<θ<236.25 degrees, and ends the process (Step S137; TRUE). If 0.598Cosθ-0.402Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 236.25 degrees<θ<247.5 degrees, and ends the process (Step S137; FALSE).

[0075] In FIG. 8, as an example of a specific flow, a flow in the case where the direction angle θ of the magnetic flux density B is 192 degrees (that is, 191.25 degrees<θ<202.5 degrees) is shown by adding circles to branch destinations.

[0076] 9 is a fourth flowchart showing an example of the determination process by the rotation angle sensor according to the first embodiment. With reference to the same figure, a series of operations of the determination process when the angle vector of the magnetic field to be detected exists in the fourth quadrant will be described. In the illustrated example, the quadrant determination (steps S101 to S103) has already been described with reference to FIG. 6, so the description will be omitted.

[0077] (Step S141) This step is the third judgment overall, and the first judgment in the in-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.5Cosθ+0.5Sinθ, and performs judgment by the comparator 40. If 0.5Cosθ+0.5Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>315 degrees, and proceeds to the process of step S142 (step S141; TRUE). If 0.5Cosθ+0.5Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ<315 degrees, and proceeds to the process of step S143 (step S141; FALSE).

[0078] (Step S142) This step and step S143 are the fourth judgment overall, and the second judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.293Cosθ+0.707Sinθ, and performs judgment by the comparator 40. If 0.293Cosθ+0.707Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>337.5 degrees, and proceeds to the process of step S144 (step S142; TRUE). Furthermore, if 0.293Cosθ+0.707Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is “L”, the semiconductor device 1 determines that θ<337.5 degrees, and proceeds to step S145 (step S142; FALSE).

[0079] (Step S143) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.707Cosθ+0.293Sinθ, and the comparator 40 performs a judgment. If 0.707Cosθ+0.293Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that θ>292.5 degrees, and proceeds to the process of step S146 (step S143; TRUE). If 0.707Cosθ+0.293Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that θ<292.5 degrees, and proceeds to the process of step S147 (step S143; FALSE).

[0080] (Step S144) This step and steps S145 to S147 are the fifth judgment overall, and the third judgment in the intra-quadrant judgment. First, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.166Cosθ+0.834Sinθ, and performs judgment by the comparator 40. If 0.166Cosθ+0.834Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 348.75 degrees<θ<360 degrees, and ends the process (step S144; TRUE). Furthermore, if 0.166Cosθ+0.834Sinθ>0 is not true, that is, if the comparator output signal Ds from the comparator 40 is "L", the semiconductor device 1 determines that 337.5°<θ<348.75°, and ends the process (step S144; FALSE).

[0081] (Step S145) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.402Cosθ+0.598Sinθ, and the comparator 40 performs a judgment. If 0.402Cosθ+0.598Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 326.25 degrees<θ<337.5 degrees, and ends the process (Step S145; TRUE). If 0.402Cosθ+0.598Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 315 degrees<θ<326.25 degrees, and ends the process (Step S145; FALSE).

[0082] (Step S146) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.598Cosθ+0.402Sinθ, and the comparator 40 performs a judgment. If 0.598Cosθ+0.402Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 292.5 degrees<θ<303.75 degrees, and ends the process (Step S146; TRUE). If 0.598Cosθ+0.402Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 303.75 degrees<θ<315 degrees, and ends the process (Step S146; FALSE).

[0083] (Step S147) Next, the control circuit 60 controls the first control signal Sa, the second control signal Sb, and the polarity switching control signal Dcrs so that the output voltage Vs output by the addition and subtraction unit 30 becomes 0.834Cosθ+0.166Sinθ, and the comparator 40 performs a judgment. If 0.834Cosθ+0.166Sinθ>0, that is, if the comparator output signal Ds by the comparator 40 is "H", the semiconductor device 1 judges that 281.25 degrees<θ<292.5 degrees, and ends the process (Step S147; TRUE). If 0.834Cosθ+0.166Sinθ>0 is not true, that is, if the comparator output signal Ds by the comparator 40 is "L", the semiconductor device 1 judges that 270 degrees<θ<281.25 degrees, and ends the process (Step S147; FALSE).

[0084] In FIG. 9, as an example of a specific flow, a flow in the case where the direction angle θ of the magnetic flux density B is 331 degrees (that is, 326.25 degrees<θ<337.5 degrees) is shown by adding circles to branch destinations.

[0085] Next, the timing of the determination process by the rotation angle sensor according to the first embodiment will be described with reference to Figs. 10 and 11. Fig. 10 is a first timing chart showing the timing of the determination process by the rotation angle sensor according to the first embodiment. Fig. 11 is a second timing chart showing the timing of the determination process by the rotation angle sensor according to the first embodiment. Figs. 10 and 11 show the time-dependent changes of the first magnetic sensor element output signal Vx1 which is the output of the first magnetic sensor element 11, the second magnetic sensor element output signal Vy1 which is the output of the second magnetic sensor element 12, the addition / subtraction signal Vs which is the output of the addition / subtraction unit 30, the reference clock signal CLK, the comparator output signal Ds which is the output of the comparator 40, the absolute angle output signal Do which is the output of the decoder circuit 70, the value of the coefficient a included in the first control signal Sa, the value of the coefficient b included in the second control signal Sb, and the polarity switching control signal Dcrs controlled by the control circuit 60, which are values ​​corresponding to the direction angle θ of the magnetic flux density B.

[0086] 10 and 11 show examples of the direction angle θ of magnetic flux density B, which are 62 degrees, 331 degrees, 192 degrees, and 117 degrees, as specific examples of the angle of the direction angle θ of magnetic flux density B with reference to Fig. 6 to Fig. 9. More specifically, from time t10 to time t15, quadrant determination and in-quadrant determination are shown when the angle of the direction angle θ of magnetic flux density B is 62 degrees, from time t15 to time t25, quadrant determination and in-quadrant determination are shown when the angle of the direction angle θ of magnetic flux density B is 331 degrees, from time t25 to time t35, quadrant determination and in-quadrant determination are shown when the angle of the direction angle θ of magnetic flux density B is 192 degrees, and from time t35 to time t42, quadrant determination is shown when the angle of the direction angle θ of magnetic flux density B is 117 degrees.

[0087] As shown in the figure, Vx1 which is the output of the first magnetic sensor element 11 and Vy1 which is the output of the second magnetic sensor element 12 change according to the direction angle θ of the magnetic flux density B. Furthermore, as a result of the control circuit 60 controlling the coefficient a included in the first control signal Sa, the coefficient b included in the second control signal Sb, and the polarity switching control signal Dcrs, the addition-subtraction signal Vs which is the output of the addition-subtraction unit 30 changes.

[0088] Here, during the quadrant determination period, the coefficient a included in the first control signal Sa and the coefficient b included in the second control signal Sb are 1 or 0. That is, in the quadrant determination, either a signal corresponding to the output of the first magnetic sensor element 11 or a signal corresponding to the output of the second magnetic sensor element 12 is output to the addition and subtraction unit 30. That is, it can be said that the signal generating circuit 26 generates either a signal corresponding to the output of the first magnetic sensor element 11 or a signal corresponding to the output of the second magnetic sensor element 12 as a signal used for the quadrant determination. Also, in the in-quadrant determination, addition and subtraction are performed using a value corresponding to the coefficient a included in the first control signal Sa and the coefficient b included in the second control signal Sb. That is, it can be said that the signal generating circuit 26 outputs a signal used for the in-quadrant determination, and then adds or subtracts the signal corresponding to the output of the first magnetic sensor element 11 and the signal corresponding to the output of the second magnetic sensor element 12 to generate a signal used for the in-quadrant determination.

[0089] The polarity switching control signal Dcrs is fixed to the quadrant determination section "L". In the intra-quadrant determination, it is appropriately set according to the determination results up to that point (specifically, the quadrant determination result). In the first and third quadrants where cosθ and sinθ have the same sign, the polarity switching control signal Dcrs=1. In the second and fourth quadrants where cosθ and sinθ have different signs, the polarity switching control signal Dcrs=0.

[0090] The comparator output signal Ds is switched according to the change in the addition-subtraction signal Vs. Specifically, when the addition-subtraction signal Vs is greater than the median value, the comparator output signal Ds is "H," and when the addition-subtraction signal Vs is less than the median value, the comparator output signal Ds is "L." The comparator output signal Ds is the determination result in the quadrant determination and the in-quadrant determination.

[0091] As shown in the figure, the absolute angle is gradually specified as a result of sequential determinations. The shift register circuit 50 holds the sequential results and outputs the held value in synchronization with the final clock (the illustrated example is an example of 5 bits, so the fifth clock).

[0092] 12 is a diagram showing an example of coefficients used by the rotation angle sensor according to the first embodiment. With reference to the drawing, an example of coefficients used by the rotation angle sensor according to the first embodiment will be described. The drawing shows the values ​​of coefficient a and coefficient b for each angle when an angle is to be determined with a 5-bit resolution.

[0093] The values ​​of coefficient a and coefficient b are determined so that acrtan(b' / a')=θth, a'^2+b'^2=1. Note that coefficient 1 is code 1, coefficient 0 is code 0, and 1 / 31=0.03226 per code.

[0094] In this embodiment, it is preferable to perform quantization using a number of bits that is one bit more than the number of bits that indicates the resolution with which the semiconductor device 1 detects the rotation angle. For example, when the resolution is 5 bits, it is preferable to perform quantization using 5+1=6 bits. This is because it is not easy to express a coefficient of 0.5 when quantization is performed using the same number of bits as the resolution. For example, when expressing a coefficient of 0.5 using 5 bits, one is set to 1 / 2 and the other is set to 1 / 4+1 / 8+1 / 16+1 / 32. That is, the sum of the other cannot be 0.5. Therefore, by further preparing a redundant bit that expresses 1 / 32, the sum of the other can be set to 0.5, and it becomes possible to express the coefficient 0.5. If N bits plus one redundant bit with the same weight as the LSB are called N.1 bits, as shown in the figure, in this embodiment, by using 5.1 bits including the redundant bit, no coefficient quantization threshold error occurs even when a coefficient of 0.5 is required, such as 45 degrees, 135 degrees, 225 degrees, and 315 degrees.

[0095] The resolution with which the semiconductor device 1 detects the rotation angle is the number of bits of the shift register circuit 50. Therefore, it can be said that the number of bits of the coefficients calculated by the control circuit 60 is larger than the number of bits of the shift register circuit 50. Furthermore, it can be said that the number of bits of the coefficients calculated by the control circuit 60 is preferably one bit larger than the number of bits of the shift register circuit 50. When the value held by the shift register circuit 50 is a specific value (for example, in the case of angles that require a coefficient of 0.5, such as 45 degrees, 135 degrees, 225 degrees, and 315 degrees), the control circuit 60 reduces the quantization threshold error by calculating the coefficient using the one bit. Note that the redundant bit may be disabled except for angles that require a coefficient of 0.5, such as 45 degrees, 135 degrees, 225 degrees, and 315 degrees.

[0096] As shown in the figure, the difference between the quantized coefficients a' and b' and the theoretical values ​​is small, and the calculated threshold angle error is within ±1.5 degrees. This threshold angle error is about 13% of the resolution, which is considered to be practically acceptable depending on the application. In addition, the DAC ratio accuracy configured with a current mirror is generally better than the threshold angle error of about 13%, and does not become a bottleneck in the angle accuracy.

[0097] FIG. 13 is a diagram showing an example of an output value of the decoder circuit according to the first embodiment. With reference to the same figure, an example of an absolute angle output signal Do output by the decoder circuit 70 will be described. FIG. 13(A) is an example of a case where the absolute angle output signal Do output by the decoder circuit 70 is a multi-bit binary code signal. In this case, the decoder circuit 70 may be a latch circuit that outputs a 5-bit binary code signal held by the shift register circuit 50. Also, FIG. 13(B) is an example of a case where the absolute angle output signal Do output by the decoder circuit 70 is an analog voltage output. In this case, the decoder circuit 70 may include a DAC circuit (digital-analog converter circuit) in the subsequent stage of the above-mentioned latch circuit.

[0098] [Modification of the first embodiment] FIG. 14 is a diagram showing a modified example of the voltage-current converter according to the modified example of the first embodiment. With reference to the same figure, a functional configuration of a voltage-current converter 20A according to the modified example of the first embodiment will be described. The semiconductor device 1A according to the modified example of the first embodiment includes a voltage-current converter 20A instead of the voltage-current converter 20. The voltage-current converter 20A includes a switching circuit 23, a differential pair circuit 24, and a switch circuit 25. In the modified example of the first embodiment, the control circuit 60 controls the first control signal Sa and the second control signal Sb output to the voltage-current converter 20 by a 6-bit control signal including a redundant bit. In the modified example of the first embodiment, the first control signal Sa and the second control signal Sb, which are 6-bit control signals including a redundant bit, are used to exclusively switch the input signals to the differential pair, thereby exclusively sharing the transconductors of the X-axis signal and the Y-axis signal.

[0099] The switching circuit 23 switches to exclusively supply one of Vx1, which is the output and differential signal of the first magnetic sensor element 11, Vy1, which is the output and differential signal of the second magnetic sensor element 12, or Vss to the differential pair circuit 24. The switching circuit 23 switches based on a first control signal Sa and a second control signal Sb, which are 6-bit control signals. The case where Vss is selected is when the redundant bit is invalidated for angles other than those requiring a coefficient of 0.5, such as 45 degrees, 135 degrees, 225 degrees, and 315 degrees.

[0100] The differential pair circuit 24 comprises a first differential pair by including transistors 241A, 241B, and a current source 241C, a second differential pair by including transistors 242A, 242B, and a current source 242C, a third differential pair by including transistors 243A, 243B, and a current source 243C, a fourth differential pair by including transistors 244A, 244B, and a current source 244C, a fifth differential pair by including transistors 245A, 245B, and a current source 245C, and a sixth differential pair by including transistors 246A, 246B, and a current source 246C.

[0101] The first differential pair has a transconductance coefficient of K / 2 and a tail current of Iref / 2. The second differential pair has a transconductance coefficient of K / 4 and a tail current of Iref / 4. The third differential pair has a transconductance coefficient of K / 8 and a tail current of Iref / 8. The fourth differential pair has a transconductance coefficient of K / 16 and a tail current of Iref / 16. The fifth differential pair has a transconductance coefficient of K / 32 and a tail current of Iref / 32. The sixth differential pair has a transconductance coefficient of K / 32 and a tail current of Iref / 32.

[0102] Here, when determining 45 degrees, 135 degrees, 215 degrees, and 315 degrees (i.e., coefficient a=b=0.5), all bits of the first to sixth differential pairs (when the differential pairs are not distinguished from one another) are valid. When determining other angles (i.e., coefficient a≠b), the second of Iref / 32 (i.e., the sixth differential pair) is invalidated, and the other bit differential pairs are exclusively selected on the X-axis and Y-axis. It can also be said that the second of Iref / 32 (i.e., the sixth differential pair) is a differential pair for expressing a redundant bit that is used only when all bits are selected. In the illustrated example, Iref / 2 and Iref / 8 are selected on the X-axis, and Iref / 4, Iref / 16, and Iref / 32 are selected on the Y-axis.

[0103] In the illustrated example, a 5-bit resolution (i.e., 11.25 degrees) is shown. As another example, when configuring a rotation angle sensor with 8-bit resolution (i.e., 1.41 degrees), it is preferable to add three more differential pairs and configure Iref / 2 to Iref / 256 + redundant bit Iref / 256. In this case, the LSB (least significant bit) is 0.78% of the MSB (most significant bit), which is a region that is limited by the current ratio accuracy.

[0104] The switch circuit 25 switches the polarity of the output signal from the differential pair circuit 24 by a 6-bit polarity switching control signal Dcrs controlled by the control circuit 60. The switch circuit 25 outputs Vsum obtained as a result of switching the polarity to the addition / subtraction unit 30. When the voltage-to-current conversion unit 20A includes the switch circuit 25, the polarity has already been set by the control circuit 60, so the addition / subtraction unit 30 does not need to include the switch circuit 33 described with reference to FIG. 3.

[0105] [Summary of embodiment 1] According to the embodiment described above, the rotation angle sensor includes the first magnetic sensor element 11 to detect the magnetic flux density in a first direction, the second magnetic sensor element 12 to detect the magnetic flux density in a second direction intersecting the first direction, the first current source 81 to supply a current to the first magnetic sensor element 11, the second current source 82 to supply a current to the second magnetic sensor element 12, the signal generating circuit 26 to generate a signal by adding or subtracting a signal corresponding to the output of the first magnetic sensor element 11 and a signal corresponding to the output of the second magnetic sensor element 12, the comparator 40 to compare the signal generated by the signal generating circuit 26 with a predetermined voltage, the shift register circuit 50 to hold the result of the comparison by the comparator 40, and the control circuit 60 to control the value of the signal corresponding to the output of the first magnetic sensor element 11 and the value of the signal corresponding to the output of the second magnetic sensor element 12 according to the value held by the shift register circuit 50. By adopting such a configuration, the rotation angle sensor performs addition and subtraction processing on the output voltage of the first magnetic sensor element 11 in the first direction and the output voltage of the magnetic sensor element in the second direction using an appropriate combination of weighting coefficients, thereby sequentially determining the sign of the phase-shifted angle vector signal. That is, the rotation angle sensor according to this embodiment obtains absolute angle information by sequentially repeating a binary search. By adopting such a configuration, the rotation angle sensor operates as a successive approximation type A / D converter, and does not require a so-called A / D converter that simply converts the amplitude information of each axis sensor output signal into a digital code, or a digital arctangent (arctan) calculation processing circuit in the subsequent stage. Therefore, the rotation angle sensor can be configured with a relatively simple linear analog circuit instead of performing nonlinear vector calculation processing. Therefore, according to this embodiment, the circuit scale can be reduced, and area saving can be achieved.

[0106] Also, according to this embodiment, as described with reference to Fig. 14, it is preferable to configure the weighting current DAC (i.e., voltage-current conversion unit 20A) to have N bits representing the resolution plus a least significant bit as a redundant bit. For example, in the case of 5 bits, by using a redundant 1LSB, it becomes possible to cover the coefficients required for two axes with Iref / 2+Iref / 4+Iref / 8+Iref / 16+Iref / 32 x 2. Therefore, according to this embodiment, by using the redundant bit, it is possible to obtain an approximation of the required weighting coefficient with a small number of current sources.

[0107] The rotation angle sensor according to this embodiment is suitable for low resolution specifications of up to about 6 to 7 bits. If the resolution is 6 to 7 bits or less, the circuit scale of the current DAC (voltage-current conversion unit 20A) is small, and it is easy to ensure the DAC ratio accuracy. Therefore, if the resolution is 6 to 7 bits or less, the effect of this embodiment that it can be configured with a relatively simple linear analog circuit can be further obtained.

[0108] [Second embodiment] Next, a semiconductor device 1B according to a second embodiment will be described with reference to Fig. 15 to Fig. 17. The second embodiment is different from the first embodiment in that, instead of outputting the first control signal Sa and the second control signal Sb to the voltage-current converter 20, the first control signal Sa and the second control signal Sb are output to a current source that supplies current to the first magnetic sensor element 11 and the second magnetic sensor element 12.

[0109] FIG. 15 is a functional configuration diagram showing an example of the functional configuration of the semiconductor device according to the second embodiment. With reference to the same figure, an example of the functional configuration of the semiconductor device 1B will be described. The semiconductor device 1B is different from the first embodiment in that it includes a voltage-current conversion unit 20B instead of the voltage-current conversion unit 20, a first current source 83 instead of the first current source 81, and a second current source 84 instead of the second current source 82. A configuration including the voltage-current conversion unit 20B and the addition / subtraction unit 30 may be referred to as a signal generating circuit 26B. In the description of the semiconductor device 1B, the same components as those of the semiconductor device 1 may be denoted by the same reference numerals and description thereof may be omitted.

[0110] The first current source 83 acquires a first control signal Sa from the control circuit 60. The first current source 83 supplies a current according to the acquired first control signal Sa to the first magnetic sensor element 11. The first magnetic sensor element 11 outputs a voltage according to the supplied current and the magnetic flux density Bx in the first direction as a first magnetic sensor element output signal Vx1.

[0111] The second current source 84 acquires a second control signal Sb from the control circuit 60. The second current source 84 supplies a current according to the acquired second control signal Sb to the second magnetic sensor element 12. The second magnetic sensor element 12 outputs a voltage according to the supplied current and the magnetic flux density By in the second direction as a second magnetic sensor element output signal Vy1. Note that the first current source 83 and the second current source 84 may have the same configuration as each other.

[0112] In the second embodiment, the control circuit 60 calculates a coefficient a for controlling the output current by the first current source 83 and calculates a coefficient b for controlling the output current by the second current source 84 in accordance with the value held by the shift register circuit 50. The control circuit 60 outputs a first control signal Sa including the coefficient a to the first current source 83 and outputs a second control signal Sb including the coefficient b to the second current source 84, thereby controlling the output from the first magnetic sensor element 11 and the second magnetic sensor element 12 to the signal generating circuit 26.

[0113] 16 is a circuit diagram showing an example of a circuit configuration of a voltage-to-current converter according to the second embodiment. An example of a circuit configuration of a voltage-to-current converter 20B will be described with reference to the same figure. The voltage-to-current converter 20B includes a first differential pair 21B and a second differential pair 22B. The first differential pair 21B and the second differential pair 22B differ from the first differential pair 21 and the second differential pair 22 in that the tail currents of the first differential pair 21B and the second differential pair 22B are not controlled by the control circuit 60.

[0114] The voltage-current converter 20B acquires the magnetic flux density Bx in the first direction from the first magnetic sensor element 11, and acquires the magnetic flux density By in the second direction from the second magnetic sensor element 12. The magnetic flux density Bx in the first direction and the magnetic flux density By in the second direction acquired by the voltage-current converter 20B are values ​​according to the first control signal Sa and the second control signal Sb from the control circuit 60. The first differential pair 21B and the second differential pair 22B convert the received differential signals into differential currents.

[0115] 17 is a circuit diagram showing a modified circuit configuration of the current source according to the second embodiment. With reference to the same figure, an example of the circuit configuration of a current source 85 which is a modified version of the first current source 83 and the second current source 84 will be described. This modified version differs from the semiconductor device 1B in that a current source 85 is provided instead of the first current source 83 and the second current source 84. In this modified version, the first magnetic sensor element 11 and the second magnetic sensor element 12 exclusively share a drive current source.

[0116] The current source 85 includes a first-bit current source 851, a second-bit current source 852, a third-bit current source 853, a fourth-bit current source 854, a fifth-bit current source 855, a sixth-bit current source 856, and a switching circuit 857. The first-bit current source 851 to the sixth-bit current source 856 switch the current value output to the first magnetic sensor element 11 and the second magnetic sensor element 12 according to the first control signal Sa and the second control signal Sb. The first-bit current source 851 is a current source that supplies Idrv / 2, the second-bit current source 852 is a current source that supplies Idrv / 4, the third-bit current source 853 is a current source that supplies Idrv / 8, the fourth-bit current source 854 is a current source that supplies Idrv / 16, the fifth-bit current source 855 is a current source that supplies Idrv / 32, and the sixth-bit current source 856 is a current source that supplies Idrv / 32.

[0117] Here, when the first bit current source 851 to the sixth bit current source 856 (when not distinguishing between them, they are also simply referred to as bit current sources) determine 45 degrees, 135 degrees, 215 degrees, and 315 degrees (i.e., coefficient a=b=0.5), all bits are valid and Idrv / 2 is equally distributed to the first magnetic sensor element 11 and the second magnetic sensor element 12. When determining other angles (i.e., coefficient a≠b), one Idrv / 32 (the fifth bit current source 855 or the sixth bit current source 856) is invalidated, and the output from the other bit current source is exclusively selected on the X-axis and the Y-axis. One Idrv / 32 (i.e., the fifth bit current source 855 or the sixth bit current source 856) can also be said to be a redundant bit that is used only when all bits are selected. In the example shown in the figure, Idrv / 2 and Idrv / 8 are selected for the X-axis, resulting in Idrvx=0.625Idrv. In the illustrated example, Idrv / 4, Idrv / 16, and Idrv / 32 are selected on the Y-axis, resulting in Idrvy=0.34375Idrv.

[0118] [Summary of embodiment 2] According to the embodiment described above, the control circuit 60 calculates coefficients for controlling the output currents from the first current source 83 and the second current source 84 according to the values ​​held by the shift register circuit 50, and outputs the coefficients to the first current source 83 and the second current source 84, respectively, thereby controlling the outputs from the first magnetic sensor element 11 and the second magnetic sensor element 12 to the signal generating circuit 26. That is, according to this embodiment, instead of controlling the voltage-current conversion unit 20, the driving current source of the magnetic sensor element is controlled to apply the coefficients used in the calculation. The rotation angle sensor according to this embodiment obtains absolute angle information by repeating a calculation using a signal to which the coefficients are applied. By adopting such a configuration, the rotation angle sensor operates as a successive approximation type A / D converter, and does not require a so-called A / D converter that simply converts the amplitude information of each axis sensor output signal into a digital code, or a digital arctangent (arctan) calculation processing circuit at a subsequent stage. Therefore, the rotation angle sensor can be configured by a relatively simple linear analog circuit instead of performing nonlinear vector calculation processing. Therefore, according to this embodiment, the circuit scale can be reduced, and area saving can be achieved. By adopting a configuration such as that of the second embodiment, it is possible to make the circuit scale relatively smaller than that of the first embodiment.

[0119] The above describes the form for carrying out the present invention using an embodiment, but the present invention is not limited to such an embodiment, and various modifications and substitutions can be made within the scope that does not deviate from the gist of the present invention. [Explanation of symbols]

[0120] 1...Semiconductor device 2...Semiconductor substrate 3...VDD pin 4...VSS terminal 10...Rotation angle sensor 11...First magnetic sensor element 12...Second magnetic sensor element 20...Voltage-current converter 26...Signal generation circuit 30…Addition and subtraction section 40...Comparator 50...Shift register circuit 60...Control circuit 70...Decoder circuit 81…First current source 82…Second current source Sa...First control signal Sb...Second control signal Dcrs…Polarity switching control signal Ds…Comparator output signal Do…Absolute angle output signal Vs…addition / subtraction signal Sc: Shift register hold value CLK: Reference clock signal 21…First differential pair 22...Second differential pair 31...Feedback differential pair 32...Current-to-voltage converter 33...Switch circuit 91, 92…Resistance 61...Counter circuit 62...Control signal decoder circuit

Claims

1. a first magnetic sensor element for detecting a magnetic flux density in a first direction; a second magnetic sensor element configured to detect a magnetic flux density in a second direction intersecting the first direction; a first current source that supplies power to the first magnetic sensor element; a second current source that supplies power to the second magnetic sensor element; a signal generating circuit that generates a signal by adding or subtracting a signal corresponding to an output of the first magnetic sensor element and a signal corresponding to an output of the second magnetic sensor element; a comparator that compares the signal generated by the signal generating circuit with a predetermined voltage; a shift register for holding the result of the comparison by the comparator; a control circuit that controls a value of a signal corresponding to an output of the first magnetic sensor element and a value of a signal corresponding to an output of the second magnetic sensor element in accordance with a value held by the shift register; A rotation angle sensor comprising:

2. The signal generating circuit includes: a voltage-current converter that converts a signal corresponding to an output of the first magnetic sensor element into a current signal, and converts a signal corresponding to an output of the second magnetic sensor element into a current signal; an adder / subtractor that adds or subtracts a current signal based on an output of the first magnetic sensor element and a current signal based on an output of the second magnetic sensor element; 2. The rotation angle sensor according to claim 1.

3. The control circuit calculates a coefficient for controlling a current value output by the voltage-to-current converter in accordance with the value held by the shift register, and outputs the coefficient to the voltage-to-current converter. The rotation angle sensor according to claim 2 .

4. The control circuit calculates a coefficient for controlling the output current from the first current source and the output current from the second current source in accordance with the value held by the shift register, and outputs the coefficient to the first current source and the second current source, respectively, thereby controlling the output from the first magnetic sensor element and the second magnetic sensor element to the signal generating circuit.

2. The rotation angle sensor according to claim 1.

5. the signal generating circuit generates, as a signal used for a first determination, either a signal corresponding to an output of the first magnetic sensor element or a signal corresponding to an output of the second magnetic sensor element, and outputs the signal used for the first determination, A signal corresponding to the output of the first magnetic sensor element and a signal corresponding to the output of the second magnetic sensor element are added or subtracted to generate a signal used for a second determination.

2. The rotation angle sensor according to claim 1.

6. the control circuit calculates, in accordance with the value held by the shift register, a coefficient for determining a value of a signal corresponding to an output of the first magnetic sensor element and a coefficient for determining a value of a signal corresponding to an output of the second magnetic sensor element; The number of bits of the coefficients calculated by the control circuit is greater than the number of bits of the shift register.

2. The rotation angle sensor according to claim 1.

7. the number of bits of the coefficient calculated by the control circuit is one bit larger than the number of bits of the shift register; The control circuit calculates a coefficient using one bit when the value held by the shift register is a specific value.

7. The rotation angle sensor according to claim 6.

8. A rotation angle sensor according to any one of claims 1 to 7 is formed on a semiconductor substrate. Semiconductor device.

Citation Information

Patent Citations

  • Integrated circuit for processing magnetic sensor signal, its rotation angle measuring method, and rotation angle sensor

    JP2004191101A