Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7534263B2 - Detection circuit and detection device - Google Patents
[go: Go Back, main page]

JP7534263B2 - Detection circuit and detection device - Google Patents

Detection circuit and detection device Download PDF

Info

Publication number
JP7534263B2
JP7534263B2 JP2021091362A JP2021091362A JP7534263B2 JP 7534263 B2 JP7534263 B2 JP 7534263B2 JP 2021091362 A JP2021091362 A JP 2021091362A JP 2021091362 A JP2021091362 A JP 2021091362A JP 7534263 B2 JP7534263 B2 JP 7534263B2
Authority
JP
Japan
Prior art keywords
signal
unit
movement
input
output
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
JP2021091362A
Other languages
Japanese (ja)
Other versions
JP2022183859A (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.)
TDK Corp
Original Assignee
TDK Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TDK Corp filed Critical TDK Corp
Priority to JP2021091362A priority Critical patent/JP7534263B2/en
Publication of JP2022183859A publication Critical patent/JP2022183859A/en
Application granted granted Critical
Publication of JP7534263B2 publication Critical patent/JP7534263B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Description

本発明は、検出回路及び検出装置に関する。 The present invention relates to a detection circuit and a detection device.

従来から、移動体の移動をホール素子によって検出し、ホール素子の出力信号に基づいて、移動体の移動(移動量)や移動体の移動の向きを検出する検出装置が知られている(たとえば、特許文献1参照)。 Conventionally, there are known detection devices that detect the movement of a moving object using a Hall element, and detect the movement (amount of movement) and direction of the moving object based on the output signal of the Hall element (see, for example, Patent Document 1).

特開2008-76591号公報JP 2008-76591 A

検出装置では、ホール素子の2相の出力信号(パルス信号)を制御装置(コンピュータ等)に入力し、制御装置において移動体の移動等を検出している。ここで、移動体の移動が速くなると、出力信号の周波数が高くなる(周期が短くなる)ため、出力信号のパルス幅が小さくなる。この場合において、たとえば、制御装置において割り込み処理等が発生すると、出力信号を正確に取得できなくなるおそれがある。この場合、移動体の向きの検出ができなくなる。移動体の向きの検出ができない場合、その移動区間は無視(除外)されるため、移動体の移動量に誤差が生じ得る。このような不具合の発生を回避するために、制御装置の処理能力を向上させることが考えられる。しかしながら、この構成では、構成が複雑化したり、コストが増大したりする。 In the detection device, the two-phase output signal (pulse signal) of the Hall element is input to a control device (computer, etc.), and the control device detects the movement of the moving object, etc. Here, when the movement of the moving object becomes faster, the frequency of the output signal becomes higher (the period becomes shorter), and the pulse width of the output signal becomes smaller. In this case, for example, if an interrupt process occurs in the control device, the output signal may not be acquired accurately. In this case, the direction of the moving object cannot be detected. If the direction of the moving object cannot be detected, that movement section is ignored (excluded), and an error may occur in the amount of movement of the moving object. In order to avoid such problems, it is possible to improve the processing power of the control device. However, this configuration makes the configuration complicated and increases costs.

本発明の一側面は、簡易な構成で移動体の移動を精度良く検出することができる検出回路及び検出装置を提供することを目的とする。 One aspect of the present invention aims to provide a detection circuit and detection device that can accurately detect the movement of a moving object with a simple configuration.

本発明の一側面に係る検出回路は、移動体の移動及び当該移動体の移動の向きを検出する検出回路であって、移動体の移動に係る信号を入力する入力部と、入力部によって入力された信号において、入力部に第一時刻に入力される信号を第一信号とした場合、第一時刻よりも一時刻前の第二時刻に入力された第二信号と、第二時刻よりも一時刻前の第三時刻に入力された第三信号と、を保持する保持部と、第一信号と第二信号とに基づいてクロック信号を生成する生成部と、移動体の移動に係る移動信号、及び、移動体の移動の方向に係る方向信号を出力する出力部と、を備え、保持部は、生成部において生成されたクロック信号に基づいて、第二信号及び第三信号を取得して保持し、出力部は、第二信号及び第三信号に基づいて移動体の向きを判定する判定部と、生成部において生成されたクロック信号に基づいて移動体の移動を検出する検出部と、を有する。 A detection circuit according to one aspect of the present invention is a detection circuit that detects the movement of a moving body and the direction of the movement of the moving body, and includes an input unit that inputs a signal related to the movement of the moving body, a holding unit that holds a second signal input at a second time one time before the first time and a third signal input at a third time one time before the second time, where the signal input by the input unit is a signal input to the input unit at a first time, a generation unit that generates a clock signal based on the first signal and the second signal, and an output unit that outputs a movement signal related to the movement of the moving body and a direction signal related to the direction of the movement of the moving body, and the holding unit acquires and holds the second signal and the third signal based on the clock signal generated by the generation unit, and the output unit has a determination unit that determines the direction of the moving body based on the second signal and the third signal, and a detection unit that detects the movement of the moving body based on the clock signal generated by the generation unit.

本発明の一側面に係る検出回路では、上記回路構成によって、移動体の移動に係る移動信号、及び、移動体の移動の方向に係る方向信号を出力する。そのため、検出回路では、移動体の移動が速い場合であっても、割り込み処理等によって信号が取得できなくなるといった事態を回避できる。また、高性能な制御装置を必要としない。そのため、検出回路では、簡易な構成で移動体の移動を精度良く検出することができる。 In a detection circuit according to one aspect of the present invention, the above circuit configuration outputs a movement signal related to the movement of the moving body and a direction signal related to the direction of movement of the moving body. Therefore, even if the moving body is moving fast, the detection circuit can avoid a situation where the signal cannot be acquired due to interrupt processing, etc. Furthermore, a high-performance control device is not required. Therefore, the detection circuit can accurately detect the movement of the moving body with a simple configuration.

一実施形態においては、判定部は、方向信号を入力し、方向信号を平滑化して出力する平滑部を有していてもよい。この構成では、方向信号にグリッチノイズが含まれている場合に、グリッチノイズを低減させることができる。 In one embodiment, the determination unit may have a smoothing unit that receives the direction signal, smooths the direction signal, and outputs the smoothed direction signal. In this configuration, when the direction signal contains glitch noise, the glitch noise can be reduced.

一実施形態においては、生成部は、クロック信号を遅延させる遅延部を有していてもよい。クロック信号のパル幅が狭い場合、クロック信号に基づいて動作する保持部及び検出部において誤動作が生じるおそれがある。この構成では、遅延部によって、クロック信号のパルス幅を広くすることができる。そのため、上記誤動作が生じることを回避することができる。 In one embodiment, the generating unit may have a delay unit that delays the clock signal. If the pulse width of the clock signal is narrow, there is a risk of malfunction occurring in the holding unit and the detecting unit that operate based on the clock signal. In this configuration, the delay unit can widen the pulse width of the clock signal. This makes it possible to avoid the above-mentioned malfunction occurring.

一実施形態においては、出力部は、移動信号及び方向信号を所定の信号に変換する変換部を有していてもよい。この構成では、移動信号及び方向信号を用いて処理する制御装置において、制御装置の処理に適した信号とすることができる。 In one embodiment, the output unit may have a conversion unit that converts the movement signal and the direction signal into a predetermined signal. In this configuration, in a control device that processes using the movement signal and the direction signal, the signal can be made suitable for processing by the control device.

一実施形態においては、検出部は、クロック信号を入力してクロック信号に応じて二つのカウンタ信号を出力するカウンタ部と、カウンタ部から出力された二つのカウンタ信号を入力し、二つのカウンタ信号の論理積を演算して、演算結果を移動信号として出力する論理積回路と、を有していてもよい。この構成では、移動体の移動を適切に検出することができる。 In one embodiment, the detection unit may have a counter unit that receives a clock signal and outputs two counter signals in response to the clock signal, and a logical product circuit that receives the two counter signals output from the counter unit, calculates the logical product of the two counter signals, and outputs the result of the calculation as a movement signal. With this configuration, the movement of the moving object can be appropriately detected.

一実施形態においては、検出部は、クロック信号を入力してクロック信号に応じて二つのカウンタ信号を出力するカウンタ部と、二つのカウンタ信号のうちの一方のカウンタ信号を入力し、一方のカウンタ信号の値を反転させた反転信号を出力する論理否定回路と、二つのカウンタ信号のうちの他方のカウンタ信号及び反転信号を入力し、他方のカウンタ信号と反転信号との論理積を演算して、演算結果を移動信号として出力する論理積回路と、を有していてもよい。この構成では、移動体の移動を適切に検出することができる。 In one embodiment, the detection unit may have a counter unit that receives a clock signal and outputs two counter signals in response to the clock signal, a logical negation circuit that receives one of the two counter signals and outputs an inverted signal that inverts the value of one of the counter signals, and a logical product circuit that receives the other of the two counter signals and the inverted signal, calculates the logical product of the other counter signal and the inverted signal, and outputs the calculation result as a movement signal. With this configuration, the movement of a moving object can be appropriately detected.

一実施形態においては、入力部は、圧電素子の駆動によって移動する移動体の移動に係る信号を入力してもよい。この構成では、検出回路において、圧電素子の駆動によって移動する移動体の移動に係る移動信号、及び、当該移動体の移動の方向に係る方向信号を出力できる。 In one embodiment, the input unit may input a signal related to the movement of a moving body that is moved by driving the piezoelectric element. In this configuration, the detection circuit can output a movement signal related to the movement of the moving body that is moved by driving the piezoelectric element, and a direction signal related to the direction of movement of the moving body.

本発明の一側面に係る検出装置は、上記の検出回路と、検出回路から出力された移動信号及び方向信号を処理する制御装置と、を備える。 A detection device according to one aspect of the present invention includes the above detection circuit and a control device that processes the movement signal and direction signal output from the detection circuit.

本発明の一側面に係る検出装置では、上記の検出回路を備えている。これにより、検出装置では、簡易な構成で移動体の移動を精度良く検出することができる。 A detection device according to one aspect of the present invention includes the above-mentioned detection circuit. This allows the detection device to accurately detect the movement of a moving object with a simple configuration.

本発明の一側面によれば、簡易な構成で移動体の移動を精度良く検出することができる。 According to one aspect of the present invention, the movement of a moving object can be detected with high accuracy using a simple configuration.

図1は、一実施形態に係る検出回路を備える検出システムを示す図である。FIG. 1 is a diagram showing a detection system including a detection circuit according to one embodiment. 図2(a)は、移動装置の正面図であり、図2(b)は、移動装置の側面図である。FIG. 2(a) is a front view of the moving device, and FIG. 2(b) is a side view of the moving device. 図3は、検出回路の構成を示す図である。FIG. 3 is a diagram showing a configuration of the detection circuit. 図4(a)及び図4(b)は、入力部に入力される信号を示す図である。4A and 4B are diagrams showing signals input to the input section. 図5は、スライド部が第一方向に移動している場合において、保持部で保持されるデータを示す図である。FIG. 5 is a diagram showing data held in the holding section when the sliding section is moving in the first direction. 図6は、スライド部が第二方向に移動している場合において、保持部で保持されるデータを示す図である。FIG. 6 is a diagram showing data held in the holding section when the sliding section is moving in the second direction. 図7は、スライド部が第一方向に移動している場合における、信号の規則性を示す図である。FIG. 7 is a diagram showing the regularity of signals when the sliding portion is moving in the first direction. 図8は、スライド部が第二方向に移動している場合における、信号の規則性を示す図である。FIG. 8 is a diagram showing the regularity of signals when the sliding portion is moving in the second direction. 図9は、検出部の動作を説明するための表である。FIG. 9 is a table for explaining the operation of the detection unit. 図10は、他の実施形態に係る検出部の構成を示す図である。FIG. 10 is a diagram showing a configuration of a detection unit according to another embodiment. 図11は、変換部の構成を示す図である。FIG. 11 is a diagram illustrating a configuration of the conversion unit. 図12(a)及び図12(b)は、変換部によって変換された信号を示す図である。12(a) and 12(b) are diagrams showing signals converted by the conversion unit.

以下、添付図面を参照して、本発明の好適な実施形態について詳細に説明する。なお、図面の説明において同一又は相当要素には同一符号を付し、重複する説明は省略する。 A preferred embodiment of the present invention will be described in detail below with reference to the attached drawings. In the description of the drawings, the same or equivalent elements are given the same reference numerals, and duplicate descriptions will be omitted.

図1は、一実施形態に係る検出装置を含む検出システムを示す図である。図1に示されるように、検出システム100は、移動装置110と、検出回路1と、コンピュータ(制御装置)200と、を備えている。検出回路1及びコンピュータ200は、検出装置を構成している。 FIG. 1 is a diagram showing a detection system including a detection device according to one embodiment. As shown in FIG. 1, the detection system 100 includes a moving device 110, a detection circuit 1, and a computer (control device) 200. The detection circuit 1 and the computer 200 constitute the detection device.

図2(a)は、移動装置の正面図であり、図2(b)は、移動装置側面図である。図2に示されるように、移動装置110は、圧電素子112と、スライド体114と、エンコーダ116と、を備えている。以下の説明では、説明の便宜のため、図2(a)及び図2(b)に示す「X」、「Y」及び「Z」方向を用いることがある。 2(a) is a front view of the moving device, and FIG. 2(b) is a side view of the moving device. As shown in FIG. 2, the moving device 110 includes a piezoelectric element 112, a sliding body 114, and an encoder 116. In the following explanation, for convenience of explanation, the "X", "Y", and "Z" directions shown in FIG. 2(a) and FIG. 2(b) may be used.

スライド体114は、スライド部(移動体)118と、レール部120と、を有している。スライド部118は、レール部120に対して移動可能(摺動可能)に設けられている。スライド部118は、レール部120の延在方向(Y方向)に沿って移動する。スライド部118は、第一方向(たとえば、図2(a)において右側に向かう方向)と、第一方向と反対の第二方向(たとえば、図2(b)において左側に向かう方向)と、に移動する。レール部120は、固定されている。図2(b)に示されるように、スライド部118とレール部120との間には、ボール119が設けられている。ボール119は、Z方向において、レール部120を挟む位置にそれぞれ設けられている。 The slide body 114 has a slide portion (moving body) 118 and a rail portion 120. The slide portion 118 is provided so as to be movable (slidable) relative to the rail portion 120. The slide portion 118 moves along the extension direction (Y direction) of the rail portion 120. The slide portion 118 moves in a first direction (for example, a direction toward the right in FIG. 2(a)) and a second direction opposite to the first direction (for example, a direction toward the left in FIG. 2(b)). The rail portion 120 is fixed. As shown in FIG. 2(b), a ball 119 is provided between the slide portion 118 and the rail portion 120. The balls 119 are provided at positions sandwiching the rail portion 120 in the Z direction.

図2(b)に示されるように、スライド部118は、長手方向に沿った方向から見て、略U字形状を呈している。図2(a)及び図2(b)に示されるように、スライド部118の上面118Aには、摩擦部材122が配置されている。摩擦部材122は、たとえば、アルミナ板である。摩擦部材122は、スライド部118の長手方向に沿って延在している。圧電素子112は、摩擦部材122と当接可能に設けられており、スライド部118を移動させる。すなわち、スライド部118は、圧電素子112の駆動によって移動する。 As shown in FIG. 2(b), the slide portion 118 has a generally U-shape when viewed from the longitudinal direction. As shown in FIG. 2(a) and FIG. 2(b), a friction member 122 is disposed on the upper surface 118A of the slide portion 118. The friction member 122 is, for example, an alumina plate. The friction member 122 extends along the longitudinal direction of the slide portion 118. The piezoelectric element 112 is arranged so as to be able to come into contact with the friction member 122, and moves the slide portion 118. That is, the slide portion 118 moves when driven by the piezoelectric element 112.

スライド部118の下面118Bには、磁気リボン124が配置されている。磁気リボン124は、スライド部118の長手方向に沿って延在している。磁気リボン124は、N極及びS極が磁気リボン124の長手方向(スライド部118の長手方向)において交互に配置されている。 A magnetic ribbon 124 is disposed on the lower surface 118B of the sliding portion 118. The magnetic ribbon 124 extends along the longitudinal direction of the sliding portion 118. The magnetic ribbon 124 has north and south poles arranged alternately in the longitudinal direction of the magnetic ribbon 124 (the longitudinal direction of the sliding portion 118).

エンコーダ116は、磁気リボン124の位置を検出する。エンコーダ116は、磁気リボン124と対向する位置に配置されている。エンコーダ116は、第一ホール素子116A及び第二ホール素子116Bを含んでいる。第一ホール素子116A及び第二ホール素子116Bのそれぞれは、検出結果を示す信号を出力する。エンコーダ116は、2相の出力を出力する。第一ホール素子116A及び第二ホール素子116Bは、磁気リボン124のN極を検出(N極に反応)した場合には「1」、磁気リボン124のS極を検出(S極に反応)した場合には「0」を出力する。以下の説明では、第一ホール素子116Aが出力する信号を「信号A」、第二ホール素子116Bが出力する信号を「信号B」とする。なお、第一ホール素子116A及び第二ホール素子116Bが出力する信号としては、「1」に替えて「H」、「0」に替えて「L」であってもよい。 The encoder 116 detects the position of the magnetic ribbon 124. The encoder 116 is disposed at a position facing the magnetic ribbon 124. The encoder 116 includes a first hall element 116A and a second hall element 116B. The first hall element 116A and the second hall element 116B each output a signal indicating the detection result. The encoder 116 outputs a two-phase output. The first hall element 116A and the second hall element 116B each output "1" when they detect the N pole of the magnetic ribbon 124 (respond to the N pole), and output "0" when they detect the S pole of the magnetic ribbon 124 (respond to the S pole). In the following description, the signal output by the first hall element 116A is referred to as "signal A" and the signal output by the second hall element 116B is referred to as "signal B". Note that the signals output by the first hall element 116A and the second hall element 116B may be "H" instead of "1" and "L" instead of "0".

図3に示されるように、検出回路1は、入力部3と、保持部5と、生成部7と、出力部9と、を備えている。 As shown in FIG. 3, the detection circuit 1 includes an input unit 3, a holding unit 5, a generating unit 7, and an output unit 9.

入力部3は、圧電素子112の駆動によって移動するスライド部118の移動に係る信号を入力する。入力部3は、エンコーダ116から出力された信号A及び信号Bを入力する。入力部3は、信号Aを入力する第一入力端30と、信号Bを入力する第二入力端32と、を有している。第一入力端30に入力された信号A及び第二入力端32に入力された信号Bのそれぞれは、保持部5及び生成部7に出力される。 The input unit 3 inputs a signal related to the movement of the slide portion 118, which moves due to the drive of the piezoelectric element 112. The input unit 3 inputs the signal A and the signal B output from the encoder 116. The input unit 3 has a first input end 30 that inputs the signal A, and a second input end 32 that inputs the signal B. The signal A input to the first input end 30 and the signal B input to the second input end 32 are each output to the holding unit 5 and the generating unit 7.

図4(a)及び図4(b)は、入力部に入力される信号を示す図である。図4(a)では、スライド体114のスライド部118が第一方向に移動したときに、入力部3に入力される信号A及び信号Bを示している。図4(b)では、スライド体114のスライド部118が第二方向に移動したときに、入力部3に入力される信号A及び信号Bを示している。信号A及び信号Bは、パルス信号である。 Figures 4(a) and 4(b) are diagrams showing signals input to the input section. Figure 4(a) shows signals A and B input to the input section 3 when the sliding section 118 of the sliding body 114 moves in a first direction. Figure 4(b) shows signals A and B input to the input section 3 when the sliding section 118 of the sliding body 114 moves in a second direction. Signals A and B are pulse signals.

図3に示されるように、保持部5は、入力部3から出力された信号A及び信号Bを保持する。保持部5は、入力部3によって入力された信号A及び信号Bにおいて、入力部3に第一時刻に入力される信号を信号(第一信号)A及び信号(第一信号)Bとした場合、第一時刻よりも一時刻前の第二時刻に入力された信号(第二信号)A及び信号(第二信号)Bと、第二時刻よりも一時刻前の第三時刻に入力された信号(第三信号)A及び信号(第三信号)Bと、を保持する。 3, the holding unit 5 holds signals A and B output from the input unit 3. In the signals A and B input by the input unit 3, when signals (first signal) A and (first signal) B are input to the input unit 3 at a first time, the holding unit 5 holds signals (second signal) A0 and (second signal) B0 input at a second time one time before the first time, and signals (third signal) A1 and (third signal) B1 input at a third time one time before the second time.

保持部5は、シフトレジスタである。本実施形態では、保持部5は、Dフリップフロップである。保持部5は、第一保持部50と、第二保持部52と、第三保持部54と、第四保持部56と、を含んで構成されている。第一保持部50、第二保持部52、第三保持部54及び第四保持部56のそれぞれは、信号を入力する入力Dと、クロック信号を入力する入力CKと、信号を出力する出力Qと、を有している。 The holding unit 5 is a shift register. In this embodiment, the holding unit 5 is a D flip-flop. The holding unit 5 is configured to include a first holding unit 50, a second holding unit 52, a third holding unit 54, and a fourth holding unit 56. Each of the first holding unit 50, the second holding unit 52, the third holding unit 54, and the fourth holding unit 56 has an input D for inputting a signal, an input CK for inputting a clock signal, and an output Q for outputting a signal.

第一保持部50の入力Dは、入力部3の第一入力端30に接続されている。第一保持部50の入力Dには、第一入力端30から出力された信号Aが入力される。第一保持部50の入力CKは、生成部7に接続されている。第一保持部50の入力CKには、生成部7から出力されたクロック信号が入力される。第一保持部50の出力Qは、第二保持部52の入力D及び生成部7に接続されている。第一保持部50の出力Qは、信号Aを出力する。 An input D of the first holding unit 50 is connected to the first input terminal 30 of the input unit 3. A signal A output from the first input terminal 30 is input to the input D of the first holding unit 50. An input CK of the first holding unit 50 is connected to the generation unit 7. A clock signal output from the generation unit 7 is input to the input CK of the first holding unit 50. An output Q of the first holding unit 50 is connected to an input D of the second holding unit 52 and the generation unit 7. The output Q of the first holding unit 50 outputs a signal A0 .

第二保持部52の入力Dは、第一保持部50の出力Qに接続されている。第二保持部52の入力Dには、第一保持部50から出力された信号Aが入力される。第二保持部52の入力CKは、生成部7に接続されている。第二保持部52の入力CKには、生成部7から出力されたクロック信号が入力される。第二保持部52の出力Qは、出力部9の判定部90(後述)に接続されている。第二保持部52の出力Qは、信号Aを出力する。 An input D of the second holding unit 52 is connected to an output Q of the first holding unit 50. A signal A0 output from the first holding unit 50 is input to the input D of the second holding unit 52. An input CK of the second holding unit 52 is connected to the generation unit 7. A clock signal output from the generation unit 7 is input to the input CK of the second holding unit 52. An output Q of the second holding unit 52 is connected to a determination unit 90 (described later) of the output unit 9. The output Q of the second holding unit 52 outputs a signal A1 .

第三保持部54の入力Dは、入力部3の第二入力端32に接続されている。第三保持部54の入力Dには、第二入力端32から出力された信号Bが入力される。第三保持部54の入力CKは、生成部7に接続されている。第三保持部54の入力CKには、生成部7から出力されたクロック信号が入力される。第三保持部54の出力Qは、第四保持部56の入力D、生成部7及び出力部9の判定部90に接続されている。第三保持部54の出力Qは、信号Bを出力する。 The input D of the third holding unit 54 is connected to the second input terminal 32 of the input unit 3. The signal B output from the second input terminal 32 is input to the input D of the third holding unit 54. The input CK of the third holding unit 54 is connected to the generation unit 7. The clock signal output from the generation unit 7 is input to the input CK of the third holding unit 54. The output Q of the third holding unit 54 is connected to the input D of the fourth holding unit 56, the generation unit 7, and the determination unit 90 of the output unit 9. The output Q of the third holding unit 54 outputs a signal B0 .

第四保持部56の入力Dは、第三保持部54の出力Qに接続されている。第四保持部56の入力Dには、第三保持部54から出力された信号Bが入力される。第二保持部52の入力CKは、生成部7に接続されている。第二保持部52の入力CKには、生成部7から出力されたクロック信号が入力される。第二保持部52の出力Qは、出力部9の判定部90に接続されている。第四保持部56の出力Qは、信号Bを出力する。 The input D of the fourth holding unit 56 is connected to the output Q of the third holding unit 54. The signal B0 output from the third holding unit 54 is input to the input D of the fourth holding unit 56. The input CK of the second holding unit 52 is connected to the generation unit 7. The clock signal output from the generation unit 7 is input to the input CK of the second holding unit 52. The output Q of the second holding unit 52 is connected to the determination unit 90 of the output unit 9. The output Q of the fourth holding unit 56 outputs the signal B1 .

図5及び図6は、保持部において保持されるデータを示す図である。図5は、スライド部118が第一方向に移動した場合のデータを示している。図6は、スライド部118が第二方向に移動した場合のデータを示している。本実施形態では、保持部5は、4カウントごとに1周期する周期性を有している。図5に示されるように、保持部5では、Initial→State1→State2→State3→State4→State1→State2→…の順に信号がシフトする。図5では、検出開始の時刻tがt、t、t、t(図4(a)及び図4(b)参照)の場合について示している。時刻tは、t、t、tであってもよい。 5 and 6 are diagrams showing data held in the holding unit. FIG. 5 shows data when the sliding unit 118 moves in a first direction. FIG. 6 shows data when the sliding unit 118 moves in a second direction. In this embodiment, the holding unit 5 has a periodicity in which one cycle occurs every four counts. As shown in FIG. 5, in the holding unit 5, the signal shifts in the order of Initial→State 1→State 2→State 3→State 4→State 1→State 2→... FIG. 5 shows the cases where the detection start time t is t0 , t1 , t2 , and t3 (see FIG. 4(a) and FIG. 4(b)). The time t may be t4 , t5 , and t6 .

図5に示されるように、たとえば、検出開始時刻t=tの場合には、Initialにおいて、信号Aである「1」、信号Bである「0」が入力されると、State1において、信号Aに「1」、信号Bに「0」が保持される。続いて、State1において、信号Aである「1」、信号Bである「1」が入力されると、State1の信号Aの「1」及び信号Bの「0」がState2の信号A及び信号Bにシフトし、State2において、信号Aに「1」、信号Bに「1」が保持される。続いて、State2において、信号Aである「0」、信号Bである「1」が入力されると、State2の信号Aの「1」及び信号Bの「1」がState3の信号A及び信号Bにシフトし、State3において、信号Aに「0」、信号Bに「1」が保持される。続いて、State3において、信号Aである「0」、信号Bである「0」が入力されると、State3の信号Aの「0」及び信号Bの「1」がState4の信号A及び信号Bにシフトし、State4において、信号Aに「0」、信号Bに「0」が保持される。続いて、State4において、信号Aである「1」、信号Bである「0」が入力されると、State4の信号Aの「0」及び信号Bの「0」がState1の信号A及び信号Bにシフトし、State1において、信号Aに「1」、信号Bに「0」が保持される。検出開始時刻t=t、t=t及びt=tの場合においても、上記と同様に信号が保持される。 5, for example, when the detection start time t= t0 , when signal A "1" and signal B "0" are input in Initial, signal A0 holds "1" and signal B0 holds "0" in State 1. Subsequently, when signal A "1" and signal B " 1 " are input in State 1, signal A0 "1" and signal B0 "0" in State 1 shift to signals A1 and B1 in State 2, and signal A0 holds "1" and signal B0 holds " 1 " in State 2. Next, when signal A "0" and signal B "1" are input in State 2, signals A0 "1" and B0 " 1 " in State 2 are shifted to signals A1 and B1 in State 3, and signals A0 and B0 hold "0" and "1" in State 3. Next, when signal A "0" and signal B " 0 " are input in State 3, signals A0 and B0 hold "0" and "1" in State 3 are shifted to signals A1 and B1 in State 4, and signals A0 and B0 hold "0" in State 4. Subsequently, when signal A "1" and signal B "0" are input in State 4, signals A0 "0" and B0 "0" in State 4 are shifted to signals A1 and B1 in State 1 , and signal A0 holds "1" and signal B0 holds "0" in State 1. In the cases where detection start times t= t1 , t= t2 , and t= t3 , the signals are held in a similar manner to the above.

図6に示されるように、たとえば、検出開始時刻t=tの場合には、Initialにおいて、信号Aである「0」、信号Bである「1」が入力されると、State1において、信号Aに「0」、信号Bに「1」が保持される。続いて、State1において、信号Aである「1」、信号Bである「1」が入力されると、State1の信号Aの「0」及び信号Bの「1」がState2の信号A及び信号Bにシフトし、State2において、信号Aに「1」、信号Bに「1」が保持される。続いて、State2において、信号Aである「1」、信号Bである「0」が入力されると、State2の信号Aの「1」及び信号Bの「1」がState3の信号A及び信号Bにシフトし、State3において、信号Aに「1」、信号Bに「0」が保持される。続いて、State3において、信号Aである「0」、信号Bである「0」が入力されると、State3の信号Aの「1」及び信号Bの「0」がState4の信号A及び信号Bにシフトし、State4において、信号Aに「0」、信号Bに「0」が保持される。続いて、State4において、信号Aである「1」、信号Bである「0」が入力されると、State4の信号Aの「0」及び信号Bの「0」がState1の信号A及び信号Bにシフトし、State1において、信号Aに「1」、信号Bに「0」が保持される。検出開始時刻t=t、t=t及びt=tの場合においても、上記と同様に信号が保持される。 6, for example, when the detection start time t= t0 , when a signal A of "0" and a signal B of "1" are input in Initial, a "0" is held in signal A0 and a "1" is held in signal B0 in State 1. Subsequently, when a signal A of "1" and a signal B of "1" are input in State 1, the "0" of signal A0 and the "1" of signal B0 in State 1 are shifted to signals A1 and B1 in State 2, and in State 2, a "1" is held in signal A0 and a "1" is held in signal B0 . Next, when signal A "1" and signal B "0" are input in State 2, signals A0 "1" and B0 " 1 " in State 2 are shifted to signals A1 and B1 in State 3, and signals A0 and B0 hold "1" and "0" in State 3. Next, when signal A "0" and signal B "0" are input in State 3, signals A0 "1" and B0 " 0 " in State 3 are shifted to signals A1 and B1 in State 4, and signals A0 and B0 hold "0" in State 4 . Subsequently, when signal A "1" and signal B "0" are input in State 4, signals A0 "0" and B0 "0" in State 4 are shifted to signals A1 and B1 in State 1 , and signal A0 holds "1" and signal B0 holds "0" in State 1. In the cases where detection start times t= t1 , t= t2 , and t= t3 , the signals are held in a similar manner to the above.

図3に示されるように、生成部7は、信号A及び信号Bと、信号A及び信号Bとに基づいてクロック信号CLKを生成する。生成部7は、信号A及び信号Bの立ち上がり及び立ち下がりを検知し、クロック信号CLKを生成する。生成部7は、第一XOR回路70と、第二XOR回路72と、OR回路74と、遅延回路(遅延部)76と、を有している。 3, the generating unit 7 generates a clock signal CLK based on signals A and B, and signals A1 and B1 . The generating unit 7 detects the rising and falling edges of signals A and B, and generates the clock signal CLK. The generating unit 7 has a first XOR circuit 70, a second XOR circuit 72, an OR circuit 74, and a delay circuit (delay unit) 76.

第一XOR回路70は、XORゲート素子である。第一XOR回路70は、信号A及び信号Aを入力する。第一XOR回路70は、信号A及び信号Aの値が異なる場合には「1」を出力し、信号A及び信号Aの値が同じ場合には「0」を出力する。 The first XOR circuit 70 is an XOR gate element. The first XOR circuit 70 receives the signal A and the signal A0 . The first XOR circuit 70 outputs "1" when the values of the signal A and the signal A0 are different, and outputs "0" when the values of the signal A and the signal A0 are the same.

第二XOR回路72は、XORゲート素子である。第二XOR回路72は、信号B及び信号Bを入力する。第二XOR回路72は、信号B及び信号Bの値が異なる場合には「1」を示す信号を出力し、信号B及び信号Bの値が同じ場合には「0」を示す信号を出力する。 The second XOR circuit 72 is an XOR gate element. The second XOR circuit 72 receives the signal B and the signal B0 . The second XOR circuit 72 outputs a signal indicating "1" when the values of the signal B and the signal B0 are different, and outputs a signal indicating "0" when the values of the signal B and the signal B0 are the same.

OR回路74は、ORゲート素子である。OR回路74は、第一XOR回路70から出力された信号及び第二XOR回路72から出力された信号を入力する。OR回路74は、第一XOR回路70及び第二XOR回路72から出力された信号の値がいずれも「0」である場合には「0」を出力する。すなわち、OR回路74は、演算結果が「0」の場合には、クロック信号を出力しない。OR回路74は、第一XOR回路70及び第二XOR回路72から出力された信号の値の少なくとも一方が「1」である場合には「1」を出力する。すなわち、OR回路74は、演算結果が「1」の場合には、クロック信号を出力する。OR回路74は、遅延回路76に接続されている。OR回路74は、クロック信号を遅延回路76に出力する。 The OR circuit 74 is an OR gate element. The OR circuit 74 inputs the signal output from the first XOR circuit 70 and the signal output from the second XOR circuit 72. The OR circuit 74 outputs "0" when the values of the signals output from the first XOR circuit 70 and the second XOR circuit 72 are both "0". In other words, the OR circuit 74 does not output a clock signal when the operation result is "0". The OR circuit 74 outputs "1" when at least one of the values of the signals output from the first XOR circuit 70 and the second XOR circuit 72 is "1". In other words, the OR circuit 74 outputs a clock signal when the operation result is "1". The OR circuit 74 is connected to the delay circuit 76. The OR circuit 74 outputs a clock signal to the delay circuit 76.

遅延回路76は、クロック信号を遅延させる。遅延回路76は、N個のNOTゲート素子(インバータ)76Aが直列に接続されて構成されている。Nは、偶数である。遅延回路76は、クロック信号CLKのパルス幅を広げる。すなわち、遅延回路76は、クロック信号CLKのクロック周期を長くする。生成部7によって生成されるクロック信号CLKのパルス幅(パルス信号の立ち上がりから立ち下がりまでの間の幅)の時間tは、以下の関係を有する。
=tsh+txor+tor+N・tinv
shは、保持部5のシフト動作による遅れ時間である。txorは、第一XOR回路70及び第二XOR回路72による遅れ時間である。torは、OR回路74による遅れ時間である。N・tinvは、遅延回路76による遅れ時間である。時間tは、適宜設定されればよい。時間tは、たとえば、信号A及び信号Bのパルス幅の半分未満となるように設定される。
The delay circuit 76 delays the clock signal. The delay circuit 76 is configured by connecting N NOT gate elements (inverters) 76A in series. N is an even number. The delay circuit 76 widens the pulse width of the clock signal CLK. That is, the delay circuit 76 lengthens the clock period of the clock signal CLK. The time tw of the pulse width (the width from the rising edge to the falling edge of the pulse signal) of the clock signal CLK generated by the generation unit 7 has the following relationship:
t w =t sh +t xor +t or +N・t inv
t sh is the delay time caused by the shift operation of the holding unit 5. t xor is the delay time caused by the first XOR circuit 70 and the second XOR circuit 72. t or is the delay time caused by the OR circuit 74. N·t inv is the delay time caused by the delay circuit 76. The time t w may be set appropriately. The time t w is set, for example, to be less than half the pulse width of the signals A and B.

遅延回路76は、第一保持部50、第二保持部52、第三保持部54及び第四保持部56の入力CK、及び、出力部9の検出部92(後述)に接続されている。遅延回路76は、クロック信号CLKを第一保持部50、第二保持部52、第三保持部54、第四保持部56及び検出部92に出力する。 The delay circuit 76 is connected to the inputs CK of the first holding unit 50, the second holding unit 52, the third holding unit 54, and the fourth holding unit 56, and to a detection unit 92 (described later) of the output unit 9. The delay circuit 76 outputs a clock signal CLK to the first holding unit 50, the second holding unit 52, the third holding unit 54, the fourth holding unit 56, and the detection unit 92.

出力部9は、スライド部118の移動に係る移動信号MOVout、及び、スライド部118の移動の方向に係る方向信号DIRoutを出力する。出力部9は、判定部90と、検出部92と、を有している。 The output unit 9 outputs a movement signal MOV out relating to the movement of the sliding portion 118 and a direction signal DIR out relating to the direction of movement of the sliding portion 118. The output unit 9 has a determination unit 90 and a detection unit 92.

判定部90は、スライド部118の移動の方向(第一方向、第二方向)を判定する。判定部90は、第二保持部52から出力された信号A及び第三保持部54から出力された信号Bに基づいて、スライド部118の移動の方向きを判定する。判定部90は、XOR回路90Aと、ローパスフィルタ(平滑部)90Bと、NOT回路90Cと、を有している。 The determination unit 90 determines the direction (first direction, second direction) of movement of the sliding portion 118. The determination unit 90 determines the direction of movement of the sliding portion 118 based on the signal A1 output from the second holding unit 52 and the signal B0 output from the third holding unit 54. The determination unit 90 has an XOR circuit 90A, a low-pass filter (smoothing unit) 90B, and a NOT circuit 90C.

XOR回路90Aは、XORゲート素子である。本実施形態では、XOR回路90Aは、第二保持部52から出力された信号A及び第三保持部54から出力された信号Bを入力する。XOR回路90Aは、第二保持部52から出力された信号A及び第三保持部54から出力された信号Bの値が異なる場合には「1」を出力する。XOR回路90Aは、第二保持部52から出力された信号A及び第三保持部54から出力された信号Bの値が同じである場合には「0」を出力する。XOR回路90Aは、演算結果をローパスフィルタ90Bに出力する。 The XOR circuit 90A is an XOR gate element. In this embodiment, the XOR circuit 90A inputs the signal A1 output from the second holding unit 52 and the signal B0 output from the third holding unit 54. The XOR circuit 90A outputs "1" when the values of the signal A1 output from the second holding unit 52 and the signal B0 output from the third holding unit 54 are different. The XOR circuit 90A outputs "0" when the values of the signal A1 output from the second holding unit 52 and the signal B0 output from the third holding unit 54 are the same. The XOR circuit 90A outputs the calculation result to the low-pass filter 90B.

図7は、スライド部118が第一方向に移動している場合における、信号A及び信号Bの規則性を示す図である。図7に示されるように、スライド部118が第一方向に移動している場合には、信号A及び信号Bが(1,1)又は(0,0)となる規則性を有する。XOR回路90Aは、信号A及び信号Bとして(1,1)又は(0,0)が入力されると、「0」を出力する。すなわち、XOR回路90Aは、スライド部118が第一方向に移動している場合には、「0」を出力する。 7 is a diagram showing the regularity of the signal A1 and the signal B0 when the sliding portion 118 is moving in the first direction. As shown in FIG. 7, when the sliding portion 118 is moving in the first direction, the signal A1 and the signal B0 have a regularity of being (1,1) or (0,0). When (1,1) or (0,0) is input as the signal A1 and the signal B0 , the XOR circuit 90A outputs "0". In other words, when the sliding portion 118 is moving in the first direction, the XOR circuit 90A outputs "0".

図8は、スライド部118が第二方向に移動している場合における、信号A及び信号Bの規則性を示す図である。図8に示されるように、スライド部118が第二方向に移動している場合には、信号A及び信号Bが(0,1)又は(1,0)となる規則性を有する。XOR回路90Aは、信号A及び信号Bとして(0,1)又は(1,0)が入力されると、「1」を出力する。すなわち、XOR回路90Aは、スライド部118が第二方向に移動している場合には、「1」を出力する。 8 is a diagram showing the regularity of the signal A1 and the signal B0 when the sliding portion 118 is moving in the second direction. As shown in FIG. 8, when the sliding portion 118 is moving in the second direction, the signal A1 and the signal B0 have a regularity of being (0,1) or (1,0). When (0,1) or (1,0) is input as the signal A1 and the signal B0 , the XOR circuit 90A outputs "1". In other words, when the sliding portion 118 is moving in the second direction, the XOR circuit 90A outputs "1".

図3に示されるように、ローパスフィルタ90Bは、XOR回路90Aから出力された信号を平滑化する。ローパスフィルタ90Bは、XOR回路90Aから出力された信号を平滑化することで、信号に発生しているグリッチノイズを低減する。 As shown in FIG. 3, the low-pass filter 90B smoothes the signal output from the XOR circuit 90A. By smoothing the signal output from the XOR circuit 90A, the low-pass filter 90B reduces glitch noise occurring in the signal.

NOT回路90Cは、NOTゲート素子である。NOT回路90Cは、ローパスフィルタ90Bから出力された信号を論理反転させる。NOT回路90Cは、ローパスフィルタ90Bから出力された信号が「1」の場合には「0」を出力する。NOT回路90Cは、ローパスフィルタ90Bから出力された信号が「0」の場合には「1」を出力する。NOT回路90Cは、演算結果を方向信号DIRoutとして出力する。本実施形態では、NOT回路90Cは、スライド部118が第一方向に移動している場合には「1」を出力し、スライド部118が第二方向に移動している場合には「0」を出力する。なお、NOT回路90Cは、ローパスフィルタ90Bから出力された信号を整形する機能も有している。 The NOT circuit 90C is a NOT gate element. The NOT circuit 90C logically inverts the signal output from the low-pass filter 90B. The NOT circuit 90C outputs "0" when the signal output from the low-pass filter 90B is "1". The NOT circuit 90C outputs "1" when the signal output from the low-pass filter 90B is "0". The NOT circuit 90C outputs the calculation result as a direction signal DIR out . In this embodiment, the NOT circuit 90C outputs "1" when the slide portion 118 moves in the first direction, and outputs "0" when the slide portion 118 moves in the second direction. The NOT circuit 90C also has a function of shaping the signal output from the low-pass filter 90B.

検出部92は、生成部7において生成されたクロック信号CLKに基づいてスライド部118の移動を検出する。検出部92は、カウンタ部92Aと、AND回路(論理積回路)92Bと、を有している。 The detection unit 92 detects the movement of the slide portion 118 based on the clock signal CLK generated by the generation unit 7. The detection unit 92 has a counter unit 92A and an AND circuit (logical product circuit) 92B.

カウンタ部92Aは、2ビットカウンタである。カウンタ部92Aは、クロック信号を入力する入力Cと、カウンタ信号を出力する2つの出力Q、Qと、を有している。また、カウンタ部92Aは、カウンタ部92Aを初期化するためのリセット信号を入力する入力RSTを有している。カウンタ部92Aの入力Cは、生成部7に接続されている。カウンタ部92Aの入力Cには、生成部7(遅延回路76)から出力されたクロック信号CLKが入力される。カウンタ部92Aの出力Q及び出力Qは、AND回路92Bに接続されている。 The counter unit 92A is a 2-bit counter. The counter unit 92A has an input C for inputting a clock signal and two outputs Q1 and Q0 for outputting a counter signal. The counter unit 92A also has an input RST for inputting a reset signal for initializing the counter unit 92A. The input C of the counter unit 92A is connected to the generating unit 7. The clock signal CLK output from the generating unit 7 (delay circuit 76) is input to the input C of the counter unit 92A. The outputs Q1 and Q0 of the counter unit 92A are connected to the AND circuit 92B.

AND回路92Bは、ANDゲート素子である。AND回路92Bは、カウンタ部92Aから出力されたカウンタ信号を入力する。AND回路92Bは、カウンタ部92Aの出力Q及び出力Qのそれぞれから出力されたカウンタ信号の値が「1」である場合には、「1」を出力する。AND回路92Bは、カウンタ部92Aの出力Q及び出力Qのそれぞれから出力されたカウンタ信号の値が異なる場合には、「0」を出力する。AND回路92Bは、演算結果を移動信号MOVoutとして出力する。 The AND circuit 92B is an AND gate element. The AND circuit 92B inputs the counter signal output from the counter unit 92A. If the value of the counter signal output from each of the outputs Q1 and Q0 of the counter unit 92A is "1", the AND circuit 92B outputs "1". If the values of the counter signals output from each of the outputs Q1 and Q0 of the counter unit 92A are different, the AND circuit 92B outputs "0". The AND circuit 92B outputs the calculation result as a movement signal MOV out .

検出部92の動作について、詳細に説明する。本実施形態では、カウンタ部92Aは、「3」までカウントアップするカウンタである。カウンタ部92Aでは、入力Cにクロック信号CLKが入力されると、Initial→State1→State2→State3→State4→State1→State2→…の順に遷移する。State1はカウント1、State2はカウント2、State3はカウント3、State4はカウント0に相当する。図9に示されるように、検出部92では、(Q1,Q2)=(1,1)であり、10進数で「3」の場合に「1」となる。検出部92では、それ以外の場合では「0」となる。移動信号MOVoutは、State1からState4までを1周期とするパルス信号である。移動信号MOVoutは、State3のときに「1」となるパルス信号となる。 The operation of the detection unit 92 will be described in detail. In this embodiment, the counter unit 92A is a counter that counts up to "3". When the clock signal CLK is input to the input C of the counter unit 92A, the counter unit 92A transitions in the following order: Initial → State 1 → State 2 → State 3 → State 4 → State 1 → State 2 → .... State 1 corresponds to count 1, State 2 corresponds to count 2, State 3 corresponds to count 3, and State 4 corresponds to count 0. As shown in FIG. 9, in the detection unit 92, (Q1, Q2) = (1, 1), and when the decimal number is "3", the detection unit 92 becomes "1". In the detection unit 92, the detection unit 92 becomes "0" in other cases. The movement signal MOV out is a pulse signal with one period from State 1 to State 4. The movement signal MOV out is a pulse signal that is “1” in State 3.

コンピュータ200は、検出回路1から出力された移動信号MOVout及び方向信号DIRoutを処理する。コンピュータ200は、CPU(Central Processing Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等を含んで構成されている。 The computer 200 processes the movement signal MOV out and the direction signal DIR out output from the detection circuit 1. The computer 200 includes a central processing unit (CPU), a read only memory (ROM), a random access memory (RAM), and the like.

コンピュータ200は、検出回路1の出力部9から出力された移動信号MOVoutに基づいて、スライド部118の移動量を算出し得る。コンピュータ200は、移動信号MOVoutのクロックを計測することにより、スライド部118の移動量を算出し得る。コンピュータ200は、移動信号MOVout及び方向信号DIRoutに基づいて、スライド部118の移動に係る情報を取得し得る。 The computer 200 can calculate the amount of movement of the sliding portion 118 based on the movement signal MOV out output from the output portion 9 of the detection circuit 1. The computer 200 can calculate the amount of movement of the sliding portion 118 by measuring the clock of the movement signal MOV out . The computer 200 can obtain information related to the movement of the sliding portion 118 based on the movement signal MOV out and the direction signal DIR out .

以上説明したように、本実施形態に係る検出回路1は、上記回路構成によって、スライド部118の移動に係る移動信号MOVout、及び、スライド部118の移動の方向に係る方向信号DIRoutを出力する。そのため、検出回路1では、スライド部118の移動が速い場合であっても、割り込み処理等によって信号が取得できなくなるといった事態を回避できる。また、高性能な制御装置を必要としない。そのため、検出回路1では、簡易な構成でスライド部118の移動を精度良く検出することができる。 As described above, the detection circuit 1 according to this embodiment uses the above circuit configuration to output a movement signal MOV out related to the movement of the sliding portion 118 and a direction signal DIR out related to the direction of movement of the sliding portion 118. Therefore, even if the movement of the sliding portion 118 is fast, the detection circuit 1 can avoid a situation in which the signal cannot be acquired due to interrupt processing or the like. In addition, a high-performance control device is not required. Therefore, the detection circuit 1 can accurately detect the movement of the sliding portion 118 with a simple configuration.

本実施形態に係る検出回路1では、判定部90は、方向信号を入力し、方向信号を平滑化して出力するローパスフィルタ90Bを有している。この構成では、方向信号DIRoutにグリッチノイズが含まれている場合に、グリッチノイズを低減させることができる。 In the detection circuit 1 according to this embodiment, the determination unit 90 has a low-pass filter 90B that receives a direction signal, smooths the direction signal, and outputs the smoothed direction signal. With this configuration, when glitch noise is included in the direction signal DIR out , the glitch noise can be reduced.

本実施形態に係る検出回路1では、生成部7は、クロック信号CLKを遅延させる遅延回路76を有している。クロック信号CLKのパル幅が狭い場合、クロック信号CLKに基づいて動作する保持部5及び検出部92において誤動作が生じるおそれがある。この構成では、遅延回路76によって、クロック信号CLKのパルス幅を広くすることができる。そのため、上記誤動作が生じることを回避することができる。 In the detection circuit 1 according to this embodiment, the generation unit 7 has a delay circuit 76 that delays the clock signal CLK. If the pulse width of the clock signal CLK is narrow, there is a risk of malfunction occurring in the holding unit 5 and detection unit 92 that operate based on the clock signal CLK. In this configuration, the delay circuit 76 can widen the pulse width of the clock signal CLK. This makes it possible to avoid the above-mentioned malfunction occurring.

本実施形態に係る検出回路1では、検出部92は、クロック信号CLKを入力してクロック信号CLKに応じて二つのカウンタ信号を出力するカウンタ部92Aと、カウンタ部92Aから出力された二つのカウンタ信号を入力し、二つのカウンタ信号の論理積を演算し、演算結果を移動信号MOVoutとして出力するAND回路92B路と、を有している。この構成では、スライド部118の移動を適切に検出することができる。 In the detection circuit 1 according to this embodiment, the detection section 92 includes a counter section 92A that receives a clock signal CLK and outputs two counter signals in response to the clock signal CLK, and an AND circuit 92B that receives the two counter signals output from the counter section 92A, calculates the logical product of the two counter signals, and outputs the result of the calculation as a movement signal MOV out . With this configuration, the movement of the slide section 118 can be appropriately detected.

以上、本発明の実施形態について説明してきたが、本発明は必ずしも上述した実施形態に限定されるものではなく、その要旨を逸脱しない範囲で様々な変更が可能である。 Although the embodiments of the present invention have been described above, the present invention is not necessarily limited to the above-described embodiments, and various modifications are possible without departing from the spirit of the present invention.

上記実施形態では、エンコーダ116の第一ホール素子116A及び第二ホール素子116Bを含んでいる形態を一例に説明した。しかし、エンコーダは、磁気式に限られず、光学式、接触式などであってもよい。 In the above embodiment, an example was described in which the encoder 116 includes the first hall element 116A and the second hall element 116B. However, the encoder is not limited to a magnetic type, and may be an optical type, a contact type, or the like.

上記実施形態では、遅延回路76が、N個のNOTゲート素子(インバータ)76Aが直列に接続されて構成されている形態を一例に説明した。しかし、遅延回路76は、ディレイライン素子などであってもよい。 In the above embodiment, an example was described in which the delay circuit 76 is configured by connecting N NOT gate elements (inverters) 76A in series. However, the delay circuit 76 may also be a delay line element, etc.

上記実施形態では、保持部5が第四保持部56を有している形態を一例に説明した。しかし、保持部5は、第四保持部56を有していなくてもよい。 In the above embodiment, an example was described in which the holding unit 5 has the fourth holding unit 56. However, the holding unit 5 does not have to have the fourth holding unit 56.

上記実施形態では、判定部90がローパスフィルタ90B及びNOT回路90Cを有している形態を一例に説明した。しかし、判定部90は、ローパスフィルタ90B及び/又はNOT回路90Cを有していなくてもよい。 In the above embodiment, an example has been described in which the determination unit 90 has a low-pass filter 90B and a NOT circuit 90C. However, the determination unit 90 does not have to have a low-pass filter 90B and/or a NOT circuit 90C.

上記実施形態では、XOR回路90Aが、第二保持部52から出力された信号A及び第三保持部54から出力された信号Bを入力する形態を一例に説明した。しかし、XOR回路90Aは、第一保持部50から出力された信号A及び第四保持部56から出力された信号Bを入力してもよい。XOR回路90Aは、第一保持部50から出力された信号A及び第四保持部56から出力された信号Bの値が異なる場合には「1」を出力する。XOR回路90Aは、第一保持部50から出力された信号A及び第四保持部56から出力された信号Bの値が同じである場合には「0」を出力する。 In the above embodiment, an example has been described in which the XOR circuit 90A receives the signal A1 output from the second holding unit 52 and the signal B0 output from the third holding unit 54. However, the XOR circuit 90A may receive the signal A0 output from the first holding unit 50 and the signal B1 output from the fourth holding unit 56. The XOR circuit 90A outputs "1" when the values of the signal A0 output from the first holding unit 50 and the signal B1 output from the fourth holding unit 56 are different. The XOR circuit 90A outputs "0" when the values of the signal A0 output from the first holding unit 50 and the signal B1 output from the fourth holding unit 56 are the same.

図7に示されるように、スライド部118が第一方向に移動している場合には、信号A及び信号Bが(1,0)又は(0,1)となる規則性を有する。XOR回路90Aは、信号A及び信号Bとして(1,0)又は(0,1)が入力されると、「1」を出力する。すなわち、XOR回路90Aは、スライド部118が第一方向に移動している場合には、「1」を出力する。 7, when the sliding portion 118 is moving in the first direction, the signals A0 and B1 have a pattern of being (1,0) or (0,1). When (1,0) or (0,1) is input as the signals A0 and B1 , the XOR circuit 90A outputs "1." In other words, when the sliding portion 118 is moving in the first direction, the XOR circuit 90A outputs "1."

図8に示されるように、スライド部118が第二方向に移動している場合には、信号A及び信号Bが(1,1)又は(0,0)となる規則性を有する。XOR回路90Aは、信号A及び信号Bとして(1,1)又は(0,0)が入力されると、「0」を出力する。すなわち、XOR回路90Aは、スライド部118が第二方向に移動している場合には、「0」を出力する。 8, when the sliding portion 118 is moving in the second direction, the signals A0 and B1 are regularly (1,1) or (0,0). When (1,1) or (0,0) is input as the signals A0 and B1 , the XOR circuit 90A outputs "0." In other words, when the sliding portion 118 is moving in the second direction, the XOR circuit 90A outputs "0."

上記実施形態では、検出部92が、カウンタ部92Aと、AND回路92Bと、を有している形態を一例に説明した。しかし、検出部の構成はこれに限定されない。図10に示されるように、検出部92Dは、カウンタ部92Aと、AND回路92Bと、NOT回路92Cと、を備えていてもよい。NOT回路92Cは、カウンタ部92Aから出力されるカウンタ信号のうちの出力Qから出力されたカウンタ信号を入力し、当該カウンタ信号の値を反転させた反転信号をAND回路92Bに出力する。 In the above embodiment, the detection unit 92 has a counter unit 92A and an AND circuit 92B. However, the configuration of the detection unit is not limited to this. As shown in Fig. 10, the detection unit 92D may include a counter unit 92A, an AND circuit 92B, and a NOT circuit 92C. The NOT circuit 92C receives a counter signal output from output Q0 of the counter signals output from the counter unit 92A, and outputs an inverted signal obtained by inverting the value of the counter signal to the AND circuit 92B.

AND回路92Bは、カウンタ部92Aの出力Qから出力されたカウンタ信号及びNOT回路92Cから出力された反転信号を入力し、当該カウンタ信号と反転信号との論理積を演算し、演算結果を移動信号MOVoutとして出力する。検出部92Dでは、(Q1、Q2)=(1,1)であり、10進数で「2」の場合に「1」となる。 The AND circuit 92B receives the counter signal output from the output Q1 of the counter unit 92A and the inverted signal output from the NOT circuit 92C, calculates the logical product of the counter signal and the inverted signal, and outputs the calculation result as a movement signal MOV out . In the detection unit 92D, (Q1, Q2)=(1, 1), and when the decimal number is "2", the result is "1".

上記実施形態に加えて、図11に示されるように、出力部9は、変換部94を更に有していてもよい。変換部94は、移動信号MOVout及び方向信号DIRoutを所定の信号FORout及び信号REVoutに変換する。変換部94は、第一AND回路94Aと、第二AND回路94Bと、NOT回路(論理否定回路)94Cと、を有している。 In addition to the above embodiment, as shown in Fig. 11, the output unit 9 may further include a conversion unit 94. The conversion unit 94 converts the movement signal MOV out and the direction signal DIR out into predetermined signals FOR out and REV out . The conversion unit 94 includes a first AND circuit 94A, a second AND circuit 94B, and a NOT circuit (logical negation circuit) 94C.

第一AND回路94Aは、ANDゲート素子である。第一AND回路94Aは、判定部90のNOT回路90Cから出力された方向信号DIRout及び検出部92のAND回路92Bから出力された移動信号MOVoutを入力する。第一AND回路94Aは、信号FORoutを出力する。 The first AND circuit 94A is an AND gate element. The first AND circuit 94A receives the direction signal DIR out output from the NOT circuit 90C of the determination unit 90 and the movement signal MOV out output from the AND circuit 92B of the detection unit 92. The first AND circuit 94A outputs a signal FOR out .

第二AND回路94Bは、ANDゲート素子である。第二AND回路94Bは、NOT回路94Cから出力された信号及び検出部92のAND回路92Bから出力された移動信号MOVoutを入力する。第二AND回路94Bは、信号REVoutを出力する。 The second AND circuit 94B is an AND gate element. The second AND circuit 94B receives the signal output from the NOT circuit 94C and the movement signal MOV out output from the AND circuit 92B of the detection unit 92. The second AND circuit 94B outputs a signal REV out .

NOT回路94Cは、NOTゲート素子である。NOT回路94Cは、判定部90のNOT回路90Cから出力された方向信号DIRoutを入力し、方向信号DIRoutを論理反転して第二AND回路94Bに出力する。 The NOT circuit 94C is a NOT gate element that receives the direction signal DIR out output from the NOT circuit 90C of the determination unit 90, logically inverts the direction signal DIR out , and outputs the result to the second AND circuit 94B.

図12(a)及び図12(b)は、変換部によって変換された信号を示す図である。図12(a)は、スライド部118が第一方向に移動している場合の信号を示している。図12(b)は、スライド部118が第二方向に移動している場合の信号を示している。図12(a)に示されるように、変換部94は、スライド部118が第一方向に移動している場合、入力された移動信号MOVout及び方向信号DIRoutを、信号FORoutはパルス信号、信号REVoutは「0」に変換する。図12(b)に示されるように、変換部94は、スライド部118が第二方向に移動している場合、入力された移動信号MOVout及び方向信号DIRoutを、信号FORoutは「0」、信号REVoutはパルス信号に変換する。 12(a) and 12(b) are diagrams showing signals converted by the conversion unit. FIG. 12(a) shows a signal when the sliding portion 118 is moving in a first direction. FIG. 12(b) shows a signal when the sliding portion 118 is moving in a second direction. As shown in FIG. 12(a), when the sliding portion 118 is moving in the first direction, the conversion unit 94 converts the input movement signal MOV out and direction signal DIR out into a signal FOR out that is a pulse signal and a signal REV out that is "0". As shown in FIG. 12(b), when the sliding portion 118 is moving in the second direction, the conversion unit 94 converts the input movement signal MOV out and direction signal DIR out into a signal FOR out that is "0" and a signal REV out that is a pulse signal.

変換部94によって移動信号MOVout及び方向信号DIRoutを信号FORout及び信号REVoutに変換することにより、たとえば、コンピュータ200において割り込み処理が行われる場合、信号FORout及び信号REVoutを用いることにより、信号FORout及び信号REVoutが互いに排他であるため、割り込みルーチンの処理に条件分岐を含まない。そのため、コンピュータ200において動作を高速に行うことができ、反応することができるパルスの周波数を高くすることができる。 By converting the movement signal MOV out and the direction signal DIR out into the signals FOR out and REV out by the conversion unit 94, for example, when an interrupt process is performed in the computer 200, the signals FOR out and REV out are used, and therefore the process of the interrupt routine does not include a conditional branch because the signals FOR out and REV out are mutually exclusive. Therefore, the computer 200 can operate at high speed and can respond to a high frequency of pulses.

1…検出回路、3…入力部、5…保持部、7…生成部、9…出力部、76…遅延回路(遅延部)、90…判定部、90B…ローパスフィルタ(平滑部)、92,92D…検出部、92A…カウンタ部、92B…AND回路(論理積回路)、94…変換部、112…圧電素子、118…スライド部(移動体)、200…コンピュータ(制御装置)。 1...detection circuit, 3...input section, 5...holding section, 7...generation section, 9...output section, 76...delay circuit (delay section), 90...determination section, 90B...low-pass filter (smoothing section), 92, 92D...detection section, 92A...counter section, 92B...AND circuit (logical product circuit), 94...conversion section, 112...piezoelectric element, 118...slide section (moving body), 200...computer (control device).

Claims (8)

移動体の移動及び当該移動体の移動の向きを検出する検出回路であって、
前記移動体の移動に係る信号を入力する入力部と、
前記入力部によって入力された前記信号において、前記入力部に第一時刻に入力される前記信号を第一信号とした場合、前記第一時刻よりも一時刻前の第二時刻に入力された第二信号と、前記第二時刻よりも一時刻前の第三時刻に入力された第三信号と、を保持する保持部と、
前記第一信号と前記第二信号とに基づいてクロック信号を生成する生成部と、
前記移動体の移動に係る移動信号、及び、前記移動体の移動の方向に係る方向信号を出力する出力部と、を備え、
前記保持部は、前記生成部において生成された前記クロック信号に基づいて、前記第二信号及び前記第三信号を取得して保持し、
前記出力部は、
前記第二信号及び前記第三信号に基づいて前記移動体の向きを判定する判定部と、
前記生成部において生成された前記クロック信号に基づいて前記移動体の移動を検出する検出部と、を有する、検出回路。
A detection circuit for detecting a movement of a moving object and a direction of the movement of the moving object,
an input unit for inputting a signal related to the movement of the moving object;
a holding unit that holds, in the signals input by the input unit, a signal input to the input unit at a first time as a first signal, a second signal input at a second time one time before the first time, and a third signal input at a third time one time before the second time;
a generator that generates a clock signal based on the first signal and the second signal;
an output unit that outputs a movement signal related to the movement of the moving body and a direction signal related to the direction of the movement of the moving body,
the holding unit acquires and holds the second signal and the third signal based on the clock signal generated by the generation unit;
The output unit is
a determination unit that determines a direction of the moving object based on the second signal and the third signal;
a detection unit that detects the movement of the moving object based on the clock signal generated by the generation unit.
前記判定部は、前記方向信号を入力し、前記方向信号を平滑化して出力する平滑部を有する、請求項1に記載の検出回路。 The detection circuit according to claim 1, wherein the determination unit has a smoothing unit that receives the direction signal, smooths the direction signal, and outputs the smoothed direction signal. 前記生成部は、前記クロック信号を遅延させる遅延部を有する、請求項1又は2に記載の検出回路。 The detection circuit according to claim 1 or 2, wherein the generating unit has a delay unit that delays the clock signal. 前記出力部は、前記移動信号及び前記方向信号を所定の信号に変換する変換部を有する、請求項1~3のいずれか一項に記載の検出回路。 The detection circuit according to any one of claims 1 to 3, wherein the output section has a conversion section that converts the movement signal and the direction signal into a predetermined signal. 前記検出部は、
前記クロック信号を入力して前記クロック信号に応じて二つのカウンタ信号を出力するカウンタ部と、
前記カウンタ部から出力された二つの前記カウンタ信号を入力し、二つの前記カウンタ信号の論理積を演算して、演算結果を前記移動信号として出力する論理積回路と、を有する、請求項1~4のいずれか一項に記載の検出回路。
The detection unit is
a counter unit which receives the clock signal and outputs two counter signals in response to the clock signal;
and a logical AND circuit that receives the two counter signals output from the counter unit, calculates a logical AND of the two counter signals, and outputs a result of the calculation as the movement signal.
前記検出部は、
前記クロック信号を入力して前記クロック信号に応じて二つのカウンタ信号を出力するカウンタ部と、
二つの前記カウンタ信号のうちの一方の前記カウンタ信号を入力し、一方の前記カウンタ信号の値を反転させた反転信号を出力する論理否定回路と、
二つの前記カウンタ信号のうちの他方の前記カウンタ信号及び前記反転信号を入力し、他方の前記カウンタ信号と前記反転信号との論理積を演算して、演算結果を前記移動信号として出力する論理積回路と、を有する、請求項1~4のいずれか一項に記載の検出回路。
The detection unit is
a counter unit which receives the clock signal and outputs two counter signals in response to the clock signal;
a logical NOT circuit which receives one of the two counter signals and outputs an inverted signal obtained by inverting the value of the other counter signal;
a logical AND circuit that receives the other of the two counter signals and the inverted signal, calculates a logical AND between the other of the two counter signals and the inverted signal, and outputs a result of the calculation as the movement signal.
前記入力部は、圧電素子の駆動によって移動する前記移動体の移動に係る前記信号を入力する、請求項1~6のいずれか一項に記載の検出回路。 The detection circuit according to any one of claims 1 to 6, wherein the input unit inputs the signal related to the movement of the moving body that moves due to the driving of a piezoelectric element. 請求項1~7のいずれか一項に記載の検出回路と、
前記検出回路から出力された前記移動信号及び前記方向信号を処理する制御装置と、を備える、検出装置。
A detection circuit according to any one of claims 1 to 7;
a control device that processes the movement signal and the direction signal output from the detection circuit.
JP2021091362A 2021-05-31 2021-05-31 Detection circuit and detection device Active JP7534263B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021091362A JP7534263B2 (en) 2021-05-31 2021-05-31 Detection circuit and detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021091362A JP7534263B2 (en) 2021-05-31 2021-05-31 Detection circuit and detection device

Publications (2)

Publication Number Publication Date
JP2022183859A JP2022183859A (en) 2022-12-13
JP7534263B2 true JP7534263B2 (en) 2024-08-14

Family

ID=84437948

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021091362A Active JP7534263B2 (en) 2021-05-31 2021-05-31 Detection circuit and detection device

Country Status (1)

Country Link
JP (1) JP7534263B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000213960A (en) 1999-01-26 2000-08-04 Olympus Optical Co Ltd Controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000213960A (en) 1999-01-26 2000-08-04 Olympus Optical Co Ltd Controller

Also Published As

Publication number Publication date
JP2022183859A (en) 2022-12-13

Similar Documents

Publication Publication Date Title
JP4808197B2 (en) Optical encoder and electronic device having the same
CN102879023A (en) Photosensor for position detecting device, position detecting device using same and position detecting method
JP6792602B2 (en) High resolution time-digital converter
JP4875889B2 (en) Encoder count error detection circuit and encoder count error detection method
CN100510648C (en) Encoder device
JP7534263B2 (en) Detection circuit and detection device
JP4951885B2 (en) Encoder device
CN106802597A (en) A kind of incremental optical electric axial angle encoder data processing equipment and processing method
JP6825260B2 (en) Speed detector and speed control system
CN117394825A (en) Capturing circuit and micro-processing chip
JP6707922B2 (en) Physical quantity sensor
US9438247B2 (en) Apparatus for simplification of input signal
CN103475344B (en) A kind of phase demodulating, frequency doubling logic circuit with the anti-mechanism of makeing mistakes
JPS64612Y2 (en)
JP5055016B2 (en) Phase difference measurement circuit
JP4551780B2 (en) Encoder signal processing circuit
JPH04346069A (en) Speed signal generating circuit
KR100550971B1 (en) Encoder Direction Detection Device Using Gray Code
JP3135633B2 (en) Speed detector
JP3035751B2 (en) Optical encoder
JP6196539B2 (en) Optical encoder
JP2010074637A (en) Up/down counter device
JP2001255173A (en) Processing circuit for signal for counting and apparatus for generating angular position signal of sine wave/ cosine wave signal
JP3248209B2 (en) Position detection method
JP2778170B2 (en) Position detection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20240123

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20240626

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: 20240730

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240801

R150 Certificate of patent or registration of utility model

Ref document number: 7534263

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150