JP6653341B2 - Position detection device - Google Patents

Position detection device Download PDF

Info

Publication number
JP6653341B2
JP6653341B2 JP2018028096A JP2018028096A JP6653341B2 JP 6653341 B2 JP6653341 B2 JP 6653341B2 JP 2018028096 A JP2018028096 A JP 2018028096A JP 2018028096 A JP2018028096 A JP 2018028096A JP 6653341 B2 JP6653341 B2 JP 6653341B2
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.)
Active
Application number
JP2018028096A
Other languages
Japanese (ja)
Other versions
JP2019144086A (en
Inventor
正章 澤
正章 澤
正昭 風間
正昭 風間
祥太 藤村
祥太 藤村
憲 河野
憲 河野
小澤 徹
徹 小澤
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
Original Assignee
Honda Motor Co Ltd
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 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

Description

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

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

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

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

上記のように、従来の検出装置では、磁石の磁界を検出する際に、地磁気等の外部磁界の影響を受けて位置検出値に誤差を生じたり、有効検出長が短いといった課題があった。   As described above, in the conventional detection device, when detecting the magnetic field of the magnet, there has been a problem that an error is generated in the position detection value due to the influence of an external magnetic field such as terrestrial magnetism 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 terrestrial magnetism, or when the offset component similarly changes due to the temperature characteristics of the magnetic sensor and the like. It is another object of the present invention to provide a position detecting device which is not affected by the offset component and 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-mentioned problem, a first technical means of the present invention includes a plurality of permanent magnets arranged at a predetermined distance, and arranged along a relative movement direction of the plurality of permanent magnets, The difference value between the M (M is an integer of 3 or more) magnetic sensors arranged in a direction in which the maximum detection value is output when the permanent magnet comes closest to each other, and the detection values of the two magnetic sensors one by one Virtual magnetic field value generation for generating (M−2) magnetic field values of the first group of virtual sensors as the magnetic field value of the virtual sensor positioned between the two skipped magnetic sensors. Unit, from the detection values of the plurality of magnetic sensors, a magnet identification unit that identifies the permanent magnet facing the magnetic sensor, the magnetic field value of the magnetic field distribution obtained by interpolating the magnetic field value of the virtual sensor is 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群の仮想センサと含む仮想センサの磁界値を補間して得られる磁界分布の磁界値がゼロとなる位置を、前記磁石特定部が特定した前記永久磁石の位置として出力することを特徴とするものである。   A second technical means is the first technical means, wherein the virtual sensor magnetic field value generation unit further calculates a difference value between respective detection values of the adjacent magnetic sensors, and compares the difference value with the two adjacent magnetic sensor 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 outputting a 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 virtual sensor of the second group and the virtual sensor as the position of the permanent magnet specified by the magnet specifying unit. It is a feature.

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

第4の技術手段は、第1から第3のいずれか1の技術手段において、前記磁石特定部は、前記磁気センサの検出値の大きさに基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とするものである。   A fourth technical means is the electronic device according to any one of the first to third technical means, wherein the magnet identification unit is configured to select the magnetic field from a plurality of the permanent magnets based on a magnitude of a detection value of the magnetic sensor. It is characterized in that 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 the second technical means, the magnet identification section is arranged such that a distance between magnets is shorter than 1 / n (n is an integer of 2 or more) of an effective detection length of the magnetic sensor. by and based on a detection value of the magnetic sensor with respect to said n permanent magnets magnetized in the same magnetization direction with respect to the moving direction, the permanent magnets facing the magnetic sensor from a plurality of said permanent magnet It is characterized by specifying.

第6の技術手段は、第1から第3のいずれか1の技術手段において、前記磁石特定部は、磁石間距離が前記磁気センサの有効検出長の1/(n−1)(nは2以上の整数)より短く配設されかつ前記移動方向に対して交互に異なる方向に磁化されたn個の前記永久磁石に対する前記磁気センサの検出値に基づいて、複数の前記永久磁石の中から前記磁気センサに対向する前記永久磁石を特定することを特徴とするものである。 A sixth technical means is the image processing apparatus according to any one of the first to third technical means, wherein the magnet identification section 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 value of the magnetic sensor with respect to an integer greater than or equal to) n number of said permanent magnets that are magnetized in different directions alternately to shorter than provided by and the moving direction, wherein from the plurality of the permanent magnet The method is characterized in that the permanent magnet facing the magnetic sensor is specified.

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

第8の技術手段は、第1から第7のいずれか1の技術手段において、前記位置信号生成部は、前記磁気センサに対向する第1の永久磁石の位置を算出し、該算出した第1の前記永久磁石の位置に、第1の前記永久磁石と前記磁気センサに対向していない第2の永久磁石との磁石間距離を加算することによって、第2の前記永久磁石の位置を出力することを特徴とするものである。   An eighth technical means is the electronic device according to any one of the first to seventh technical means, wherein the position signal generating section calculates a position of a first permanent magnet facing the magnetic sensor, and The position of the second permanent magnet is output by adding the inter-magnet 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 the following.

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

第10の技術手段は、第1から第9のいずれか1の技術手段において、複数の前記永久磁石が前記磁気センサに対向している際に、前記位置信号生成部が算出した複数の前記永久磁石の位置に基づいて、複数の前記永久磁石の距離を算出する磁石間距離算出部を、さらに有することを特徴とするものである。   A tenth technical means is the electronic device according to any one of the first to ninth technical means, wherein the plurality of permanent magnets calculated by the position signal generation unit are provided when the plurality of permanent magnets face the magnetic sensor. It is characterized by further comprising 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 terrestrial magnetism, or when the offset component similarly changes due to the temperature characteristics of the magnetic sensor or the like, it is not affected by the offset component. Furthermore, the detection accuracy can be increased without increasing the number of magnetic sensors, and the effective detection length can be lengthened. If the effective range is the same as the conventional one, the size of the detection device can be reduced.

本発明の実施形態に係る位置検出装置の一構成を示す図である。It is a figure showing one composition of a position detecting device concerning an embodiment of the present invention. 磁石と磁気センサとの具体的な配置の関係を示す図である。It is a figure which shows the specific relationship of arrangement | positioning of a magnet and a magnetic sensor. 磁石と磁気センサとの相対的な位置を変更した際の図である。FIG. 3 is a diagram when a relative position between a magnet and a magnetic sensor is changed. 第1の磁石に対する磁気センサの検出値(磁界値)の特性を説明するための図である。FIG. 4 is a diagram for explaining characteristics of a detection value (magnetic field value) of a magnetic sensor with respect to a first magnet. 第1の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図である。FIG. 9 is a diagram for explaining characteristics of a difference value of each detection value of two magnetic sensors skipping when the first magnet faces the magnetic sensor. 磁気センサの位置と第1群の仮想センサの位置との関係を示す図である。FIG. 3 is a diagram illustrating a relationship between a position of a magnetic sensor and a position of a first group of virtual sensors. 本発明の実施形態に係る位置検出装置における処理フローの例を示す図である。FIG. 5 is a diagram illustrating an example of a processing flow in the position detection device according to the embodiment of the present invention. 磁石の位置を求めるための直線補間について説明するための図である。FIG. 4 is a diagram for describing linear interpolation for obtaining a position of a magnet. 第2の磁石に対する磁気センサの検出値(磁界値)の特性を説明するための図であるFIG. 9 is a diagram for explaining characteristics of a detection value (magnetic field value) of a magnetic sensor with respect to a second magnet. 第2の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図である。FIG. 7 is a diagram for explaining characteristics of a difference value of each detection value of two magnetic sensors skipping when a second magnet faces the magnetic sensor. 磁気センサの有効検出長内に第1の磁石のみが位置する場合を示す図である。It is a figure showing the case where only the 1st magnet is located within the effective detection length of a magnetic sensor. 磁気センサの有効検出長内に第1の磁石と第2の磁石とが位置する場合を示す図である。It is a figure showing the case where the 1st magnet and the 2nd magnet are located within the effective detection length of a magnetic sensor. 磁気センサの有効検出長内に第2の磁石のみが位置する場合を示す図である。It is a figure showing the case where only the 2nd magnet is located within the effective detection length of the magnetic sensor. 第1の磁石が磁気センサに対向した際の、隣接する2つの磁気センサの各検出値の差分値の特性を説明するための図である。FIG. 7 is a diagram for explaining characteristics of a difference value between respective detection values of two adjacent magnetic sensors when the first magnet faces the magnetic sensor. 磁気センサの位置と第1群と第2群を合わせた仮想センサの位置との関係を示す図である。FIG. 4 is a diagram illustrating a relationship between a position of a magnetic sensor and a position of a virtual sensor obtained by combining a first group and a second group. 磁石間距離の算出フローの例を示す図である。It is a figure showing an example of a calculation flow of the distance between magnets. 本発明の実施形態に係る位置検出装置の他の構成を示す図である。It is a figure showing other composition of a position detecting device concerning an embodiment of the present invention. 本発明の実施形態に係る位置検出装置のさらに他の構成を示す図である。FIG. 9 is a diagram illustrating still another configuration of the position detection device according to the embodiment of the present invention. 図18に示す位置検出装置において、磁石位置が異なる場合を説明するための図である。FIG. 19 is a diagram for explaining a case where magnet positions are different in the position detection device shown in FIG. 18.

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

(第1の実施形態)
図1は、本発明の第1の実施形態に係る位置検出装置の一構成を示す図である。本実施形態では、複数の磁石として、移動方向に対して、磁化方向の異なる第1の磁石10Aと第2の磁石10Bの2つの磁石を用いた例について説明する。
(First embodiment)
FIG. 1 is a diagram showing one configuration of the position detecting device according to the first embodiment of the present invention. In the present embodiment, an example will be described in which two magnets, 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.

位置検出装置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 device 1 includes a first magnet 10A and a second magnet 10B for detection, and a plurality of magnetic sensors MS and a plurality of magnetic sensors MS that detect the first magnet 10A and the second magnet 10B. 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 values of the magnetic sensor MS 40, an output circuit 50 for outputting a value calculated by the microcomputer 40 as an analog signal. In this specification, a magnetic sensor is described as a magnetic sensor MS when generically referred to without specifying a magnetic sensor, and a magnetic sensor is specified with a number such as a magnetic sensor MS2 when specifying a magnetic sensor. This is the same also about the virtual sensor mentioned later.

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

磁気センサMSとしては、ホール素子や可飽和コイル等を用いたものが利用できる。可飽和コイルを用いたものとしては、例えば、コアの飽和領域まで可飽和コイルを励磁、外部磁界の作用によってコアの飽和点が移動することを利用したもの、例えば、特開2003-215221号公報に開示されたものを利用することができる。   As the magnetic sensor MS, a sensor using a Hall element, a saturable coil, or the like can be used. As a device using a saturable coil, for example, a device utilizing the fact that a saturable coil is excited to the saturation region of a core and a saturation point of the core is moved by the action of an external magnetic field, for example, JP-A-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 relationship between the magnets and the magnetic sensors, and FIG. 3 is a diagram when the relative positions of the magnets and the magnetic sensors are changed. In the present embodiment, M, for example, 11 magnetic sensors MS are linearly arranged 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) at a distance L between the magnets, and both move in parallel to the substrate BS while keeping a fixed distance from the magnetic sensors MS1 to MS11. I do. The magnetization direction of the first magnet 10A is magnetized to the S-pole and the N-pole with respect to the moving direction, and the magnetization direction of the second magnet 10B is N-magnetized to the moving direction opposite to the first magnet 10A. It is magnetized into a pole and an S pole. The directions of the magnetizations may be opposite to each other. The magnetic sensor MS detects a horizontal magnetic field of the first magnet 10A and the second magnet 10B. The output characteristics of the detection values with respect to the magnet magnetic field 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 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 a pitch P, but the arrangement of the magnetic sensors MS may not be equal. In any case, it is assumed that the positions of the magnetic sensors MS1 to MS11 are stored in the microcomputer 40 in advance. Further, the number M of the magnetic sensors MS is not limited to 11, but requires three or more.

また、第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となる。   In addition, the inter-magnet distance L between the first magnet 10A and the second magnet 10B is set to be shorter than the effective detection length A of the magnetic sensor MS, and is set to, for example, 70 mm in the present embodiment. I have. FIG. 2 shows a case where the first magnet 10A faces the magnetic sensor MS2, and FIG. 3 shows a case where the second magnet 10B faces the magnetic sensor MS10. 1 is the first magnet 10A or the second magnet 10A within a range from a position where the first magnet 10A faces the magnetic sensor MS2 to a position where the second magnet 10B faces the magnetic sensor MS10. The position of the magnet 10B can be detected. Therefore, the total effective detection length of the position detecting device 1 is the sum of the effective detection length A (80 mm) of the magnetic sensor MS and the distance L (70 mm) between the magnets, and is 150 mm.

まず、第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 of 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 which is a detection value of the magnetic sensor with respect to the first magnet. Note that the characteristics shown in FIG. 4 use a saturable coil for the magnetic sensor MS and neodymium φ5 × 6 for the first magnet 10A. The vertical axis in FIG. 4 indicates the internal value of the microcomputer 40 representing 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. And, 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 a detection value at a position where the position of the magnet is smaller than −10 mm, which is outside the effective detection length A of the magnetic sensor MS, but 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は最大の検出値を出力するように配置されている。   FIG. 4 shows magnetic field values which are detection values of the magnetic sensors MS1 to MS4. 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. When the first magnet 10A is located at a position of 10 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 10 mm. As described above, the detection value of each magnetic sensor MS becomes maximum 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 1 to MS 11 are sequentially switched according to a command from the multiplexer signal generation unit 45 of the microcomputer 40, and an analog signal from each magnetic sensor MS is converted into a digital signal 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, it is difficult to detect the position of the first magnet 10A by finding the zero point of the magnetic field value by interpolating with a straight line or a curve if the detection value of the magnetic sensor MS remains unchanged. For this reason, in the present embodiment, a difference value is obtained every time the detection value of the magnetic sensor MS is skipped inside the microcomputer 40, and the obtained difference value is set to a virtual value located in the middle of the two skipped magnetic sensors MS. It is the magnetic field value of the sensor. Specifically, "detected value of magnetic sensor MS3-detected value of magnetic sensor MS1", "detected value of magnetic sensor MS4-detected value of magnetic sensor MS2", "detected value of magnetic sensor MS5-detected value of magnetic sensor MS3" "Value" ... "Detected value of magnetic sensor MS11-Detected value of magnetic sensor MS9", and the virtual sensors VL1, VL2, VL3,. The magnetic field value is VL9 (see FIG. 6 described later).

図5は、第1の磁石が磁気センサに対向した際の、1つ飛ばしの2つの磁気センサの各検出値の差分値の特性を説明するための図であり、図6は、磁気センサの位置と第1群の仮想センサの位置との関係を示す図である。図5の縦軸は磁界の大きさを表すマイコン40の内部値を示し、横軸は基板BSに沿った座標位置を示している。   FIG. 5 is a diagram for explaining the characteristic of the difference value between the detection values of the two magnetic sensors one by one when the first magnet faces the magnetic sensor, and FIG. FIG. 4 is a diagram illustrating a relationship between a position and a position of a first group of virtual sensors. The vertical axis in FIG. 5 indicates the internal value of the microcomputer 40 representing 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, the difference value between the detection values of the magnetic sensor MS1 and the magnetic sensor MS3 one by one from the magnetic sensor, that is, “the detection value of the magnetic sensor MS3−the magnetic sensor The “detected value of MS1” is calculated as the magnetic field value of the virtual sensor VL1 located between the magnetic sensor MS1 and the magnetic sensor MS3. In the case of 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 before and after the position 0 mm, the magnetic field value of the virtual sensor VL1 changes almost linearly. I have.

次に、仮想センサ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 calculates the difference value of “the detected value of the magnetic sensor MS4−the detected value of the magnetic sensor MS2” by the magnetic field. Value. The characteristic of the virtual sensor VL2 is such 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 drawing) so that the magnetic field value becomes zero when the magnet is at the position of 10 mm. Characteristics.
Further, the virtual sensor VL3 becomes equal to the position of the magnetic sensor MS4, and has a magnetic field value equal to the difference value of “the detection value of the magnetic sensor MS5−the detection value of the magnetic sensor MS3”. The characteristic of the virtual sensor VL3 is a characteristic obtained by shifting the characteristic 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, a difference value between the detection values of the two magnetic sensors MS one by one is sequentially obtained, and the obtained difference value is generated as a magnetic field value of the virtual sensor VL located in the middle of the magnetic sensor MS one by one. Then, finally, a difference value of “the detection value of the magnetic sensor MS11−the detection value of the magnetic sensor MS9” is obtained, and is set as the magnetic field value of the virtual sensor VL9 located at the same position as the magnetic sensor MS10. The characteristics of the virtual sensor VL9 are 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 set to 11, nine difference values of the magnetic sensors MS skipping one are obtained. In addition, since the magnetic sensors MS are arranged at the same pitch P, the intermediate position between the two magnetic sensors MS is one between the two magnetic sensors MS, as shown in FIG. It is equal to the position of the magnetic sensor MS located. As described above, in the present embodiment, nine virtual sensors VL of the virtual sensors VL1 to VL9 can be generated, and their positions are equal to the positions of the magnetic sensors MS2 to MS10, respectively. It is not necessary to arrange the magnetic sensors MS at the same pitch. In this case, the position of the virtual sensor VL may be an intermediate position between the magnetic sensors one by one based on the position of each magnetic sensor MS. In the present invention, a plurality of virtual sensors located between the two magnetic sensors MS that are skipped by one 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 VL1 to VL9 with a straight line or a curve, finds a zero point of the magnetic field value, and detects the position of the first magnet 10A. 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 processing the position of the first magnet 10A 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 the external magnetic field such as the terrestrial magnetism, the detection position of the first magnet 10A is maintained. Not affected. Further, even when the offset component similarly changes due to the temperature characteristics of the magnetic sensor MS, the detection position of the first magnet 10A is not affected. Therefore, even when the offset component of the magnetic field changes due to the influence of an external magnetic field such as terrestrial magnetism, or when the offset component similarly changes due to the temperature characteristics of the magnetic sensor MS, highly accurate position detection can be performed without being affected by these components. 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, including processing for detecting the position of the first magnet 10A using linear interpolation, will be described. FIG. 7 is a diagram illustrating an example of a processing flow in the position detection device 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 a signal from the multiplexer signal generation unit 45, and are converted into digital values. It is taken in. The acquisition of the detection value from the magnetic sensor MS into the microcomputer 40 may be performed 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 to a variable n. In step S2, the virtual sensor magnetic field value generation unit 41 shown in FIG. 1 calculates the difference between the detection values of the n-th and (n + 2) -th magnetic sensors MS, and in step S3, calculates the difference value between the n-th and (n + 2) -th magnetic sensors. 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 the value is not equal (in the case of NO), the process proceeds to step S5, where 1 is added to the variable n. 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, where the position signal generation unit 42 determines that the magnetic sensor MS that has output the maximum detection value (absolute value) The closest virtual sensor VL is specified.

次に、ステップS7に移り、磁石特定部43は、位置検出の対象とする磁石を特定する。この処理は、後述するように、複数の磁石の内、磁気センサMSに対向している磁石を特定し、位置検出の対象とする磁石を特定するための処理である。本実施形態では、第1の磁石10Aと第2の磁石10Bが有効検出長Aの範囲内にある場合、第1の磁石10Aが位置検出の対象として特定されているものとする。   Next, the process proceeds to step S7, where the magnet identification unit 43 identifies a magnet to be subjected to position detection. This process is a process for identifying a magnet facing the magnetic sensor MS from among the plurality of magnets and identifying a magnet to be subjected to position detection, as described later. 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 closest to the magnetic sensor MS that has output the maximum detection value is specified, it is possible to roughly know the position of the first magnet 10A, and to determine the approximate position of the two virtual sensors VL. This is a reference for searching whether the magnetic field value crosses the zero point. Next, the process proceeds to step S8, and it is determined whether or not 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 over 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 value of the virtual sensors VL3 and VL5 immediately 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 straddles zero between the two virtual sensors, and the first magnet 10A is between the two virtual sensors. 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 plus, the magnetic field value of the virtual sensor VL4 is minus, and the magnetic field value of the virtual sensor VL5 is minus, the polarities of the magnetic field value of the virtual sensor VL3 and the magnetic field value of the virtual sensor VL4 are opposite. Therefore, it can be seen that the first magnet 10A is present between them. Then, in order to obtain the position of the first magnet 10A, the process proceeds to step S9, where the magnetic field values of the two virtual sensors VL crossing zero are linearly interpolated, and the position where the magnetic field value becomes zero is determined as the position of the first magnet 10A. Is calculated 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 the present embodiment, since the pitch P is 10 mm, the position of the virtual sensor VL3 is at the position of 20 mm, and the position of the virtual sensor VL4 is at the position of 30 mm. The position of the first magnet 10A is between 20 mm and 30 mm, and linear interpolation is performed between the magnetic field value of the virtual sensor VL3 and the magnetic field value of the virtual sensor VL4 to calculate the final magnet position. 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 linear interpolation for obtaining a magnet position. The vertical axis in FIG. 8 is an internal value of the microcomputer 40 representing the magnitude of the magnetic field, and the horizontal axis is a 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. The coordinate position is at point a, and the coordinate position of virtual sensor VL (n + 1) is indicated by point b. In the linear interpolation, the position of the magnet is obtained by obtaining the position of X at the intersection of the line connecting the points a and b and the line having the magnetic field value of zero.

ここで、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) (Equation 1). For example, when X0 = 20, X1 = 30, Y0 = 100, and Y1 = −200, when applied to 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 of 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 has been described above. A method of detecting the position of the second magnet 10B when it is within the effective detection length A of the MS will be described.
FIG. 9 is a diagram for explaining the characteristic of the detection value (magnetic field value) of the magnetic sensor with respect to the second magnet. The second magnet 10B uses neodymium φ5 × 6 similarly to the first magnet 10A. are 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 the position of 0 mm, the detection 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. When the second magnet 10B is located at a position of 10 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. 9 are 10 mm. As described above, the detection value of each magnetic sensor MS becomes maximum when the center of the second magnet 10B and the center of the magnetic sensor MS are at the same position. That is, similarly to the case of the first magnet 10A, the polarity is different, but the magnetic sensor MS is arranged to output the maximum detection 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, it is difficult to detect the position of the second magnet 10B by finding the zero point of the magnetic field value by interpolating with a straight line or a curve if the detection value of the magnetic sensor MS remains unchanged. 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, the difference between the detected values of the magnetic sensor MS is obtained every time the microcomputer 40 skips one, and the magnetic field value of the virtual sensor located between the two magnetic sensors MS that are skipped by one is generated, and the magnetic field of the virtual sensor is generated. The position where the magnetic field value of the magnetic field distribution obtained by interpolating the value 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 inverting 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. 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 is on the minus side. For this reason, the first magnet 10A and the second magnet 10B can be distinguished, and the magnet specifying unit 43 specifies the magnet by 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 the two magnetic sensors one by one 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, but are shown in FIG. 5 when the first magnet 10A faces the magnetic sensor MS. 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 characteristic of the virtual sensor VL1.

このように、第2の磁石10Bの位置を検出する場合は、磁気センサMSの検出値の特性や、仮想センサVLの磁界値の特性が、第1の磁石10Aの位置検出の場合と正負反転しているだけであり、第2の磁石10Bの位置検出は第1の磁石10Aの位置検出と同じ方法で求めることができる。   As described above, when the position of the second magnet 10B is detected, 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 the case of the position detection 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 closest to the magnetic sensor MS is specified. Further, it is determined whether or not the magnetic field value crosses the value of zero between the specified virtual sensor VL and the virtual sensors VL before and after the specified virtual sensor VL. If two virtual sensors crossing zero can be specified, the second magnet 10B is located between them, and the magnetic field values of the two virtual sensors VL are linearly interpolated to determine 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 of the magnetic sensors MS2 to MS10 within the effective detection length A detects a negative maximum value, the virtual sensor closest to the magnetic sensor MS8 is the virtual sensor VL7. The polarity of the detection value of the sensor VL6 and the detection value of the virtual sensor VL7 and the polarity of the detection value of the virtual sensor VL7 and the detection value of the virtual sensor VL8 are compared. If the polarity is reversed, the magnetic field value crosses zero during that time, 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 minus, the magnetic field value of the virtual sensor VL7 is plus, and the magnetic field value of the virtual sensor VL8 is plus, the polarity of the magnetic field value of the virtual sensor VL6 is opposite to that of the virtual sensor VL7. 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 the present 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. The 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の位置を求めることができる。   Regarding the linear interpolation, although the inclination of the straight line shown in FIG. 8 is reversed, it 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 is obtained by X = X0 + Y0 × (X1−X0) / (Y0−Y1) (Equation 1). When X0 = 50, X1 = 60, Y0 = -100, and Y1 = 200 are applied to the 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 be.

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

図11は、磁気センサの有効検出長内に第1の磁石のみが位置する場合を示す図であり、図12は、磁気センサの有効検出長内に第1の磁石と第2の磁石とが位置する場合を示す図であり、図13は、磁気センサの有効検出長内に第2の磁石のみが位置する場合を示す図である。   FIG. 11 is a diagram showing a case where only the first magnet is located within the effective detection length of the magnetic sensor, and FIG. 12 shows that the first magnet and the second magnet are located within the effective detection length of the magnetic sensor. FIG. 13 is a diagram illustrating a case where the second magnet is located 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 located 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, and the position is detected. The output value of the device 1 is used. 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 case is referred to as “case 2”. It is determined which of the magnet 10A and the second magnet 10B is given priority. For example, when giving priority to the first magnet 10 </ b> A, the position of the first magnet 10 </ b> A is determined as the output value of the position detection device 1, as in the case 1. As shown in FIG. 13, when only the second magnet 10B is located 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 determined, and the position of the second magnet 10B is determined. An output value of the position detecting device 1 is obtained by adding 70 mm, which is the distance L between magnets, to the value. When giving priority to the second magnet 10B in the second case, the same method as in the case 3 is used.

第2の磁石10Bの位置に磁石間距離Lである70mmを加算することは、第1の磁石10Aは磁気センサMSの有効検出長Aの範囲外にあるにもかかわらず、第2の磁石10Bの位置から第1の磁石10Aの位置を求めることである。これにより、1個の磁石を用いる場合に比べて、位置検出装置の全有効検出長が磁石間距離L分増えて150mmと長くなり、更に第1の磁石10Aと第2の磁石10Bが切り替わった場合でも、連続的な位置検出が可能になる。また、この方式を用いれば、全有効検出長が従来と同じ場合、磁気センサMSや基板BS等の部品の削減、装置の小型化等が可能になる。   Adding the inter-magnet distance L of 70 mm to the position of the second magnet 10B means that the first magnet 10A is out of the range of the effective detection length A of the magnetic sensor MS even though the first magnet 10A is outside the effective detection length A of the magnetic sensor MS. From the position of the first magnet 10A. As a result, as 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 to 150 mm, and the first magnet 10A and the second magnet 10B are switched. Even in this case, continuous position detection becomes possible. Also, 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 components such as the magnetic sensor MS and the substrate BS and to reduce the size of the device.

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

第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 does not actually exist in the range of the effective detection length A even if there is no first magnet 10A but only the second magnet 10B. It is determined that there is, and normal position detection cannot be performed. For this reason, the positive value of the second magnet 10B is prevented from being 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 plus value of the second magnet 10B is not erroneously detected. , A threshold is provided for the detection value. For example, by not detecting a plus value having a magnetic field value of 100 or less as the threshold value of the detection value, it is possible to prevent the plus value of the second magnet 10B from being erroneously detected.

同様に、第2の磁石10Bを検出する場合、第1の磁石10Aによって生じるマイナス側の値を誤検出しないようにする。例えば、磁界値−100に閾値を設け、閾値以上のマイナス側の値を検出しないようにすることで、第1の磁石10Aのマイナス側の値を誤検出することがなくなる。   Similarly, when the second magnet 10B is detected, 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 value on the minus side that is equal to or greater than the threshold value, the value on the minus side 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 identification unit 43 can reliably determine which of the cases 1 to 3 is in the state. 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 it is determined that the maximum value on both the plus side and the minus side is detected, it is determined that the 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分増えることになる。   As described above, in the present embodiment, it is possible to continuously detect the position of the first magnet 10A and the position of the second magnet 10B from the case 1 to the case 3. The position detection device 1 distinguishes 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 is possible to detect the position of the first magnet 10A outside the range of the effective detection length A. Further, from a different point of view, in case 1, as shown in FIG. 2 or 11, the position of the second magnet 10B outside the effective detection length A of the magnetic sensor MS is changed 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 increases 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 calculating the difference value for each of the two magnetic sensors MS skipped by one, the number of the virtual sensors VL is two less than the number of the magnetic sensors, and 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 a section ± 10 mm from the zero point of the magnetic field value (the interval between the magnetic sensors MS) is a straight line. As shown by the symbol C in FIGS. 5 and 10, the linearity deteriorates. Therefore, an error occurs when linear interpolation is performed using a value with 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 that is easy to calculate. For this reason, in the second embodiment, in addition to the method of calculating the difference every time the detection value of the magnetic sensor MS is skipped by one in the first embodiment, the difference value of the detection value of the adjacent magnetic sensor MS is also calculated. I have. That is, in addition to the (M-2) first group of virtual sensors VL obtained in the first embodiment, a difference value between the detection values of two adjacent magnetic sensors is calculated, and this difference value is used as a magnetic field value. And (M-1) second group of virtual sensors VL positioned between two adjacent magnetic sensors. In the present invention, a plurality of virtual sensors located 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 of detecting the position of the first magnet 10A in the case 1 shown in FIG. 11 in which only the first magnet 10A is located within the effective detection length A of the magnetic sensor MS will be described.
FIG. 14 is a diagram for explaining a characteristic of a difference value between respective detection values of two adjacent magnetic sensors when the first magnet faces the magnetic sensor. FIG. It is a figure showing the position of the virtual sensor which combined the 1st group and the 2nd group. 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, a difference value of “the detection value of the magnetic sensor MS2−the detection value of the magnetic sensor MS1” is obtained, and the difference value is calculated by using the virtual sensor VL1 located at −5 mm between the magnetic sensor MS1 and the magnetic sensor MS2. , And a difference value of “the detection value of the magnetic sensor MS3−the detection value of the magnetic sensor MS1” is obtained, and this difference value is set to a virtual sensor located at a position of 0 mm located between the magnetic sensor MS1 and the magnetic sensor MS3. As the magnetic field value of VL2, a difference value of “the detection value of the magnetic sensor MS3−the detection value of the magnetic sensor MS2” is obtained, and this difference value is calculated for the virtual sensor VL3 located 5 mm between the magnetic sensor MS2 and the magnetic sensor MS3. As a magnetic field value, a difference value of “the detection value of the magnetic sensor MS4−the detection value of the magnetic sensor MS2” is obtained, and this difference value is determined as an intermediate value between the magnetic sensor MS2 and the 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 each have the same characteristic curve as the characteristic curve shown in FIG. The VL19 odd-numbered ten virtual sensors VL1, VL3, VL5... VL19 are generated from 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, and its magnetic field value becomes zero at the position of 5mm, and the magnetic field value before and after the zero point changes linearly. I have. 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 of FIG. 11 by 10 mm in the minus direction of the substrate BS, and the characteristic of the virtual sensor VL5 is the characteristic of the virtual sensor VL3 of FIG. 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の配列方向に沿って、両端に位置する仮想センサ間の距離に相当すると定義できる。   Thereby, in the second embodiment, nine even-numbered first group virtual sensors VL having characteristics similar to the characteristics shown in FIG. 5 and ten virtual sensors VL having characteristics similar to the characteristics shown in FIG. Odd-numbered second group virtual sensors VL are generated at a pitch P ′ of 5 mm intervals as shown in FIG. This is the same as that 19 magnetic sensors are arranged at 5 mm intervals, 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 also 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 determined between the virtual sensors located at both ends along the arrangement direction of the magnetic sensors MS. It can be defined as equivalent to distance.

第2の実施形態において、直線補間によって第1の磁石10Aの位置を検出する方法は、第1の実施形態と同様である。
まず、磁気センサMSの中から最大の検出値を出力する磁気センサMSを特定する。これにより大まかな磁石の位置を知ることができ、仮想センサVLの磁界値がゼロ点を跨いでないかを探す基準になる。次に、最大値を示す磁気センサMSに最も近接する仮想センサVLを特定し、特定した仮想センサVLの磁界値と、この特定した仮想センサVLの前後の仮想センサの磁界値とがゼロを跨いでいるか否かを判別する。
In the second embodiment, a 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 detection value is specified from among the magnetic sensors MS. 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 over zero. Is determined.

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

仮に、仮想センサ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 polarities of the magnetic field value of the virtual sensor VL7 and the magnetic field value of the virtual sensor VL8 are opposite. Therefore, it can be seen that the first magnet 10A is present between them. In the present 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 crossing 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 method of linear interpolation is the same as in the first embodiment. As described with reference to FIG. 8, the position X of the magnet is determined by X = X0 + Y0 × (X1-X0) / (Y0-Y1) (Equation 1). For example, when X0 = 25, X1 = 30, Y0 = 100, and Y1 = −200, if this expression 1 is applied, 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 of detecting the position of the first magnet 10A in the case 1 where only the first magnet 10A is located within the effective detection length A 'of the magnetic sensor MS has been described. In case 3, in which only the second magnet 10B is located within the effective detection length A 'of the magnetic sensor MS, the method of detecting the position of the second magnet 10B also has a positive or negative characteristic of the detection value of the magnetic sensor MS. It is the same as Case 1 except that it is reversed. Therefore, the description is omitted. In the case 2 where the first magnet 10A and the second magnet 10B are within the effective detection length A ', similarly to the first embodiment, the position is detected by giving priority to one of the magnets. 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 calculates the difference between the detection values of the magnetic sensors MS, the present embodiment, like the first embodiment, has an external magnetic field such as terrestrial magnetism. Even when the offset component of the magnetic field changes due to the influence of the magnetic field, or when the offset component similarly changes due to the temperature characteristics of the magnetic sensor, etc., highly accurate position detection can be performed without being affected by these. In this embodiment, highly accurate position detection is possible even by linear interpolation without increasing the number of magnetic sensors, and the effective detection length A ′ is also 90 mm, which is more than the effective detection length A of 80 mm in the first embodiment. Can be longer.

(第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 position of the second magnet 10B is The position of the first magnet 10A is output by adding the distance L between the magnets of 70 mm. However, since the inter-magnet distance 70 mm is a fixed value that does not take account of the installation error and the like, if the inter-magnet distance L is shifted due to the installation error and 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 range of 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 positions. 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 calculation unit 44 to the first magnet 10B. The position of the magnet 10A is output.

磁石間距離Lについては、予めマイコン40のメモリにその値を入力可能であるが、実際の入力値と磁石間距離算出部44による磁石間距離の算出値とが異なる場合は、予め入力された入力値を磁石間距離算出部44の算出値で補正する。これによって、精度の高い位置検出が可能になる。   The value of the inter-magnet distance L can be input to the memory of the microcomputer 40 in advance, but if the actual input value is different 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 by the calculated value of the magnet distance calculation 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 method of calculating the inter-magnet distance L in the case of the first embodiment will be described, but the same applies to the method of calculating the inter-magnet distance L in the case of the second embodiment.
FIG. 16 is a diagram illustrating an example of a calculation flow of the distance between magnets. First, the magnet identification unit 43 determines whether 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 (step S11). If both magnets are not within the effective detection length A, move the magnets and wait until both magnets are within 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 detection of the position of the first magnet 10A specifies the magnetic sensor MS that outputs the maximum detected value on the plus side, and checks whether the magnetic field values of the two virtual sensors VL close to the magnetic sensor MS cross zero. Then, the position of the first magnet 10A is obtained by 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 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 plus side of the detection value, that position is the position of the virtual sensor VL8, and the polarities of the magnetic field values of this virtual sensor VL8 and the preceding and following virtual sensors VL7, VL9 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. Has the first magnet 10A, and performs linear interpolation 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 the linear interpolation, the position X of the first magnet 10A is obtained by Expression 1: X = X0 + Y0 × (X1-X0) / (Y0-Y1). In the present 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 Expression 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 determined (Step S13). In addition, in the flow shown in FIG. 16, the order of step S12 and step S13 may be reversed. The detection of the position of the second magnet 10B specifies the magnetic sensor MS that outputs the maximum negative detection value, and checks whether the magnetic field values of the two virtual sensors VL close to the magnetic sensor MS cross zero. Then, the position of the second magnet 10B is obtained by linearly interpolating the magnetic field values of the two virtual sensors whose magnetic field values cross over zero.

第1の磁石10Aと第2の磁石10Bの磁石間距離Lを70mmであるから、両方の磁石が有効検出長Aの範囲内にある場合、第2の磁石10Bは、磁気センサMS2、MS3付近に来る。例えば、磁気センサMS2の検出値がマイナス側の最大値をとる場合、その位置は仮想センサVL1の位置となり、仮想センサVL1と仮想センサVL2との磁界値の間で直線補間を行う。   Since the distance L between the magnets of the first magnet 10A and the second magnet 10B is 70 mm, when both magnets are within the range of the effective detection length A, the second magnet 10B is located 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 becomes 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 the linear interpolation, the position X of the second magnet 10B is obtained by Expression 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 Equation (1), 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 sets the inter-magnet distance L from the position of the first magnet 10A to the second distance. 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-5.000 = 68.333. 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 or the like in the inter-magnet distance L, for example, if the inter-magnet distance L is set to a fixed value of 70 mm in the first embodiment, the positions of the first magnet 10A and the second magnet 10B will be changed. When the detected value is switched, an error occurs in the output of the position detecting device 1 by a difference from the actual distance between the magnets. However, in this 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 magnet distance L from the position of each magnet is determined. Can be obtained. For this reason, 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 distance between the second magnets 10B is calculated by the inter-magnet distance calculation unit 44. By adding the actual value of the inter-magnet distance L to obtain the position of the first magnet 10A, it is possible to prevent an error from occurring.

(第4の実施形態)
第1〜第3の実施形態では、複数の磁石を判別するために、移動方向に対して磁化方向の異なる2つの磁石の場合を例に説明したが、磁化方向が同じであってもよい。図17は、本発明の実施形態に係る位置検出装置の他の構成を示す図であり、磁石の個数n(nは2以上の整数)とした場合にn=2の場合を示している。
(Fourth embodiment)
In the first to third embodiments, two magnets having different magnetization directions with respect to the moving direction have been described as an example in order to distinguish a plurality of magnets, but the magnetization directions may be the same. FIG. 17 is a diagram showing another configuration of the position detecting 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 detecting device includes a first magnet 10A and a second magnet 10B whose magnetization directions are arranged in the same direction as the movement direction, and the first magnet 10A and the second magnet 10B. Are arranged on the substrate BS at a pitch P of 10 mm at intervals P, for example, eleven magnetic sensors MS for detecting. The configurations of the magnetic sensor MS and the substrate BS are the same as in the first embodiment, and the effective detection length A is 80 mm. The two magnets, the first magnet 10A and the second magnet 10B, are arranged at intervals of, for example, 30 mm so that the distance L between the magnets is shorter than A / 2. This magnet arrangement is for specifying each magnet and detecting its absolute position even when a plurality of magnets having the same magnetization direction as 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のみが位置する場合を示している。   FIG. 17A shows the case where only the first magnet 10A is located within the effective detection length A of the magnetic sensor MS. FIG. 17B shows the case where the first magnet 10A is located within the effective detection length A of the magnetic sensor MS. FIG. 17C shows a case where only the second magnet 10B is located within the effective detection length A of the magnetic sensor MS when the magnet 10A and the second magnet 10B are located.

磁石特定部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, as shown in FIG. 17A, the magnet identification unit 43 determines whether one magnet is detected and the detected position is less than the effective detection length A / 2. , The detected magnet is specified as the first magnet 10 </ b> A, and 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. Also, as shown in FIG. 17B, when the number of detected magnets is two, the magnet identification unit 43 sets the magnetic sensor MS11 side to the first magnet 10A and the magnetic sensor MS1 side to the second magnet 10B. The position signal generation unit 42 specifies the position of the first magnet 10A as an output value of the position detection device 1 by giving priority to the position of the first magnet 10A, for example. Further, as shown in FIG. 17C, when the number of detected magnets is one and the detected position is a position equal to or longer than the effective detection length A / 2, the magnet specifying unit 43 determines that the detected magnet is the second one. The position signal generator 42 specifies 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 the length A + L obtained by adding the inter-magnet distance L 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に対向する磁石を特定することが可能である。 The case where two magnets are used has been described above. However, the number n of magnets having the same magnetization direction as the moving direction may be three or more. For example, when the number of magnets is n = 3, 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 a first magnet, a second magnet, and a third magnet from the side closer to the magnetic sensor MS11, the positional relationship of the magnets facing the magnetic sensor MS is as follows. In the case, the magnet identification unit 43 can identify 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 one magnet is detected and its detection position is less than the effective detection length A / n, that is, less than A / 3, the position of the first magnet can be specified.
(Case 2 ′) When two magnets are detected 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 three magnets are detected, the positions of all magnets can be specified.
(Case 4 ′) When two magnets are detected and the detection position of one of the magnets is equal to or more than 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 detection position is equal to or more than the effective detection length (A−A / n), that is, 2 × A / 3 or more, the position of the third magnet is determined. Can be identified.

そして、位置信号生成部42は、磁石特定部43が特定した磁石の位置と磁石間距離Lから、磁気センサMSに対向していない磁石の位置を出力することができる。位置検出装置としての全有効検出長は、磁気センサMSの有効検出長Aに両端に位置する磁石の磁石間距離Lを加算した長さA+Lになる。なお、本実施形態と第2の実施形態を組み合わせた場合、位置検出装置としての全有効検出長は、長さA’+Lになる。   Then, 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 specification unit 43 and the distance L between the magnets. The total effective detection length as the position detection device is a length A + L obtained by adding the inter-magnet distance L of 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 detecting device is 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, in order to distinguish a plurality of magnets, two magnets having different magnetization directions with respect to the moving direction have been described as an example, but the number n of the magnets is more than two. Is also good. FIG. 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, a case where n = 3 is shown as the number n of magnets (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, in which the magnetization directions are alternately different from the moving direction, and the first magnet 10A, As a plurality of magnetic sensors MS for detecting the magnet 10A, the second magnet 10B, and the third magnet 10C, M pieces, for example, 11 pieces 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 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 a space. Similarly, the two magnets of the second magnet 10B and the third magnet 10C have an interval of, for example, 35 mm so that the distance L2 between the magnets is shorter than A / (n-1), that is, A / 2. It is arranged in a space. This magnet arrangement is for specifying each magnet and detecting its absolute position even when a plurality of magnets whose magnetization directions are alternately different from 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のみが位置する場合を示している。   FIG. 18A shows a case where only the first magnet 10A is located within the effective detection length A of the magnetic sensor MS, and FIG. 18B shows a case where the first magnet 10A is located within the effective detection length A of the magnetic sensor MS. When the magnet 10A and the second magnet 10B are located, 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. 19 (A) shows the 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. 19 (B) shows the case where the magnetic sensor MS is located. 3 shows a case where only the third magnet 10C is located within the effective detection length A of FIG.

磁石特定部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, as shown in FIG. 18A, the magnet identification unit 43 detects one magnet and its detection position is less than the effective detection length A / (n-1). 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の出力値とする。   In addition, as shown in FIG. 18B, when the number of detected magnets is two, the maximum value of the detection value of the magnetic sensor MS by the first magnet 10A is on the plus side, and the magnetism by the second magnet 10B is large. The maximum value of the detection value of the sensor MS appears on the negative side. The magnet identification unit 43 identifies the first magnet 10A or the second magnet 10B by using this characteristic. For example, the position signal generation unit 42 determines the position of the first magnet 10A by 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 the magnets 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 three, the magnet identification unit 43 can identify all three magnets. The position signal generator 42 sets, for example, 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 the 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 the maximum value of the third magnet 10C is The maximum value of the detection value of the magnetic sensor MS appears on the plus side. The magnet identification unit 43 identifies the second magnet 10B or the third magnet 10C using this characteristic. For example, the position signal generation unit 42 determines the distance L1 between the magnets 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つの磁石を特定することができる。   As described above, in the present embodiment, when the number of detected magnets is two, there are two cases shown in FIGS. 18B and 19A, respectively. On the other hand, since the two magnets are magnetized alternately with polarity, the two magnets detected based on the polarity of the detection value of the magnetic sensor MS are the first magnet 10A and the second magnet 10B, or the second magnet 10B. 10B and the third magnet 10C can be determined. For example, two magnets can be specified by taking the difference between the positive maximum value and the negative maximum value 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 one detected magnet is located at a position equal to or longer than the effective detection length (A−A / (n−1)), that is, at a position equal to or longer 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 the present embodiment, the total effective detection length of the position detection device is A + L, which is the sum of the effective detection length A of the magnetic sensor MS and the distance L (= L1 + L2) between the magnets located at both ends, and 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 identified by the magnet identification 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 inter-magnet distance L between the magnets at both ends to the effective detection length A of the magnetic sensor MS. Further, when this embodiment and the second embodiment are combined, the total effective detection length as the position detecting device is the length A '+ L. Note that the first embodiment corresponds to a case where the number n of magnets is set to two in the fifth embodiment. Further, the number n of the magnets may be four or more.

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

Claims (10)

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

Family Cites Families (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 detecting method
SE529125C2 (en) * 2005-03-02 2007-05-08 Tetra Laval Holdings & Finance Method and apparatus for determining the position of a packaging material with magnetic markings
JP6145467B2 (en) * 2014-03-27 2017-06-14 株式会社マコメ研究所 Position detection device

Also Published As

Publication number Publication date
JP2019144086A (en) 2019-08-29

Similar Documents

Publication Publication Date Title
JP5885382B2 (en) Electromagnetic induction type linear encoder
US9995597B2 (en) Magnetic position sensor and position detecting method
US9086613B1 (en) Camera module and autofocus method thereof
JPH0361208B2 (en)
US10697803B2 (en) Motion detecting apparatus
US9772198B2 (en) Displacement sensor and displacement detection method
JP6653341B2 (en) Position detection device
JPH0654460B2 (en) Coordinate detection method
JP6577639B1 (en) Position detection device
JP6577635B1 (en) Position detection device
JPS62143120A (en) Input device for coordinate
JP6449935B2 (en) Sensor
JP6374129B1 (en) Position detection device
JP2008298570A (en) Position detection apparatus and positioning apparatus
JPH10170210A (en) Induction type position detecting device
JPH05165560A (en) Coordinate input device
JP3111281B2 (en) Coordinate reading device and its scanning method
JP6368185B2 (en) Linear motion device position sensor and linear motion device position control apparatus using the position sensor
JP6568452B2 (en) Rotor centering method for reluctance resolver
US20230116491A1 (en) Displacement detection device
WO2016111266A1 (en) Position detecting device
JP2012149891A (en) Linear sensor
JP7431032B2 (en) electromagnetic induction encoder
EP3907475B1 (en) Magnetic position sensor system and method
JP3309870B2 (en) Linear resolver

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