JP2008256657A - Encoder for motor - Google Patents
Encoder for motor Download PDFInfo
- Publication number
- JP2008256657A JP2008256657A JP2007101908A JP2007101908A JP2008256657A JP 2008256657 A JP2008256657 A JP 2008256657A JP 2007101908 A JP2007101908 A JP 2007101908A JP 2007101908 A JP2007101908 A JP 2007101908A JP 2008256657 A JP2008256657 A JP 2008256657A
- Authority
- JP
- Japan
- Prior art keywords
- count value
- signal
- multiplication
- multiplied
- analog
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、モータ用エンコーダに関する。 The present invention relates to a motor encoder.
モータの回転制御をするときに、ロータの回転位置を検出するセンサとして、例えば、エンコーダを使用することがある。この種の用途に用いられるエンコーダでは、ロータの回転に従って周期関数からなるアナログ信号が発生されるので、アナログ/デジタル(以下、A/Dという)変換器でデジタルのパルス信号を作成してステータのコイルの通電を切り替えるタイミングを演算する(例えば、特許文献1参照)。 For example, an encoder may be used as a sensor for detecting the rotational position of the rotor when controlling the rotation of the motor. In an encoder used for this kind of application, an analog signal composed of a periodic function is generated according to the rotation of the rotor. Therefore, a digital pulse signal is created by an analog / digital (hereinafter referred to as A / D) converter to generate a stator signal. The timing which switches energization of a coil is calculated (for example, refer to patent documents 1).
ここで、従来のエンコーダは、モータに内蔵して使用されるエンコーダ基板がケーブルでドライバに接続される構成になっている。エンコーダ基板は、ロータに固定されたスケールの回転を検出する光学ピックアップと、光学ピックアップから出力される擬似サイン波出力が入力されるA/D変換器と、擬似コサイン波出力が入力されるA/D変換器と、各A/D変換器からのデジタル信号を4逓倍する逓倍専用IC(集積回路)と、レベル変換回路が実装されている。ここで、4逓倍のパルス信号を作成するためには、擬似サイン波や擬似コサイン波(以下、これらを総称するときは擬似正弦波という)の符号変化を常に検出していなければならない。このため、A/D変換器に要求される能力は、モータへの通電を切り替えるタイミングを演算する周期より大きい周波数でA/D変換が可能である必要がある。例えば、1周に1024個のスリットがあるスケールを使用し、6000rpm(100Hz)で回転させたときに、符号の変化を正しく判定するためには、100Hz×1024×4=409.6kHz以上の周波数でA/D変換する必要がある。このため、従来のモータ用エンコーダでは、高速差動A/D変換器を使用し、逓倍専用ICとの間の通信はパラレル通信を採用していた。
しかしながら、モータ用エンコーダが複数の信号を使って逓倍した信号を生成するときは、信号が出力されるタイミングがずれるとカウント値が大きくずれてしまうことがあった。
また、高速差動A/D変換器は、回路のサイズが大きくなるので、エンコーダ基板を小型化することができなかった。また、高速差動A/D変換器と逓倍専用ICの間は、特許文献1に示すように多数の配線でパラレル接続する必要があった。このような配線は、エンコーダ基板の小型化を妨げる原因になっていた。さらに、逓倍専用ICもパラレル通信をするために多数の端子が必要になるので小型化が難しかった。これらの理由から、従来ではエンコーダ基板を小型化することが困難であり、エンコーダ基板を内蔵するモータの小型化も難しかった。
この発明は、このような事情に鑑みてなされたものであり、モータ用エンコーダの誤カウントを防止することを主な目的とする。
However, when the motor encoder generates a signal multiplied by using a plurality of signals, the count value may be greatly shifted if the timing at which the signal is output is shifted.
Further, since the high-speed differential A / D converter has a large circuit size, the encoder board cannot be miniaturized. In addition, as shown in
The present invention has been made in view of such circumstances, and a main object thereof is to prevent erroneous counting of a motor encoder.
上記の課題を解決する本発明の請求項1に係る発明は、モータに取り付けられる検出部と、前記モータ外に配置され、前記検出部との間でデータ通信可能に接続されたドライバとを有するモータ用エンコーダであって、前記モータの回転に伴って擬似正弦波状のアナログ信号を出力するピックアップと、前記ピックアップから出力されるアナログ信号をデジタル信号に変換してシリアル出力するアナログ/デジタル変換器と、基準電位に対するアナログ信号の符号変化に伴って信号レベルが切り替わるパルス状の符号変化信号を生成するコンパレータと、前記アナログ/デジタル変換器及び前記コンパレータから出力されるデジタル信号を受け取って、逓倍処理する逓倍部とを有し、前記逓倍部は、前記アナログ/デジタル変換器から出力されるデジタル信号から第1の逓倍カウント値を算出する第1の逓倍回路と、前記コンパレータから出力される符号変化信号の符号変化をカウントして第2の逓倍カウント値を生成する第2の逓倍回路と、第1の逓倍カウント値と第2の逓倍カウント値を合成して合成逓倍カウント値を生成する合成回路と、前回の合成逓倍カウント値と今回の合成逓倍カウント値の差の大きさが所定の値以上になったらカウント値のずれを補正する誤カウント補正回路を有することを特徴とするモータ用エンコーダとした。
アナログ/デジタル変換器の出力タイミングとコンパレータの出力タイミングがずれていたときは、合成逓倍カウント値の今回値が前回値に対して大きく異なる値になる。したがって、今回値と前回値の差に応じて補正を行い、正しいカウント値が得られるようにする。
The invention according to
When the output timing of the analog / digital converter is different from the output timing of the comparator, the current value of the combined multiplication count value is greatly different from the previous value. Therefore, correction is performed according to the difference between the current value and the previous value so that a correct count value is obtained.
請求項2に係る発明は、請求項1に記載のモータ用エンコーダにおいて、前記誤カウント補正回路は、前回の合成逓倍カウント値と今回の合成逓倍カウント値の差が第1の閾値を越えたら、第2の逓倍カウント値の2カウント分補正した合成逓倍カウント値を生成し、第1の閾値未満で第2の閾値以上であったら第2の逓倍カウント値の1カウント分補正した合成逓倍カウント値を生成するように構成されていることを特徴とする。
このモータ用エンコーダは、前回の合成逓倍カウント値と今回の合成逓倍カウント値の差が大きいときには、第2の逓倍カウント値の1カウント分又は2カウント分の補正を行う。前回の合成逓倍カウント値に対して今回の合成逓倍カウント値が第1、第2の閾値より大きいときは、それぞれ2カウント分、1カウント分だけ減算する。前回の合成逓倍カウント値に対して今回の合成逓倍カウント値が第1、第2の閾値より小さいときは、それぞれ2カウント分、1カウント分だけ加算する。
According to a second aspect of the present invention, in the motor encoder according to the first aspect, the erroneous count correction circuit is configured such that the difference between the previous combined multiplied count value and the current combined multiplied count value exceeds a first threshold value. A composite multiplication count value corrected by 2 counts of the second multiplication count value is generated, and if it is less than the first threshold and greater than or equal to the second threshold, the composite multiplication count value corrected by 1 count of the second multiplication count value It is characterized by producing | generating.
When the difference between the previous combined multiplication count value and the current combined multiplication count value is large, the motor encoder corrects the second multiplied count value by one count or two counts. When the current combined multiplied count value is larger than the first and second threshold values with respect to the previous combined multiplied count value, 2 counts and 1 count are respectively subtracted. When the current combined multiplication count value is smaller than the first and second threshold values with respect to the previous combined multiplication count value, 2 counts and 1 count are added respectively.
請求項3に係る発明は、請求項2に記載のモータ用エンコーダにおいて、第1の閾値は、第2の逓倍カウント値の1.5カウントに相当する値であり、第2の閾値は、第2の逓倍カウント値の0.5カウントに相当する値であることを特徴とする。
このモータ用エンコーダは、第2の逓倍カウント値のカウントアップ又はカウントダウンのタイミングがずれたときに合成逓倍カウント値の誤差が大きくなることに着目し、第2の逓倍カウント値に対応付けて補正する。
According to a third aspect of the present invention, in the motor encoder according to the second aspect, the first threshold value is a value corresponding to 1.5 counts of the second multiplied count value, and the second threshold value is It is a value corresponding to 0.5 count of 2 multiplied count value.
The motor encoder pays attention to the fact that the error of the combined multiplied count value becomes large when the timing of counting up or counting down the second multiplied count value is shifted, and corrects it in association with the second multiplied count value. .
請求項4に係る発明は、請求項1から請求項3のいずれか一項に記載のモータ用エンコーダにおいて、前記ピックアップは、周期が1/4異なる擬似サイン波信号と擬似コサイン波信号を出力し、前記アナログ/デジタル変換器及び前記コンパレータは、擬似サイン波信号が入力される第1のアナログ/デジタル変換器及び第1のコンパレータと、擬似コサイン波信号が入力される第2のアナログ/デジタル変換器及び第2のコンパレータを有することを特徴とする。
このモータ用エンコーダは、ピックアップが位相の異なる2種類のアナログ信号を発生させる。このため、アナログ/デジタル変換器及びコンパレータがそれぞれ2つずつ検出部に設けられ、それぞれに対応したデジタル信号がモータ外のドライバに送られて逓倍処理される。
According to a fourth aspect of the present invention, in the motor encoder according to any one of the first to third aspects, the pickup outputs a pseudo sine wave signal and a pseudo cosine wave signal having a period different by ¼. The analog / digital converter and the comparator include a first analog / digital converter and a first comparator to which a pseudo sine wave signal is input, and a second analog / digital conversion to which the pseudo cosine wave signal is input. And a second comparator.
In this motor encoder, the pickup generates two types of analog signals having different phases. For this reason, two analog / digital converters and two comparators are provided in the detection unit, respectively, and corresponding digital signals are sent to a driver outside the motor and multiplied.
請求項5に係る発明は、請求項1から請求項4のいずれか一項に記載のモータ用エンコーダにおいて、前記アナログ/デジタル変換器及び前記コンパレータを前記検出部に設け、前記逓倍部を前記ドライバに設けたことを特徴とする。
このモータ用エンコーダは、逓倍処理を行う逓倍部がモータ外に配置される。アナログ/デジタル変換器からシリアル出力されたデジタルデータは、ドライバに送られてからデータ処理される。検出部から出力されるアナログ信号の符号変化は、コンパレータの出力を参照すれば調べられるのでアナログ/デジタル変換器の信号出力頻度を低くできる。
According to a fifth aspect of the present invention, in the motor encoder according to any one of the first to fourth aspects, the analog / digital converter and the comparator are provided in the detection unit, and the multiplication unit is the driver. It is characterized by being provided in.
In this motor encoder, a multiplication unit that performs multiplication processing is arranged outside the motor. The digital data serially output from the analog / digital converter is sent to the driver and processed. Since the change in the sign of the analog signal output from the detection unit can be checked by referring to the output of the comparator, the signal output frequency of the analog / digital converter can be lowered.
本発明によれば、アナログ/デジタル変換器とコンパレータを用いて合成逓倍カウント値を作成するようにしたので簡単な構成でモータの回転検出が行える。この際に、アナログ/デジタル変換器とコンパレータの信号出力のタイミングがずれたときは、誤カウント補正回路で合成逓倍カウント値が補正されるので、正しいカウント値が得られる。 According to the present invention, since the combined multiplication count value is created using the analog / digital converter and the comparator, the rotation of the motor can be detected with a simple configuration. At this time, if the signal output timings of the analog / digital converter and the comparator are shifted, the combined multiplication count value is corrected by the erroneous count correction circuit, so that a correct count value can be obtained.
発明を実施するための最良の形態について図面を参照しながら詳細に説明する。
エンコーダ1は、モータのロータの回転軸に固定されるスケール2を含み、モータ内に搭載されるエンコーダ基板3と、ケーブル4を介して接続されるドライバ5とを有する。
The best mode for carrying out the invention will be described in detail with reference to the drawings.
The
スケール2は、不透明な円盤にスリット列を設けた構成になっている。スリット列は、擬似正弦波を出力するために周方向にスリットが設けられている。スリットは、周方向に多数、例えば、1024個設けられた第1のスリット列と、周方向に1箇所だけ設けた第2のスリットを有する。第1のスリット列は、ロータの回転角度を検出するために用いられる。第2のスリットは、モータの回転回数を計測したり、エンコーダ1のカウント値をリセットしたりする際に使用される。なお、スケール2は、ガラス等の円盤に光を反射する部分と反射しない部分が周方向に等間隔に設けた構成でも良い。
The
エンコーダ基板3は、スケール2に近接して配置される光ピックアップ11を有する検出部である。光ピックアップ11の出力は、エンコーダ基板3に搭載された第1の差動A/D変換器12、第1のコンパレータ13、第2の差動A/D変換器14及び第2のコンパレータ15に接続されている。さらに、信号を送受信する際に使用するレベル変換回路16も実装されている。
The
光ピックアップ11は、透過型であれば発光素子と受光素子がスケール2のスリットを挟んで配置され、反射型であれば発光素子と受光素子がスケール2の同じ側に配置され、スケール2が回転したときに第1のスリット列に対応して周期的に変化するアナログ信号が出力される。この実施の形態では、アナログ信号として、擬似正弦波信号である擬似サイン波信号と、擬似サイン波信号に対して位相が1/4周期ずれた擬似正弦波信号である擬似コサイン波信号とを発生するように構成されている。光ピックアップ11は、基準電位に対する差動出力として擬似サイン波信号及び擬似コサイン波信号を出力する。具体的には、擬似サイン波信号は、基準電位からのプラス成分である擬似サインプラス信号Asin1と、基準電位からのマイナス成分である擬似サインマイナス信号Asin2として出力される。同様に、擬似サイン波信号は、基準電位からのプラス成分である擬似コサインプラス信号Acos1と、基準電位からのマイナス成分である擬似コサインマイナス信号Acos2として出力する。さらに、スケール2が一回転する度に第2のスリットに対応して1回出力されるインデックス信号Ixがレベル変換回路16に出力される。
If the
第1の差動A/D変換器12は、光ピックアップ11から出力される擬似サインプラス信号Asin1と擬似サインマイナス信号Asin2をA/D変換し、アナログの擬似サイン波信号をデジタル化した第1のデジタル信号Dsinをシリアル出力する。
第2の差動A/D変換器14は、光ピックアップ11から出力される擬似コサインプラス信号Acos1と擬似コサインマイナス信号Acos2をA/D変換し、アナログの擬似コサイン波信号をデジタル化した第2のデジタル信号Dcosをシリアル出力する。
各差動A/D変換器12,14には、レベル変換回路16から制御信号AD1及びクロック信号AD2が入力され、第1、第2のデジタル信号Dsin,Dcosが一定時間ごとに同期して出力されるようになっている。
The first differential A /
The second differential A /
Each of the differential A /
第1のコンパレータ13は、光ピックアップ11から出力される擬似サインプラス信号Asin1と擬似サインマイナス信号Asin2から擬似サイン波信号の符号変化信号Csinをシリアル出力する。符号変化信号Csinは、擬似サイン波信号が基準電位に対してプラス側の値であるか、マイナス側の値であるかを示す信号である。
第2のコンパレータ15は、光ピックアップ11から出力される擬似コサインプラス信号Acos1と擬似コサインマイナス信号Acos2から擬似サイン波信号の符号変化信号Ccosをシリアル出力する。符号変化信号Ccosは、擬似コサイン波信号が基準電位に対してプラス側の値であるか、マイナス側の値であるかを示す信号である。
The
The
レベル変換回路16は、各差動A/D変換器12,14及び各コンパレータ13,15からシリアル出力されるデジタル信号Dsin,Dcos,Csin,Ccosと、インデックス信号Ixが入力され、ケーブル4の信号線を通してドライバ5に出力するように構成されている。レベル変換回路16は、RS−422やLVDS(Low Voltage Differential Signaling)等に規格に則った差動信号に変換してケーブル4からデータをドライバ5に送信することで、耐ノイズ性を向上させている。また、ケーブル4を介してエンコーダ基板3の各回路に電力が供給される。
The
ここで、各差動A/D変換器12,14からデジタル信号を受け取るために必要な端子数は、2つである。同様に、各コンパレータ13,15から符号変化信号Csin,Ccosを受け取るために必要な端子数も2つである。これに制御信号AD1及びクロック信号AD2を出力する端子と、インデックス信号Ix用の端子を合わせてもレベル変換回路16のデータ入力に必要な端子数は7個で済む。これに対して、従来のA/D変換器のようにパラレル通信を行う場合、例えば、12ビットのデータ出力では12個の端子と、信号AD1,AD2,Ix用の3つの端子の合計15の端子が必要であった。
また、パラレル出力された12ビットのデータをケーブル4で送信する場合には、12本の信号線が必要であり、差動信号を使用する場合には12×2=24本の信号線が必要になる。これに対して、レベル変換回路16は、差動信号を使用する場合でも、4×2=8本の信号線で足りる。
Here, the number of terminals required for receiving digital signals from the differential A /
When transmitting 12-bit data output in parallel via the
ドライバ5は、レベル変換回路21と、逓倍部である逓倍専用IC22と、制御用のCPU(中央演算装置)23とを有する。
逓倍専用IC22は、エンコーダ基板3から出力された信号が入力されるインターフェイス回路31と、A/D変換したデジタル信号Dsin,Dcosを逓倍する第1の逓倍回路32と、符号変換信号Csin,Ccosから逓倍のパルス信号を作成してカウントアップ又はカウントダウンを行う第2の逓倍回路である2相エンコーダ用カウンタ33と、合成逓倍カウント値生成回路34と、誤カウントを補正する誤カウント補正回路35とを有する。
The
The multiplication-dedicated
合成逓倍カウント値生成回路34は、第1の逓倍回路32で生成した第1の逓倍カウント値と、2相エンコーダ用カウンタ33で生成した第2の逓倍カウント値とを合成して合成逓倍カウント値を生成する。
図2に示すように、誤カウント補正回路35は、補正前のカウント値が入力される引き算回路41及び補正回路42を有し、補正回路42で補正したカウント値を出力する構成になっている。補正したカウント値は、保存用レジスタ43に記憶され、必要に応じて引き算回路41に補正後のカウント値を入力可能になっている。引き算回路41の出力は、補正回路42の入力に接続されている。
The synthesized multiplication count
As shown in FIG. 2, the erroneous
次に、この実施の形態のエンコーダ1でモータの回転検出を行う処理について説明する。
モータのロータが回転すると、回転軸に固定されたスケール2が一緒に回転する。光学ピックアップ11の発光素子から出射された光は、スケール2を透過又は反射して受光素子に入力される。光学ピックアップ11からは、受光素子で受光した光の光量に応じてアナログ信号が出力される。アナログ信号は、擬似的な正弦波形になっており、スケール2や発光素子、受光素子の配置によって位相が90度ずれた第1の擬似信号と第2の擬似信号が出力される。以下、第1の擬似信号を擬似サイン波信号とし、第2の擬似信号を擬似コサイン波信号とする。この光学ピックアップ11は、基準電位からの差動信号を出力するように構成されているので、図3に示すように、擬似サイン波信号は、基準電位より電位が高い成分からなる擬似サインプラス信号Asin1と、基準電位より電位が低い成分からなる擬似サインマイナス信号Asin2とが出力される。同様に、擬似コサイン波信号は、基準電位より電位が高い成分からなる擬似コサインプラス信号Acos1と、基準電位より電位が低い成分からなる擬似コサインマイナス信号Acos2とが出力される。
Next, processing for detecting rotation of the motor by the
When the rotor of the motor rotates, the
擬似サインプラス信号Asin1及び擬似サインマイナス信号Asin2は、差動A/D変換器12と第1のコンパレータ13のそれぞれに入力される。差動A/D変換器12は、制御信号AD1の指令を受けて一定時間ごとに擬似サインプラス信号Asin1及び擬似サインマイナス信号Asin2をデジタル変換して第1のデジタル信号Dsinを作成し、レベル変換回路16にシリアル出力する。第1のデジタル信号Dsinを作成する頻度は、擬似正弦波の周波数以下の頻度で良い。
第1のコンパレータ13では、擬似サインプラス信号Asin1と擬似サインマイナス信号Asin2を比較して符号変化信号Csinを作成してシリアル出力する。この結果、図3に示すように、擬似サイン波信号の変化に応じてHighレベルとLowレベルが入れ替わるパルス信号になる。
The pseudo sine plus signal Asin1 and the pseudo sine minus signal Asin2 are input to the differential A /
The
擬似コサインプラス信号Acos1及び擬似コサインマイナス信号Acos2は、差動A/D変換器14と第2のコンパレータ15のそれぞれに入力される。差動A/D変換器14は、前記と同様に、制御信号AD1の指令を受けて一定時間ごとにアナログ信号をデジタル変換して第2のデジタル信号Dcosに作成し、レベル変換回路16にシリアル出力する。第2のデジタル信号Dcosは、第1のデジタル信号Dsinと同期して作成される。
第2のコンパレータ15では、擬似コサイン波信号についての符号変化信号Ccosを作成してシリアル出力する。この結果、図3に示すように、擬似コサイン波信号の変化に応じてHighレベルとLowレベルが入れ替わるパルス信号になる。符合変化信号Ccosは、符号変化信号Csinに対して擬似正弦波の周期で1/4周期ずれたパルス信号になる。
The pseudo cosine plus
The
各差動A/D変換器12,14及び各コンパレータ13,15から出力されたデジタル信号は、レベル変換回路16及びケーブル4を介してドライバ5に送信される。ドライバ5では、デジタル信号がレベル変換回路21から逓倍専用IC22に受け渡される。逓倍専用IC22は、CPU23の制御下でデータ処理を行う。
2相エンコーダカウンタ33は、符号変化信号Csin,Ccosの符号の変化を調べて符号の変化から回転方向を検出する。例えば、図3の符号変化信号Csin,Ccosのように、時間経過に従って擬似コサイン波信号についての符号変化信号Ccosと擬似サイン波信号についての符号変化信号Csinの信号レベルの組み合わせが(Hihg、High)の次に(Low,High)に切り替わるとき、つまり符号変化信号Ccosが符号変化信号Csinより先行して変化するときはモータが反時計回りしているとみなし、符号が切り替わるごとにカウントアップする。
Digital signals output from the differential A /
The two-phase encoder counter 33 checks the sign change of the sign change signals Csin and Ccos and detects the rotation direction from the sign change. For example, like the code change signals Csin and Ccos in FIG. 3, the combination of the signal level of the code change signal Ccos for the pseudo cosine wave signal and the code change signal Csin for the pseudo sine wave signal with the passage of time is (Hihg, High). Is switched to (Low, High), that is, when the sign change signal Ccos changes prior to the sign change signal Csin, the motor is considered to be counterclockwise and is counted up each time the sign is switched.
例えば、カウント開始時のカウント数が「n」であった場合、符号変化信号Csin,Ccosのいずれかの符号が変化する度に、「n+1」、「n+2」、「n+3」、「n+4」、「n+5」、「n+6」、「n+7」とカウントアップするような4逓倍カウント値が第2の逓倍カウント値として算出される。 For example, when the count number at the start of counting is “n”, every time the sign of the sign change signal Csin, Ccos changes, “n + 1”, “n + 2”, “n + 3”, “n + 4”, A quadruple count value that counts up as “n + 5”, “n + 6”, and “n + 7” is calculated as the second multiple count value.
さらに、第1の逓倍回路32は、擬似サイン波信号及び擬似コサイン波信号をA/D変換したデジタル信号Dsin,Dcosから第1の逓倍カウント値を算出する。第1の逓倍カウント値は、擬似正弦波の位相tan−1(第1のデジタル信号Dsinの値/第2のデジタル信号Dcos)から演算される。この実施の形態では、ラインL1に示すように、スケール2のスリットの数に対応して1024カウントまでカウントアップしてからリセットされるような信号になる。
Further, the
第1、第2の逓倍カウント値は、合成逓倍カウント値生成回路34において合成され、ラインL2に示すように、4逓倍のパルス信号で段階的にカウントアップした値(ラインL2a参照)に、1つのカウント値の間をリニアに補完するような合成逓倍カウント値が得られる。なお、合成逓倍カウント値の算出例として、この実施の形態では、第1の逓倍カウント値の下位8ビットの信号(ラインL3参照)に、第2の逓倍カウント値を256倍した値を加算している。
The first and second multiplied count values are synthesized by the synthesized multiplied count
一方、モータが逆回転したときは、図4に示すような擬似サイン波信号及び擬似コサイン波信号が得られる。このとき、符号変化信号Csin,Ccosの信号レベルの組み合わせは、符号変化信号Ccosに先行して符号変化信号Csinが変化する。ドライバ5は、モータが時計回りしているとみなし、符号が切り替わるごとにカウントダウンする。
例えば、カウント開始時のカウント数が「n」であった場合、符号変化信号Csin,Ccosのいずれかの符号が変化する度に、「n−1」、「n−2」、「n−3」、「n−4」、「n−5」、「n−6」、「n−7」とカウントダウンするような第2の逓倍カウント値が得られる。
On the other hand, when the motor rotates in reverse, a pseudo sine wave signal and a pseudo cosine wave signal as shown in FIG. 4 are obtained. At this time, the combination of the signal levels of the code change signals Csin and Ccos changes the code change signal Csin prior to the code change signal Ccos. The
For example, when the count number at the start of counting is “n”, every time the sign of the sign change signal Csin, Ccos changes, “n−1”, “n-2”, “n-3” ”,“ N−4 ”,“ n−5 ”,“ n−6 ”, and“ n−7 ”, the second multiplied count value is obtained.
第1の逓倍回路32は、デジタル信号Dsin,Dcosから擬似正弦波の位相tan−1を算出して第1の逓倍カウント値を生成する。ラインL4に示すように、スケール2のスリットの数に対応して1024カウントからカウントダウンしてカウント値がゼロになったらリセットされるような信号になる。合成逓倍カウント値生成回路34は、ラインL5に示すように、4逓倍の第2のカウント値で段階的にカウントダウンするときに(ラインL5a参照)、1つのカウント値の間をリニアに補完するような合成逓倍カウント値を生成する。この場合も第1の逓倍カウント値の下位8ビットの信号(ラインL6参照)に、第2の逓倍カウント値を256倍した値を加算している。
The
さらに、合成逓倍カウント値は、誤カウント補正回路35に入力され、誤カウントがあった場合には補正される。誤カウント補正回路35の処理を図5のフローチャートに示す。誤カウント補正回路35は、予め前回の合成逓倍カウント値を保存用レジスタ43に保存しておく(ステップS101)。今回の合成逓倍カウント値が新しく入力されたら、引き算回路41が前回の合成逓倍カウント値と、新しく入力された今回の合成逓倍カウント値の差を算出する(ステップS102)。引き算の結果は、補正回路42に入力される。補正回路42は、差が第2の逓倍カウント値である4逓倍カウント値の1.5カウント分より大きいときは(ステップS103でYes)、4逓倍カウント値を2カウント分減らす(ステップS104)。差が4逓倍カウント値の1.5カウント分より小さく(ステップS103でNo)、かつ4逓倍カウント値の0.5カウント分より大きいときは(ステップS105でYes)4逓倍カウント値を1カウント分減らす(ステップS106)。
Further, the combined multiplication count value is input to the erroneous
これに対して、差が4逓倍カウント値の−1.5カウント分より小さいときは(ステップS107でYes)、4逓倍カウント値を2カウント分増やす(ステップS108)。差が4逓倍カウント値の−1.5カウント分より大きく(ステップS107でNo)、かつ4逓倍カウント値の−0.5カウント分より小さいときは(ステップS109でYes)4逓倍カウント値を1カウント分増やす(ステップS110)。それ以外の場合は、カウント値を修正しない。つまり、今回の合成逓倍カウント値と、保存用レジスタ43に記憶されている前回の合成逓倍カウント値の差を調べ、差が第1の閾値(差がプラスマイナスのそれぞれについて1.5カウント分)を越えているか、差が第1の閾値から第2の閾値(差がプラスマイナスのそれぞれについて0.5カウント分)までの間にあるかによって、異なる補正値を選択する。
On the other hand, when the difference is less than −1.5 counts of the 4-fold count value (Yes in step S107), the 4-fold count value is increased by 2 counts (step S108). When the difference is larger than the -1.5 count of the quadruple count value (No in step S107) and smaller than the -0.5 count of the quadruple count value (Yes in step S109), the quadruple count value is set to 1. The count is increased (step S110). In other cases, the count value is not corrected. In other words, the difference between the current combined multiplication count value and the previous combined multiplication count value stored in the
ここで、前回の合成逓倍カウント値と今回の合成逓倍カウント値の差が4逓倍カウント値の0.5カウントより大きく、1.5カウント以下の場合(ステップS105でYesに相当)について、図6を参照して具体的に説明する。
符号変化信号Csin,Ccosは、本来であれば、一部破線で示すように、擬似コサイン波信号や擬似サイン波信号が基準電位とクロスする位置で符号が切り替わる筈であるが、アナログ式の第1、第2のコンパレータ13,15のクロス点の検出タイミングと、A/D変換のサンプルホールドタイミングとに回路の遅延等によって誤差が生じることがある。例えば、実線で示す符号変化信号Csin,Ccosのように実際のクロス点より手前のタイミングで符号変化が生じたとみなされたときは、ラインL2に示すように、対応する位置のカウント値が不連続に大きくなる。第2の逓倍カウント値である4逓倍カウント値がラインL2aに示すように早いタイミングで「n+2」にカウントアップされ、これに第1の逓倍カウント値を加算した値が大きくなってしまうからである。
そこで、この場合には、ステップS106で4逓倍カウント値を1カウント分減らして合成逓倍カウント値を演算すれば、一部を破線で示すラインL7に示すように、連続したカウント値が得られるようになる。
Here, when the difference between the previous combined multiplied count value and the current combined multiplied count value is larger than 0.5 count of the 4 multiplied count value and not more than 1.5 count (corresponding to Yes in step S105), FIG. It demonstrates concretely with reference to.
The sign change signals Csin and Ccos are supposed to change in sign at a position where the pseudo cosine wave signal or the pseudo sine wave signal crosses the reference potential as shown in part by broken lines. An error may occur between the detection timing of the cross point of the first and
Therefore, in this case, if the combined multiplied count value is calculated by reducing the multiplied count value by one count in step S106, a continuous count value can be obtained as indicated by a line L7 partially shown by a broken line. become.
また、第2の逓倍カウント値で「n+4」から「n+5」にカウントアップするときのように実際のクロス点より遅れて符号変化が生じたとみなされたときは、ラインL2に示すように、対応する位置のカウント値が不連続に小さくなる。第2の逓倍カウント値である4逓倍カウント値がラインL2aに示すように遅れたタイミングで「n+5」にカウントアップされ、これに第1の逓倍カウント値を加算した値が小さくなってしまうからである。
そこで、この場合には、ステップS110で4逓倍カウント値を1カウント分増やして合成逓倍カウント値を演算すれば、一部を破線で示すラインL7に示すように、連続したカウント値が得られるようになる。
Also, when it is considered that the sign change has occurred behind the actual cross point, such as when counting up from “n + 4” to “n + 5” with the second multiplication count value, as shown in line L2, The count value at the position to be reduced becomes discontinuously small. The quadruple count value, which is the second multiple count value, is counted up to “n + 5” at a delayed timing as shown by the line L2a, and the value obtained by adding the first multiple count value to this becomes small. is there.
Therefore, in this case, if the combined multiplication count value is calculated by increasing the quadruple count value by one count in step S110, a continuous count value can be obtained as indicated by a line L7 partially shown by a broken line. become.
この実施の形態では、逓倍専用IC22をドライバ5側に搭載したので、モータ内に収容されるエンコーダ基板3に大型のICを搭載する必要がなくなり、エンコーダ基板3を小型化できる。
シリアル出力するA/D変換器12,14を使用したので、A/D変換器12,14とレベル変換回路16の間の信号ラインの数を削減でき、エンコーダ基板3を小型化できる。A/D変換器12,14を高速処理を行うタイプに比べて小型化できることもエンコーダ基板3の小型化に貢献する。シリアル出力を使用することでケーブル4に必要な信号線の数を減らせるのでケーブル4を細くできる。ケーブル4の信号線が減ることで、ケーブル4をエンコーダ基板3に接続するためのコネクタも小さくでき、エンコーダ基板3をさらに小型化できる。
シリアル出力するA/D変換器12,14では、データ変換の頻度が擬似正弦波の符号変化の頻度を下回ることがあるが、符号の変化はコンパレータ13,14の出力から判定できるので、第2の逓倍カウント値をベースにA/D変換したときのカウント値を加算すれば正確なカウント値が得られる。このため、A/D変換器12,14のデータ変換の頻度が少なくてもモータの回転検出を確実に行える。
In this embodiment, since the multiplication-dedicated
Since the serial output A /
In the A /
また、この実施の形態では、誤カウント補正回路35が合成逓倍カウント値の前回値と今回値を比較し、その差が所定値以上であるときにカウント異常と判断して補正を行うようにしたので誤カウントが防止される。例えば、1回転の分解能が20ビットのモータ用エンコーダでサンプリング周期が50μ秒のとき、合成逓倍カウント値で128の変化は回転数100rpmに相当するが、実際のモータではこのような回転数変化はあり得ない。したがって、カウント値の差が128(第2の逓倍カウント値の0・5カウントに相当)を越えたら、256(第2の逓倍カウント値の1カウントに相当)を減算すれば、正しいカウント値に修正することができる。
Further, in this embodiment, the erroneous
なお、本発明は、前記の実施の形態に限定されずに広く応用することができる。
例えば、光学ピックアップ11の出力信号や、ケーブル4を介して送受信するデータは、差動出力を用いなくても良い。
光学ピックアップ11は一種類のアナログ信号を出力し、これに基づいて回転検出のカウント値を生成しても良い。
第1の閾値と第2の閾値の値は、1.5カウント、0.5カウントに限定されない第2の逓倍カウント値の1カウント分、2カウント分のずれを補正するのに適した値であれば良い。
Note that the present invention can be widely applied without being limited to the above-described embodiment.
For example, the output signal of the
The
The values of the first threshold value and the second threshold value are values suitable for correcting a shift of 1 count by 2 counts of the second multiplied count value not limited to 1.5 counts and 0.5 counts. I just need it.
1 モータ用エンコーダ
2 スケール
3 エンコーダ基板(検出部)
4 ケーブル
5 ドライバ
11 光学ピックアップ
12 第1の差動A/D変換器
13 第1のコンパレータ
14 第2の差動A/D変換器
15 第2のコンパレータ
16,21 レベル変換回路
22 逓倍専用IC(逓倍部)
23 CPU
32 第1の逓倍回路
33 2相エンコーダ用カウンタ(第2の逓倍回路)
34 合成逓倍カウント値生成回路
35 誤カウント補正回路
41 引き算回路
42 補正回路
43 エンコーダ値保存用レジスタ
1
4
23 CPU
32 First multiplication circuit 33 Counter for two-phase encoder (second multiplication circuit)
34 Composite Multiplication Count
Claims (5)
前記モータの回転に伴って擬似正弦波状のアナログ信号を出力するピックアップと、
前記ピックアップから出力されるアナログ信号をデジタル信号に変換してシリアル出力するアナログ/デジタル変換器と、基準電位に対するアナログ信号の符号変化に伴って信号レベルが切り替わるパルス状の符号変化信号を生成するコンパレータと、前記アナログ/デジタル変換器及び前記コンパレータから出力されるデジタル信号を受け取って、逓倍処理する逓倍部とを有し、
前記逓倍部は、前記アナログ/デジタル変換器から出力されるデジタル信号から第1の逓倍カウント値を算出する第1の逓倍回路と、前記コンパレータから出力される符号変化信号の符号変化をカウントして第2の逓倍カウント値を生成する第2の逓倍回路と、第1の逓倍カウント値と第2の逓倍カウント値を合成して合成逓倍カウント値を生成する合成回路と、前回の合成逓倍カウント値と今回の合成逓倍カウント値の差の大きさが所定の値以上になったらカウント値のずれを補正する誤カウント補正回路を有することを特徴とするモータ用エンコーダ。 A motor encoder having a detection unit attached to a motor and a driver disposed outside the motor and connected to the detection unit so as to be able to perform data communication,
A pickup that outputs a pseudo sine wave analog signal as the motor rotates,
An analog / digital converter that converts an analog signal output from the pickup into a digital signal and serially outputs the comparator, and a comparator that generates a pulse-like code change signal whose signal level is switched in accordance with a change in the sign of the analog signal relative to a reference potential And a multiplier for receiving and multiplying the digital signals output from the analog / digital converter and the comparator,
The multiplication unit counts a sign change of a sign change signal output from a first multiplication circuit that calculates a first multiplication count value from a digital signal output from the analog / digital converter and a comparator. A second multiplication circuit for generating a second multiplied count value; a combining circuit for combining the first multiplied count value and the second multiplied count value to generate a combined multiplied count value; and a previous combined multiplied count value. And an erroneous count correction circuit that corrects the deviation of the count value when the difference between the current and the combined multiplication count value exceeds a predetermined value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007101908A JP2008256657A (en) | 2007-04-09 | 2007-04-09 | Encoder for motor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007101908A JP2008256657A (en) | 2007-04-09 | 2007-04-09 | Encoder for motor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008256657A true JP2008256657A (en) | 2008-10-23 |
Family
ID=39980355
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007101908A Withdrawn JP2008256657A (en) | 2007-04-09 | 2007-04-09 | Encoder for motor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008256657A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014057533A1 (en) * | 2012-10-09 | 2014-04-17 | 株式会社安川電機 | Overload detector, servo system, and converter |
WO2020149002A1 (en) * | 2019-01-18 | 2020-07-23 | パナソニックIpマネジメント株式会社 | Motor control device |
-
2007
- 2007-04-09 JP JP2007101908A patent/JP2008256657A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014057533A1 (en) * | 2012-10-09 | 2014-04-17 | 株式会社安川電機 | Overload detector, servo system, and converter |
WO2020149002A1 (en) * | 2019-01-18 | 2020-07-23 | パナソニックIpマネジメント株式会社 | Motor control device |
CN113316892A (en) * | 2019-01-18 | 2021-08-27 | 松下知识产权经营株式会社 | Motor control device |
US20220085696A1 (en) * | 2019-01-18 | 2022-03-17 | Panasonic Intellectual Property Management Co., Ltd. | Motor control device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5221494B2 (en) | Rotation detection device and bearing with rotation detection device | |
US9481394B2 (en) | Angle detection apparatus, motor having the angle detection apparatus, torque sensor, electric power steering apparatus, and vehicle | |
JP4875889B2 (en) | Encoder count error detection circuit and encoder count error detection method | |
JP5341714B2 (en) | Phase difference type resolver | |
JP4835606B2 (en) | Rotating body phase / speed detector | |
CN107860404B (en) | Rotary encoder and absolute angle position detection method for rotary encoder | |
JP2009080058A (en) | Rotation detector and bearing with rotation detector | |
JP2008256657A (en) | Encoder for motor | |
US20050090998A1 (en) | Sensor signal processor | |
US9134143B2 (en) | Absolute position detector with abnormality detection function | |
JP4782434B2 (en) | Rotation detection device signal processing device | |
JP2008256656A (en) | Encoder for motor | |
JPH074990A (en) | Method for detecting absolute position in encoder apparatus | |
JP2009244022A (en) | Phase detection circuit | |
JP2003130686A (en) | Device for detecting position | |
JP3365913B2 (en) | Position detection device | |
JP3118816B2 (en) | Multi-rotation detection rotary encoder | |
JP3708093B2 (en) | R / D converter used for motor servo control system and motor speed control | |
JP2010014410A (en) | Rotational position detecting apparatus of rotator | |
JP2580714B2 (en) | Composite rotary encoder | |
JP2008241639A (en) | Rotary encoder and brushless motor | |
JP2008298745A (en) | Rotation detecting device using resolver | |
JP2008076382A (en) | Serial encoder data conversion circuit, and servo drive system | |
JP5097012B2 (en) | Encoder signal processing circuit | |
JP2006177806A (en) | Rotation detecting device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20100706 |