Magnetic sensor and magnetic sensor device

A magnetic sensor arranged on a second line forming an angle of 45° at a switched position for switching a state being set up on a first line that projects displacement of center of magnetic field generating means generating a magnetic field.

The present application is based on Japanese Patent Application No. 2008-211581 filed on Aug. 20, 2008, the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a magnetic sensor and a magnetic sensor device.

2. Related Art

As a conventional technique, a switch device is known which includes a casing, an inner rotor rotatably provided with respect to the casing and including a magnetic plate having a circular shape in which a north pole, a south pole and a north pole are magnetized in this order, and a Hall IC (Integrated Circuit) provided on a substrate facing the magnetic plate (e.g., JP-A 2008-130314).

According to this switch device, the magnetic plate also rotates in accordance with rotation of the inner rotor, and the Hall IC can output ON and OFF signals based on a variation of a magnetic field caused by the rotation.

However, in a conventional switch device, there is a problem that a revision of the arrangement of the Hall IC or of a related electronic circuit, etc., is required for changing a switched position of ON and OFF signals depending on the application, which results in a complicated design.

THE SUMMARY OF THE INVENTION

Therefore, it is an object of the invention to provide a magnetic sensor and a magnetic sensor device in which it is possible to easily set a switched position and a distance between the switched positions depending on the application without making the design complicated.

[1] According to a feature of the present invention, a magnetic sensor arranged on a second line forming an angle of 45° at a switched position for switching a state being set up on a first line that projects displacement of center of magnetic field generating means generating a magnetic field.

[2] In the magnetic sensor described in above-mentioned [1], the magnetic sensor comprises four magnetoresistance elements comprising magnetic sensing portions; and

when the magnetic field generating means is located at a position where an angle formed between the first line and a third line connecting the center of the magnetic field generating means on the first line to a center of the magnetic sensor is 90°, a first half-bridge circuit is composed of a first magnetoresistance element having the magnetic sensing portions parallel to a magnetic field direction and a second magnetoresistance element having the vertical magnetic sensing portions, and a full bridge-circuit is composed of the first half-bridge circuit and a second half-bridge circuit that is the 180 degrees rotated first half-bridge circuit.

[3] In the magnetic sensor described in above-mentioned [1], the magnetic field generating means is a permanent magnet having a circular cylindrical shape for radially generating the magnetic field.

[4] In the magnetic sensor described in above-mentioned [1], another magnetic sensor having the same structure is provided at a position axisymmetric with respect to the first line.

[5] According to a feature of the present invention, a magnetic sensor device, comprising:

a magnet field generating means for generating a magnet field; and

a magnetic sensor portion comprising second lines each forming an angle of 45° at at least one switched position for switching a plurality of states being set up on a first line that projects displacement of center of magnetic field generating means, and at least one magnetic sensor arranged on each of the second line.

[6] In the magnetic sensor device described in above-mentioned [5], the at least one magnetic sensor comprises four magnetoresistance elements each having magnetic sensing portions; and

when the magnetic field generating means is located at a position where an angle formed between the first line and a third line connecting the center of the magnetic field generating means on the first line to a center of the magnetic sensor is 90°, a first half-bridge circuit is composed of a first magnetoresistance element having the magnetic sensing portions parallel to a magnetic field direction and a second magnetoresistance element having the vertical magnetic sensing portions, and a full bridge-circuit is composed of the first half-bridge circuit and a second half-bridge circuit that is the 180 degrees rotated first half-bridge circuit.

[7] In the magnetic sensor device described in above-mentioned [5], the at least one magnetic sensor is each arranged at an equal distance from the first line.

[8] In the magnetic sensor device described in above-mentioned [5], the magnetic field generating means is a permanent magnet having a circular cylindrical shape for radially generating the magnetic field.

[9] In the magnetic sensor device described in above-mentioned [5], the magnetic sensor portion comprises a magnetic sensor having the same structure and the same number as the at least one magnetic sensor at a position axisymmetric with respect to the first line.

[10] According to a feature of the present invention, a magnetic sensor device, comprising:

a magnet field generating means for generating a magnet field;

a magnetic sensor portion comprising second lines each forming an angle of 45° at at least one switched position for switching a plurality of states being set up on a first line that projects displacement of center of magnetic field generating means, and at least one magnetic sensor arranged on each of the second line; and

a judgment portion for judging each state based on at least one output signal output from the at least one magnetic sensor, and then judging the plurality of states based on a combination of the each state.

EFFECT OF THE INVENTION

According to the invention, it is possible to easily set a switched position and a distance between the switched positions depending on the application without making the design complicated.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Next, preferred embodiments of the magnetic sensor and the magnetic sensor device according to the present invention will be explained in detail in conjunction with appended drawings.

First Embodiment

Structure of Switch Device

FIG. 1is a schematic view showing a switch device in a first embodiment of the invention. It will be explained that a magnetic sensor and a magnetic device of the invention is used as a switch device.

A switch device1is, as an example, a switch for switching a state of a below-described controlled device mounted on a vehicle, and as shown inFIG. 1, the switch device1is schematically configured to include an operating portion2, a magnet (magnetic field generating means)3, a printed circuit board4, and an MR (a magnetic sensor; Magneto-Resistance) sensor5A. The state here means, e.g., on/off of a certain function and shift-up and -down of a shift device, and the detail thereof depends on the controlled device.

Structure of Operating Portion

The operating portion2is, e.g., supported by a non-illustrated heretofore known support mechanism so as to be operable at an operating position on a single axis. The single axis here indicates a trajectory, projected on the printed circuit board4, of a center of the magnet3which is displaced by an operation of the operating portion2.

In addition, as shown inFIG. 1, the operating portion2is provided with the magnet3at an end portion thereof facing the printed circuit board4.

Structure of Magnet

The magnet3is formed of, e.g., a ferrite magnet or a neodymium magnet, etc., and is a permanent magnet having a circular cylindrical shape which radially generates a magnetic field6, and as shown inFIG. 1, the magnet3is magnetized in a vertical direction using a side facing the printed circuit board4as a north pole, and generates the magnetic field6as indicated by magnetic field lines60from a north pole to a south pole.

FIG. 2is a schematic view related to a magnetic vector in the first embodiment of the invention.FIG. 2shows an overview of the magnet3when viewed from the top. As shown inFIG. 2, the magnet3radially generates the magnetic field6from the center thereof toward an outer periphery. In addition, a direction and magnitude of the magnetic field6in a plane formed by a below-described magnetic sensing portion of the MR sensor5A are indicated as magnetic vectors61inFIG. 2.

Structure of MR Sensor

FIG. 3is a schematic view showing a positional relation between a switched position and an MR sensor in the first embodiment of the invention. InFIG. 3, an axis on which displacement of center of the magnet3is projected is an X-axis (a first line), an axis perpendicular to the X-axis is a Y-axis and an origin coincides with a point which is a projected center of the magnet3when the magnet3is located at a reference position. In addition, a position a shows a point which is a projected center of the magnet3when the magnet3is located at a first switched position21, and a position b shows a point which is a projected center of the magnet3when the magnet3is located at a second switched position22. Distances from the origin to the positions a and b on the X-axis are equal, and the point which is the center of the magnet3projected on the X-axis moves on the X-axis.

As shown inFIG. 3, the center of the MR sensor5A is arrange on the Y-axis separating a distance A from the X-axis. In addition, the MR sensor5A is arranged so that an angle θ formed by the center of the MR sensor5A and the position a at the first switched position21is 45°.

In other words, when a state is switched from a certain state to another certain state at the portion a by operating the operating portion2, the MR sensor5A is arranged at a position on a line passing through the position a on the X-axis and forming an angle of 45° with the X-axis (a second line) for reasons as described below. Therefore, in this case, the distance from the origin to the position a on the X-axis is equal to the distance A shown inFIG. 3.

FIG. 4is an equivalent circuit diagram showing the MR sensor in the first embodiment of the invention. As shown inFIG. 4, the MR sensor5A is composed of magnetoresistance elements M1to M4which output a variation of the magnetic field6as a variation of voltage, and the magnetoresistance elements M1to M4have a shape such that the magnetic sensing portions5aare replicated in an accordion-like manner.

A magnetic sensing portion5ahas a physicality that a magnetoresistance value thereof varies based on an acting direction of the magnetic field6, i.e., a variation of a direction of the magnetic vector61on a plane formed by the magnetic sensing portion5a, and is formed of, e.g., a ferromagnetic substance such as NiFe permalloy and FeCo alloy, etc., which are formed in a form of a thin film.

As shown inFIG. 4, in the MR sensor5A, applied voltage Vcc is applied between the magnetoresistance elements M1and M3, and a intermediate point between the magnetoresistance elements M2and M4is electrically connected to a ground circuit of the printed circuit board4.

In addition, the MR sensor5A is configured to output midpoint potential between the magnetoresistance elements M1and M2as output voltage V1and to output midpoint potential between the magnetoresistance elements M3and M4as output voltage V2.

The magnetic sensing portion5aof the magnetoresistance element M1is 90° different from the magnetic sensing direction thereof, and in the MR sensor5A, a first half-bridge circuit is formed by the magnetoresistance elements M1and M2and a second half-bridge circuit is formed by the magnetoresistance elements M3and M4which is a 180 degrees rotated first half-bridge circuit. In the MR sensor5A, a full bridge-circuit is formed by the first and second half-bridge circuits.

Control Portion

FIG. 5is a block diagram related to the switch device in the first embodiment of the invention. The switch device1has, e.g., a control portion7for judging two states of Hi and Lo based on an output signal which is output from the MR sensor5A, the control portion7is connected to a vehicle control portion8and the vehicle control portion8is connected to a controlled device9.

In addition, the control portion7calculates, e.g., a difference value between the output voltages V1and V2which are output from the MR sensor5A (=V1−V2), and judges Hi or Lo based on the calculated difference value (a below-described first output signal). It should be noted that the control portion7may be circuit-integrated with the MR sensor5A or may be configured to switch the Hi and Lo states using the vehicle control portion8by inputting the output from the MR sensor5A to the vehicle control portion8, and it is not limited thereto.

The controlled device9is, as an example, an electronic device such as a shift device, a wiper system or an indicator system, etc., which are mounted on a vehicle, and is switched to two states of Hi and Lo based on the operating position of the operating portion2.

Motion in the First Embodiment

Motions of the switch device in the present embodiment will be explained in detail hereinafter in conjunction with each drawing. It will be explained that the magnet3is operated to a first switched position, to a reference position and to a second switched position via the operating portion2.

Operation in an Initial Position

FIG. 6Ais an equivalent circuit diagram showing the MR sensor in the first embodiment of the invention when a magnet is located at a reference position,FIG. 6Bis a schematic view showing a magnetic sensing portion of magnetoresistance elements M1and M4, andFIG. 6Cis a schematic view showing a magnetic sensing portion of magnetoresistance elements M2and M3. In the following explanation, as an example, the applied voltage Vcc is 2.6 v, the first switched position21is −5 mm, and the second switched position22is +5 mm. Firstly, it will be explained that the operating portion2is located at a reference position20shown inFIG. 3.

When the operating portion2is located at the reference position20, since the magnetic vector61parallel to the magnetic sensing portion5aacts on the magnetoresistance elements M1and M4as shown inFIG. 6, a magnetoresistance value thereof becomes a maximum value.

In addition, as shown inFIG. 6C, since the magnetic vector61perpendicular to the magnetic sensing portion5aacts on the magnetoresistance elements M2and M3, the magnetoresistance value thereof becomes a minimum value.

The MR sensor5A outputs the output voltages V1and V2to the control portion7and the control portion7calculates a first output signal based on the output voltages V1and V2. The output voltages V1and V2are values which are determined by a ratio of the magnetoresistance value of the magnetoresistance elements M1to M4, and since the magnetoresistance value of the magnetoresistance element M2is less than that of the magnetoresistance element M4, the first output signal (=V1−V2) has a negative value.

Operation in the First Switched Position

FIG. 7Ais an equivalent circuit diagram showing the MR sensor in the first embodiment of the invention when a magnet is located at a first switched position,FIG. 7Bis a schematic view showing a magnetic sensing portion of magnetoresistance elements M1and M4, andFIG. 7Cis a schematic view showing a magnetic sensing portion of magnetoresistance elements M2and M3. Since the distance from the origin to the position a is equivalent to the distance A, the angle θ shown inFIGS. 7B and 7Cis 45°.

When the operating portion2is located at the first switched position21, since the magnetic vector61acts on the magnetoresistance elements M1and M4at an angle of 45° with respect to the magnetic sensing portion5aas shown inFIG. 7Band the magnetic vector61acts on the magnetoresistance elements M2and M3at an angle of 45° with respect to the magnetic sensing portion5aas shown inFIG. 7C, the magnetoresistance values are the same for the magnetoresistance elements M1to M4.

The MR sensor5A outputs the output voltages V1and V2to the control portion7and the control portion7calculates a first output signal based on the output voltages V1and V2. Since the magnetoresistance values of the magnetoresistance elements M1to M4are the same value, the first output signal (=V1−V2) has a zero value.

Operation in the Second Switched Portion

FIG. 8Ais an equivalent circuit diagram showing the MR sensor in the first embodiment of the invention when a magnet is located at a second switched position,FIG. 8Bis a schematic view showing a magnetic sensing portion of magnetoresistance elements M1and M4, andFIG. 8Cis a schematic view showing a magnetic sensing portion of magnetoresistance elements M2and M3. The angle θ shown inFIGS. 8B and 8Cis 45° for the same reason as the above.

When the operating portion2is located at the second switched position22, since the magnetic vector61acts on the magnetoresistance elements M1and M4at an angle of 45° with respect to the magnetic sensing portion5aas shown inFIG. 8Band the magnetic vector61acts on the magnetoresistance elements M2and M3at an angle of 45° with respect to the magnetic sensing portion5aas shown inFIG. 8C, the magnetoresistance values are the same for the magnetoresistance elements M1to M4.

The MR sensor5A outputs the output voltages V1and V2to the control portion7and the control portion7calculates a first output signal based on the output voltages V1and V2. Since the magnetoresistance values of the magnetoresistance elements M1to M4are the same value, the first output signal (=V1−V2) has a zero value.

FIG. 9is a graph showing a relation between calculated output voltage V and a position on an X-axis in the first embodiment of the invention.

As shown inFIG. 9, a calculated first output signal50has a minimum value (a negative value) at the reference position20, and has zero at the first switched position21and the second switched position22.

Therefore, as shown inFIG. 9, the control portion7judges as Lo when output voltage V≦0 mv and then outputs an L signal to the vehicle control portion8, and judges as Hi when 0 mv<the output voltage mv and then outputs an H signal to the vehicle control portion8.

At this time, as shown inFIG. 9, a switching position of H and L is at a distance of ±5 mm on the X-axis, and the arrangement of the MR sensor5A can be easily determined based on the switching position of H and L.

In addition, although the MR sensor5A is arranged on the Y-axis in the present embodiment, for example, when the switch device1requires on/off switching, i.e., when on/off is switched at the first switched position21, it is possible to easily realize a switched position depending on the application without making the design complicated by arranging the center thereof on a line passing through a position a on the X-axis and forming an angle of 45°.

Effect of the First Embodiment

(1) According to the above-mentioned switch device1in the first embodiment, it is possible to determine the arrangement of the MR sensor5A based on a switched position of Hi and Lo.

(2) According to the above-mentioned switch device1in the first embodiment, since the magnetoresistance elements M1to M4are arranged so as to output the output voltages V1and V2of which a difference value (the first output signal50) becomes zero at the first switched position21and the second switched position22, the design is facilitated and it is thereby possible to reduce the cost.

(3) According to the above-mentioned switch device1in the first embodiment, it is possible to accurately judge the two operating position of Hi and Lo.

(4) According to the above-mentioned switch device1in the first embodiment, since the magnet3is used as magnetic field generating means, the structure is simplified, in addition, the radial magnetic field6is easily generated, and it is thereby possible to reduce the cost.

It should be noted that the angle θ is 45° based on the arrangement of the magnetoresistance elements M1to M4of the MR sensor5A, however, it is not limited thereto, and the arrangement of the magnetoresistance elements M1to M4may be rotated based on the angle θ for setting the switched position.

Second Embodiment

Structure of Switch Device

FIG. 10is a schematic view showing a positional relation between a switched position and an MR sensor in a second embodiment of the invention. A switch device1A of the present embodiment is the switch device1with a MR sensor5B added thereto. It should be noted that common reference numerals are given to portions having the same structure and the same functions as the first embodiment.

As shown inFIG. 10, the MR sensor5B is arranged at an axisymmetric position of the MR sensor5A with respect to the X-axis.

The MR sensor5B has the same structure as the MR sensor5A, and is configured to output the same output voltage as that of the MR sensor5A to the control portion7based on a position of the magnet3.

The control portion7calculates a difference value based on the output voltage of the MR sensor5B in the same manner as the first embodiment, and the calculated difference value draws the same curved line as the first output signal50shown inFIG. 9.

Motion in the Second Embodiment

The control portion7calculates a difference value based on the output voltages output from the MR sensors5A or5B. As an example, when the output voltage is not output from either the MR sensors5A and5B, or, when the largely different output voltages are output, the control portion7judges that an abnormality occurs and a signal indicating the abnormality is output to the vehicle control portion8, then, the vehicle control portion8stops controlling the controlled device9and alerts the abnormality to the outside.

In addition, the control portion7may, e.g., alerts the abnormality and continue the operation based on the MR sensor5A or5B which still functions well, and it is not limited thereto.

Effect of the Second Embodiment

(1) According to the above-mentioned switch device1A in the second embodiment, since, when the abnormality occurs either in the MR sensor5A or5B, it is possible to promptly judge the abnormality and to alert it to the outside, it is possible to prevent malfunction due to the abnormality.

Third Embodiment

Structure of Switch Device

FIG. 11is a schematic view showing a positional relation between a switched position and an MR sensor in a third embodiment of the invention. As shown inFIG. 11, a switch device1B in the present embodiment is provided with two magnetic sensors, which are MR sensors5C and5D, and also provided with first to fourth switched positions23-26(positions c to f).

The MR sensor5C has the same structure as the MR sensor5A in the first embodiment, and as shown inFIG. 11, the MR sensor5C is arranged at a position separated a distance B from the Y-axis (a negative region of the X-axis) and a distance C from the X-axis (a positive region of the Y-axis). Distances from the origin to the positions c and f are the same, and distances from the origin to the positions d and e are the same.

The MR sensor5D is configured in the same manner as the MR sensor5C, and as shown inFIG. 11, the MR sensor5D is arranged at an axisymmetric position of the MR sensor5C with respect to the Y-axis.

The MR sensors5C and5D output the output voltages to the control portion7and the control portion7calculates the above-mentioned difference value for each of the MR sensors5C and5D.

Motion in the Third Embodiment

FIG. 12is a graph showing a relation between calculated output voltage V and a position on an X-axis in the third embodiment of the invention.

As shown inFIG. 12, the control portion7calculates a difference value based on the output voltage from the MR sensor5C (a first output signal51) and that based on the output voltage from the MR sensor5D (a second output signal52).

When the center of the magnet3is located at the distance B from the X-axis (a negative region of the X-axis), since the magnetic vector61acts on the magnetoresistance elements M1to M4from the above-mentioned direction shown inFIGS. 6A,6B and6C, the first output signal51has a negative minimum value.

In addition, when the center of the magnet3is located at the positions c and d, since the magnetic vector61acts on the magnetoresistance elements M1to M4at an angle of 45° as shown in the above-mentionedFIGS. 7,8A,8B and8C, the first output signal51has a zero value.

When the center of the magnet3is located at the distance B from the X-axis (a positive region of the X-axis), since the magnetic vector61acts on the magnetoresistance elements M1to M4from the above-mentioned direction shown inFIGS. 6A,6B and6C, the second output signal52has a negative minimum value.

In addition, when the center of the magnet3is located at the positions e and f, since the magnetic vector61acts on the magnetoresistance elements M1to M4at an angle of 45° as shown in the above-mentionedFIGS. 7,8A,8B and8C, the second output signal52has a zero value.

Therefore, as shown inFIG. 12, the control portion7judges as L1when the output voltage V≦0 mv and as H1when 0 mv<the output voltage V for the first output signal51, and judges as L2when the output voltage V≦0 mv and as H2when 0 mv<the output voltage V for the second output signal52.

As shown inFIG. 12, the control portion7can judge three operating positions based on the first output signal51and the second output signal52. Namely, (in case of judgment based on the MR sensor5C and that based on the MR sensor5D) the control portion7can judge three operating positions based on three combinations of (L1, H2), (H1, H2) and (H1, L2).

In addition, as shown inFIG. 12, the switched position thereof is a position where the first output signal51and the second output signal52become zero, i.e., the first to fourth switched positions23-26.

Therefore, the control portion7can accurately judge three operating positions and send a signal based on the three operating positions to the vehicle control portion8, and the vehicle control portion8controls the controlled device9based on the signal received. In the switch device1B, it is possible to easily change a distance between the switched positions by the distances B and C.

Effect of the Third Embodiment

(1) According to the above-mentioned switch device1B in the third embodiment, since the MR sensors5C and5D are provided, it is possible to have three operating positions, and it is thereby possible to easily set the switched positions thereof by the positions of the MR sensors5C and5D.

(2) According to the above-mentioned switch device1B in the third embodiment, since it is possible to arrange the MR sensors5C and5D at a position on a line which forms an angle θ of 45° with the X-axis, it is possible to control a width in a Y-axis direction and it is thereby possible to downsize.

(3) According to the above-mentioned switch device1B in the third embodiment, it is possible to easily change a distance between the switched portions by changing the distances B and C.

Similarly to the second embodiment, it is possible to obtain the same effect as that of the second embodiment by each providing an MR sensor at a position axisymmetric with respect to the X-axis.

Fourth Embodiment

Structure of Switch Device

FIG. 13is a schematic view showing a positional relation between a switched position and an MR sensor in a fourth embodiment of the invention. As shown inFIG. 13, a switch device1C in the present embodiment is provided with three magnetic sensors, which are MR sensors5E to5G, and also provided with first to sixth first switched positions201to206.

The MR sensor5E has the same structure as the MR sensor5A in the first embodiment, and as shown inFIG. 13, the MR sensor5E is arranged at a position separated a distance D from the Y-axis (a negative region of the X-axis) and a distance E from the X-axis (a positive region of the Y-axis). Distances from the origin to the positions g and l are the same, and distances from the origin to the positions i and j are the same.

The MR sensor5F has the same structure as the MR sensor5A in the first embodiment, and is arranged at a position separated a distance E from the X-axis in the same manner as the MR sensor5E.

The MR sensor5G is configured in the same manner as the MR sensors5E and5F, and as shown inFIG. 13, the MR sensor5G is arranged at an axisymmetric position of the MR sensor5E with respect to the Y-axis.

The MR sensors5E to5G output the output voltage to the control portion7and the control portion7calculates the above-mentioned difference value for each of the MR sensors5E to5G.

Motion in the Fourth Embodiment

FIG. 14is a graph showing a relation between calculated output voltage V and a position on an X-axis in the fourth embodiment of the invention.

As shown inFIG. 14, the control portion7calculates a difference value based on the output voltage from the MR sensor5E (a first output signal53), that based on the output voltage from the MR sensor5F (a second output signal54), and that based on the output voltage from the MR sensor5G (a third output signal55).

When the center of the magnet3is located at the distance D from the X-axis (a negative region of the X-axis), since the magnetic vector61acts on the magnetoresistance elements M1to M4from the above-mentioned direction shown inFIGS. 6A,6B and6C, the first output signal53has a negative minimum value.

In addition, when the center of the magnet3is located at the positions g and i, since the magnetic vector61acts on the magnetoresistance elements M1thM4at an angle of 45° as shown in the above-mentionedFIGS. 7,8A,8B and8C, the first output signal53has a zero value.

When the center of the magnet3is located at the origin, since the magnetic vector61acts on the magnetoresistance elements M1to M4from the above-mentioned direction shown inFIGS. 6A,6B and6C, the second output signal54has a negative minimum value. In addition, when the center of the magnet3is located at the positions h and k, since the magnetic vector61acts on the magnetoresistance elements M1to M4at an angle of 45° as shown in the above-mentionedFIGS. 7,8A,8B and8C, the second output signal54has a zero value.

When the center of the magnet3is located at the distance D from the X-axis (a positive region of the X-axis), since the magnetic vector61acts on the magnetoresistance elements M1to M4from the above-mentioned direction shown inFIGS. 6A,6B and6C, the third output signal55has a negative minimum value.

In addition, when the center of the magnet3is located at the positions j and l, since the magnetic vector61acts on the magnetoresistance elements M1to M4at an angle of 45° as shown in the above-mentionedFIGS. 7,8A,8B and8C, the third output signal55has a zero value.

Therefore, as shown inFIG. 14, the control portion7judges as L1when the output voltage V≦0 mv and as H1when 0 mv<the output voltage V for the first output signal53, judges as L2when the output voltage V≦0 mv and as H2when 0 mv<the output voltage V for the second output signal54, and judges as L3when the output voltage V≦0 mv and as H3when 0 mv<the output voltage V for the third switched position55.

As shown inFIG. 14, the control portion7can judge five operating positions based on the first to third output signals53to55. Namely, (in case of judgment based on the MR sensor5E, that based on the MR sensor5F and that based on the MR sensor5G) the control portion7can judge five operating positions based on five combinations of (L1, H2,H3), (L1, L2, H3), (H1, L2, H3), (H1, L2, L3) and (H1, H2, L3).

In addition, as shown inFIG. 14, the switched position thereof is a position where the first to third output signals53to55become zero, i.e., first to sixth switched positions201to206.

Therefore, the control portion7can accurately judge five operating positions and send a signal based on the five operating positions to the vehicle control portion8, and the vehicle control portion8controls the controlled device9based on the signal received.

Effect of the Fourth Embodiment

(1) According to the above-mentioned switch device1C in the fourth embodiment, since the MR sensors5E to5G are provided, it is possible to have five operating positions, and it is thereby possible to easily set the switched positions thereof by the positions of the MR sensors5E to5G.

(2) According to the above-mentioned switch device1C in the fourth embodiment, since it is possible to arrange the MR sensors5E to5G at a position on a line which forms an angle θ of 45° with the X-axis, it is possible to control a width in a Y-axis direction and it is thereby possible to downsize.

(3) According to the above-mentioned switch device1C in the fourth embodiment, it is possible to easily change a distance between the switched portions by changing the distances D and E.

(4) Similarly to the second embodiment, it is possible to obtain the same effect as that of the second embodiment by each providing an MR sensor at a position axisymmetric with respect to the X-axis. In addition, as described above, in the switch device, it is possible to easily set the switched position even if the number of the MR sensors is increased. It should be noted that the present invention is not intended to be limited to the above-mentioned embodiments, and the various kinds of changes thereof can be implemented by those skilled in the art without departing from or without modifying the technical idea of the present invention.