[go: up one dir, main page]

JP2019144086A - Position detector - Google Patents

Position detector Download PDF

Info

Publication number
JP2019144086A
JP2019144086A JP2018028096A JP2018028096A JP2019144086A JP 2019144086 A JP2019144086 A JP 2019144086A JP 2018028096 A JP2018028096 A JP 2018028096A JP 2018028096 A JP2018028096 A JP 2018028096A JP 2019144086 A JP2019144086 A JP 2019144086A
Authority
JP
Japan
Prior art keywords
magnet
magnetic
sensor
value
magnetic field
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018028096A
Other languages
Japanese (ja)
Other versions
JP6653341B2 (en
Inventor
正章 澤
Masaaki Sawa
正章 澤
正昭 風間
Masaaki Kazama
正昭 風間
祥太 藤村
Shota Fujimura
祥太 藤村
憲 河野
Ken Kono
憲 河野
小澤 徹
Toru Ozawa
徹 小澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honda Motor Co Ltd
Macome Corp
Original Assignee
Honda Motor Co Ltd
Macome Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honda Motor Co Ltd, Macome Corp filed Critical Honda Motor Co Ltd
Priority to JP2018028096A priority Critical patent/JP6653341B2/en
Publication of JP2019144086A publication Critical patent/JP2019144086A/en
Application granted granted Critical
Publication of JP6653341B2 publication Critical patent/JP6653341B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Length, Angles, Or The Like Using Electric Or Magnetic Means (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

【課題】地磁気や磁気センサの温度特性等によるオフセット成分の変化の影響を受けることがなく、さらに、磁気センサを増やすことなく有効検出長を長くする。【解決手段】位置検出装置1は、所定距離を離して配置された複数の磁石10A、10Bと、磁石が最も近接した際に最大の検出値を出力する向きに配列されたM個(Mは3以上の整数)の磁気センサMSと、1つ飛ばしの2つの磁気センサの各検出値の差分値を算出し、これらの1つ飛ばしの2つの磁気センサの中間に位置する仮想センサの磁界値として、(M−2)個の仮想センサの磁界値を生成する仮想センサ磁界値生成部41と、複数の磁気センサの検出値から、磁気センサに対向する磁石を特定する磁石特定部43と、仮想センサの磁界値を補間して得られる磁界分布の磁界値がゼロとなる位置を、磁石特定部43が特定した磁石の位置として出力する位置信号生成部42を備えている。【選択図】図1PROBLEM TO BE SOLVED: To lengthen an effective detection length without being affected by a change in an offset component due to geomagnetism, temperature characteristics of a magnetic sensor, or the like, and without increasing the number of magnetic sensors. SOLUTION: A position detection device 1 has a plurality of magnets 10A and 10B arranged at a predetermined distance, and M magnets (M) arranged in a direction to output a maximum detection value when the magnets are closest to each other. Calculate the difference between the detected values of the magnetic sensor MS (an integer of 3 or more) and the two magnetic sensors that skip one, and the magnetic field value of the virtual sensor located between the two magnetic sensors that skip one. As a result, a virtual sensor magnetic field value generation unit 41 that generates magnetic field values of (M-2) virtual sensors, and a magnet identification unit 43 that identifies a magnet facing the magnetic sensor from the detection values of a plurality of magnetic sensors. A position signal generation unit 42 is provided which outputs a position where the magnetic field value of the magnetic field distribution obtained by interpolating the magnetic field value of the virtual sensor becomes zero as the position of the magnet specified by the magnet identification unit 43. [Selection diagram] Fig. 1

Description

本発明は、位置検出装置に関し、詳しくは、磁気方式の位置検出装置に関する。   The present invention relates to a position detection device, and more particularly to a magnetic position detection device.

位置検出装置として、永久磁石(以下、「磁石」という。)の磁界の大きさを検出することによって、磁石の位置を検出する磁気方式の位置検出装置が知られている。例えば、特許文献1には、複数の磁気センサを直線上に並べ、各磁気センサで検出した磁界値を直線あるいは曲線で補間して得た磁界分布から磁界値がゼロになる点を求めることによって、磁石の位置を検出する従来装置が開示されている。   As a position detection device, a magnetic position detection device that detects the position of a magnet by detecting the magnitude of a magnetic field of a permanent magnet (hereinafter referred to as “magnet”) is known. For example, in Patent Document 1, a plurality of magnetic sensors are arranged on a straight line, and a point where the magnetic field value becomes zero is obtained from a magnetic field distribution obtained by interpolating a magnetic field value detected by each magnetic sensor with a straight line or a curve. A conventional apparatus for detecting the position of a magnet is disclosed.

しかしながら、この方式では地磁気等外部磁界の影響で磁界のオフセット成分が変化した場合、磁界値がゼロになる点がずれてしまい、誤差が発生するという問題がある。また、磁気センサの温度特性等により、同様にオフセット成分が変化した場合も、磁界値がゼロになる点がずれてしまい、誤差が出てしまう。また、直線補間によって検出精度を上げるためには、磁気センサの数を増やさなければならない。さらに、磁石の検出範囲は、配列した複数の磁気センサの両端の磁気センサ間の距離に制限されており、有効検出長が短いという問題があった。   However, this method has a problem that when the offset component of the magnetic field changes due to the influence of an external magnetic field such as geomagnetism, the point at which the magnetic field value becomes zero shifts and an error occurs. Similarly, even when the offset component changes due to the temperature characteristics of the magnetic sensor or the like, the point at which the magnetic field value becomes zero is shifted and an error occurs. Further, in order to increase detection accuracy by linear interpolation, the number of magnetic sensors must be increased. Furthermore, the detection range of the magnet is limited to the distance between the magnetic sensors at both ends of the plurality of magnetic sensors arranged, and there is a problem that the effective detection length is short.

特開平8−50004号公報JP-A-8-50004

上記のように、従来の検出装置では、磁石の磁界を検出する際に、地磁気等の外部磁界の影響を受けて位置検出値に誤差を生じたり、有効検出長が短いといった課題があった。   As described above, the conventional detection device has a problem in that when the magnetic field of the magnet is detected, an error occurs in the position detection value due to the influence of an external magnetic field such as geomagnetism or the effective detection length is short.

本発明は、これらの実情に鑑みてなされたものであり、地磁気等の外部磁界の影響で磁界のオフセット成分が変化した場合や、磁気センサの温度特性等により同様にオフセット成分が変化した場合でも、オフセット成分による影響を受けることがなく、さらに、磁気センサを増やすことなく有効検出長を長くできる位置検出装置を提供することをその目的とする。   The present invention has been made in view of these circumstances, and even when the offset component of the magnetic field changes due to the influence of an external magnetic field such as geomagnetism or when the offset component changes similarly due to the temperature characteristics of the magnetic sensor or the like. An object of the present invention is to provide a position detection device that is not affected by an offset component and that can increase the effective detection length without increasing the number of magnetic sensors.

上記課題を解決するために、本発明の第1の技術手段は、所定距離を離して配置された複数の永久磁石と、複数の該永久磁石の相対的な移動方向に沿って配列され、前記永久磁石が最も近接した際に最大の検出値を出力する向きに配列されたM個(Mは3以上の整数)の磁気センサと、1つ飛ばしの2つの磁気センサの各検出値の差分値を算出し、前記1つ飛ばしの2つの前記磁気センサの中間に位置する仮想センサの磁界値として、(M−2)個の第1群の仮想センサの磁界値を生成する仮想センサ磁界値生成部と、複数の前記磁気センサの検出値から、前記磁気センサに対向する前記永久磁石を特定する磁石特定部と、前記仮想センサの磁界値を補間して得られる磁界分布の磁界値がゼロとなる位置を、前記磁石特定部が特定した前記永久磁石の位置として出力する位置信号生成部と、を備えたことを特徴とするものである。   In order to solve the above-described problem, the first technical means of the present invention includes a plurality of permanent magnets arranged at a predetermined distance and a plurality of permanent magnets arranged along a relative moving direction of the permanent magnets, Difference value between detection values of M magnetic sensors (M is an integer of 3 or more) arranged in a direction to output the maximum detection value when the permanent magnets are closest to each other and one magnetic sensor that is skipped by one And (M−2) virtual sensor magnetic field value generation that generates magnetic field values of the first group of virtual sensors as the magnetic field value of the virtual sensor located in the middle of the two skipped magnetic sensors. A magnetic field distribution value obtained by interpolating a magnetic field value of the virtual sensor, a magnet specifying unit that specifies the permanent magnet facing the magnetic sensor from detection values of the plurality of magnetic sensors, and zero The permanent position specified by the magnet specifying unit. A position signal generating unit for outputting as a position of the magnet, is characterized in that it comprises a.

第2の技術手段は、第1の技術手段において、前記仮想センサ磁界値生成部は、さらに、隣接する前記磁気センサの各検出値の差分値を算出し、該差分値を前記隣接する2つ前記磁気センサとの中間に位置する仮想センサの磁界値として、(M−1)個の第2群の仮想センサの磁界値を算出し、前記位置信号生成部は、前記第1群の仮想センサと前記第2群の仮想センサと含む仮想センサの磁界値を補間して得られる磁界分布の磁界値がゼロとなる位置を、前記磁石特定部が特定した前記永久磁石の位置として出力することを特徴とするものである。   According to a second technical means, in the first technical means, the virtual sensor magnetic field value generation unit further calculates a difference value of each detection value of the adjacent magnetic sensor, and calculates the difference value as the two adjacent values. The magnetic field value of the (M−1) second group of virtual sensors is calculated as the magnetic field value of the virtual sensor located in the middle of the magnetic sensor, and the position signal generation unit is configured to output the first group of virtual sensors. And outputting the position at which the magnetic field value of the magnetic field distribution obtained by interpolating the magnetic field values of the virtual sensors including the second group of virtual sensors becomes zero as the position of the permanent magnet specified by the magnet specifying unit. It is a feature.

第3の技術手段は、第1または第2の技術手段において、前記磁石特定部は、前記磁気センサの検出値の極性に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とするものである。   According to a third technical means, in the first or second technical means, the magnet specifying unit faces the magnetic sensor from among the plurality of permanent magnets based on a polarity of a detection value of the magnetic sensor. A permanent magnet is specified.

第4の技術手段は、第1から第3のいずれか1の技術手段において、前記磁石特定部は、前記磁気センサの検出値の大きさに基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とするものである。   According to a fourth technical means, in any one of the first to third technical means, the magnet specifying unit is configured to select the magnetism from a plurality of the permanent magnets based on a magnitude of a detection value of the magnetic sensor. The permanent magnet facing the sensor is specified.

第5の技術手段は、第1または第2の技術手段において、前記磁石特定部は、磁石間距離が前記磁気センサの有効検出長の1/n(nは2以上の整数)より短く配設されかつ前記移動方向に対して同じ磁化方向に磁化されたn個の永久磁石の検出値に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とするものである。   According to a fifth technical means, in the first or second technical means, the magnet specifying unit is arranged such that a distance between the magnets is shorter than 1 / n (n is an integer of 2 or more) of an effective detection length of the magnetic sensor. And identifying the permanent magnet facing the magnetic sensor from among the plurality of permanent magnets based on detection values of n permanent magnets magnetized in the same magnetization direction with respect to the moving direction. It is what.

第6の技術手段は、第1から第3のいずれか1の技術手段において、前記磁石特定部は、磁石間距離が前記磁気センサの有効検出長の1/(n−1)(nは2以上の整数)より短く配設されかつ前記移動方向に対して交互に異なる方向に磁化されたn個の永久磁石の検出値に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とするものである。   A sixth technical means is the first technical means according to any one of the first to third technical means, wherein the magnet specifying unit is configured such that a distance between magnets is 1 / (n−1) (n is 2) of an effective detection length of the magnetic sensor. Based on the detection values of n permanent magnets arranged shorter than the above integer) and magnetized alternately in different directions with respect to the moving direction, the magnetic sensor is opposed to the magnetic sensor from among the plurality of permanent magnets. The permanent magnet is specified.

第7の技術手段は、第1から第6のいずれか1の技術手段において、前記位置信号生成部は、前記磁気センサの内、最大の検出値を出力する前記磁気センサを特定し、該磁気センサに最も近接する前記仮想センサの磁界値と該仮想センサの前後の前記仮想センサの磁界値とがゼロを跨いでいるか否かを判別し、ゼロを跨いでいる2つの前記仮想センサの磁界値を補間し、磁界値がゼロとなる位置を前記永久磁石の位置として出力することを特徴とするものである。   A seventh technical means is any one of the first to sixth technical means, wherein the position signal generation unit specifies the magnetic sensor that outputs the maximum detected value of the magnetic sensors, and It is determined whether or not the magnetic field value of the virtual sensor closest to the sensor and the magnetic field values of the virtual sensor before and after the virtual sensor cross zero, and the magnetic field values of the two virtual sensors straddling zero And a position where the magnetic field value becomes zero is output as the position of the permanent magnet.

第8の技術手段は、第1から第7のいずれか1の技術手段において、前記位置信号生成部は、前記磁気センサに対向する第1の永久磁石の位置を算出し、該算出した第1の前記永久磁石の位置に、第1の前記永久磁石と前記磁気センサに対向していない第2の永久磁石との磁石間距離を加算することによって、第2の前記永久磁石の位置を出力することを特徴とするものである。   According to an eighth technical means, in any one of the first to seventh technical means, the position signal generation unit calculates a position of the first permanent magnet facing the magnetic sensor, and calculates the calculated first The position of the second permanent magnet is output by adding the distance between the first permanent magnet and the second permanent magnet not facing the magnetic sensor to the position of the permanent magnet. It is characterized by this.

第9の技術手段は、第1から第8のいずれか1の技術手段において、前記磁気センサが等ピッチで配列されていることを特徴とするものである。   According to a ninth technical means, in any one of the first to eighth technical means, the magnetic sensors are arranged at an equal pitch.

第10の技術手段は、第1から第9のいずれか1の技術手段において、複数の前記永久磁石が前記磁気センサに対向している際に、前記位置信号生成部が算出した複数の前記永久磁石の位置に基づいて、複数の前記永久磁石の距離を算出する磁石間距離算出部を、さらに有することを特徴とするものである。   A tenth technical means according to any one of the first to ninth technical means, wherein the plurality of permanent signals calculated by the position signal generation unit when the plurality of permanent magnets are opposed to the magnetic sensor. The apparatus further includes an inter-magnet distance calculation unit that calculates the distance between the plurality of permanent magnets based on the position of the magnet.

本発明によれば、地磁気等の外部磁界の影響で磁界のオフセット成分が変化した場合や、磁気センサの温度特性等により同様にオフセット成分が変化した場合でも、オフセット成分による影響を受けることがなく、さらに、磁気センサを増やすことなく検出精度を高め、有効検出長を長くすることができる。また有効範囲が従来と同じであれば検出装置の小型化が可能となる。   According to the present invention, even when the offset component of the magnetic field changes due to the influence of an external magnetic field such as geomagnetism or when the offset component changes similarly due to the temperature characteristics of the magnetic sensor, etc., it is not affected by the offset component. Furthermore, the detection accuracy can be improved and the effective detection length can be increased without increasing the number of magnetic sensors. If the effective range is the same as the conventional one, the detection device can be downsized.

本発明の実施形態に係る位置検出装置の一構成を示す図である。It is a figure which shows one structure of the position detection apparatus which concerns on embodiment of this invention. 磁石と磁気センサとの具体的な配置の関係を示す図である。It is a figure which shows the relationship of the specific arrangement | positioning of a magnet and a magnetic sensor. 磁石と磁気センサとの相対的な位置を変更した際の図である。It is a figure at the time of changing the relative position of a magnet and a magnetic sensor. 第1の磁石に対する磁気センサの検出値(磁界値)の特性を説明するための図である。It is a figure for demonstrating the characteristic of the detection value (magnetic field value) of the magnetic sensor with respect to a 1st magnet. 第1の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図である。It is a figure for demonstrating the characteristic of the difference value of each detection value of two magnetic sensors skipped when the 1st magnet opposes the magnetic sensor. 磁気センサの位置と第1群の仮想センサの位置との関係を示す図である。It is a figure which shows the relationship between the position of a magnetic sensor, and the position of a 1st group virtual sensor. 本発明の実施形態に係る位置検出装置における処理フローの例を示す図である。It is a figure which shows the example of the processing flow in the position detection apparatus which concerns on embodiment of this invention. 磁石の位置を求めるための直線補間について説明するための図である。It is a figure for demonstrating the linear interpolation for calculating | requiring the position of a magnet. 第2の磁石に対する磁気センサの検出値(磁界値)の特性を説明するための図であるIt is a figure for demonstrating the characteristic of the detected value (magnetic field value) of the magnetic sensor with respect to a 2nd magnet. 第2の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図である。It is a figure for demonstrating the characteristic of the difference value of each detection value of two skipped magnetic sensors when a 2nd magnet opposes a magnetic sensor. 磁気センサの有効検出長内に第1の磁石のみが位置する場合を示す図である。It is a figure which shows the case where only a 1st magnet is located within the effective detection length of a magnetic sensor. 磁気センサの有効検出長内に第1の磁石と第2の磁石とが位置する場合を示す図である。It is a figure which shows the case where a 1st magnet and a 2nd magnet are located within the effective detection length of a magnetic sensor. 磁気センサの有効検出長内に第2の磁石のみが位置する場合を示す図である。It is a figure which shows the case where only a 2nd magnet is located within the effective detection length of a magnetic sensor. 第1の磁石が磁気センサに対向した際の、隣接する2つの磁気センサの各検出値の差分値の特性を説明するための図である。It is a figure for demonstrating the characteristic of the difference value of each detection value of two adjacent magnetic sensors when a 1st magnet opposes a magnetic sensor. 磁気センサの位置と第1群と第2群を合わせた仮想センサの位置との関係を示す図である。It is a figure which shows the relationship between the position of a magnetic sensor, and the position of the virtual sensor which combined the 1st group and the 2nd group. 磁石間距離の算出フローの例を示す図である。It is a figure which shows the example of the calculation flow of the distance between magnets. 本発明の実施形態に係る位置検出装置の他の構成を示す図である。It is a figure which shows the other structure of the position detection apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る位置検出装置のさらに他の構成を示す図である。It is a figure which shows the further another structure of the position detection apparatus which concerns on embodiment of this invention. 図18に示す位置検出装置において、磁石位置が異なる場合を説明するための図である。In the position detection apparatus shown in FIG. 18, it is a figure for demonstrating the case where a magnet position differs.

以下、図面を参照しながら、本発明の位置検出装置に係る好適な実施形態について説明する。以下の説明において、異なる図面においても同じ符号を付した構成は同様のものであるとして、その説明を省略する場合がある。なお、本発明はこれらの実施形態での例示に限定されるものではなく、特許請求の範囲に記載された事項の範囲内および均等の範囲内におけるすべての変更を含む。   DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments according to a position detection device of the invention will be described with reference to the drawings. In the following description, the configurations denoted by the same reference numerals in different drawings are the same, and the description thereof may be omitted. In addition, this invention is not limited to the illustration in these embodiment, All the changes within the range of the matter described in the claim and within the equal range are included.

(第1の実施形態)
図1は、本発明の第1の実施形態に係る位置検出装置の一構成を示す図である。本実施形態では、複数の磁石として、移動方向に対して、磁化方向の異なる第1の磁石10Aと第2の磁石10Bの2つの磁石を用いた例について説明する。
(First embodiment)
FIG. 1 is a diagram showing a configuration of a position detection apparatus according to the first embodiment of the present invention. In the present embodiment, an example in which two magnets of a first magnet 10A and a second magnet 10B having different magnetization directions with respect to the moving direction are used as the plurality of magnets will be described.

位置検出装置1は、検出用の第1の磁石10A、第2の磁石10Bと、これらの第1の磁石10A、第2の磁石10Bを検出する複数の磁気センサMS、複数の磁気センサMSを切り替えるマルチプレクサ20、磁気センサMSからのアナログ信号をデジタル信号に変換するA/D変換器30、磁気センサMSの検出値を元に第1の磁石10A、第2の磁石10Bの位置を演算するマイコン40、マイコン40で演算した値をアナログ信号で出力する出力回路50を備えている。なお、本明細書では、磁気センサを特定せずに総称する場合は磁気センサMSと記載し、磁気センサを特定する場合は、磁気センサMS2のように番号を付して記載する。このことは、後述する仮想センサについても同様である。   The position detection apparatus 1 includes a first magnet 10A and a second magnet 10B for detection, a plurality of magnetic sensors MS that detect the first magnet 10A and the second magnet 10B, and a plurality of magnetic sensors MS. A multiplexer 20 for switching, an A / D converter 30 for converting an analog signal from the magnetic sensor MS into a digital signal, and a microcomputer for calculating the positions of the first magnet 10A and the second magnet 10B based on the detection value of the magnetic sensor MS 40, an output circuit 50 for outputting the value calculated by the microcomputer 40 as an analog signal. In this specification, the magnetic sensor MS is collectively described without specifying the magnetic sensor, and the magnetic sensor MS is specified with a number like the magnetic sensor MS2 when specifying the magnetic sensor. The same applies to the virtual sensor described later.

マイコン40は、機能部として、仮想センサ磁界値生成部41、位置信号生成部42、磁石特定部43、磁石間距離算出部44、および、マルチプレクサ信号生成部45を有している。これらの機能部の機能は、マイコン40の図示しないCPU、ROM、RAMと、ROMに予め記憶した制御プログラムを実行することによって実現できる。   The microcomputer 40 includes a virtual sensor magnetic field value generation unit 41, a position signal generation unit 42, a magnet identification unit 43, an intermagnet distance calculation unit 44, and a multiplexer signal generation unit 45 as functional units. The functions of these functional units can be realized by executing a CPU, ROM, RAM (not shown) of the microcomputer 40 and a control program stored in advance in the ROM.

磁気センサMSとしては、ホール素子や可飽和コイル等を用いたものが利用できる。可飽和コイルを用いたものとしては、例えば、コアの飽和領域まで可飽和コイルを励磁、外部磁界の作用によってコアの飽和点が移動することを利用したもの、例えば、特開2003-215221号公報に開示されたものを利用することができる。   As the magnetic sensor MS, a sensor using a Hall element or a saturable coil can be used. As the one using the saturable coil, for example, the saturable coil is excited to the saturation region of the core, and the saturation point of the core is moved by the action of an external magnetic field, for example, Japanese Patent Laid-Open No. 2003-215221 Can be used.

図2は、磁石と磁気センサの具体的な配置の関係を示す図であり、図3は、磁石と磁気センサとの相対的な位置を変更した際の図である。本実施形態では、磁気センサMSは基板BS上で直線上に10mm間隔のピッチPでM個、例えば、11個並べられ、マルチプレクサ20と繋がる。第1の磁石10Aと第2の磁石10Bは、図示しない移動機構に磁石間距離Lだけ離して固定されており、ともに磁気センサMS1〜MS11と一定距離を保ちながら基板BSに対して平行に移動する。第1の磁石10Aの磁化方向は移動方向に対してS極、N極に磁化されており、第2の磁石10Bの磁化方向は、第1の磁石10Aとは反対に移動方向に対してN極、S極に磁化されている。磁化の方向は互いに逆でも構わない。磁気センサMSは、これらの第1の磁石10A、第2の磁石10Bの水平磁界を検出する。複数の磁気センサMSの磁石磁界に対する検出値の出力特性は同じである。   FIG. 2 is a diagram showing a specific arrangement relationship between the magnet and the magnetic sensor, and FIG. 3 is a diagram when the relative positions of the magnet and the magnetic sensor are changed. In this embodiment, M, for example, 11 magnetic sensors MS are arranged on a straight line on the substrate BS at a pitch P of 10 mm, and are connected to the multiplexer 20. The first magnet 10A and the second magnet 10B are fixed to a moving mechanism (not shown) by a distance L between the magnets, and both move parallel to the substrate BS while maintaining a certain distance from the magnetic sensors MS1 to MS11. To do. The magnetization direction of the first magnet 10A is magnetized in the S and N poles with respect to the moving direction, and the magnetization direction of the second magnet 10B is N with respect to the moving direction, as opposed to the first magnet 10A. It is magnetized to the pole and the S pole. The directions of magnetization may be opposite to each other. The magnetic sensor MS detects the horizontal magnetic fields of the first magnet 10A and the second magnet 10B. The output characteristics of the detected values for the magnetic fields of the plurality of magnetic sensors MS are the same.

本実施形態では、磁気センサMSの有効検出長Aは、左右両端の磁気センサMS1と磁気センサMS11を除く、磁気センサMS2から磁気センサMS10までの距離80mmとなる。なお、本実施形態では、磁気センサMSはピッチPで等間隔に配列しているが、磁気センサMSの配列は等間隔でなくてもよい。いずれの場合も、マイコン40には、予め各磁気センサMS1〜MS11の位置が記憶されているものとする。また、磁気センサMSの個数Mも11に限定されないが、3個以上を必要とする。   In the present embodiment, the effective detection length A of the magnetic sensor MS is a distance of 80 mm from the magnetic sensor MS2 to the magnetic sensor MS10, excluding the magnetic sensors MS1 and MS11 at the left and right ends. In the present embodiment, the magnetic sensors MS are arranged at equal intervals with the pitch P, but the arrangement of the magnetic sensors MS may not be equally spaced. In any case, it is assumed that the position of each of the magnetic sensors MS1 to MS11 is stored in the microcomputer 40 in advance. Further, the number M of the magnetic sensors MS is not limited to 11, but 3 or more are required.

また、第1の磁石10Aと第2の磁石10Bとの磁石間距離Lは、磁気センサMSの有効検出長Aよりも短い距離に設定されており、本実施形態では、例えば70mmに設定されている。図2は、第1の磁石10Aが磁気センサMS2に対向している場合を、また、図3は、第2の磁石10Bが磁気センサMS10に対向している場合を示しており、位置検出装置1は、第1の磁石10Aが磁気センサMS2に対向している位置から、第2の磁石10Bが磁気センサMS10に対向している位置までの範囲内で、第1の磁石10Aまたは第2の磁石10Bの位置を検出することができる。したがって、位置検出装置1の全有効検出長は、磁気センサMSの有効検出長A(80mm)に磁石間距離L(70mm)を加えたものとなり、150mmとなる。   Further, the inter-magnet distance L between the first magnet 10A and the second magnet 10B is set to a distance shorter than the effective detection length A of the magnetic sensor MS, and is set to 70 mm, for example, in this embodiment. Yes. FIG. 2 shows the case where the first magnet 10A faces the magnetic sensor MS2, and FIG. 3 shows the case where the second magnet 10B faces the magnetic sensor MS10. 1 is a range from the position where the first magnet 10A faces the magnetic sensor MS2 to the position where the second magnet 10B faces the magnetic sensor MS10. The position of the magnet 10B can be detected. Accordingly, the total effective detection length of the position detection device 1 is 150 mm, which is obtained by adding the inter-magnet distance L (70 mm) to the effective detection length A (80 mm) of the magnetic sensor MS.

まず、第1の磁石10Aが磁気センサMSの有効検出長Aの範囲内にある場合の、第1の磁石10Aの位置検出の方法について説明する。
図4は、第1の磁石に対する磁気センサの検出値である磁界値の特性を説明するための図である。なお、図4に示す特性は、磁気センサMSに可飽和コイル、第1の磁石10Aにネオジムφ5×6を使用している。図4の縦軸は磁界の大きさを表すマイコン40の内部値を示し、横軸は基板BSに沿った座標位置を示している。図4に示す位置0mmは、図2に示すように磁気センサMS2の位置を基準にしている。そして、例えば、磁気センサMS1は−10mmの位置に、磁気センサMS2は0mmの位置に、磁気センサMS3は10mmの位置に、磁気センサMS4は20mmの位置に、また、磁気センサMS10は80mmの位置にある。図4では、磁石の位置が磁気センサMSの有効検出長Aから外れている−10mmより小さい位置での検出値も記載しているが、実際には位置検出のためには用いない。
First, a method for detecting the position of the first magnet 10A when the first magnet 10A is within the range of the effective detection length A of the magnetic sensor MS will be described.
FIG. 4 is a diagram for explaining characteristics of a magnetic field value that is a detection value of the magnetic sensor with respect to the first magnet. The characteristics shown in FIG. 4 use a saturable coil for the magnetic sensor MS and neodymium φ5 × 6 for the first magnet 10A. 4 indicates the internal value of the microcomputer 40 indicating the magnitude of the magnetic field, and the horizontal axis indicates the coordinate position along the substrate BS. The position 0 mm shown in FIG. 4 is based on the position of the magnetic sensor MS2 as shown in FIG. For example, the magnetic sensor MS1 is at a position of -10 mm, the magnetic sensor MS2 is at a position of 0 mm, the magnetic sensor MS3 is at a position of 10 mm, the magnetic sensor MS4 is at a position of 20 mm, and the magnetic sensor MS10 is at a position of 80 mm. It is in. FIG. 4 also shows the detection value at a position smaller than −10 mm where the position of the magnet deviates from the effective detection length A of the magnetic sensor MS, but it is not actually used for position detection.

図4では、磁気センサMS1〜MS4の各検出値である磁界値を示している。例えば、第1の磁石10Aが0mmの位置にある場合は、各磁気センサMS1〜MS4の検出値は、図4で示す磁気センサMS1〜MS4の特性曲線が0mmの場合の磁界値を出力する。また、第1の磁石10Aが10mmの位置にある場合は、各磁気センサMS1〜MS4の検出値は、図4で示す磁気センサMS1〜MS4の特性曲線が10mmの場合の磁界値を出力する。このように、各磁気センサMSは、第1の磁石10Aの中心と磁気センサMSの中心が同じ位置の時に検出値が最大になる。すなわち、第1の磁石10Aと磁気センサMSとが最も近接した際に、磁気センサMSは最大の検出値を出力するように配置されている。   In FIG. 4, the magnetic field value which is each detection value of magnetic sensor MS1-MS4 is shown. For example, when the first magnet 10A is at a position of 0 mm, the detection values of the magnetic sensors MS1 to MS4 output magnetic field values when the characteristic curves of the magnetic sensors MS1 to MS4 shown in FIG. 4 are 0 mm. Further, when the first magnet 10A is at a position of 10 mm, the detection values of the magnetic sensors MS1 to MS4 output the magnetic field values when the characteristic curves of the magnetic sensors MS1 to MS4 shown in FIG. 4 are 10 mm. Thus, each magnetic sensor MS has the maximum detection value when the center of the first magnet 10A and the center of the magnetic sensor MS are at the same position. That is, when the first magnet 10A and the magnetic sensor MS are closest to each other, the magnetic sensor MS is arranged to output the maximum detection value.

マルチプレクサ20ではマイコン40のマルチプレクサ信号生成部45からの指令により磁気センサMS1〜MS11を順次切り替え、各磁気センサMSからのアナログ信号をA/D変換器30でデジタル信号に変換しマイコン40に入力する。   In the multiplexer 20, the magnetic sensors MS <b> 1 to MS <b> 11 are sequentially switched in response to a command from the multiplexer signal generation unit 45 of the microcomputer 40, and analog signals from each magnetic sensor MS are converted into digital signals by the A / D converter 30 and input to the microcomputer 40. .

図4に示す通り磁気センサMSの検出値のままでは、直線あるいは曲線で補間して磁界値のゼロ点を求め、第1の磁石10Aの位置を検出することは難しい。そのため、本実施形態では、マイコン40の内部で磁気センサMSの検出値を1つ飛ばし毎に差分値を求め、求めた差分値を、1つ飛ばしの2つの磁気センサMSの中間に位置する仮想センサの磁界値としている。具体的には、「磁気センサMS3の検出値−磁気センサMS1の検出値」、「磁気センサMS4の検出値−磁気センサMS2の検出値」、「磁気センサMS5の検出値−磁気センサMS3の検出値」・・・「磁気センサMS11の検出値−磁気センサMS9の検出値」を求め、それぞれ、差分を求めた1つ飛ばしの磁気センサMSの中間にある仮想センサVL1、VL2、VL3・・・VL9の磁界値としている(後述する図6参照。)。   As shown in FIG. 4, with the detection value of the magnetic sensor MS, it is difficult to detect the zero point of the magnetic field value by interpolation with a straight line or a curve and detect the position of the first magnet 10A. Therefore, in the present embodiment, a difference value is obtained every time one detection value of the magnetic sensor MS is skipped inside the microcomputer 40, and the calculated difference value is a virtual position located between the two skipped magnetic sensors MS. The magnetic field value of the sensor is used. Specifically, “detection value of magnetic sensor MS3—detection value of magnetic sensor MS1”, “detection value of magnetic sensor MS4—detection value of magnetic sensor MS2”, “detection value of magnetic sensor MS5—detection of magnetic sensor MS3” Value ”...“ Detected value of magnetic sensor MS11−Detected value of magnetic sensor MS9 ”is obtained, and virtual sensors VL1, VL2, VL3,. The magnetic field value of VL9 is used (see FIG. 6 described later).

図5は、第1の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図であり、図6は、磁気センサの位置と第1群の仮想センサの位置との関係を示す図である。図5の縦軸は磁界の大きさを表すマイコン40の内部値を示し、横軸は基板BSに沿った座標位置を示している。   FIG. 5 is a diagram for explaining the characteristics of the difference value between the detection values of two skipped magnetic sensors when the first magnet faces the magnetic sensor. FIG. It is a figure which shows the relationship between a position and the position of a 1st group virtual sensor. The vertical axis in FIG. 5 indicates the internal value of the microcomputer 40 indicating the magnitude of the magnetic field, and the horizontal axis indicates the coordinate position along the substrate BS.

例えば、本実施形態の場合、所定の磁気センサMSとして、磁気センサMS1とこの磁気センサから1つ飛ばしの磁気センサMS3の各検出値の差分値、すなわち、「磁気センサMS3の検出値−磁気センサMS1の検出値」を算出し、磁気センサMS1と磁気センサMS3の中間に位置する仮想センサVL1の磁界値としている。本実施形態の場合、仮想センサVL1の位置は磁気センサMS2の位置と等しくなり、図5に示す特性が生成される。図5から分かるように、第1の磁石10Aが0mmの位置にある場合は、仮想センサVL1の磁界値はゼロとなり、位置0mmの前後で仮想センサVL1の磁界値はほぼ直線的に変化している。   For example, in the case of the present embodiment, as the predetermined magnetic sensor MS, a difference value between detection values of the magnetic sensor MS1 and the magnetic sensor MS3 skipped from the magnetic sensor, that is, “detection value of the magnetic sensor MS3−magnetic sensor”. “Detected value of MS1” is calculated and set as the magnetic field value of the virtual sensor VL1 located between the magnetic sensor MS1 and the magnetic sensor MS3. In the present embodiment, the position of the virtual sensor VL1 is equal to the position of the magnetic sensor MS2, and the characteristics shown in FIG. 5 are generated. As can be seen from FIG. 5, when the first magnet 10A is at the position of 0 mm, the magnetic field value of the virtual sensor VL1 becomes zero, and the magnetic field value of the virtual sensor VL1 changes substantially linearly before and after the position of 0 mm. Yes.

次に、仮想センサVL2は、磁気センサMS4と磁気センサMS2の中間点にある磁気センサMS3の位置と等しくなり、「磁気センサMS4の検出値−磁気センサMS2の検出値」の差分値をその磁界値としている。仮想センサVL2の特性は、磁石が10mmの位置にある場合に磁界値がゼロとなるように、図5に示す仮想センサVL1の特性を基板BSのプラス方向(紙面の右側に)に10mmシフトさせた特性となる。
さらに、仮想センサVL3は磁気センサMS4の位置と等しくなり、「磁気センサMS5の検出値−磁気センサMS3の検出値」の差分値に等しい磁界値を有する。仮想センサVL3の特性は、図5に示す仮想センサVL1の特性を基板BSのプラス方向に20mmシフトさせた特性となる。
Next, the virtual sensor VL2 becomes equal to the position of the magnetic sensor MS3 at the intermediate point between the magnetic sensor MS4 and the magnetic sensor MS2, and the difference value of “the detected value of the magnetic sensor MS4−the detected value of the magnetic sensor MS2” is set as the magnetic field. Value. The characteristic of the virtual sensor VL2 is that the characteristic of the virtual sensor VL1 shown in FIG. 5 is shifted by 10 mm in the plus direction of the substrate BS (to the right side of the paper) so that the magnetic field value becomes zero when the magnet is at a position of 10 mm. Characteristics.
Further, the virtual sensor VL3 is equal to the position of the magnetic sensor MS4, and has a magnetic field value equal to the difference value of “the detected value of the magnetic sensor MS5−the detected value of the magnetic sensor MS3”. The characteristics of the virtual sensor VL3 are obtained by shifting the characteristics of the virtual sensor VL1 shown in FIG. 5 by 20 mm in the plus direction of the substrate BS.

以降、順次1つ飛ばしの2つの磁気センサMSの検出値の差分値を求めて、求めた差分値を、1つ飛ばしの磁気センサMSの中間に位置する仮想センサVLの磁界値として生成する。そして、最後に、「磁気センサMS11の検出値−磁気センサMS9の検出値」の差分値を求めて、磁気センサMS10と同じ位置にある仮想センサVL9の磁界値とする。仮想センサVL9の特性は、図5に示す仮想センサVL1の特性を基板BSのプラス方向に80mmシフトさせた特性となる。   Thereafter, the difference value between the detection values of the two skipped magnetic sensors MS is sequentially obtained, and the obtained difference value is generated as the magnetic field value of the virtual sensor VL located in the middle of the skipped magnetic sensor MS. Finally, a difference value of “the detection value of the magnetic sensor MS11−the detection value of the magnetic sensor MS9” is obtained and set as the magnetic field value of the virtual sensor VL9 at the same position as the magnetic sensor MS10. The characteristics of the virtual sensor VL9 are characteristics obtained by shifting the characteristics of the virtual sensor VL1 shown in FIG. 5 by 80 mm in the plus direction of the substrate BS.

本実施形態では、磁気センサMSの個数Mを11としているため、1つ飛ばしの磁気センサMSの差分値は9つ求まる。また、磁気センサMSを等ピッチPで配列しているため、1つ飛ばしの2つの磁気センサMSの中間の位置は、図6に示すように、1つ飛ばしの2つの磁気センサMSの間に位置する磁気センサMSの位置と等しくなる。このように、本実施形態では、仮想センサVLは、仮想センサVL1〜VL9の9つ生成でき、それらの位置は、それぞれ磁気センサMS2〜MS10の位置に等しくなる。なお、磁気センサMSは等ピッチで配置する必要はなく、この場合、仮想センサVLの位置は、各磁気センサMSの位置に基づいて1つ飛ばしの磁気センサの中間の位置とすればよい。本発明では、1つ飛ばしの2つの磁気センサMSの中間に位置する複数の仮想センサを第1群の仮想センサと呼ぶ。   In the present embodiment, since the number M of the magnetic sensors MS is 11, nine difference values of one skipped magnetic sensor MS are obtained. Further, since the magnetic sensors MS are arranged at an equal pitch P, the intermediate position between the two skipped magnetic sensors MS is between the two skipped magnetic sensors MS as shown in FIG. It becomes equal to the position of the magnetic sensor MS located. Thus, in this embodiment, nine virtual sensors VL1 to VL9 can be generated, and their positions are equal to the positions of the magnetic sensors MS2 to MS10, respectively. Note that the magnetic sensors MS do not need to be arranged at an equal pitch, and in this case, the position of the virtual sensor VL may be an intermediate position of one skipped magnetic sensor based on the position of each magnetic sensor MS. In the present invention, a plurality of virtual sensors positioned between two skipped magnetic sensors MS are referred to as a first group of virtual sensors.

マイコン40では、算出した仮想センサVL1〜VL9の磁界値を、直線あるいは曲線で補間し、磁界値のゼロ点を求め第1の磁石10Aの位置を検出する。マイコン40で求めた第1の磁石10Aの位置の値はデジタル信号であり、出力回路50で所定のアナログ信号に変換し出力される。第1の磁石10Aの位置をデジタル信号として処理する場合は、出力回路50を省略してもよい。   The microcomputer 40 interpolates the calculated magnetic field values of the virtual sensors VL <b> 1 to VL <b> 9 with a straight line or a curve, obtains a zero point of the magnetic field value, and detects the position of the first magnet 10 </ b> A. The value of the position of the first magnet 10A obtained by the microcomputer 40 is a digital signal, which is converted into a predetermined analog signal by the output circuit 50 and output. When the position of the first magnet 10A is processed as a digital signal, the output circuit 50 may be omitted.

以上のように、本発明では、磁気センサMSの検出値の差を求めていることから、地磁気等外部磁界の影響で磁界のオフセット成分が変化した場合でも、第1の磁石10Aの検出位置に影響を受けることがない。また、磁気センサMSの温度特性等により同様にオフセット成分が変化した場合も、第1の磁石10Aの検出位置に影響を受けない。そのため、地磁気等外部磁界の影響で磁界のオフセット成分が変化した場合や磁気センサMSの温度特性等により同様にオフセット成分が変化した場合でも、これらの影響を受けることなく高精度な位置検出が可能である。   As described above, in the present invention, since the difference between the detection values of the magnetic sensor MS is obtained, even when the offset component of the magnetic field changes due to the influence of an external magnetic field such as geomagnetism, the detection position of the first magnet 10A is obtained. Not affected. Similarly, even when the offset component changes due to the temperature characteristics of the magnetic sensor MS, the detection position of the first magnet 10A is not affected. Therefore, even if the offset component of the magnetic field changes due to the influence of an external magnetic field such as geomagnetism, or even if the offset component changes similarly due to the temperature characteristics of the magnetic sensor MS, etc., highly accurate position detection is possible without being affected by these effects. It is.

次に、直線補間を用いて第1の磁石10Aの位置を検出するための処理を含め、位置検出装置の処理フローについて説明する。図7は、本発明の実施形態に係る位置検出装置における処理フローの例を示す図である。
磁気センサMS1〜MS11からの検出値は、マルチプレクサ信号生成部45からの信号に基づいてマルチプレクサ20を切り換えることによって、順次A/D変換器30に送られ、デジタル値に変換された後、マイコン40に取り込まれる。磁気センサMSからの検出値のマイコン40への取り込みは、図7に示す処理フローと並行して行ってもよい。
Next, a processing flow of the position detection device will be described including processing for detecting the position of the first magnet 10A using linear interpolation. FIG. 7 is a diagram showing an example of a processing flow in the position detection apparatus according to the embodiment of the present invention.
The detection values from the magnetic sensors MS1 to MS11 are sequentially sent to the A / D converter 30 by switching the multiplexer 20 based on the signal from the multiplexer signal generation unit 45, converted into a digital value, and then the microcomputer 40. Is taken in. The detection value from the magnetic sensor MS may be taken into the microcomputer 40 in parallel with the processing flow shown in FIG.

図7のステップS1で、まず、変数nに1が置かれる。ステップS2に移り、図1に示す仮想センサ磁界値生成部41は、n番目とn+2番目の磁気センサMSの検出値の差分を算出し、ステップS3で、この差分値をn番目とn+2番目の磁気センサMSの中間に位置する仮想センサVL(n)の磁界値として、マイコン40の、記憶装置に記憶する。   In step S1 of FIG. 7, first, 1 is set in the variable n. In step S2, the virtual sensor magnetic field value generation unit 41 shown in FIG. 1 calculates a difference between detection values of the nth and n + 2th magnetic sensors MS, and in step S3, this difference value is calculated for the nth and n + 2th. The magnetic field value of the virtual sensor VL (n) located in the middle of the magnetic sensor MS is stored in the storage device of the microcomputer 40.

ステップS4では、n+2の値が磁気センサMSの個数Mに等しいかどうか判別し、等しくない場合(NOの場合)は、ステップS5に移り、変数nに1を加えた後、ステップS2以降の処理を繰り返す。ステップS4でn+2の値が磁気センサMSの個数Mに等しい場合(YESの場合)は、ステップS6に移り、位置信号生成部42は、最大の検出値(絶対値)を出力した磁気センサMSに最も近接する仮想センサVLを特定する。   In step S4, it is determined whether or not the value of n + 2 is equal to the number M of the magnetic sensors MS. If not (NO), the process proceeds to step S5, 1 is added to the variable n, and the processes in and after step S2 are performed. repeat. When the value of n + 2 is equal to the number M of the magnetic sensors MS in step S4 (in the case of YES), the process proceeds to step S6, and the position signal generator 42 applies the magnetic sensor MS that has output the maximum detected value (absolute value). The closest virtual sensor VL is specified.

次に、ステップS7に移り、磁石特定部43は、位置検出の対象とする磁石を特定する。この処理は、後述するように、複数の磁石の内、磁気センサMSに対向している磁石を特定し、位置検出の対象とする磁石を特定するための処理である。本実施形態では、第1の磁石10Aと第2の磁石10Bが有効検出長Aの範囲内にある場合、第1の磁石10Aが位置検出の対象として特定されているものとする。   Next, it moves to step S7 and the magnet specific | specification part 43 specifies the magnet made into the object of a position detection. As will be described later, this process is a process for identifying a magnet facing the magnetic sensor MS from among a plurality of magnets and identifying a magnet for position detection. In the present embodiment, when the first magnet 10A and the second magnet 10B are within the range of the effective detection length A, it is assumed that the first magnet 10A is specified as a position detection target.

最大の検出値を出力した磁気センサMSに最も近接する仮想センサVLが特定されているため、これにより、大まかな第1の磁石10Aの位置を知ることができ、隣接する2つの仮想センサVLの磁界値がゼロ点を跨いでないかを探す基準になる。次に、ステップS8に移り、特定した仮想センサVLの磁界値と、この特定した仮想センサVLの前後の仮想センサの磁界値とがゼロを跨いでいるか否かを判別する。   Since the virtual sensor VL that is closest to the magnetic sensor MS that has output the maximum detection value is specified, it is possible to know the approximate position of the first magnet 10A, and to detect the two adjacent virtual sensors VL. This is a reference for searching whether the magnetic field value does not cross the zero point. Next, the process proceeds to step S8, where it is determined whether or not the magnetic field value of the identified virtual sensor VL and the magnetic field values of the virtual sensors before and after the identified virtual sensor VL cross zero.

例えば、本実施形態では、磁気センサMS5の検出値が最も大きい場合、磁気センサMS5の位置に最も近接する仮想センサVLは仮想センサVL4であり、磁気センサMS5と仮想センサVL4の位置は同じである。そして、仮想センサVL4の磁界値の極性と、仮想センサVL4に隣接する前後の仮想センサVL3、VL5の磁界値の極性とを比較する。2つの仮想センサVLの磁界値の極性が逆になっていれば、この2つの仮想センサの間で磁界値はゼロを跨いでおり、この2つの仮想センサの間に第1の磁石10Aがあることになる。   For example, in this embodiment, when the detection value of the magnetic sensor MS5 is the largest, the virtual sensor VL closest to the position of the magnetic sensor MS5 is the virtual sensor VL4, and the positions of the magnetic sensor MS5 and the virtual sensor VL4 are the same. . Then, the polarity of the magnetic field value of the virtual sensor VL4 is compared with the polarity of the magnetic field values of the virtual sensors VL3 and VL5 before and after the virtual sensor VL4. If the polarities of the magnetic field values of the two virtual sensors VL are reversed, the magnetic field value crosses zero between the two virtual sensors, and the first magnet 10A exists between the two virtual sensors. It will be.

仮に、仮想センサVL3の磁界値がプラス、仮想センサVL4の磁界値がマイナス、仮想センサVL5の磁界値がマイナスの場合、仮想センサVL3の磁界値と仮想センサVL4の磁界値の極性が逆であるので、この間に第1の磁石10Aがあることが分かる。そして、第1の磁石10Aの位置を得るために、ステップS9に移り、ゼロを跨ぐ2つの仮想センサVLの磁界値を直線補間し、磁界値がゼロとなる位置を第1の磁石10Aの位置として算出する。   If the magnetic field value of the virtual sensor VL3 is positive, the magnetic field value of the virtual sensor VL4 is negative, and the magnetic field value of the virtual sensor VL5 is negative, the magnetic field values of the virtual sensor VL3 and VL4 are opposite in polarity. Therefore, it turns out that there exists the 1st magnet 10A in the meantime. Then, in order to obtain the position of the first magnet 10A, the process proceeds to step S9, the magnetic field values of the two virtual sensors VL straddling zero are linearly interpolated, and the position where the magnetic field value becomes zero is the position of the first magnet 10A. Calculate as

本実施形態では、仮想センサVL3の磁界値と仮想センサVL4の磁界値との間で直線補間を行う。本実施形態では、ピッチPが10mmであるので、仮想センサVL3の位置は20mmの位置にあり、仮想センサVL4の位置は30mmの位置にある。第1の磁石10Aの位置は、20mmと30mmとの間にあり、仮想センサVL3の磁界値と仮想センサVL4の磁界値との間で直線補間を行って、最終的な磁石の位置を算出している。   In the present embodiment, linear interpolation is performed between the magnetic field value of the virtual sensor VL3 and the magnetic field value of the virtual sensor VL4. In this embodiment, since the pitch P is 10 mm, the position of the virtual sensor VL3 is at a position of 20 mm, and the position of the virtual sensor VL4 is at a position of 30 mm. The position of the first magnet 10A is between 20 mm and 30 mm, and the final magnet position is calculated by performing linear interpolation between the magnetic field value of the virtual sensor VL3 and the magnetic field value of the virtual sensor VL4. ing.

図8は、磁石位置を求めるための直線補間について説明するための図である。図8の縦軸は磁界の大きさを表すマイコン40の内部値であり、横軸は基板BSに沿った座標位置を示している。位置X0にある仮想センサVL(n)が磁界値Y0を有し、位置X1にある仮想センサVL(n+1)が磁界値Y1を有する場合、図8の座標系では、仮想センサVL(n)の座標位置は点aにあり、仮想センサVL(n+1)の座標位置は点bで示される。直線補間は、点aと点bとを結ぶ直線と磁界値0の線との交点のXの位置を求めることによって、磁石の位置を求めるものである。   FIG. 8 is a diagram for explaining the linear interpolation for obtaining the magnet position. The vertical axis in FIG. 8 is an internal value of the microcomputer 40 indicating the magnitude of the magnetic field, and the horizontal axis indicates the coordinate position along the substrate BS. When the virtual sensor VL (n) at the position X0 has the magnetic field value Y0 and the virtual sensor VL (n + 1) at the position X1 has the magnetic field value Y1, in the coordinate system of FIG. 8, the virtual sensor VL (n) The coordinate position is at point a, and the coordinate position of the virtual sensor VL (n + 1) is indicated by point b. In the linear interpolation, the position of the magnet is obtained by obtaining the X position of the intersection of the straight line connecting the point a and the point b and the magnetic field value 0 line.

ここで、Xの位置は、X=X0+Y0×(X1-X0)/(Y0-Y1)(式1)で求まる。例えば、X0=20、X1=30、Y0=100、Y1=−200の時、この式1に当てはめると、磁石の位置は23.333となり、簡単に第1の磁石10Aの位置を求めることができる。   Here, the position of X is obtained by X = X0 + Y0 × (X1-X0) / (Y0-Y1) (Formula 1). For example, when X0 = 20, X1 = 30, Y0 = 100, and Y1 = −200, applying this equation 1, the position of the magnet is 23.333, and the position of the first magnet 10A can be easily obtained. it can.

以上、第1の磁石10Aが磁気センサMSの有効検出長Aの範囲内にある場合の、第1の磁石10Aの位置検出の方法について説明したが、次に、第2の磁石10Bが磁気センサMSの有効検出長Aの範囲内にある場合の、第2の磁石10Bの位置検出の方法について説明する。
図9は、第2の磁石に対する磁気センサの検出値(磁界値)の特性を説明するための図であり、第2の磁石10Bは、第1の磁石10Aと同様にネオジムφ5×6を使用している。
The method for detecting the position of the first magnet 10A when the first magnet 10A is within the effective detection length A of the magnetic sensor MS has been described above. Next, the second magnet 10B is a magnetic sensor. A method for detecting the position of the second magnet 10B when the effective detection length A is within the range of the MS will be described.
FIG. 9 is a diagram for explaining the characteristics of the detection value (magnetic field value) of the magnetic sensor with respect to the second magnet, and the second magnet 10B uses neodymium φ5 × 6 similarly to the first magnet 10A. doing.

図9において、例えば、第2の磁石10Bが0mmの位置にある場合は、各磁気センサMS1〜MS4の検出値は、図9で示す磁気センサMS1〜MS4の特性曲線が0mmの場合の磁界値を出力する。また、第2の磁石10Bが10mmの位置にある場合は、各磁気センサMS1〜MS4の検出値は、図9で示す磁気センサMS1〜MS4の特性曲線が10mmの場合の磁界値を出力する。このように、各磁気センサMSは、第2の磁石10Bの中心と磁気センサMSの中心が同じ位置の時に検出値が最大になる。すなわち、第1の磁石10Aの場合と同様に、極性は異なるが、第2の磁石10Bと磁気センサMSとが最も近接した際に、磁気センサMSは最大の検出値を出力するように配置されている。   In FIG. 9, for example, when the second magnet 10B is at a position of 0 mm, the detected values of the magnetic sensors MS1 to MS4 are the magnetic field values when the characteristic curves of the magnetic sensors MS1 to MS4 shown in FIG. Is output. Moreover, when the 2nd magnet 10B exists in the position of 10 mm, the detected value of each magnetic sensor MS1-MS4 outputs the magnetic field value in case the characteristic curve of magnetic sensor MS1-MS4 shown in FIG. 9 is 10 mm. Thus, each magnetic sensor MS has a maximum detection value when the center of the second magnet 10B and the center of the magnetic sensor MS are at the same position. That is, as in the case of the first magnet 10A, the polarities are different, but the magnetic sensor MS is arranged to output the maximum detected value when the second magnet 10B and the magnetic sensor MS are closest to each other. ing.

図9に示すように、磁気センサMSの検出値のままでは、直線あるいは曲線で補間して磁界値のゼロ点を求め、第2の磁石10Bの位置を検出するということは難しい。したがって、第1の磁石10Aの位置を検出した方法と同じ方法で、第2の磁石10Bの位置を検出している。
すなわち、マイコン40の内部で磁気センサMSの検出値を1つ飛ばし毎に差を求め、1つ飛ばしの2つの磁気センサMSの中間に位置する仮想センサの磁界値を生成し、仮想センサの磁界値を補間して得られた磁界分布の磁界値がゼロとなる位置を第2の磁石10Bの位置として出力している。
As shown in FIG. 9, with the detection value of the magnetic sensor MS, it is difficult to detect the zero point of the magnetic field value by interpolation with a straight line or a curve and detect the position of the second magnet 10B. Therefore, the position of the second magnet 10B is detected by the same method as the method of detecting the position of the first magnet 10A.
That is, a difference is obtained every time one detection value of the magnetic sensor MS is skipped inside the microcomputer 40, and a magnetic field value of the virtual sensor located between the two skipped two magnetic sensors MS is generated. The position where the magnetic field value of the magnetic field distribution obtained by interpolating the values becomes zero is output as the position of the second magnet 10B.

図9に示すとおり、第2の磁石に対する磁気センサの検出値(磁界値)の特性は、図4に示した第1の磁石に対する磁気センサの検出値(磁界値)の特性の出力を正負反転させたものとなっている。すなわち、第1の磁石10Aの場合は磁気センサMSの最大値はプラス側にあり、第2の磁石10Bの場合は磁気センサMSの最大値はマイナス側に現れる。このため、第1の磁石10Aと第2の磁石10Bの判別は可能であり、磁石特定部43は、この特性を利用して磁石を特定している。   As shown in FIG. 9, the characteristic of the detection value (magnetic field value) of the magnetic sensor with respect to the second magnet is obtained by reversing the output of the characteristic of the detection value (magnetic field value) of the magnetic sensor with respect to the first magnet shown in FIG. It has been made to. That is, in the case of the first magnet 10A, the maximum value of the magnetic sensor MS is on the plus side, and in the case of the second magnet 10B, the maximum value of the magnetic sensor MS appears on the minus side. Therefore, it is possible to distinguish between the first magnet 10A and the second magnet 10B, and the magnet specifying unit 43 specifies the magnet using this characteristic.

図10は、第2の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図である。図10に示す特性は、図9に示す各磁気センサの検出値から求めているが、図5に示した、第1の磁石10Aが磁気センサMSに対向した際の、1つ飛ばしの2つの磁気センサMSの各検出値の差分値の特性を正負反転させた特性となっている。図10に示す特性曲線は、仮想センサVL1の特性を示している。   FIG. 10 is a diagram for explaining the characteristic of the difference value between the detection values of two skipped magnetic sensors when the second magnet faces the magnetic sensor. The characteristics shown in FIG. 10 are obtained from the detection values of the respective magnetic sensors shown in FIG. 9. However, when the first magnet 10A shown in FIG. The characteristic of the difference value of each detection value of the magnetic sensor MS is a characteristic obtained by inverting the sign. The characteristic curve shown in FIG. 10 shows the characteristics of the virtual sensor VL1.

このように、第2の磁石10Bの位置を検出する場合は、磁気センサMSの検出値の特性や、仮想センサVLの磁界値の特性が、第1の磁石10Aの位置検出の場合と正負反転しているだけであり、第2の磁石10Bの位置検出は第1の磁石10Aの位置検出と同じ方法で求めることができる。   As described above, when detecting the position of the second magnet 10B, the characteristics of the detection value of the magnetic sensor MS and the characteristics of the magnetic field value of the virtual sensor VL are reversed from those in the case of detecting the position of the first magnet 10A. The position detection of the second magnet 10B can be obtained by the same method as the position detection of the first magnet 10A.

第2の磁石10Bの位置を検出する場合は、マイナス側の最大値を検出した磁気センサMSを特定し、この磁気センサMSに最も近い仮想センサVLを特定する。さらに、特定した仮想センサVLとその前後の仮想センサVLとの間で磁界値がゼロの値を跨いでないか判別する。そして、ゼロを跨ぐ2つの仮想センサが特定できれば、それらの間に第2の磁石10Bがあり、2つの仮想センサVLの磁界値の直線補間を行って、第2の磁石10Bの位置を求める。   When detecting the position of the second magnet 10B, the magnetic sensor MS that has detected the maximum value on the minus side is specified, and the virtual sensor VL that is closest to the magnetic sensor MS is specified. Further, it is determined whether or not the magnetic field value crosses the zero value between the specified virtual sensor VL and the virtual sensors VL before and after the specified virtual sensor VL. Then, if two virtual sensors straddling zero can be specified, the second magnet 10B exists between them, and linear interpolation of the magnetic field values of the two virtual sensors VL is performed to obtain the position of the second magnet 10B.

例えば、有効検出長A内にある磁気センサMS2からMS10の内、磁気センサMS8がマイナスの最大値を検出している場合、磁気センサMS8に最も近接する仮想センサは仮想センサVL7であるので、仮想センサVL6と仮想センサのVL7の検出値の極性、および、仮想センサVL7と仮想センサVL8の検出値の極性をそれぞれ比較する。極性が逆になっていれば、その間で磁界値がゼロを跨いでいることになり、第2の磁石10Bがあることなる。   For example, when the magnetic sensor MS8 detects the maximum negative value among the magnetic sensors MS2 to MS10 within the effective detection length A, the virtual sensor closest to the magnetic sensor MS8 is the virtual sensor VL7. The polarities of the detection values of the sensor VL6 and the virtual sensor VL7 and the polarities of the detection values of the virtual sensor VL7 and the virtual sensor VL8 are respectively compared. If the polarities are reversed, the magnetic field value is between zero and the second magnet 10B is present.

仮に、仮想センサVL6の磁界値がマイナス、仮想センサVL7の磁界値がプラス、仮想センサVL8の磁界値がプラスの場合、仮想センサVL6の磁界値の極性と仮想センサVL7の磁界値の極性が逆であるので、この間に第2の磁石10Bがあることになる。そして、仮想センサVL6と仮想センサVL7の磁界値の直線補間を行う。   If the magnetic field value of the virtual sensor VL6 is negative, the magnetic field value of the virtual sensor VL7 is positive, and the magnetic field value of the virtual sensor VL8 is positive, the polarity of the magnetic field value of the virtual sensor VL6 and the polarity of the magnetic field value of the virtual sensor VL7 are reversed. Therefore, there is the second magnet 10B in the meantime. Then, linear interpolation of the magnetic field values of the virtual sensor VL6 and the virtual sensor VL7 is performed.

本実施形態では、仮想センサVLの間隔は10mmとなるので、仮想センサVL6の位置は、位置0mmにある仮想センサVL1から50mmということが分かる。この値に、仮想センサVL6と仮想センサVL7の磁界値の直線補間で求めた値を加算し、最終的な第2の磁石10Bの位置を求める。   In this embodiment, since the interval between the virtual sensors VL is 10 mm, it can be seen that the position of the virtual sensor VL6 is 50 mm from the virtual sensor VL1 at the position 0 mm. A value obtained by linear interpolation of the magnetic field values of the virtual sensor VL6 and the virtual sensor VL7 is added to this value to obtain the final position of the second magnet 10B.

直線補間については、図8で示した直線の傾きが逆になるが、有効検出長Aの範囲内に第1の磁石10Aのみが位置する場合と同様であり、例えば、仮想センサVL6の磁界値Y0が−100、仮想センサVL7の磁界値Y1が200の場合、Xの位置は、X=X0+Y0×(X1-X0)/(Y0-Y1)(式1)で求まる。X0=50、X1=60、Y0=−100、Y1=200をこの式1に当てはめると、第2の磁石10Bの位置Xは53.333となり、簡単に第2の磁石10Bの位置を求めることができる。   The linear interpolation is the same as the case where only the first magnet 10A is located within the range of the effective detection length A, for example, the magnetic field value of the virtual sensor VL6. When Y0 is −100 and the magnetic field value Y1 of the virtual sensor VL7 is 200, the position of X can be obtained by X = X0 + Y0 × (X1−X0) / (Y0−Y1) (Equation 1). When X0 = 50, X1 = 60, Y0 = −100, and Y1 = 200 are applied to Equation 1, the position X of the second magnet 10B is 53.333, and the position of the second magnet 10B can be easily obtained. Can do.

次に、本実施形態では、磁石が複数あり、磁石間距離Lが磁気センサMSの有効検出長Aよりも短い距離に設定されている。このため、磁気センサMSの有効検出長A内に第1の磁石10Aのみ位置する場合、第2の磁石10Bのみ位置する場合、あるいは、第1の磁石10Aと第2の磁石10Bの両者が位置する場合の3通りで、処理を分ける必要がある。   Next, in this embodiment, there are a plurality of magnets, and the distance L between the magnets is set to be shorter than the effective detection length A of the magnetic sensor MS. Therefore, when only the first magnet 10A is positioned within the effective detection length A of the magnetic sensor MS, only when the second magnet 10B is positioned, or both the first magnet 10A and the second magnet 10B are positioned. It is necessary to divide the processing in three ways.

図11は、磁気センサの有効検出長内に第1の磁石のみが位置する場合を示す図であり、図12は、磁気センサの有効検出長内に第1の磁石と第2の磁石とが位置する場合を示す図であり、図13は、磁気センサの有効検出長内に第2の磁石のみが位置する場合を示す図である。   FIG. 11 is a diagram illustrating a case where only the first magnet is positioned within the effective detection length of the magnetic sensor, and FIG. 12 illustrates that the first magnet and the second magnet are within the effective detection length of the magnetic sensor. FIG. 13 is a diagram illustrating a case where only the second magnet is positioned within the effective detection length of the magnetic sensor.

図11に示すように、磁気センサMSの有効検出長A内に第1の磁石10Aのみが位置する場合(以下、「ケース1」という。)、第1の磁石10Aの位置を求め、位置検出装置1の出力値とする。また、図12に示すように、磁気センサMSの有効検出長A内に第1の磁石10Aと第2の磁石10Bの両者が位置する場合(以下、「ケース2」という。)、予め第1の磁石10Aと第2の磁石10Bのどちらを優先させるかを決めておく。例えば、第1の磁石10Aを優先させる場合は、ケース1と同様に、第1の磁石10Aの位置を求め、位置検出装置1の出力値とする。図13に示すように、磁気センサMSの有効検出長A内に第2の磁石10Bのみが位置する場合(以下、「ケース3」という。)、第2の磁石10Bの位置を求め、更にその値に磁石間距離Lである70mmを加算して位置検出装置1の出力値とする。なお、第2のケースで第2の磁石10Bを優先させる場合は、ケース3と同様の方法をとる。   As shown in FIG. 11, when only the first magnet 10A is positioned within the effective detection length A of the magnetic sensor MS (hereinafter referred to as “case 1”), the position of the first magnet 10A is obtained to detect the position. The output value of the device 1 is assumed. In addition, as shown in FIG. 12, when both the first magnet 10A and the second magnet 10B are located within the effective detection length A of the magnetic sensor MS (hereinafter referred to as “case 2”), the first in advance. It is determined which of the magnet 10A and the second magnet 10B is prioritized. For example, when giving priority to the first magnet 10 </ b> A, as in the case 1, the position of the first magnet 10 </ b> A is obtained and used as the output value of the position detection device 1. As shown in FIG. 13, when only the second magnet 10B is positioned within the effective detection length A of the magnetic sensor MS (hereinafter referred to as “case 3”), the position of the second magnet 10B is obtained, and further 70 mm, which is the distance L between magnets, is added to the value to obtain the output value of the position detection device 1. In addition, when giving priority to the 2nd magnet 10B in a 2nd case, the method similar to case 3 is taken.

第2の磁石10Bの位置に磁石間距離Lである70mmを加算することは、第1の磁石10Aは磁気センサMSの有効検出長Aの範囲外にあるにもかかわらず、第2の磁石10Bの位置から第1の磁石10Aの位置を求めることである。これにより、1個の磁石を用いる場合に比べて、位置検出装置の全有効検出長が磁石間距離L分増えて150mmと長くなり、更に第1の磁石10Aと第2の磁石10Bが切り替わった場合でも、連続的な位置検出が可能になる。また、この方式を用いれば、全有効検出長が従来と同じ場合、磁気センサMSや基板BS等の部品の削減、装置の小型化等が可能になる。   Adding 70 mm, which is the distance L between the magnets, to the position of the second magnet 10B means that the first magnet 10A is outside the effective detection length A of the magnetic sensor MS, but the second magnet 10B. The position of the first magnet 10A is obtained from the position of. Thereby, compared with the case where one magnet is used, the total effective detection length of the position detection device is increased by the distance L between the magnets and is increased to 150 mm, and the first magnet 10A and the second magnet 10B are switched. Even in this case, continuous position detection is possible. If this method is used, when the total effective detection length is the same as the conventional one, it is possible to reduce the number of parts such as the magnetic sensor MS and the substrate BS and to reduce the size of the apparatus.

次に、本実施形態において、各ケース1からケース3を確実に検出し、誤検出を防止するための方法について説明する。まず、第1の磁石10Aを検出する場合、各磁気センサMSの検出値からプラス側の最大値を出力する磁気センサMSを探す。この時、第2の磁石10Bのプラス側の値を検出しないようにする。図9で示すように、第2の磁石10Bに対する磁気センサMSの検出値の特性から、位置0mmの位置にマイナスの最大値があるが、±20mm付近のプラス側でも最大値を有しており、第2の磁石10Bは、磁気センサMSにプラス側の検出値を発生させる。   Next, in the present embodiment, a method for reliably detecting cases 1 to 3 and preventing erroneous detection will be described. First, when detecting the first magnet 10A, the magnetic sensor MS that outputs the maximum value on the plus side is searched for from the detection values of the magnetic sensors MS. At this time, the value on the plus side of the second magnet 10B is not detected. As shown in FIG. 9, from the characteristic of the detection value of the magnetic sensor MS for the second magnet 10B, there is a maximum negative value at the position of 0 mm, but it also has a maximum value on the positive side near ± 20 mm. The second magnet 10B generates a detected value on the plus side in the magnetic sensor MS.

第2の磁石10Bのプラス側の値を誤検出してしまうと、実際は第1の磁石10Aはなく第2の磁石10Bのみの場合でも、有効検出長Aの範囲内に第1の磁石10Aもあると判断してしまい、正常な位置検出ができない。このため、第2の磁石10Bのプラス側の値を誤検出しないようにする。具体的には、第2の磁石10Bのプラス側の最大値は、第1の磁石10Aのプラス側の最大値よりも十分に小さく、第2の磁石10Bのプラス側の値を誤検出しないように検出値に閾値を設ける。例えば、検出値の閾値として、磁界値100以下のプラス値を検出しないようにすることで、第2の磁石10Bのプラス側の値を誤検出することがなくなる。   If the value on the plus side of the second magnet 10B is erroneously detected, the first magnet 10A is also within the range of the effective detection length A even in the case where only the second magnet 10B is not actually there but the first magnet 10A. It is judged that there is, and the normal position cannot be detected. For this reason, the value on the plus side of the second magnet 10B is not erroneously detected. Specifically, the maximum value on the plus side of the second magnet 10B is sufficiently smaller than the maximum value on the plus side of the first magnet 10A, so that the value on the plus side of the second magnet 10B is not erroneously detected. A threshold is provided for the detected value. For example, by not detecting a positive value with a magnetic field value of 100 or less as the detection value threshold value, the positive value of the second magnet 10B is not erroneously detected.

同様に、第2の磁石10Bを検出する場合、第1の磁石10Aによって生じるマイナス側の値を誤検出しないようにする。例えば、磁界値−100に閾値を設け、閾値以上のマイナス側の値を検出しないようにすることで、第1の磁石10Aのマイナス側の値を誤検出することがなくなる。   Similarly, when detecting the second magnet 10B, a negative value generated by the first magnet 10A is not erroneously detected. For example, by providing a threshold value for the magnetic field value −100 and not detecting a negative value that is equal to or greater than the threshold value, the negative value of the first magnet 10A is not erroneously detected.

これにより、磁石特定部43は、ケース1から3のいずれの状態にあるのかを確実に判別することができる。例えば、プラス側の最大値のみを検出した場合は、第1の磁石10Aのみがあるケース1と判断し、マイナス側の最大値のみを検出した場合、第2の磁石10Bのみがあるケース3と判断し、プラス側とマイナス側の両方の最大値を検出した場合、第1の磁石10Aと第2の磁石10Bの両方があるケース2と判断する。   Thereby, the magnet specific | specification part 43 can discriminate | determine reliably it is in any state of case 1 to 3. For example, when only the maximum value on the plus side is detected, it is determined that the case 1 has only the first magnet 10A, and when only the maximum value on the minus side is detected, the case 3 has only the second magnet 10B. If the maximum value on both the positive side and the negative side is detected, it is determined that Case 2 has both the first magnet 10A and the second magnet 10B.

このように、本実施形態では、ケース1からケース3まで連続的に第1の磁石10Aの位置と第2の磁石10Bの位置を検出することが可能である。位置検出装置1は、第1の磁石10Aと第2の磁石10Bとを判別しており、ケース3では、図3あるいは13で示すように、第2の磁石10Bの位置から、磁気センサMSの有効検出長Aの範囲外にある第1の磁石10Aの位置を検出することが可能になる。さらに、見方を変えれば、ケース1では、図2あるいは11で示すように、第1の磁石10Aの位置から、磁気センサMSの有効検出長Aの範囲外にある第2の磁石10Bの位置を検出することが可能になる。このように、本発明では、位置検出装置としての全有効検出長が磁石間距離L分増えることになる。   Thus, in the present embodiment, it is possible to detect the position of the first magnet 10A and the position of the second magnet 10B continuously from case 1 to case 3. The position detection device 1 discriminates between the first magnet 10A and the second magnet 10B. In the case 3, as shown in FIG. 3 or 13, the position of the magnetic sensor MS is determined from the position of the second magnet 10B. It becomes possible to detect the position of the first magnet 10A outside the range of the effective detection length A. Further, from a different perspective, in case 1, as shown in FIG. 2 or 11, the position of the second magnet 10B that is outside the range of the effective detection length A of the magnetic sensor MS from the position of the first magnet 10A. It becomes possible to detect. As described above, in the present invention, the total effective detection length as the position detection device is increased by the distance L between the magnets.

(第2の実施形態)
第1の実施形態では、1つ飛ばしの2つの磁気センサMS毎に差分値を求めて仮想センサVLを生成しているため、仮想センサVLの数は磁気センサの数よりも2個少なく、また、磁気センサを10mmの等ピッチPで配置した場合、仮想センサVL間の間隔も磁気センサMSの間隔と同じ10mmである。そして、第1の実施形態において、直線補間をする場合、磁界値のゼロ点から±10mmの区間(磁気センサMSの間隔分)が直線であることが望ましいが、磁界値のゼロ点から離れると図5および図10の符号Cで示すように直線性が悪くなる。そのため、直線性の悪い値を用いて直線補間をすると誤差が発生する。
(Second Embodiment)
In the first embodiment, since the virtual sensor VL is generated by obtaining the difference value for each of the two skipped magnetic sensors MS, the number of virtual sensors VL is two less than the number of magnetic sensors, When the magnetic sensors are arranged at an equal pitch P of 10 mm, the interval between the virtual sensors VL is also 10 mm, which is the same as the interval between the magnetic sensors MS. In the first embodiment, when linear interpolation is performed, it is desirable that the interval of ± 10 mm from the zero point of the magnetic field value (the interval of the magnetic sensor MS) is a straight line. As shown by the symbol C in FIGS. 5 and 10, the linearity is deteriorated. Therefore, an error occurs when linear interpolation is performed using a value having poor linearity.

第2の実施形態は、計算が簡単な直線補間でもより高精度な磁石の位置検出を可能とするものである。このため、第2の実施形態では、第1の実施形態の磁気センサMSの検出値を1つ飛ばし毎に差を求める方式に加え、磁気センサMSの隣同士の検出値の差分値も求めている。すなわち、第1の実施形態で求めた(M−2)個の第1群の仮想センサVLに加え、隣接する2つの磁気センサの検出値の差分値を算出し、この差分値を磁界値として有する、隣接する2つの磁気センサの中間に位置する(M−1)個の第2群の仮想センサVLを用いている。本発明では、隣接する2つの磁気センサMSの中間に位置する複数の仮想センサを第2群の仮想センサと呼ぶ。   In the second embodiment, it is possible to detect the position of the magnet with higher accuracy even by linear interpolation with simple calculation. For this reason, in the second embodiment, in addition to the method of obtaining the difference every time the detection value of the magnetic sensor MS of the first embodiment is skipped, the difference value of the detection value adjacent to the magnetic sensor MS is also obtained. Yes. That is, in addition to the (M-2) first group of virtual sensors VL obtained in the first embodiment, a difference value between detection values of two adjacent magnetic sensors is calculated, and this difference value is used as a magnetic field value. The (M−1) second group of virtual sensors VL located between two adjacent magnetic sensors are used. In the present invention, a plurality of virtual sensors positioned between two adjacent magnetic sensors MS are referred to as a second group of virtual sensors.

以下、図11に示す、磁気センサMSの有効検出長A内に第1の磁石10Aのみが位置するケース1の場合について、第1の磁石10Aの位置を検出する方法について説明する。
図14は、第1の磁石が磁気センサに対向した際の、隣接する2つの磁気センサの各検出値の差分値の特性を説明するための図であり、図15は、磁気センサの位置と第1群と第2群を合わせた仮想センサの位置を示す図である。図14において、縦軸は磁界の大きさを表すマイコン40の内部値であり、横軸は基板BSに沿った位置を示している。
Hereinafter, a method for detecting the position of the first magnet 10A will be described in the case 1 where only the first magnet 10A is positioned within the effective detection length A of the magnetic sensor MS shown in FIG.
FIG. 14 is a diagram for explaining the characteristics of the difference value between the detection values of two adjacent magnetic sensors when the first magnet faces the magnetic sensor. FIG. 15 shows the position of the magnetic sensor. It is a figure which shows the position of the virtual sensor which combined the 1st group and the 2nd group. In FIG. 14, the vertical axis represents the internal value of the microcomputer 40 representing the magnitude of the magnetic field, and the horizontal axis represents the position along the substrate BS.

具体的には、「磁気センサMS2の検出値−磁気センサMS1の検出値」の差分値を求め、この差分値を、磁気センサMS1と磁気センサMS2の中間の−5mmの位置にある仮想センサVL1の磁界値とし、「磁気センサMS3の検出値−磁気センサMS1の検出値」の差分値を求め、この差分値を、磁気センサMS1と磁気センサMS3の中間に位置する0mmの位置にある仮想センサVL2の磁界値とし、「磁気センサMS3の検出値−磁気センサMS2の検出値」の差分値を求め、この差分値を、磁気センサMS2と磁気センサMS3の中間の5mmの位置する仮想センサVL3の磁界値とし、「磁気センサMS4の検出値−磁気センサMS2の検出値」の差分値を求め、この差分値を、磁気センサMS2と磁気センサMS4の中間の10mmに位置する仮想センサVL4の磁界値とし、順次、仮想センサVL19までの磁界値を算出している。   Specifically, the difference value of “the detection value of the magnetic sensor MS2−the detection value of the magnetic sensor MS1” is obtained, and this difference value is obtained as a virtual sensor VL1 located at a position of −5 mm between the magnetic sensor MS1 and the magnetic sensor MS2. A difference value of “detection value of magnetic sensor MS3−detection value of magnetic sensor MS1” is obtained, and this difference value is a virtual sensor at a position of 0 mm located between magnetic sensor MS1 and magnetic sensor MS3. The difference value of “the detection value of the magnetic sensor MS3−the detection value of the magnetic sensor MS2” is obtained as the magnetic field value of VL2, and this difference value is obtained from the virtual sensor VL3 located 5 mm between the magnetic sensor MS2 and the magnetic sensor MS3. A difference value of “detection value of magnetic sensor MS4−detection value of magnetic sensor MS2” is obtained as a magnetic field value, and this difference value is an intermediate value between magnetic sensor MS2 and magnetic sensor MS4. A field value of the virtual sensor VL4 located 10 mm, sequentially calculates the magnetic field values to the virtual sensor VL19.

ここで、偶数番目の9個の仮想センサVL2、VL4、VL6・・・VL18は、第1の実施形態で求めた1つ飛ばしの2つの磁気センサMSから生成したものであり、第1群の仮想センサVLに相当する。第1群の仮想センサVLの特性は、それぞれ図4で示した特性曲線と同じ特性曲線を有する。また、奇数番目の10個の仮想センサVL1、VL3、VL5・・・VL19は、隣接する2つの磁気センサMSから生成したものであり、第2群の仮想センサVLに相当する。   Here, the even-numbered nine virtual sensors VL2, VL4, VL6... VL18 are generated from the two skipped magnetic sensors MS obtained in the first embodiment. It corresponds to the virtual sensor VL. The characteristics of the first group of virtual sensors VL have the same characteristic curves as the characteristic curves shown in FIG. The odd-numbered ten virtual sensors VL1, VL3, VL5... VL19 are generated from the two adjacent magnetic sensors MS and correspond to the second group of virtual sensors VL.

図14に示す特性は、図4に示す磁気センサMS2の検出値と磁気センサMS3の検出値から求めたものであり、仮想センサVL3の特性を示している。仮想センサVL3は、磁気センサMS2と磁気センサMS3の中間の位置である5mmの位置にあり、その磁界値は5mmの位置でゼロとなり、ゼロ点を挟む前後の磁界値は直線的に変化している。同様に、第2群に属する仮想センサVL1の特性は、図11の仮想センサVL3の特性を基板BSのマイナス方向に10mmシフトさせた特性となり、仮想センサVL5の特性は、図11の仮想センサVL3の特性を基板BSのプラス方向に10mmシフトさせた特性となる。   The characteristic shown in FIG. 14 is obtained from the detection value of the magnetic sensor MS2 and the detection value of the magnetic sensor MS3 shown in FIG. 4, and shows the characteristic of the virtual sensor VL3. The virtual sensor VL3 is located at a position of 5 mm, which is an intermediate position between the magnetic sensor MS2 and the magnetic sensor MS3. The magnetic field value becomes zero at the position of 5 mm, and the magnetic field value before and after the zero point changes linearly. Yes. Similarly, the characteristic of the virtual sensor VL1 belonging to the second group is a characteristic obtained by shifting the characteristic of the virtual sensor VL3 in FIG. 11 by 10 mm in the minus direction of the substrate BS, and the characteristic of the virtual sensor VL5 is the virtual sensor VL3 in FIG. The characteristic is shifted by 10 mm in the plus direction of the substrate BS.

これにより、第2の実施形態では、図5で示す特性と同様の特性を有する9個の偶数番目の第1群の仮想センサVLと、図14で示す特性と同様な特性を有する10個の奇数番目の第2群の仮想センサVLとが、図15で示すように5mm間隔のピッチP’で生成される。これは、5mm間隔で19個の磁気センサが並んでいることと同じであり、磁界値のゼロ点から±5mmの区間での直線的特性を利用することができ、直線補間でも高精度な第1の磁石10Aの位置検出が可能となる。さらに、有効検出長A’も18×ピッチP’から90mmとなる。第1の実施形態における有効検出長Aあるいは第2実施形態における有効検出長A’から、磁気センサMSの有効検出長は、磁気センサMSの配列方向に沿って、両端に位置する仮想センサ間の距離に相当すると定義できる。   Accordingly, in the second embodiment, nine even-numbered first group virtual sensors VL having the same characteristics as those shown in FIG. 5 and 10 characteristics having the same characteristics as those shown in FIG. The odd-numbered second group of virtual sensors VL are generated at a pitch P ′ having an interval of 5 mm as shown in FIG. This is the same as 19 magnetic sensors arranged at intervals of 5 mm, and the linear characteristics in the section of ± 5 mm from the zero point of the magnetic field value can be used. The position of one magnet 10A can be detected. Further, the effective detection length A ′ is 90 mm from 18 × pitch P ′. From the effective detection length A in the first embodiment or the effective detection length A ′ in the second embodiment, the effective detection length of the magnetic sensor MS is between virtual sensors positioned at both ends along the arrangement direction of the magnetic sensor MS. It can be defined as equivalent to distance.

第2の実施形態において、直線補間によって第1の磁石10Aの位置を検出する方法は、第1の実施形態と同様である。
まず、磁気センサMSの中から最大の検出値を出力する磁気センサMSを特定する。これにより大まかな磁石の位置を知ることができ、仮想センサVLの磁界値がゼロ点を跨いでないかを探す基準になる。次に、最大値を示す磁気センサMSに最も近接する仮想センサVLを特定し、特定した仮想センサVLの磁界値と、この特定した仮想センサVLの前後の仮想センサの磁界値とがゼロを跨いでいるか否かを判別する。
In the second embodiment, the method of detecting the position of the first magnet 10A by linear interpolation is the same as in the first embodiment.
First, the magnetic sensor MS that outputs the maximum detected value from among the magnetic sensors MS is specified. As a result, the approximate position of the magnet can be known, and it becomes a reference for searching whether the magnetic field value of the virtual sensor VL crosses the zero point. Next, the virtual sensor VL closest to the magnetic sensor MS indicating the maximum value is specified, and the magnetic field value of the specified virtual sensor VL and the magnetic field values of the virtual sensors before and after the specified virtual sensor VL cross zero. It is determined whether or not.

例えば、磁気センサMS5が最大値をとる場合は、磁気センサMS5に最も近接する仮想センサVLは仮想センサVL8となるため、仮想センサVL8の磁界値の極性と、この仮想センサVL8に隣接する仮想センサVL7および仮想センサVL9の磁界値の極性をそれぞれ比較する。そして、2つの仮想センサVLの磁界値の極性が逆になっていれば、この2つの仮想センサの間で磁界値はゼロを跨いでおり、この2つの仮想センサの間に第1の磁石10Aがあるということになる。   For example, when the magnetic sensor MS5 takes the maximum value, the virtual sensor VL closest to the magnetic sensor MS5 is the virtual sensor VL8, and therefore the polarity of the magnetic field value of the virtual sensor VL8 and the virtual sensor adjacent to the virtual sensor VL8. The polarities of the magnetic field values of VL7 and virtual sensor VL9 are respectively compared. If the polarities of the magnetic field values of the two virtual sensors VL are reversed, the magnetic field value crosses zero between the two virtual sensors, and the first magnet 10A is between the two virtual sensors. There will be.

仮に、仮想センサVL7の磁界値がプラス、仮想センサVL8の磁界値がマイナス、仮想センサVL9の磁界値がマイナスの場合、仮想センサVL7の磁界値と仮想センサVL8の磁界値の極性が逆であるので、この間に第1の磁石10Aがあることが分かる。本実施形態では、仮想センサVL7の位置は、磁気センサMS2の位置を0とした場合、25mmの位置にあるため、第1の磁石10Aは、25mmから30mmの間にあることが分かる。そして、そして、第1の磁石10Aの位置を得るために、ゼロを跨ぐ2つの仮想センサVLの磁界値を直線補間し、磁界値がゼロとなる位置を第1の磁石10Aの位置として算出する。   If the magnetic field value of the virtual sensor VL7 is positive, the magnetic field value of the virtual sensor VL8 is negative, and the magnetic field value of the virtual sensor VL9 is negative, the magnetic field values of the virtual sensor VL7 and VL8 are opposite in polarity. Therefore, it turns out that there exists the 1st magnet 10A in the meantime. In this embodiment, since the position of the virtual sensor VL7 is at a position of 25 mm when the position of the magnetic sensor MS2 is 0, it can be seen that the first magnet 10A is between 25 mm and 30 mm. Then, in order to obtain the position of the first magnet 10A, the magnetic field values of the two virtual sensors VL straddling zero are linearly interpolated, and the position where the magnetic field value becomes zero is calculated as the position of the first magnet 10A. .

直線補間の方法についても、第1の実施形態と同様である。図8を用いて説明したように、磁石の位置Xは、X=X0+Y0×(X1-X0)/(Y0-Y1)(式1)で求まる。例えば、X0=25、X1=30、Y0=100、Y1=−200の時、この式1に当てはめると、磁石の位置は、26.667となり、簡単に磁石の位置を求めることができる。   The linear interpolation method is the same as that in the first embodiment. As described with reference to FIG. 8, the position X of the magnet is obtained by X = X0 + Y0 × (X1−X0) / (Y0−Y1) (formula 1). For example, when X0 = 25, X1 = 30, Y0 = 100, and Y1 = −200, applying to this equation 1, the position of the magnet is 26.667, and the position of the magnet can be easily obtained.

以上、第2の実施形態において、磁気センサMSの有効検出長A’内に第1の磁石10Aのみが位置するケース1の場合に、第1の磁石10Aの位置を検出する方法について説明したが、磁気センサMSの有効検出長A’内に第2の磁石10Bのみが位置するケース3の場合に、第2の磁石10Bの位置を検出する方法も、磁気センサMSの検出値の特性が正負逆になるだけで、ケース1と同様である。このため、その説明を省略する。なお、第1の磁石10Aと第2の磁石10Bとが有効検出長A’内にあるケース2の場合は、第1の実施形態と同様に、いずれかの磁石を優先させてその位置を検出すればよい。   As described above, in the second embodiment, the method for detecting the position of the first magnet 10A in the case 1 where only the first magnet 10A is positioned within the effective detection length A ′ of the magnetic sensor MS has been described. In the case 3 where only the second magnet 10B is positioned within the effective detection length A ′ of the magnetic sensor MS, the method of detecting the position of the second magnet 10B also has positive / negative characteristics of the detection value of the magnetic sensor MS. It is the same as Case 1 only in reverse. Therefore, the description thereof is omitted. In the case 2 where the first magnet 10A and the second magnet 10B are within the effective detection length A ′, the position of one of the magnets is preferentially detected as in the first embodiment. do it.

本実施形態で追加した、第2群の仮想センサVLの特性も磁気センサMSの検出値の差を求めていることから、本実施形態は、第1の実施形態と同様に、地磁気等外部磁界の影響で磁界のオフセット成分が変化した場合や磁気センサの温度特性等により同様にオフセット成分が変化した場合でも、これらの影響を受けることなく高精度な位置検出が可能である。そして、本実施形態では、磁気センサを増やすことなく直線補間でも高精度な位置検出が可能であり、さらに、有効検出長A’も90mmとなり、第1の実施形態の有効検出長Aの80mmよりも長くできる。   Since the characteristic of the second group of virtual sensors VL added in the present embodiment also obtains the difference between the detection values of the magnetic sensor MS, the present embodiment is similar to the first embodiment in the external magnetic field such as geomagnetism. Even when the offset component of the magnetic field changes due to the influence of the above, or when the offset component similarly changes due to the temperature characteristics of the magnetic sensor or the like, highly accurate position detection is possible without being affected by these. In the present embodiment, highly accurate position detection is possible even by linear interpolation without increasing the number of magnetic sensors. Further, the effective detection length A ′ is 90 mm, which is more than the effective detection length A of 80 mm in the first embodiment. Can also be long.

(第3の実施形態)
第1の実施形態および第2の実施形態では、図13に示すように、磁気センサMSの有効検出長Aの範囲内に第2の磁石10Bのみがある場合、第2の磁石10Bの位置に磁石間距離Lである70mmを加算して、第1の磁石10Aの位置を出力している。しかし、この磁石間距離70mmは設置誤差等を考慮していない固定値であるため、磁石間距離Lが設置誤差等でずれていた場合は、位置検出装置1の出力に誤差が発生する。
(Third embodiment)
In the first embodiment and the second embodiment, as shown in FIG. 13, when only the second magnet 10B is within the range of the effective detection length A of the magnetic sensor MS, the second magnet 10B is positioned at the position of the second magnet 10B. The position of the first magnet 10A is output by adding the distance L between the magnets of 70 mm. However, since the distance between the magnets of 70 mm is a fixed value that does not consider the installation error or the like, if the distance between the magnets L is shifted due to the installation error or the like, an error occurs in the output of the position detection device 1.

第3の実施形態は、磁石間距離Lの算出と補正を行う機能を備えたものである。本実施形態では、図12に示すように、第1の磁石10Aと第2の磁石10Bの両方とも磁気センサMSの有効検出長Aの範囲内に入っている場合、図1に示す磁石間距離算出部44は、位置信号生成部42に対して、第1の磁石10Aと第2の磁石10Bの両方とも位置を算出させ、算出した位置から磁石間距離Lを求めている。そして、有効検出長A内に第2の磁石10Bのみが位置する際に、第2の磁石10Bの位置に、磁石間距離算出部44で算出した磁石間距離Lを加えることによって、第1の磁石10Aの位置を出力している。   The third embodiment has a function of calculating and correcting the distance L between magnets. In the present embodiment, as shown in FIG. 12, when both the first magnet 10A and the second magnet 10B are within the effective detection length A of the magnetic sensor MS, the distance between the magnets shown in FIG. The calculation unit 44 causes the position signal generation unit 42 to calculate the positions of both the first magnet 10A and the second magnet 10B, and obtains the inter-magnet distance L from the calculated position. Then, when only the second magnet 10B is positioned within the effective detection length A, the first magnet 10B is added to the position of the second magnet 10B by adding the inter-magnet distance L calculated by the inter-magnet distance calculator 44. The position of the magnet 10A is output.

磁石間距離Lについては、予めマイコン40のメモリにその値を入力可能であるが、実際の入力値と磁石間距離算出部44による磁石間距離の算出値とが異なる場合は、予め入力された入力値を磁石間距離算出部44の算出値で補正する。これによって、精度の高い位置検出が可能になる。   The value of the inter-magnet distance L can be input in advance to the memory of the microcomputer 40. However, if the actual input value differs from the calculated value of the inter-magnet distance by the inter-magnet distance calculation unit 44, the value is input in advance. The input value is corrected with the calculated value of the inter-magnet distance calculating unit 44. This enables highly accurate position detection.

次に、第1の実施形態の場合における磁石間距離Lの算出方法について説明するが、第2の実施形態の場合における磁石間距離Lの算出方法も同様である。
図16は、磁石間距離の算出フローの例を示す図である。まず、磁石特定部43が、第1の磁石10Aと第2の磁石10Bの両方の磁石が磁気センサMSの有効検出長Aの範囲内に入っているか否かを判別する(ステップS11)。両方の磁石が有効検出長Aの範囲内に入っていない場合は、磁石を移動させて、両方の磁石が有効検出長Aの範囲内に入るようになるまで待つ。
Next, a calculation method of the inter-magnet distance L in the case of the first embodiment will be described, but the calculation method of the inter-magnet distance L in the case of the second embodiment is the same.
FIG. 16 is a diagram illustrating an example of a calculation flow of the distance between magnets. First, the magnet specifying unit 43 determines whether or not both the first magnet 10A and the second magnet 10B are within the effective detection length A of the magnetic sensor MS (step S11). If both magnets are not within the range of the effective detection length A, move the magnets and wait until both magnets are within the range of the effective detection length A.

両方の磁石が有効検出長Aの範囲内に入っている場合は、まず、位置信号生成部42が第1の磁石10Aの位置を求める(ステップS12)。第1の磁石10Aの位置の検出は、プラス側の最大の検出値を出力する磁気センサMSを特定し、この磁気センサMSに近い2つの仮想センサVLの磁界値がゼロを跨いでいないかを探し、磁界値がゼロを跨いでいる2つの仮想センサの磁界値を直線補間することによって、第1の磁石10Aの位置を求める。   If both magnets are within the range of the effective detection length A, first, the position signal generator 42 obtains the position of the first magnet 10A (step S12). The position of the first magnet 10A is detected by specifying the magnetic sensor MS that outputs the maximum detected value on the plus side, and checking whether the magnetic field values of the two virtual sensors VL close to the magnetic sensor MS cross zero. The position of the first magnet 10A is obtained by searching and linearly interpolating the magnetic field values of the two virtual sensors whose magnetic field values cross zero.

第1の磁石10Aと第2の磁石10Bの磁石間距離Lを70mmとした場合、第1の磁石10A、第2の磁石10Bの両方の磁石が磁気センサMSの有効検出長Aの範囲内にあることから、第1の磁石10Aは、磁気センサMS9、MS10付近に来る。例えば、磁気センサMS9が検出値のプラス側の最大値をとる場合、その位置は仮想センサVL8の位置となり、この仮想センサVL8と前後の仮想センサVL7、VL9との磁界値の極性をそれぞれ比較する。仮に、仮想センサVL7の磁界値がプラス、仮想センサVL8の磁界値がプラス、仮想センサVL9の磁界値がマイナスの場合、仮想センサVL8と仮想センサVL9の磁界値の極性が逆であるので、この間に第1の磁石10Aがあることになり、仮想センサVL8と仮想センサVL9の磁界値で直線補間を行う。   When the distance L between the first magnet 10A and the second magnet 10B is 70 mm, both the first magnet 10A and the second magnet 10B are within the range of the effective detection length A of the magnetic sensor MS. Therefore, the first magnet 10A comes near the magnetic sensors MS9 and MS10. For example, when the magnetic sensor MS9 takes the maximum value on the positive side of the detection value, the position is the position of the virtual sensor VL8, and the polarities of the magnetic field values of the virtual sensor VL8 and the virtual sensors VL7 and VL9 before and after are compared. . If the magnetic field value of the virtual sensor VL7 is positive, the magnetic field value of the virtual sensor VL8 is positive, and the magnetic field value of the virtual sensor VL9 is negative, the polarities of the magnetic field values of the virtual sensor VL8 and the virtual sensor VL9 are opposite. Thus, the first magnet 10A is present, and linear interpolation is performed using the magnetic field values of the virtual sensor VL8 and the virtual sensor VL9.

直線補間によって、第1の磁石10Aの位置Xは、式1:X=X0+Y0×(X1-X0)/(Y0-Y1))で求まる。本実施形態では、仮想センサVLの間隔は10mmなので、仮想センサVL8の位置(X0)は仮想センサVL1から70mmの位置、仮想センサVL9の位置(X1)は80mmの位置にあることが分かる。例えば、仮想センサVL8の磁界値(YO)が100、仮想センサVL9の磁界値(Y1)が−200とした場合、式1より、第1の磁石10Aの位置Xは、73.333mmとして求まる。   By linear interpolation, the position X of the first magnet 10A can be obtained by Expression 1: X = X0 + Y0 × (X1−X0) / (Y0−Y1)). In this embodiment, since the interval between the virtual sensors VL is 10 mm, it can be seen that the position (X0) of the virtual sensor VL8 is 70 mm from the virtual sensor VL1, and the position (X1) of the virtual sensor VL9 is 80 mm. For example, when the magnetic field value (YO) of the virtual sensor VL8 is 100 and the magnetic field value (Y1) of the virtual sensor VL9 is −200, the position X of the first magnet 10A is obtained as 73.333 mm from Equation 1.

次に、第2の磁石10Bの位置を求める(ステップS13)。なお、図16に示すフローにおいて、ステップS12とステップS13とは順番を入れ替えてもよい。第2の磁石10Bの位置の検出は、マイナス側の最大の検出値を出力する磁気センサMSを特定し、この磁気センサMSに近い2つの仮想センサVLの磁界値がゼロを跨いでいないかを探し、磁界値がゼロを跨いでいる2つの仮想センサの磁界値を直線補間することによって、第2の磁石10Bの位置を求める。   Next, the position of the second magnet 10B is obtained (step S13). In the flow shown in FIG. 16, the order of step S12 and step S13 may be interchanged. The position of the second magnet 10B is detected by specifying the magnetic sensor MS that outputs the maximum negative detection value, and checking whether the magnetic field values of the two virtual sensors VL close to the magnetic sensor MS cross zero. The position of the second magnet 10B is obtained by searching and linearly interpolating the magnetic field values of the two virtual sensors whose magnetic field values cross zero.

第1の磁石10Aと第2の磁石10Bの磁石間距離Lを70mmであるから、両方の磁石が有効検出長Aの範囲内にある場合、第2の磁石10Bは、磁気センサMS2、MS3付近に来る。例えば、磁気センサMS2の検出値がマイナス側の最大値をとる場合、その位置は仮想センサVL1の位置となり、仮想センサVL1と仮想センサVL2との磁界値の間で直線補間を行う。   Since the distance L between the first magnet 10A and the second magnet 10B is 70 mm, when both magnets are within the effective detection length A, the second magnet 10B is near the magnetic sensors MS2 and MS3. I come to. For example, when the detection value of the magnetic sensor MS2 takes the maximum value on the minus side, the position is the position of the virtual sensor VL1, and linear interpolation is performed between the magnetic field values of the virtual sensor VL1 and the virtual sensor VL2.

直線補間によって、第2の磁石10Bの位置Xは、式1:X=X0+Y0×(X1-X0)/(Y0-Y1)で求まる。仮想センサVL1の位置(X0)は0mm、仮想センサVL2の位置(X1)は10mmであり、例えば、仮想センサVL1の磁界値(YO)が−250、仮想センサVL9の磁界値(Y1)が250とした場合、式1より、第2の磁石10Bの位置は、5.000mmとして求まる。   By linear interpolation, the position X of the second magnet 10B is obtained by the equation 1: X = X0 + Y0 × (X1-X0) / (Y0-Y1). The position (X0) of the virtual sensor VL1 is 0 mm and the position (X1) of the virtual sensor VL2 is 10 mm. For example, the magnetic field value (YO) of the virtual sensor VL1 is −250, and the magnetic field value (Y1) of the virtual sensor VL9 is 250. In this case, the position of the second magnet 10B is obtained as 5.000 mm from Equation 1.

第1の磁石10Aと第2の磁石10Bのそれぞれの位置が求まれば、ステップS14に移り、磁石間距離算出部44は、磁石間距離Lを、第1の磁石10Aの位置から第2の磁石10Bの位置を減算することにより求める。本例の場合は、第1の磁石10Aの位置が73.333mm、第2の磁石10Bの位置が5.000mmであるため、73.333−5.000=68.333 となり、磁石間距離Lは68.333mmとなる。   When the respective positions of the first magnet 10A and the second magnet 10B are obtained, the process proceeds to step S14, and the inter-magnet distance calculation unit 44 changes the inter-magnet distance L from the position of the first magnet 10A to the second. It is obtained by subtracting the position of the magnet 10B. In the case of this example, since the position of the first magnet 10A is 73.333 mm and the position of the second magnet 10B is 5.000 mm, 73.333-55.00 = 68.333, and the inter-magnet distance L Is 68.333 mm.

磁石間距離Lに設置誤差等があった場合、例えば、第1の実施形態で磁石間距離Lを70mmと固定値を設定してしまうと、第1の磁石10Aと第2の磁石10Bの位置の検出値が切り替わった際、実際の磁石間距離との差分だけ位置検出装置1の出力に誤差が生じてしまう。しかし、本実施形態では、第1の磁石10Aと第2の磁石10Bの両方とも磁気センサMSの有効検出長Aの範囲内に入っている場合、それぞれの磁石の位置から実際の磁石間距離Lを求めることが可能となる。このため、本実施形態では、有効検出長Aの範囲内に第2の磁石10Bのみがある場合、すなわちケース3の場合に、第2の磁石10Bの位置に、磁石間距離算出部44で算出した実際の磁石間距離Lの値を加算して、第1の磁石10Aの位置を求めることで誤差の発生を防止することができる。   If there is an installation error in the inter-magnet distance L, for example, if the inter-magnet distance L is set to 70 mm and a fixed value in the first embodiment, the positions of the first magnet 10A and the second magnet 10B are set. When the detected value is switched, an error occurs in the output of the position detection device 1 by the difference from the actual distance between the magnets. However, in the present embodiment, when both the first magnet 10A and the second magnet 10B are within the range of the effective detection length A of the magnetic sensor MS, the actual inter-magnet distance L from the position of each magnet. Can be obtained. Therefore, in the present embodiment, when only the second magnet 10B is within the range of the effective detection length A, that is, in the case 3, the inter-magnet distance calculation unit 44 calculates the position of the second magnet 10B. The actual value of the distance L between the magnets is added to obtain the position of the first magnet 10A, thereby preventing an error.

(第4の実施形態)
第1〜第3の実施形態では、複数の磁石を判別するために、移動方向に対して磁化方向の異なる2つの磁石の場合を例に説明したが、磁化方向が同じであってもよい。図17は、本発明の実施形態に係る位置検出装置の他の構成を示す図であり、磁石の個数n(nは2以上の整数)とした場合にn=2の場合を示している。
(Fourth embodiment)
In the first to third embodiments, the case of two magnets having different magnetization directions with respect to the movement direction has been described as an example in order to discriminate a plurality of magnets, but the magnetization directions may be the same. FIG. 17 is a diagram showing another configuration of the position detection device according to the embodiment of the present invention, and shows a case where n = 2 when the number of magnets is n (n is an integer of 2 or more).

本実施形態では、位置検出装置は、移動方向に対して磁化方向が同じ方向に配置された第1の磁石10A、第2の磁石10Bと、これらの第1の磁石10A、第2の磁石10Bを検出する複数の磁気センサMSとして、基板BS上で直線上に10mm間隔のピッチPでM個、例えば、11個並べられている。磁気センサMSと基板BSの構成については、第1の実施形態と同様であり、有効検出長Aは80mmである。そして、第1の磁石10Aと第2の磁石10Bの2つの磁石は、それらの磁石間距離LがA/2より短くなるように、例えば、30mmの間隔を空けて配置されている。この磁石配置は、移動方向に対して磁化方向が同じ複数の磁石を用いた場合でも、各磁石を特定しその絶対位置を検出するためである。   In the present embodiment, the position detection device includes a first magnet 10A and a second magnet 10B that are arranged in the same direction as the moving direction, and the first magnet 10A and the second magnet 10B. M, for example, 11 are arranged in a straight line on the substrate BS at a pitch P of 10 mm. The configurations of the magnetic sensor MS and the substrate BS are the same as those in the first embodiment, and the effective detection length A is 80 mm. Then, the two magnets of the first magnet 10A and the second magnet 10B are arranged, for example, at an interval of 30 mm so that the distance L between the magnets is shorter than A / 2. This magnet arrangement is for identifying each magnet and detecting its absolute position even when a plurality of magnets having the same magnetization direction with respect to the moving direction are used.

そして、図17(A)は、磁気センサMSの有効検出長A内に第1の磁石10Aのみが位置する場合、図17(B)は、磁気センサMSの有効検出長A内に第1の磁石10Aと第2の磁石10Bとが位置する場合、図17(C)は、磁気センサMSの有効検出長A内に第2の磁石10Bのみが位置する場合を示している。   17A shows the case where only the first magnet 10A is located within the effective detection length A of the magnetic sensor MS, and FIG. 17B shows the first detection within the effective detection length A of the magnetic sensor MS. When the magnet 10A and the second magnet 10B are located, FIG. 17C shows a case where only the second magnet 10B is located within the effective detection length A of the magnetic sensor MS.

磁石特定部43は、磁気センサMSからの検出値に基づいて、図17(A)に示すように、検出した磁石が1個でその検出位置が有効検出長A/2未満の位置の場合は、検出された磁石が第1の磁石10Aであると特定し、位置信号生成部42は、第1の磁石10Aの位置を位置検出装置1の出力値とする。また、図17(B)に示すように、検出した磁石が2個の場合は、磁石特定部43は、磁気センサMS11側を第1の磁石10A、磁気センサMS1側を第2の磁石10Bと特定し、位置信号生成部42は、例えば、第1の磁石10Aの位置を優先させて、第1の磁石10Aの位置を位置検出装置1の出力値とする。さらに、図17(C)に示すように、検出した磁石が1個でその検出位置が有効検出長A/2以上の位置の場合は、磁石特定部43は、検出された磁石が第2の磁石10Bであると特定し、位置信号生成部42は、第2の磁石10Bの位置に磁石間距離Lを加算した値を、第1の磁石10Aの位置として出力する。したがって、本実施形態では、位置検出装置の全有効検出長は磁気センサMSの有効検出長Aに磁石間距離Lを加算した長さA+Lの110mmとなる。   Based on the detection value from the magnetic sensor MS, the magnet specifying unit 43, as shown in FIG. 17 (A), in the case where the detected position is one and the detection position is less than the effective detection length A / 2. Then, the detected magnet is identified as the first magnet 10A, and the position signal generator 42 uses the position of the first magnet 10A as the output value of the position detection device 1. As shown in FIG. 17B, when two magnets are detected, the magnet specifying unit 43 includes the first magnet 10A on the magnetic sensor MS11 side and the second magnet 10B on the magnetic sensor MS1 side. For example, the position signal generation unit 42 gives priority to the position of the first magnet 10 </ b> A and sets the position of the first magnet 10 </ b> A as the output value of the position detection device 1. Furthermore, as shown in FIG. 17C, when the detected magnet is one and the detected position is a position longer than the effective detection length A / 2, the magnet specifying unit 43 determines that the detected magnet is the second magnet. The position signal generator 42 identifies the magnet 10B and outputs a value obtained by adding the inter-magnet distance L to the position of the second magnet 10B as the position of the first magnet 10A. Therefore, in this embodiment, the total effective detection length of the position detection device is 110 mm, which is a length A + L obtained by adding the distance L between magnets to the effective detection length A of the magnetic sensor MS.

以上、磁石が2個の場合について説明したが、移動方向に対して磁化方向が同じ磁石の個数nは3個以上であってもよい。例えば、磁石がn=3個の場合、これらの3個の磁石はそれぞれの磁石間距離Lsubが磁気センサMSの有効検出長Aの1/n、すなわち1/3より短く配設される。3個の磁石を磁気センサMS11に近い側から、第1の磁石、第2の磁石、第3の磁石とした場合、磁気センサMSに対向する磁石の位置関係は次の5通りとなり、それぞれのケースにおいて、磁石特定部43は、磁気センサMSからの検出値に基づいて、磁気センサMSに対向する磁石を特定することが可能である。 Although the case where there are two magnets has been described above, the number n of magnets having the same magnetization direction with respect to the moving direction may be three or more. For example, when n = 3 magnets, these three magnets are arranged such that the distance L sub between the magnets is shorter than 1 / n of the effective detection length A of the magnetic sensor MS, that is, 1/3. When the three magnets are the first magnet, the second magnet, and the third magnet from the side close to the magnetic sensor MS11, the positional relationship of the magnets facing the magnetic sensor MS is the following five types, In the case, the magnet specifying unit 43 can specify the magnet facing the magnetic sensor MS based on the detection value from the magnetic sensor MS.

(ケース1’)検出した磁石が1個で、その検出位置が有効検出長A/n未満、すなわち、A/3未満の位置にある場合、第1の磁石の位置を特定できる。
(ケース2’)検出した磁石が2個で、一方の磁石の検出位置が有効検出長A/n未満、すなわち、A/3未満の位置にある場合、第1の磁石と第2の磁石の位置を特定できる。
(ケース3’)検出した磁石が3個の場合、全ての磁石の位置を特定できる。
(ケース4’)検出した磁石が2個で、一方の磁石の検出位置が有効検出長(A−A/n)以上、すなわち、2×A/3以上の位置にある場合、第2の磁石と第3の磁石の位置を特定できる。
(ケース5’)検出した磁石が1個で、その検出位置が有効検出長(A−A/n)以上、すなわち、2×A/3以上の位置にある場合、第3の磁石の位置を特定できる。
(Case 1 ′) When the number of detected magnets is one and the detection position is less than the effective detection length A / n, that is, the position less than A / 3, the position of the first magnet can be specified.
(Case 2 ′) When there are two detected magnets and the detection position of one of the magnets is less than the effective detection length A / n, that is, less than A / 3, the first magnet and the second magnet The position can be specified.
(Case 3 ′) When the number of detected magnets is three, the positions of all the magnets can be specified.
(Case 4 ') If the number of detected magnets is two and the detection position of one of the magnets is greater than or equal to the effective detection length (AA / n), that is, 2 × A / 3 or more, the second magnet And the position of the third magnet can be specified.
(Case 5 ') When the number of detected magnets is one and the detected position is at or above the effective detection length (AA / n), that is, at a position of 2 × A / 3 or more, the position of the third magnet is Can be identified.

そして、位置信号生成部42は、磁石特定部43が特定した磁石の位置と磁石間距離Lから、磁気センサMSに対向していない磁石の位置を出力することができる。位置検出装置としての全有効検出長は、磁気センサMSの有効検出長Aに両端に位置する磁石の磁石間距離Lを加算した長さA+Lになる。なお、本実施形態と第2の実施形態を組み合わせた場合、位置検出装置としての全有効検出長は、長さA’+Lになる。   And the position signal generation part 42 can output the position of the magnet which is not facing the magnetic sensor MS from the position of the magnet which the magnet specific | specification part 43 specified, and the distance L between magnets. The total effective detection length as the position detection device is a length A + L obtained by adding the distance L between the magnets located at both ends to the effective detection length A of the magnetic sensor MS. When the present embodiment and the second embodiment are combined, the total effective detection length as the position detection device is the length A ′ + L.

(第5の実施形態)
第1〜第3の実施形態では、複数の磁石を判別するために、移動方向に対して磁化方向の異なる2つの磁石の場合を例に説明したが、磁石の数nは2個より多くてもよい。図18は、本発明の実施形態に係る位置検出装置の他の構成を示す図であり、図19は、図18に示す位置検出装置において、磁石位置が異なる場合を説明するための図である。本実施形態では、磁石の個数n(nは2以上の整数)として、n=3の場合を示している。
(Fifth embodiment)
In the first to third embodiments, the case of two magnets having different magnetization directions with respect to the moving direction has been described as an example in order to discriminate a plurality of magnets. However, the number n of magnets is more than two. Also good. 18 is a diagram showing another configuration of the position detection device according to the embodiment of the present invention, and FIG. 19 is a diagram for explaining a case where the magnet positions are different in the position detection device shown in FIG. . In the present embodiment, the case where n = 3 is shown as the number of magnets n (n is an integer of 2 or more).

本実施形態では、位置検出装置は、移動方向に対して磁化方向が交互に異なる方向に配置された第1の磁石10A、第2の磁石10B、第3の磁石10Cと、これらの第1の磁石10A、第2の磁石10B、第3の磁石10Cを検出する複数の磁気センサMSとして、基板BS上で直線上に10mm間隔のピッチPでM個、例えば、11個並べられている。磁気センサMSと基板BSの構成については、第1の実施形態と同様であり、有効検出長Aは80mmである。   In the present embodiment, the position detection device includes a first magnet 10A, a second magnet 10B, and a third magnet 10C that are arranged in directions in which the magnetization directions are alternately different from the moving direction, and the first magnets. As a plurality of magnetic sensors MS that detect the magnet 10A, the second magnet 10B, and the third magnet 10C, M, for example, 11 are arranged on the substrate BS at a pitch P of 10 mm intervals on a straight line. The configurations of the magnetic sensor MS and the substrate BS are the same as those in the first embodiment, and the effective detection length A is 80 mm.

そして、第1の磁石10Aと第2の磁石10Bの2つの磁石は、それらの磁石間距離L1がA/(n−1)、すなわちA/2より短くなるように、例えば、30mmの間隔を空けて配置されている。同じく、第2の磁石10Bと第3の磁石10Cの2つの磁石は、それらの磁石間距離L2がA/(n−1)、すなわちA/2より短くなるように、例えば、35mmの間隔を空けて配置されている。この磁石配置は、移動方向に対して磁化方向が交互に異なる複数の磁石を用いた場合でも、各磁石を特定しその絶対位置を検出するためである。   The two magnets, the first magnet 10A and the second magnet 10B, have an interval of, for example, 30 mm so that the distance L1 between the magnets is shorter than A / (n−1), that is, A / 2. It is arranged in the space. Similarly, the two magnets of the second magnet 10B and the third magnet 10C have a distance of 35 mm, for example, so that the distance L2 between the magnets is shorter than A / (n−1), that is, A / 2. It is arranged in the space. This magnet arrangement is for specifying each magnet and detecting its absolute position even when a plurality of magnets having different magnetization directions with respect to the moving direction are used.

そして、図18(A)は、磁気センサMSの有効検出長A内に第1の磁石10Aのみが位置する場合、図18(B)は、磁気センサMSの有効検出長A内に第1の磁石10Aと第2の磁石10Bとが位置する場合、図18(C)は、磁気センサMSの有効検出長A内に第1の磁石10A、第2の磁石10B、第3の磁石10Cのすべての磁石が位置する場合、図19(A)は、磁気センサMSの有効検出長A内に第2の磁石10Bと第3の磁石10Cが位置する場合、図19(B)は、磁気センサMSの有効検出長A内に第3の磁石10Cのみが位置する場合を示している。   18A shows the case where only the first magnet 10A is located within the effective detection length A of the magnetic sensor MS, and FIG. 18B shows the first detection within the effective detection length A of the magnetic sensor MS. When the magnet 10A and the second magnet 10B are positioned, FIG. 18C shows all of the first magnet 10A, the second magnet 10B, and the third magnet 10C within the effective detection length A of the magnetic sensor MS. 19A shows a case where the second magnet 10B and the third magnet 10C are located within the effective detection length A of the magnetic sensor MS, and FIG. This shows a case where only the third magnet 10C is positioned within the effective detection length A.

磁石特定部43は、磁気センサMSからの検出値に基づいて、図18(A)に示すように、検出した磁石が1個でその検出位置が有効検出長A/(n−1)未満、すなわち、A/2未満の位置の場合は、検出された磁石が第1の磁石10Aであると特定し、位置信号生成部42は、第1の磁石10Aの位置を位置検出装置1の出力値とする。   Based on the detection value from the magnetic sensor MS, the magnet specifying unit 43 has one detected magnet and its detection position is less than the effective detection length A / (n−1), as shown in FIG. That is, when the position is less than A / 2, the detected magnet is identified as the first magnet 10A, and the position signal generation unit 42 determines the position of the first magnet 10A as the output value of the position detection device 1. And

また、図18(B)に示すように、検出した磁石が2個の場合は、第1の磁石10Aによる磁気センサMSの検出値の最大値はプラス側にあり、第2の磁石10Bによる磁気センサMSの検出値の最大値はマイナス側に現れる。磁石特定部43は、この特性を利用して、第1の磁石10Aあるいは第2の磁石10Bを特定し、例えば、位置信号生成部42は、第1の磁石10Aの位置を位置検出装置1の出力値とする。   As shown in FIG. 18B, when two magnets are detected, the maximum value detected by the magnetic sensor MS by the first magnet 10A is on the plus side, and the magnetism by the second magnet 10B. The maximum value detected by the sensor MS appears on the minus side. The magnet specifying unit 43 uses this characteristic to specify the first magnet 10A or the second magnet 10B. For example, the position signal generation unit 42 determines the position of the first magnet 10A of the position detection device 1. Output value.

次に、図18(C)に示すように、磁気センサMSの有効検出長A内に、第1の磁石10A、第2の磁石10B、第3の磁石10Cのすべての磁石が位置する場合、検出する磁石の個数は3個であるため、磁石特定部43は3個の磁石のすべてを特定することができる。位置信号生成部42は、例えば、第1の磁石10Aの位置を位置検出装置1の出力値とする。   Next, as shown in FIG. 18C, when all of the first magnet 10A, the second magnet 10B, and the third magnet 10C are located within the effective detection length A of the magnetic sensor MS, Since the number of magnets to be detected is 3, the magnet specifying unit 43 can specify all three magnets. For example, the position signal generation unit 42 sets the position of the first magnet 10 </ b> A as the output value of the position detection device 1.

次に、図19(A)に示すように、検出した磁石が2個の場合は、第2の磁石10Bによる磁気センサMSの検出値の最大値はマイナス側にあり、第3の磁石10Cによる磁気センサMSの検出値の最大値はプラス側に現れる。磁石特定部43は、この特性を利用して、第2の磁石10Bあるいは第3の磁石10Cを特定し、例えば、位置信号生成部42は、第2の磁石10Bの位置に磁石間距離L1を加算した値を、第1の磁石10Aの位置として出力する。   Next, as shown in FIG. 19A, when the number of detected magnets is two, the maximum value of the detection value of the magnetic sensor MS by the second magnet 10B is on the minus side, and by the third magnet 10C. The maximum value detected by the magnetic sensor MS appears on the plus side. The magnet specifying unit 43 uses this characteristic to specify the second magnet 10B or the third magnet 10C. For example, the position signal generation unit 42 sets the inter-magnet distance L1 at the position of the second magnet 10B. The added value is output as the position of the first magnet 10A.

このように、本実施形態では、検出した磁石が2個の場合は、それぞれ図18(B)と図19(A)に示す2通りのケースが存在するが、複数の磁石は、移動方向に対して交互に極性に磁化されているため、磁気センサMSの検出値の極性に基づいて、検出した2つの磁石が、第1の磁石10Aと第2の磁石10Bであるのか、第2の磁石10Bと第3の磁石10Cであるのかを判別することができる。例えば、磁気センサMSの検出値の正側の最大値と負側の最大値との差分をとり、差分の極性を判別することで、2つの磁石を特定することができる。   Thus, in this embodiment, when there are two detected magnets, there are two cases shown in FIG. 18B and FIG. 19A, respectively. On the other hand, since the magnets are alternately magnetized to polarities, whether the detected two magnets are the first magnet 10A and the second magnet 10B based on the polarity of the detection value of the magnetic sensor MS or the second magnet. Whether it is 10B and the third magnet 10C can be discriminated. For example, two magnets can be specified by taking the difference between the maximum value on the positive side and the maximum value on the negative side of the detection value of the magnetic sensor MS and determining the polarity of the difference.

さらに、図19(B)に示すように、検出した磁石が1個でその検出位置が有効検出長(A−A/(n−1))以上の位置の場合、すなわち、A/2以上の場合には、磁石特定部43は、検出された磁石が第3の磁石10Cであると特定し、位置信号生成部42は、第3の磁石10Cの位置に磁石間距離L1とL2を加算した値を、第1の磁石10Aの位置として出力する。したがって、本実施形態では、位置検出装置の全有効検出長は磁気センサMSの有効検出長Aに両端に位置する磁石の磁石間距離L(=L1+L2)を加算した長さA+Lとなり、145mmとなる。   Further, as shown in FIG. 19 (B), when the number of detected magnets is one and the detection position is a position longer than the effective detection length (AA / (n-1)), that is, more than A / 2. In this case, the magnet specifying unit 43 specifies that the detected magnet is the third magnet 10C, and the position signal generating unit 42 adds the inter-magnet distances L1 and L2 to the position of the third magnet 10C. The value is output as the position of the first magnet 10A. Therefore, in this embodiment, the total effective detection length of the position detection device is a length A + L obtained by adding the distance L (= L1 + L2) between the magnets located at both ends to the effective detection length A of the magnetic sensor MS, which is 145 mm. .

このように、本実施形態においても、位置信号生成部42は、磁石特定部43が特定した磁石の位置と磁石間距離Lから、磁気センサMSに対向していない磁石の位置を出力することができる。位置検出装置としての全有効検出長は、第1〜第4の実施形態と同様に、磁気センサMSの有効検出長Aに両端の磁石の磁石間距離Lを加算した長さA+Lになる。また、本実施形態と第2の実施形態を組み合わせた場合、位置検出装置としての全有効検出長は、長さA’+Lになる。なお、第1の実施形態は、第5の実施形態において、磁石の数nを2個に設定した場合に相当する。また、磁石の数nは4以上であっても構わない。   As described above, also in the present embodiment, the position signal generation unit 42 can output the position of the magnet not facing the magnetic sensor MS from the position of the magnet specified by the magnet specifying unit 43 and the distance L between the magnets. it can. As in the first to fourth embodiments, the total effective detection length as the position detection device is a length A + L obtained by adding the distance L between the magnets of the magnets at both ends to the effective detection length A of the magnetic sensor MS. Further, when the present embodiment and the second embodiment are combined, the total effective detection length as the position detection device is the length A ′ + L. Note that the first embodiment corresponds to the case where the number n of magnets is set to two in the fifth embodiment. The number n of magnets may be 4 or more.

以上、本発明の実施形態について説明した。これらの本実施形態では、複数の磁石を判別するために、移動方向に対して磁化方向の異なる複数の磁石の場合と磁化方向が同じ場合を例に説明したが、磁化の強さの異なる複数の磁石を用いてもよく、これらを組み合わせることによって、さらに位置検出装置の検出範囲を伸ばしてもよい。磁化の強さの異なる複数の磁石を用いる場合は、それぞれの磁石を磁気センサMSに対向させた際に、磁気センサの検出値の最大値の違いが十分判別できる強さの磁石を用いることが望ましい。また、いずれの場合も、磁気センサMSは、磁石が最も近接した際に最大の検出値を出力するように磁石と磁気センサを配置しておく必要がある。これにより、磁石の絶対的な位置の検出が可能となり、位置検出装置の初期電源立ち上げ時においても位置の検出が可能となる。また、磁石位置を求める際に、仮想センサVLの磁界値の直線補間を用いたが、曲線補間によって磁石位置を求めてもよい。さらに、磁石と磁気センサを搭載した基板のいずれ側を可動側に配置してもよい。   The embodiment of the present invention has been described above. In these embodiments, in order to discriminate a plurality of magnets, the case where the magnetization direction is the same as the case of a plurality of magnets having different magnetization directions with respect to the moving direction has been described as an example. These magnets may be used, and by combining these, the detection range of the position detection device may be further extended. When using a plurality of magnets having different magnetization strengths, it is necessary to use a magnet having a strength that can sufficiently distinguish the difference in the maximum value of the detection values of the magnetic sensor when each magnet is opposed to the magnetic sensor MS. desirable. In either case, the magnetic sensor MS needs to have the magnet and the magnetic sensor arranged so as to output the maximum detection value when the magnet is closest. Thereby, the absolute position of the magnet can be detected, and the position can be detected even when the initial power source of the position detecting device is turned on. Further, when the magnet position is obtained, linear interpolation of the magnetic field value of the virtual sensor VL is used, but the magnet position may be obtained by curve interpolation. Further, either side of the substrate on which the magnet and the magnetic sensor are mounted may be arranged on the movable side.

1…位置検出装置、10A…第1の磁石、10B…第2の磁石、20…マルチプレクサ、30…A/D変換器、40…マイコン、41…仮想センサ磁界値生成部、42…位置信号生成部、43…磁石特定部、44…磁石間距離算出部、45…マルチプレクサ信号生成部、50…出力回路、BS…基板、MS…磁気センサ、VL…仮想センサ。 DESCRIPTION OF SYMBOLS 1 ... Position detection apparatus, 10A ... 1st magnet, 10B ... 2nd magnet, 20 ... Multiplexer, 30 ... A / D converter, 40 ... Microcomputer, 41 ... Virtual sensor magnetic field value generation part, 42 ... Position signal generation , 43... Magnet identification unit, 44... Magnet distance calculation unit, 45 .. multiplexer signal generation unit, 50... Output circuit, BS .. substrate, MS .. magnetic sensor, VL.

Claims (10)

所定距離を離して配置された複数の永久磁石と、
複数の該永久磁石の相対的な移動方向に沿って配列され、前記永久磁石が最も近接した際に最大の検出値を出力する向きに配列されたM個(Mは3以上の整数)の磁気センサと、
1つ飛ばしの2つの磁気センサの各検出値の差分値を算出し、前記1つ飛ばしの2つの前記磁気センサの中間に位置する仮想センサの磁界値として、(M−2)個の第1群の仮想センサの磁界値を生成する仮想センサ磁界値生成部と、
複数の前記磁気センサの検出値から、前記磁気センサに対向する前記永久磁石を特定する磁石特定部と、
前記仮想センサの磁界値を補間して得られる磁界分布の磁界値がゼロとなる位置を、前記磁石特定部が特定した前記永久磁石の位置として出力する位置信号生成部と、
を備えたことを特徴とする位置検出装置。
A plurality of permanent magnets arranged at a predetermined distance;
M magnets (M is an integer of 3 or more) arranged along the relative movement direction of the plurality of permanent magnets and arranged in a direction to output the maximum detection value when the permanent magnets are closest to each other. A sensor,
A difference value between the detection values of the two skipped magnetic sensors is calculated, and (M-2) first magnetic fields of the virtual sensor located between the two skipped magnetic sensors are calculated. A virtual sensor magnetic field value generation unit for generating a magnetic field value of a group of virtual sensors;
From the detection values of the plurality of magnetic sensors, a magnet specifying unit that specifies the permanent magnets facing the magnetic sensors;
A position signal generation unit that outputs a position where the magnetic field value of the magnetic field distribution obtained by interpolating the magnetic field value of the virtual sensor becomes zero, as the position of the permanent magnet specified by the magnet specifying unit;
A position detection device comprising:
前記仮想センサ磁界値生成部は、さらに、隣接する前記磁気センサの各検出値の差分値を算出し、該差分値を前記隣接する2つ前記磁気センサとの中間に位置する仮想センサの磁界値として、(M−1)個の第2群の仮想センサの磁界値を算出し、
前記位置信号生成部は、前記第1群の仮想センサと前記第2群の仮想センサとを含む前記仮想センサの磁界値を補間して得られる磁界分布の磁界値がゼロとなる位置を、前記磁石特定部が特定した前記永久磁石の位置として出力することを特徴とする請求項1に記載の位置検出装置。
The virtual sensor magnetic field value generation unit further calculates a difference value between detection values of the adjacent magnetic sensors, and calculates the magnetic field value of the virtual sensor positioned between the two adjacent magnetic sensors. And (M-1) magnetic field values of the second group of virtual sensors are calculated,
The position signal generation unit is configured to determine a position at which a magnetic field value of a magnetic field distribution obtained by interpolating magnetic field values of the virtual sensors including the first group of virtual sensors and the second group of virtual sensors is zero, The position detection device according to claim 1, wherein the position is output as the position of the permanent magnet specified by the magnet specifying unit.
前記磁石特定部は、前記磁気センサの検出値の極性に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とする請求項1または2に記載の位置検出装置。
The said magnet specific | specification part specifies the said permanent magnet which opposes the said magnetic sensor from the said several permanent magnets based on the polarity of the detected value of the said magnetic sensor. Position detector.
前記磁石特定部は、前記磁気センサの検出値の大きさに基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とする請求項1から3のいずれか1項に記載の位置検出装置。
The said magnet specific | specification part specifies the said permanent magnet which opposes the said magnetic sensor from the said several permanent magnets based on the magnitude | size of the detected value of the said magnetic sensor, The Claim 1 to 3 characterized by the above-mentioned. The position detection apparatus of any one of Claims.
前記磁石特定部は、磁石間距離が前記磁気センサの有効検出長の1/n(nは2以上の整数)より短く配設されかつ前記移動方向に対して同じ方向に磁化されたn個の永久磁石の検出値に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とする請求項1または2に記載の位置検出装置。
The magnet specifying part is arranged such that the distance between magnets is shorter than 1 / n (n is an integer of 2 or more) of the effective detection length of the magnetic sensor and is magnetized in the same direction with respect to the moving direction. 3. The position detection device according to claim 1, wherein the permanent magnet facing the magnetic sensor is specified from a plurality of the permanent magnets based on a detection value of the permanent magnet.
前記磁石特定部は、磁石間距離が前記磁気センサの有効検出長の1/(n−1)(nは2以上の整数)より短く配設されかつ前記移動方向に対して交互に異なる方向に磁化されたn個の永久磁石の検出値に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とする請求項1から3のいずれか1項に記載の位置検出装置。   The magnet specifying unit is arranged such that the distance between the magnets is shorter than 1 / (n-1) (n is an integer of 2 or more) of the effective detection length of the magnetic sensor, and is alternately different from the moving direction. 4. The permanent magnet facing the magnetic sensor is specified from among the plurality of permanent magnets based on a detection value of n magnetized permanent magnets. 5. The position detection apparatus described in 1. 前記位置信号生成部は、前記磁気センサの内、最大の検出値を出力する前記磁気センサを特定し、該磁気センサに最も近接する前記仮想センサの磁界値と該仮想センサの前後の前記仮想センサの磁界値とがゼロを跨いでいるか否かを判別し、ゼロを跨いでいる2つの前記仮想センサの磁界値を補間し、磁界値がゼロとなる位置を前記永久磁石の位置として出力することを特徴とする請求項1から6のいずれか1項に記載の位置検出装置。
The position signal generation unit specifies the magnetic sensor that outputs the maximum detection value among the magnetic sensors, and the magnetic field value of the virtual sensor closest to the magnetic sensor and the virtual sensors before and after the virtual sensor It is determined whether or not the magnetic field value of the two sensors crosses zero, the magnetic field values of the two virtual sensors straddling zero are interpolated, and the position where the magnetic field value becomes zero is output as the position of the permanent magnet The position detection device according to claim 1, wherein:
前記位置信号生成部は、前記磁気センサに対向する第1の永久磁石の位置を算出し、該算出した第1の前記永久磁石の位置に、第1の前記永久磁石と前記磁気センサに対向していない第2の永久磁石との磁石間距離を加算することによって、第2の前記永久磁石の位置を出力することを特徴とする請求項1から7のいずれか1に記載の位置検出装置。
The position signal generation unit calculates a position of the first permanent magnet facing the magnetic sensor, and faces the first permanent magnet and the magnetic sensor at the calculated position of the first permanent magnet. The position detecting device according to any one of claims 1 to 7, wherein the position of the second permanent magnet is output by adding a distance between the second permanent magnet and the second permanent magnet.
前記磁気センサが等ピッチで配列されていることを特徴とする請求項1から8のいずれか1項に記載の位置検出装置。
The position detection device according to claim 1, wherein the magnetic sensors are arranged at an equal pitch.
複数の前記永久磁石が前記磁気センサに対向している際に、前記位置信号生成部が算出した複数の前記永久磁石の位置に基づいて、複数の前記永久磁石の距離を算出する磁石間距離算出部を、さらに有することを特徴とする請求項1から9のいずれか1項に記載の位置検出装置。   Inter-magnet distance calculation that calculates the distances of the plurality of permanent magnets based on the positions of the plurality of permanent magnets calculated by the position signal generation unit when the plurality of permanent magnets are opposed to the magnetic sensor. The position detection device according to claim 1, further comprising a unit.
JP2018028096A 2018-02-20 2018-02-20 Position detection device Active JP6653341B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018028096A JP6653341B2 (en) 2018-02-20 2018-02-20 Position detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018028096A JP6653341B2 (en) 2018-02-20 2018-02-20 Position detection device

Publications (2)

Publication Number Publication Date
JP2019144086A true JP2019144086A (en) 2019-08-29
JP6653341B2 JP6653341B2 (en) 2020-02-26

Family

ID=67772330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018028096A Active JP6653341B2 (en) 2018-02-20 2018-02-20 Position detection device

Country Status (1)

Country Link
JP (1) JP6653341B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63279101A (en) * 1987-05-11 1988-11-16 Nippon Denso Co Ltd Non-contact displacement detector
JPH05126509A (en) * 1991-09-26 1993-05-21 Mazda Motor Corp Device for measuring stroke of piston
JP2002022403A (en) * 2000-07-13 2002-01-23 Tokyo Keiso Co Ltd Displacement detector and displacement detection method
JP2008532039A (en) * 2005-03-02 2008-08-14 テトラ ラバル ホールデイングス エ フイナンス ソシエテ アノニム Position detector and method for detecting the position of packaging material by magnetic marking
JP2015194488A (en) * 2014-03-27 2015-11-05 株式会社マコメ研究所 Position detection device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63279101A (en) * 1987-05-11 1988-11-16 Nippon Denso Co Ltd Non-contact displacement detector
JPH05126509A (en) * 1991-09-26 1993-05-21 Mazda Motor Corp Device for measuring stroke of piston
JP2002022403A (en) * 2000-07-13 2002-01-23 Tokyo Keiso Co Ltd Displacement detector and displacement detection method
JP2008532039A (en) * 2005-03-02 2008-08-14 テトラ ラバル ホールデイングス エ フイナンス ソシエテ アノニム Position detector and method for detecting the position of packaging material by magnetic marking
JP2015194488A (en) * 2014-03-27 2015-11-05 株式会社マコメ研究所 Position detection device

Also Published As

Publication number Publication date
JP6653341B2 (en) 2020-02-26

Similar Documents

Publication Publication Date Title
JP5885382B2 (en) Electromagnetic induction type linear encoder
JP5896166B2 (en) Magnetic position sensor, moving body and moving body system
CN106461422B (en) Inductive di lacement tra ducer
CN105190250B (en) Linear encoder device and reference position detection method
US9766095B2 (en) Magnetic position detection device and magnetic position detection method
JP6161819B1 (en) Wire rope flaw detector
JP6577639B1 (en) Position detection device
JP6449935B2 (en) Sensor
US9772198B2 (en) Displacement sensor and displacement detection method
JP6577635B1 (en) Position detection device
JP5529637B2 (en) Linear motor position detection system
US20230116491A1 (en) Displacement detection device
JP6653341B2 (en) Position detection device
CN106940197A (en) Grating straight-line displacement sensor during a kind of absolute type
JP2012005233A (en) Controller of linear motor
JP6374129B1 (en) Position detection device
JP2014153325A (en) Eddy current sensor
CN105222698A (en) A kind of linear displacement transducer based on becoming reluctance principle
JPH10170210A (en) Induction type position detecting device
JP3309870B2 (en) Linear resolver
EP3907475B1 (en) Magnetic position sensor system and method
JP4989919B2 (en) Inductive position detector
JP2016033480A (en) Linear motion device position sensor and linear motion device position control apparatus using the position sensor
JPS58198190A (en) Linear motor
JP2016205949A (en) Magnetic linear scale

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20181010

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190905

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190917

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191017

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200114

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200127

R150 Certificate of patent or registration of utility model

Ref document number: 6653341

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250