JP2008096333A - Encoder controller - Google Patents
Encoder controller Download PDFInfo
- Publication number
- JP2008096333A JP2008096333A JP2006279667A JP2006279667A JP2008096333A JP 2008096333 A JP2008096333 A JP 2008096333A JP 2006279667 A JP2006279667 A JP 2006279667A JP 2006279667 A JP2006279667 A JP 2006279667A JP 2008096333 A JP2008096333 A JP 2008096333A
- Authority
- JP
- Japan
- Prior art keywords
- pulse width
- light
- unit
- emitting element
- pulse
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、光学式のエンコーダ制御装置に関するものである。 The present invention relates to an optical encoder control device.
光学式エンコーダはモータの回転検出等に非常に幅広く使われている。例えば図7に示すように、円形のパルス板1の円周上に光透過部2と遮光部3を等間隔に形成し、発光素子4と受光素子5の間に位置させる。
Optical encoders are very widely used for motor rotation detection. For example, as shown in FIG. 7, the
発光素子4から発した光が光透過部2を通って受光素子5に入射し、光電変換された信号が出力される。このときの出力波形は図8に示す正弦波となり、この出力波形を所定の閾値でコンパレートした信号がパルス信号として検出される。しかし、従来例においては、発光素子4に常時一定の電圧を印加しているため、電流が流れ続けており、消費電力が大きいという課題を有している。
The light emitted from the
この不具合を解決するため、例えば特許文献1においては、発光素子をPWM駆動(間欠駆動)し、出力をローパスフィルタで受けることにより消費電力の低減を図っている。また特許文献2においては、受光素子にフォトICを用い、増大する消費電力を受光素子をPWM駆動することにより低減している。
In order to solve this problem, for example, in
しかし、上述の特許文献1、2に開示されているようなPWM駆動では、発光素子又は受光素子の電源がオフの間にパルスのエッジに至る確率が高く、必ずしも正確な検出結果が得られない。また、消費電力を下げるために、PWMのデューティ比を変えてオンの時間をオフの時間よりも短くすると、検出誤差が大きくなるという問題がある。
However, in the PWM drive as disclosed in
本発明の目的は、上述の課題を解消し、低消費電力で正確な検出ができるエンコーダ制御装置を提供することにある。 An object of the present invention is to provide an encoder control apparatus that solves the above-described problems and can perform accurate detection with low power consumption.
上記目的を達成するための本発明に係るエンコーダ制御装置の技術的特徴は、発光素子と相対移動する遮光部を介して前記発光素子からの光を間欠的に受光する受光素子と、該受光素子からの出力パルスの立ち上がり、立ち下りエッジをそれぞれ検出するエッジ検出部とを有し、該エッジ検出部のエッジ検出不要時間中は前記発光素子への給電を停止するエンコーダ制御装置において、前記立ち上がりエッジと前記立ち下がりエッジの間の時間をパルス幅として測定するパルス幅測定部と、次のパルス幅を予測するパルス幅予測部とを備えたことにある。 In order to achieve the above object, the technical feature of the encoder control device according to the present invention is that a light receiving element that intermittently receives light from the light emitting element via a light blocking portion that moves relative to the light emitting element, and the light receiving element An rising edge and an edge detector for detecting rising and falling edges of the output pulse, and stopping the power supply to the light emitting element during an edge detection unnecessary time of the edge detector. And a pulse width measuring unit that measures the time between the falling edges as a pulse width and a pulse width predicting unit that predicts the next pulse width.
本発明に係るエンコーダ制御装置によれば、発光素子の光が受光素子に入力しないと予測される時間には、発光素子への給電を停止するので、受光側に特別な検出方法を用いることなく、発光素子の消費電力を略半減することができる。 According to the encoder control device of the present invention, since power to the light emitting element is stopped at a time when light from the light emitting element is predicted not to be input to the light receiving element, a special detection method is not used on the light receiving side. Thus, the power consumption of the light emitting element can be substantially halved.
本発明を図示の実施例に基づいて詳細に説明する。 The present invention will be described in detail based on the embodiments shown in the drawings.
図1は実施例1の概略のブロック回路構成図を示している。発光素子11と受光素子12はトランジスタから成るスイッチング素子13を介して電源14に接続されている。受光素子12の出力は比較器15、入力ポート16aを介して制御手段16に接続され、制御手段16の出力は出力ポート16bを介してスイッチング素子13に接続されている。
FIG. 1 is a schematic block circuit configuration diagram of the first embodiment. The
発光素子11と受光素子12の間には、図2に示すパルス板21が介在されている。パルス板21には、光透過部22と遮光部23が等間隔に交互に形成されており、このパルス板21が回転することにより、受光素子12から出力信号として正弦波が得られる。
A
受光素子12の出力信号は比較器15によりオン/オフのデジタル信号に変換され、入力ポート16aを介して制御手段16に入力される。制御手段16は入力ポート16aに入力された信号を基にスイッチング素子13への制御信号を生成し、出力ポート16bを介してスイッチング素子13に出力する。スイッチング素子13は制御信号に同期してオン/オフし、発光素子11及び受光素子12には電源14からの電力が間欠的に供給される。
The output signal of the
図3は制御手段16の内部構造を表すブロック回路構成図である。受光素子12の出力を入力する入力ポート16aは、エッジ検出部31を介してパルス幅測定部32、エラー判定部33にそれぞれ接続されている。パルス幅測定部32の出力は、記憶部34、比較部35、制御信号生成部36にそれぞれ接続されている。記憶部34の出力はパルス幅予測部37を経て、制御信号生成部36に接続され、パルス幅予測部37の出力の一部は比較部35に接続されている。また、比較部35の出力は制御信号生成部36に接続されている。
FIG. 3 is a block circuit configuration diagram showing the internal structure of the control means 16. The
エラー判定部33の出力は制御信号生成部36と計数部38に接続され、更に計数部38の出力は制御信号生成部36に接続されている。そして、制御信号生成部36の出力は出力ポート16bを介してスイッチング素子13に接続されている。
The output of the
制御手段16の入力ポート16aに入力された比較器15からの信号は、エッジ検出部31により立ち上がり/立ち下りエッジが検出される。ここでは、以降の説明を簡明にするため、光束が受光素子12に入射すると立ち上がりエッジが検出され、遮光されると立ち下がりエッジが検出されることとし、立ち上がりエッジから立ち下がりエッジ間のパルスを明パルスと呼ぶ。同様に、立ち下がりエッジから立ち上がりエッジ間のパルスを暗パルスと呼ぶことにする。
The rising / falling edge of the signal from the
パルス幅測定部32により明パルス、暗パルスのそれぞれのパルス幅が測定され、測定されたパルス幅は記憶部34に蓄積される。そして、パルス幅予測部37は記憶部34に記憶されたパルス幅の履歴を基に、次の暗パルスのパルス幅を予測する。この際に、明パルスと暗パルスの両方のパルス幅の履歴を基に、次の暗パルスのパルス幅を予測してもよいし、暗パルスの履歴のみを基に、次の暗パルスのパルス幅を予測してもよい。これにより、パルス幅の正確な予測が可能となる。
The pulse
そして、パルス幅予測部37において予測されたパルス幅は、制御信号生成部36で所定の値が乗ぜられ、エッジ検出不要時間として算出される。ここで所定の値とは1以下の定数であり、パルス幅予測部37で予測したパルス幅よりも所定の割合だけ短い時間をエッジ検出不要時間として算出する。
The pulse width predicted by the pulse
また、その値は不変の定数でもよいし、後述するようにパルスの状態等によって可変であってもよい。そして、エッジ検出不要時間中は出力ポート16bの出力はオフとなり、発光素子11及び受光素子12への給電を停止する。
Further, the value may be an invariant constant, or may be variable depending on the state of the pulse as described later. During the edge detection unnecessary time, the output of the
なお、パルス幅予測部37における予測結果は常に正しいとは限らないので、常に予測結果が妥当であるか否かを検証し、妥当でなければ補正する手段が必要である。
Note that since the prediction result in the pulse
その第1の手段として、パルス幅予測部37の予測結果と、パルス幅測定部32により実際に測定された結果を比較部35で比較する。そして、予測結果が測定結果よりも所定の割合以上に大きければ、制御信号生成部36によりパルス幅予測結果に乗ずる所定の値を小さくし、予測結果が測定結果よりも所定の割合以上に小さければ所定の値を大きくする。これにより、より正確なパルス検出が可能となる。
As a first means, the comparison result is compared between the prediction result of the pulse
また、第2の手段としてエラー判定部33によりエッジ検出部31の検出結果が予測値と異なると判定された時には、少なくとも次の1周期間は発光素子11への通電を継続する。例えば、今回は立ち上がりエッジが検出されるはずなのに、立ち下がりエッジが検出された場合には、予測結果に基づくエッジ検出不要時間が長過ぎたので、次の1周期間パルス幅の測定をし直し、パルス幅予測をリセットする動作を行う。この動作については実施例2において更に詳しく説明する。
Further, as a second means, when the
第3の手段として、エラー判定部33によりエラーと判定された回数を計数部38で計数し、その結果が所定回数を上回ると、制御信号生成部36においてパルス幅予測結果に乗ずる所定値を小さくする。このように、エッジ検出不要時間の算出誤りをエラーとして計数し、エラーが多い時には予測精度を変更するため、より正確なパルス検出が可能となる。
As a third means, the number of times determined as an error by the
更に第4の手段として、パルス幅測定部32におけるパルス幅測定結果が所定のパルス幅より小さくなった場合は、制御信号生成部36におけるエッジ検出不要時間を0とし、発光素子11への給電を継続する。これは、パルスが高速になった際の制御手段16の反応遅れや予測誤差を考慮し、パルスが高速になり過ぎた場合は発光素子11への給電を継続することで測定精度を保つための動作である。そのため、制御手段16により高速制御が可能なマイクロコントローラを用いたり、パルスがそれほど高速にならないような検出系では用いなくてもよい。これにより、高速パルスに対する検出精度の劣化を限定できる。
Further, as a fourth means, when the pulse width measurement result in the pulse
図4は本実施例1におけるタイミングチャート図である。(a)はパルス板21による光の透過、遮断の様子を示しており、光が透過する場合をH、遮断される場合をLで示している。(b)は発光素子11に給電する端子電圧を示し、これは制御手段16からスイッチング素子13に与えられる制御信号と同期している。(c)は入力ポート16aから制御手段16に入力する検出パルスを示している。
FIG. 4 is a timing chart in the first embodiment. (A) shows how light is transmitted and blocked by the
パルス板21による図示しない例えばDCモータ等の動作検出対象の駆動を開始することに同期して、制御手段16の出力によりスイッチング素子13がオンとなり、発光素子11に電源電圧が印加される。図4(a)中の最初のエッジが立ち上がるまでの時間は予測不能なので通電を継続する。その後の数エッジ間は、パルス速度が非常に遅く予測も困難であるため、パルス幅の履歴を記憶するだけで発光素子11への給電を継続する。
In synchronization with the start of driving of an operation detection target such as a DC motor (not shown) by the
なお、ここでは最初の4エッジ分は給電を継続しているが、これに限定されるものではなく、条件によっては更に短くしてもよい。その後は制御手段16で算出されたエッジ検出不要時間に従って、スイッチング素子13がオフされ、暗パルスのパルス幅よりも短い時間だけ、発光素子11及び受光素子12への給電を停止する。
Here, the power supply is continued for the first four edges, but the present invention is not limited to this and may be further shortened depending on conditions. Thereafter, the switching
図5は本実施例2におけるタイミングチャート図である。この実施例2では、主にパルスのエッジが検出されると、予測される時間以外は発光素子11への給電を停止し、更なる消費電力を節減する。基本的な構成は実施例1と同様であり、実施例1との相違点は、実施例1においては暗パルスの時間のみ発光素子11への給電を停止していたが、本実施例2においては明パルスの時間内においても発光素子11への給電を停止する。
FIG. 5 is a timing chart in the second embodiment. In the second embodiment, when a pulse edge is mainly detected, power supply to the
制御手段16で算出されたエッジ検出不要時間に従って、スイッチング素子13がオフされ、明パルス及び暗パルスのパルス幅よりも短い時間だけ発光素子11及び受光素子12への給電が停止する。これにより、パルスのエッジが検出されると予測される時間以外は、発光素子11への給電を停止するので、発光素子11の消費電力を大幅に低減することができる。
According to the edge detection unnecessary time calculated by the control means 16, the switching
図6は制御手段16のエラー判定部33において、エラーと判定された場合の動作のタイミングチャート図である。明時間のエッジ検出不要時間として算出された時間だけ、発光素子11への給電を停止し、再び給電を開始した際に、本来の予測が正しければ明状態のはずのパルス板21が暗状態になっているような場合にエラーと判定される。
FIG. 6 is a timing chart of the operation when the
この場合は、検出パルスは発光素子11への給電を再開した時点で、立ち下がりエッジを出力するため本来のパルス幅よりも長いパルス幅を検出してしまう。そのため、次のパルス幅の予測に不正確な値を用いることになってしまうので、少なくとも次の1周期間は発光素子11への給電を継続し、正確なパルス幅を測定し直してから予測を行うようにする。
In this case, the detection pulse detects a pulse width longer than the original pulse width in order to output a falling edge when power supply to the
このように、発光素子11への給電を回復した時のエンコーダ出力が、予測値と違っていた場合はエッジ検出不要時間の算出が誤っていたと判断する。そして、次の1周期間は発光素子11への給電を継続してパルスを補正することにより、より正確なパルス検出が可能となる。
Thus, when the encoder output when power supply to the
以上の説明では、本発明の好ましい実施例について述べたが、本発明はこれらの実施例に限定されないことは云うまでもなく、その要旨の範囲内で種々の変形及び変更が可能である。 In the above description, preferred embodiments of the present invention have been described. However, it goes without saying that the present invention is not limited to these embodiments, and various modifications and changes can be made within the scope of the present invention.
11 発光素子
12 受光素子
13 スイッチング素子
14 電源
15 比較器
16 制御手段
16a 入力ポート
16b 出力ポート
21 パルス板
22 光透過部
23 遮光部
31 エッジ検出部
32 パルス幅測定部
33 エラー判定部
34 記憶部
35 比較部
36 制御信号生成部
37 パルス幅予測部
38 計数部
DESCRIPTION OF
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006279667A JP2008096333A (en) | 2006-10-13 | 2006-10-13 | Encoder controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006279667A JP2008096333A (en) | 2006-10-13 | 2006-10-13 | Encoder controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008096333A true JP2008096333A (en) | 2008-04-24 |
Family
ID=39379319
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006279667A Pending JP2008096333A (en) | 2006-10-13 | 2006-10-13 | Encoder controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008096333A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104965099A (en) * | 2015-06-30 | 2015-10-07 | 深圳乐行天下科技有限公司 | Velocity measurement method and device |
-
2006
- 2006-10-13 JP JP2006279667A patent/JP2008096333A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104965099A (en) * | 2015-06-30 | 2015-10-07 | 深圳乐行天下科技有限公司 | Velocity measurement method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10686994B2 (en) | Imaging device, and solid-state imaging element used for same | |
JP2003243694A (en) | Method and device for detecting single photon | |
US4965502A (en) | Drive controlling apparatus | |
US7802030B2 (en) | Interrupt generation circuit for intermediate response to edge detection signal, when count value of main timer is less than pre-stored value | |
KR100719110B1 (en) | Controller apparatus to acquire the encoder speed information and method thereof | |
KR101431973B1 (en) | Apparatus and method detecting ZCP(zero crossing point) of back EMF(electromotive force) in motor driving circuit | |
KR0185465B1 (en) | Absolute encoder and method of generating its current position | |
JP2008096333A (en) | Encoder controller | |
JP6950276B2 (en) | Distance measuring device | |
JP6289192B2 (en) | POSITION DETECTION DEVICE, LENS DEVICE HAVING SAME, AND OPTICAL OPERATING DEVICE | |
JP6484954B2 (en) | Motor control device, motor control system, motor control method, and motor control program | |
US7504611B2 (en) | Moving object detecting photointerrupter and electronic device using the same | |
JP2009244877A (en) | Optical apparatus | |
US20150015172A1 (en) | Motor controller | |
US6794840B2 (en) | Motor control method and motor control apparatus | |
CN113777587A (en) | Time-of-flight ranging sensor including histogram state monitoring device and method thereof | |
JP2004053250A (en) | Emission timing detecting method, emission timing detecting apparatus, and rangefinder | |
JP2010041462A (en) | Photoelectric switch | |
US20140062357A1 (en) | Motor driving apparatus and operating method thereof | |
US20220334233A1 (en) | Distance measurement device and control method of same | |
JP2002145552A (en) | Safety device for elevator | |
KR20130134108A (en) | Detector for duty of signal and driving apparatus for motor having the same | |
JP3372328B2 (en) | Photoelectric sensor | |
JP2006029996A (en) | Encoder counter | |
JP4518872B2 (en) | Lens driving device, moving body driving device, and reference position detection method |