JP7239332B2 - MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD - Google Patents

MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD Download PDF

Info

Publication number
JP7239332B2
JP7239332B2 JP2019012158A JP2019012158A JP7239332B2 JP 7239332 B2 JP7239332 B2 JP 7239332B2 JP 2019012158 A JP2019012158 A JP 2019012158A JP 2019012158 A JP2019012158 A JP 2019012158A JP 7239332 B2 JP7239332 B2 JP 7239332B2
Authority
JP
Japan
Prior art keywords
value
unit
control value
control
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
JP2019012158A
Other languages
Japanese (ja)
Other versions
JP2020118639A (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.)
Nidec Sankyo Corp
Original Assignee
Nidec Sankyo 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 Nidec Sankyo Corp filed Critical Nidec Sankyo Corp
Priority to JP2019012158A priority Critical patent/JP7239332B2/en
Priority to CN202010078676.8A priority patent/CN111487688A/en
Publication of JP2020118639A publication Critical patent/JP2020118639A/en
Application granted granted Critical
Publication of JP7239332B2 publication Critical patent/JP7239332B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V8/00Prospecting or detecting by optical means
    • G01V8/10Detecting, e.g. by using light barriers

Landscapes

  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Geophysics (AREA)
  • Geophysics And Detection Of Objects (AREA)
  • Photo Coupler, Interrupter, Optical-To-Optical Conversion Devices (AREA)

Description

本発明は、媒体検知装置および媒体検知方法に関する。 The present invention relates to a medium detection device and a medium detection method.

発光ダイオードと光センサとを用いた媒体検知システムにおいては、発光ダイオードの順方向電圧のばらつきや、光センサとして使用されるフォトトランジスタにおける電流増幅率のばらつきにより、光センサの出力にばらつきが生じてしまう。このような場合、光センサに抵抗器を接続し、その抵抗値を変化させて光センサの出力を調整する。しかしながら、このような調整を行うには、接続される抵抗器が固定抵抗器のみならず可変抵抗器であっても手間がかかってしまう。そこで、並列に接続された2つの抵抗器を発光素子に接続し、電流源と接続された一方の抵抗器を挿入・切り離しすることで発光素子に流れる電流を調整する回路が考えられている(例えば、特許文献1参照。)。 In a medium detection system using a light-emitting diode and a photosensor, variations in the forward voltage of the light-emitting diode and variations in the current amplification factor of the phototransistor used as the photosensor cause variations in the output of the photosensor. put away. In such a case, a resistor is connected to the photosensor and its resistance is varied to adjust the output of the photosensor. However, such adjustment is troublesome even if the connected resistor is not only a fixed resistor but also a variable resistor. Therefore, a circuit that adjusts the current flowing through the light-emitting element by connecting two resistors connected in parallel to the light-emitting element and inserting/disconnecting one of the resistors connected to the current source has been devised ( For example, see Patent Document 1.).

特開平10-221467号公報JP-A-10-221467

上述した技術においては、センサ(受光素子)ごとにその検知基準を調整する必要がある。センサの数が多くなると、それらの出力を処理する制御装置の入力端子として使用するアナログ-デジタル変換用の端子の数に制限があるため、マルチプレクサが必要となってしまい、その構成が複雑になってしまうという問題点がある。また、マルチプレクサにおける多重処理にかかる時間等が原因となって応答時間が遅くなってしまうという問題点がある。 In the technique described above, it is necessary to adjust the detection reference for each sensor (light receiving element). As the number of sensors increases, the number of analog-to-digital conversion terminals used as input terminals for the control device that processes their outputs is limited, requiring multiplexers and complicating the configuration. There is a problem that the In addition, there is a problem that the response time is delayed due to the time required for multiplex processing in the multiplexer.

本発明の目的は、簡易的な構成でセンサの出力値を調整するための制御値を設定することができる媒体検知装置および媒体検知方法を提供することである。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a medium detection device and a medium detection method capable of setting a control value for adjusting the output value of a sensor with a simple configuration.

上記課題を解決するため、本発明の媒体検知装置は、発光部と、
前記発光部が発光した光を検知し、検知した結果を示す値を出力する検知部と、
前記検知部が出力する値の大きさを、制御値を用いて調整する出力調整部と、
前記出力調整部が調整した調整値とあらかじめ設定された閾値との大小関係を判定し、該判定した結果を出力する制御部とを有し、
前記制御部は、前記発光部と前記検知部との間に媒体が無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第1の制御値として決定し、前記発光部と前記検知部との間に前記媒体がある状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第2の制御値として決定し、前記第1の制御値と前記第2の制御値との間で前記媒体の有無を検知するための制御値である検知制御値を決定することを特徴とする。
In order to solve the above problems, the medium detection device of the present invention includes a light emitting unit,
a detection unit that detects the light emitted by the light emitting unit and outputs a value indicating the detection result;
an output adjustment unit that adjusts the magnitude of the value output by the detection unit using a control value;
a control unit that determines the magnitude relationship between the adjustment value adjusted by the output adjustment unit and a preset threshold value, and outputs the determined result;
The control unit changes the control value for the output adjustment unit in a state where there is no medium between the light emission unit and the detection unit, and the magnitude relationship between the adjustment value and the threshold is changed. is determined as a first control value, and in a state where the medium is present between the light emitting unit and the detecting unit, the control value is changed with respect to the output adjusting unit to perform the adjusting The control value when the magnitude relationship between the value and the threshold changes is determined as a second control value, and the presence or absence of the medium is detected between the first control value and the second control value. It is characterized by determining a detection control value that is a control value for.

本発明の媒体検知装置では、制御部が、カードが発光部と検知部との間にある状態と無い状態とで、検知部の出力値を出力調整部が調整し、調整された出力値である調整値と閾値との比較結果に基づいて、カードの有無を検知するための検知制御値を決定する。そのため、本発明では、簡易的な構成でセンサの出力値を調整するための制御値を設定することができる。 In the medium detection device of the present invention, the control unit adjusts the output value of the detection unit according to whether or not the card is present between the light emitting unit and the detection unit, and the adjusted output value is used. A detection control value for detecting the presence or absence of a card is determined based on the result of comparison between an adjustment value and a threshold. Therefore, in the present invention, it is possible to set the control value for adjusting the output value of the sensor with a simple configuration.

本発明において、媒体検知装置は、前記出力調整部は、前記制御値として、前記発光部に流れる電流の電流値を用いる。この場合には、発光部に流れる電流値を変化させるだけでカードの有無を検知するための検知制御値を決定することができる。 In the medium detection device of the present invention, the output adjusting section uses the current value of the current flowing through the light emitting section as the control value. In this case, the detection control value for detecting the presence or absence of the card can be determined simply by changing the value of the current flowing through the light emitting portion.

本発明において、媒体検知装置は、前記出力調整部は、前記制御値として、前記検知部の出力側に接続された抵抗器の抵抗値を用いる。この場合には、検知部の出力側に接続された抵抗器の抵抗値を変化させるだけでカードの有無を検知するための検知制御値を決定することができる。 In the medium detection device of the present invention, the output adjustment section uses the resistance value of a resistor connected to the output side of the detection section as the control value. In this case, the detection control value for detecting the presence or absence of the card can be determined simply by changing the resistance value of the resistor connected to the output side of the detection section.

本発明において、媒体検知装置は、前記制御部は、前記検知制御値を前記第1の制御値のM倍(M>1)と前記第2の制御値のN倍(0<N<1)との間で決定する。この場合には、発光部と検知部との間にカードがあるか無いかの判定に影響を及ぼしにくい範囲で設定が可能となる。 In the present invention, in the medium detection device, the control unit sets the detection control value to M times (M>1) the first control value and N times (0<N<1) the second control value. to decide between In this case, it is possible to set within a range that does not easily affect the determination of whether or not there is a card between the light emitting section and the detecting section.

本発明において、媒体検知装置は、前記制御部は、前記発光部と前記検知部との間に前記媒体がある状態で、前記出力調整部に対して前記制御値を変化させても、前記調整値と前記閾値との大小関係が変化しない場合、前記検知部の出力が最大値となるときの前記制御値を前記第2の制御値とする。この場合には、発光部と検知部との間にカードがある場合に、カードがあると判定するような出力とならなくても、第2の制御値を設定することができる。 In the medium detection device according to the aspect of the invention, the control unit controls the output adjustment unit even if the control value is changed in a state where the medium is present between the light emission unit and the detection unit. When the magnitude relationship between the value and the threshold value does not change, the control value when the output of the detection unit becomes the maximum value is set as the second control value. In this case, the second control value can be set even if it is not determined that there is a card when there is a card between the light emitting unit and the detecting unit.

本発明において、媒体検知装置は、前記制御部は、有無を検知する媒体ごとに、前記発光部と前記検知部との間に該媒体が無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を前記第1の制御値として決定し、前記発光部と前記検知部との間に該媒体がある状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を前記第2の制御値として決定し、前記第1の制御値と前記第2の制御値との間で前記検知制御値を決定する。この場合には、透過率が互いに異なるカードであってもカードがあるか無いかを判定するための制御値を設定することができる。 In the medium detection device of the present invention, the control unit controls the output adjusting unit to control the control value for each medium whose presence or absence is to be detected in a state where there is no medium between the light emitting unit and the detection unit. is changed to determine the control value when the magnitude relationship between the adjustment value and the threshold value changes as the first control value, and the medium is present between the light emitting unit and the detecting unit. changing the control value for the output adjustment unit and determining the control value when the magnitude relationship between the adjustment value and the threshold value changes as the second control value; The sensing control value is determined between a control value and the second control value. In this case, even if the cards have different transmittances, it is possible to set a control value for determining whether or not there is a card.

本発明において、媒体検知装置は、前記制御部は、CPUであり、前記出力調整部からの出力信号を前記CPUのデジタル信号用端子に入力する。この場合、アナログデジタル変換の処理が不要となる。 In the medium detection device according to the present invention, the control section is a CPU, and the output signal from the output adjustment section is input to a digital signal terminal of the CPU. In this case, analog-to-digital conversion processing becomes unnecessary.

上記課題を解決するため、本発明の媒体検知方法は、発光部が発光した光を検知し、検知した結果を示す値を出力する処理と、
前記出力する値の大きさを、制御値を用いて調整する処理と、
前記調整した調整値とあらかじめ設定された閾値との大小関係を判定する処理と、
前記発光部と前記光を検知するセンサとの間に媒体が無い状態で、前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第1の制御値として決定する処理と、
前記発光部と前記光を検知するセンサとの間に媒体が無い状態で、前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第2の制御値として決定する処理と、
前記第1の制御値と前記第2の制御値との間で前記媒体の有無を検知するための制御値である検知制御値を決定する処理と、
前記検知制御値を用いて調整した調整値と前記閾値との大小関係を示す値を出力する処理とを行うことを特徴とする。
In order to solve the above problems, a medium detection method of the present invention includes processing for detecting light emitted by a light emitting unit and outputting a value indicating the detection result;
a process of adjusting the magnitude of the output value using a control value;
a process of determining the magnitude relationship between the adjusted adjustment value and a preset threshold;
The control value is changed in a state where there is no medium between the light emitting unit and the sensor that detects light, and the control value when the magnitude relationship between the adjustment value and the threshold value changes is changed to a first value. a process of determining as a control value;
The control value is changed in a state where there is no medium between the light emitting unit and the sensor for detecting light, and the control value when the magnitude relationship between the adjustment value and the threshold value changes is set to a second value. a process of determining as a control value;
a process of determining a detection control value, which is a control value for detecting the presence or absence of the medium, between the first control value and the second control value;
and outputting a value indicating a magnitude relationship between the adjustment value adjusted using the detection control value and the threshold value.

本発明の媒体検知方法では、カードが発光部とセンサとの間にある状態と無い状態とで、センサの出力値を調整し、調整された出力値である調整値と閾値との比較結果に基づいて、カードの有無を検知する。そのため、本発明では、簡易的な構成でセンサの出力値を調整するための制御値を設定することができる。 In the medium detection method of the present invention, the output value of the sensor is adjusted depending on whether or not the card is present between the light-emitting portion and the sensor, and the result of comparison between the adjusted value, which is the adjusted output value, and the threshold value. Based on this, the presence or absence of the card is detected. Therefore, in the present invention, it is possible to set the control value for adjusting the output value of the sensor with a simple configuration.

以上説明したように、本発明においては、簡易的な構成でセンサの出力値を調整するための制御値を設定することができる。 As described above, in the present invention, it is possible to set the control value for adjusting the output value of the sensor with a simple configuration.

本発明の媒体検知装置の第1の実施の形態を示す図である。It is a figure which shows 1st Embodiment of the medium detection apparatus of this invention. 図1に示した媒体検知装置における媒体検知方法の一例を説明するためのフローチャートである。2 is a flowchart for explaining an example of a medium detection method in the medium detection device shown in FIG. 1; 本発明の媒体検知装置の第2の実施の形態を示す図である。It is a figure which shows 2nd Embodiment of the medium detection apparatus of this invention. 図3に示した媒体検知装置における媒体検知方法の一例を説明するためのフローチャートである。4 is a flowchart for explaining an example of a medium detection method in the medium detection device shown in FIG. 3; 図3に示した発光ダイオードに流れる電流の値とフォトトランジスタから出力される電圧の値との関係の一例を示すグラフである。4 is a graph showing an example of the relationship between the value of the current flowing through the light emitting diode shown in FIG. 3 and the value of the voltage output from the phototransistor; 本発明の媒体検知装置の第3の実施の形態を示す図である。It is a figure which shows 3rd Embodiment of the medium detection apparatus of this invention. 図6に示した媒体検知装置における媒体検知方法の一例を説明するためのフローチャートである。7 is a flowchart for explaining an example of a medium detection method in the medium detection device shown in FIG. 6; 図6に示した可変抵抗器の抵抗値とフォトトランジスタから出力される電圧の値との関係の一例を示すグラフである。7 is a graph showing an example of the relationship between the resistance value of the variable resistor shown in FIG. 6 and the voltage value output from the phototransistor;

以下に本発明の実施の形態について図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.

(第1の実施の形態)
図1は、本発明の媒体検知装置の第1の実施の形態を示す図である。本形態における媒体検知装置100は図1に示すように、発光部110と、検知部120と、出力調整部130と、制御部140とを有する。媒体検知装置100は、例えば、カードリーダやカード発行機などのカード(媒体)を搬送して処理する装置などに搭載されて使用される。なお、図1には本発明の媒体検知装置100が具備する構成要素のうち、本形態に関わる主要な要素のみを示している。
(First embodiment)
FIG. 1 is a diagram showing a first embodiment of the medium detection device of the present invention. As shown in FIG. 1, the medium detection device 100 in this embodiment has a light emitting section 110, a detection section 120, an output adjustment section 130, and a control section 140. As shown in FIG. The medium detection device 100 is used by being installed in a device such as a card reader or a card issuing machine that transports and processes cards (medium). Note that FIG. 1 shows only major elements related to this embodiment among the constituent elements provided in the medium detection device 100 of the present invention.

発光部110は、LED(Light Emitting Diode:発光ダイオード)等の電流を流すことで発光する発光素子である。
検知部120は、発光部110が発光した光を検知する。また、検知部120は、検知した結果を示す値を制御部140へ出力する。
出力調整部130は、検知部120が出力する値の大きさを、制御値を用いて調整する。つまり、出力調整部130が制御値を変化させることで、検知部120が出力する値の大きさが変化する。ここで調整された出力値が調整値となる。
制御部140は、出力調整部130が調整した調整値とあらかじめ設定された閾値との大小関係を判定する。また、制御部140は、判定した結果を出力する。この出力とは、媒体検知装置100の外部への出力(通知)を示し、表示や、音を用いた出力、振動、印刷、外部装置への送信、またはカード処理を開始する(続ける)/終了する(中断する)ためのトリガ出力等を意味する。以下の説明においても同様である。さらに、制御部140は、発光部110と検知部120との間にカード等の媒体(以下、カードと称する)が無い状態で、出力調整部130に対して制御値を変化させて、調整値と閾値とを比較し、それらの大小関係が変化したときの制御値を第1の制御値として決定する。また、制御部140は、発光部110と検知部120との間にカードがある状態で、出力調整部130に対して制御値を変化させて、調整値と閾値とを比較し、それらの大小関係が変化したときの制御値を第2の制御値として決定する。また、制御部140は、決定した第1の制御値と第2の制御値との間でカードの有無を検知するための制御値である検知制御値を決定する。
The light emitting unit 110 is a light emitting element such as an LED (Light Emitting Diode) that emits light when a current is applied.
The detector 120 detects the light emitted by the light emitter 110 . Also, the detection unit 120 outputs a value indicating the detection result to the control unit 140 .
The output adjuster 130 adjusts the magnitude of the value output by the detector 120 using the control value. That is, when the output adjustment unit 130 changes the control value, the magnitude of the value output by the detection unit 120 changes. The output value adjusted here becomes the adjusted value.
The control unit 140 determines the magnitude relationship between the adjustment value adjusted by the output adjustment unit 130 and a preset threshold value. Also, the control unit 140 outputs the determined result. This output indicates an output (notification) to the outside of the medium detection device 100, such as display, output using sound, vibration, printing, transmission to an external device, or starting (continuing)/ending card processing. It means a trigger output or the like for performing (interrupting). The same applies to the following description. Furthermore, the control unit 140 changes the control value of the output adjustment unit 130 in a state where there is no medium such as a card (hereinafter referred to as a card) between the light emission unit 110 and the detection unit 120, and the adjustment value is compared with the threshold value, and the control value when the magnitude relationship between them changes is determined as the first control value. In addition, while the card is between the light emitting unit 110 and the detecting unit 120, the control unit 140 changes the control value for the output adjusting unit 130, compares the adjusted value with the threshold value, and determines whether the values are large or small. A control value when the relationship changes is determined as a second control value. Further, control unit 140 determines a detection control value, which is a control value for detecting the presence or absence of a card, between the determined first control value and second control value.

以下に、図1に示した媒体検知装置100における媒体検知方法について説明する。図2は、図1に示した媒体検知装置100における媒体検知方法の一例を説明するためのフローチャートである。 A medium detection method in the medium detection device 100 shown in FIG. 1 will be described below. FIG. 2 is a flow chart for explaining an example of a medium detection method in the medium detection device 100 shown in FIG.

まず、発光部110が発光すると(ステップS1)、検知部120が、その光を検知し、検知した結果である測定値を出力する(ステップS2)。 First, when the light emitting unit 110 emits light (step S1), the detecting unit 120 detects the light and outputs a measurement value as a result of the detection (step S2).

続いて、発光部110と検知部120との間にカードが無い状態で、出力調整部130が制御値を変化させていき、制御部140は、調整値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS3)。このとき、制御部140は、制御値の変化に応じて調整値が小さな値から変化した場合、調整値が閾値を超えたかどうかを判定する。調整値と閾値との大小関係が変化したら、制御部140は、そのときの制御値を第1の制御値として決定する(ステップS4)。 Subsequently, with no card between the light emitting unit 110 and the detecting unit 120, the output adjustment unit 130 changes the control value, and the control unit 140 determines the magnitude relationship between the adjustment value and the preset threshold value. has changed (step S3). At this time, when the adjustment value changes from a small value according to the change in the control value, the control unit 140 determines whether the adjustment value exceeds the threshold. When the magnitude relationship between the adjustment value and the threshold changes, the control unit 140 determines the control value at that time as the first control value (step S4).

続いて、発光部110と検知部120との間にカードがある状態で、出力調整部130が制御値を変化させていき、制御部140は、調整値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS5)。このとき、制御部140は、制御値の変化に応じて調整値が小さな値から変化した場合、調整値が閾値を超えたかどうかを判定する。調整値と閾値との大小関係が変化したら、制御部140は、そのときの制御値を第2の制御値として決定する(ステップS6)。
なお、ステップS3~S4の処理と、ステップS5~S6の処理とは、どちらを先に行っても良い。
Subsequently, while the card is between the light emitting unit 110 and the detecting unit 120, the output adjusting unit 130 changes the control value, and the control unit 140 determines the magnitude relationship between the adjusted value and the preset threshold value. has changed (step S5). At this time, when the adjustment value changes from a small value according to the change in the control value, the control unit 140 determines whether the adjustment value exceeds the threshold. When the magnitude relationship between the adjustment value and the threshold changes, the control unit 140 determines the control value at that time as the second control value (step S6).
Either the processing of steps S3 to S4 or the processing of steps S5 to S6 may be performed first.

続いて、制御部140は、決定した第1の制御値と第2の制御値との間で、カードを検知するための制御値である検知制御値を決定する(ステップS7)。そして、制御部140は、決定した検知制御値を用いて調整した調整値と閾値とを比較して、それらの大小関係を出力する(ステップS8)。この大小関係が、発光部110と検知部120との間にカードがあるか無いかの判定結果となる。 Next, control unit 140 determines a detection control value, which is a control value for detecting a card, between the determined first control value and second control value (step S7). Then, the control unit 140 compares the adjustment value adjusted using the determined detection control value and the threshold value, and outputs the magnitude relationship therebetween (step S8). This size relationship is the result of determining whether or not there is a card between the light emitting unit 110 and the detecting unit 120 .

本形態においては、制御部140が、カードが発光部110と発光部110からの光を検知する検知部120との間にある状態と無い状態とで、検知部120の出力値を出力調整部130が調整し、調整された出力値である調整値と閾値との比較結果に基づいて、カードの有無を検知するための検知制御値を決定する。そのため、簡易的な構成で検知部120の出力値を調整するための制御値を設定することができる。このため、安価な媒体検知装置100を提供できる。また、カードの有無を、調整値と閾値との比較結果のみで判定できるため、CPUでカードの有無を判定する処理量を低減することができる。さらに、媒体検知装置100で処理されるカードごとに検知制御値を設定するように構成することにより、光の透過率が高いカードが使用される場合などに対しても、カードの有無を誤検知してしまう確率を低減できる。 In this embodiment, the control unit 140 adjusts the output value of the detection unit 120 depending on whether or not the card is between the light emitting unit 110 and the detection unit 120 that detects the light from the light emitting unit 110. 130 adjusts and determines a detection control value for detecting the presence or absence of a card based on the result of comparison between the adjustment value, which is the adjusted output value, and the threshold. Therefore, it is possible to set a control value for adjusting the output value of the detection unit 120 with a simple configuration. Therefore, an inexpensive medium detection device 100 can be provided. Moreover, since the presence or absence of a card can be determined only by the result of comparison between the adjustment value and the threshold value, the amount of processing for determining the presence or absence of a card by the CPU can be reduced. Furthermore, by setting the detection control value for each card processed by the medium detection device 100, even when a card with high light transmittance is used, the presence or absence of the card may be erroneously detected. You can reduce the chances of it happening.

(第2の実施の形態)
図3は、本発明の媒体検知装置の第2の実施の形態を示す図である。本形態における媒体検知装置101は図3に示すように、発光ダイオード111と、フォトトランジスタ121と、定電流ドライバ131と、CPU(Central Processing Unit)141と、抵抗器151とを有する。なお、図3には本発明の媒体検知装置101が具備する構成要素のうち、本形態に関わる主要な要素のみを示している。
(Second embodiment)
FIG. 3 is a diagram showing a second embodiment of the medium detection device of the present invention. The medium detection device 101 in this embodiment has a light emitting diode 111, a phototransistor 121, a constant current driver 131, a CPU (Central Processing Unit) 141, and a resistor 151, as shown in FIG. It should be noted that FIG. 3 shows only main elements related to this embodiment among the constituent elements provided in the medium detection device 101 of the present invention.

発光ダイオード111は、順方向に電流を流すことで光を出力する発光部である。
フォトトランジスタ121は、発光ダイオード111が発光した光を検知する検知部である。抵抗器151は、フォトトランジスタ121とGND(グランド)とに接続され、所定の抵抗値を有する。フォトトランジスタ121は、検知した光の強度に応じた電流を出力し、この電流により抵抗器151の両端に発生する電圧(以下の記載で、「フォトトランジスタ121の出力電圧の値」と記載することもある)が測定値としてCPU141へ入力される。
定電流ドライバ131は、発光ダイオード111と接続された出力調整部である。定電流ドライバ131は、発光ダイオード111に流れる電流の大きさ(電流値)を制御値として調整する。このように、定電流ドライバ131が発光ダイオード111に流れる電流の大きさを調整することで、フォトトランジスタ121の出力電圧を調整する。ここで調整されたフォトトランジスタ121の出力電圧が調整値となる。
CPU141は、定電流ドライバ131が調整した調整値、つまり、定電流ドライバ131が調整した発光ダイオード111に流れる電流値に応じてフォトトランジスタ121が出力する出力電圧の値と、あらかじめ設定された閾値との大小関係を判定する制御部である。また、CPU141は、判定した結果を出力する。さらに、CPU141は、発光ダイオード111とフォトトランジスタ121との間にカードが無い状態で、定電流ドライバ131に対して電流値を変化させて、調整値と閾値とを比較し、それらの大小関係が変化したときの電流値を第1の制御値として決定する。また、CPU141は、発光ダイオード111とフォトトランジスタ121との間にカードがある状態で、定電流ドライバ131に対して電流値を変化させて、調整値と閾値とを比較し、それらの大小関係が変化したときの電流値を第2の制御値として決定する。また、CPU141は、決定した第1の制御値と第2の制御値との間でカードの有無を検知するための電流値である検知制御値を決定する。なお、CPU141は、汎用のCPUを用いるものであっても良く、デジタル信号を入力するデジタル信号用端子1411にフォトトランジスタ121からの出力を接続するものであっても良い。デジタル信号用端子1411を用いれば、上述した閾値は、CPU141のデジタル信号用端子1411の仕様に基づいて、入力信号のレベルが「0」と「1」とのどちらであるかを判定するための基準値となる。
The light-emitting diode 111 is a light-emitting portion that outputs light by passing current in the forward direction.
The phototransistor 121 is a detection unit that detects light emitted by the light emitting diode 111 . A resistor 151 is connected to the phototransistor 121 and GND (ground) and has a predetermined resistance value. The phototransistor 121 outputs a current corresponding to the intensity of the detected light, and the voltage generated across the resistor 151 by this current (hereinafter referred to as "the value of the output voltage of the phototransistor 121"). ) is input to the CPU 141 as a measured value.
A constant current driver 131 is an output adjustment unit connected to the light emitting diode 111 . The constant current driver 131 adjusts the magnitude (current value) of the current flowing through the light emitting diode 111 as a control value. In this way, the output voltage of the phototransistor 121 is adjusted by the constant current driver 131 adjusting the magnitude of the current flowing through the light emitting diode 111 . The output voltage of the phototransistor 121 adjusted here becomes the adjustment value.
The CPU 141 determines the value of the output voltage output by the phototransistor 121 according to the adjustment value adjusted by the constant current driver 131, that is, the value of the current flowing through the light emitting diode 111 adjusted by the constant current driver 131, and the preset threshold value. is a control unit that determines the magnitude relationship between . Also, the CPU 141 outputs the determined result. Furthermore, the CPU 141 changes the current value of the constant current driver 131 in a state where there is no card between the light emitting diode 111 and the phototransistor 121, compares the adjustment value with the threshold value, and determines the magnitude relationship between them. The current value when it changes is determined as the first control value. In addition, the CPU 141 changes the current value of the constant current driver 131 while the card is between the light emitting diode 111 and the phototransistor 121, compares the adjustment value and the threshold value, and determines the magnitude relationship between them. The current value when it changes is determined as the second control value. The CPU 141 also determines a detection control value, which is a current value for detecting the presence or absence of a card, between the determined first control value and second control value. The CPU 141 may be a general-purpose CPU, or may be one in which the output from the phototransistor 121 is connected to a digital signal terminal 1411 for inputting a digital signal. If the digital signal terminal 1411 is used, the above-described threshold is used to determine whether the level of the input signal is "0" or "1" based on the specification of the digital signal terminal 1411 of the CPU 141. It becomes the reference value.

以下に、図3に示した媒体検知装置101における媒体検知方法について説明する。図4は、図3に示した媒体検知装置101における媒体検知方法の一例を説明するためのフローチャートである。 A medium detection method in the medium detection device 101 shown in FIG. 3 will be described below. FIG. 4 is a flowchart for explaining an example of a medium detection method in the medium detection device 101 shown in FIG.

まず、定電流ドライバ131を用いて発光ダイオード111の順方向に電流を流し、発光ダイオード111が発光すると(ステップS11)、フォトトランジスタ121が、その光を検知し、検知した光の強度に応じた電流を出力し、抵抗器151により、その電流に応じた電圧が測定値として出力される(ステップS12)。 First, the constant current driver 131 is used to apply a forward current to the light emitting diode 111, and when the light emitting diode 111 emits light (step S11), the phototransistor 121 detects the light and responds to the intensity of the detected light. A current is output, and a voltage corresponding to the current is output as a measured value by the resistor 151 (step S12).

続いて、発光ダイオード111とフォトトランジスタ121との間にカードが無い状態で、定電流ドライバ131が発光ダイオード111に流す電流の値を変化させていき、CPU141は、そのときのフォトトランジスタ121からの出力電圧の値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS13)。このとき、CPU141は、定電流ドライバ131が発光ダイオード111に流す電流の値の変化に応じてフォトトランジスタ121からの出力電圧の値が小さな値から変化した場合、その出力電圧の値が閾値を超えたかどうかを判定する。出力電圧の値と閾値との大小関係が変化したら、CPU141は、そのときの電流の値を第1の制御値として決定する(ステップS14)。 Subsequently, with no card between the light emitting diode 111 and the phototransistor 121, the constant current driver 131 changes the value of the current flowing through the light emitting diode 111, and the CPU 141 controls the current from the phototransistor 121 It is determined whether or not the magnitude relationship between the value of the output voltage and the preset threshold has changed (step S13). At this time, when the value of the output voltage from the phototransistor 121 changes from a small value according to the change in the value of the current that the constant current driver 131 flows to the light emitting diode 111, the CPU 141 detects that the value of the output voltage exceeds the threshold. determine whether or not When the magnitude relationship between the output voltage value and the threshold value changes, the CPU 141 determines the current value at that time as the first control value (step S14).

続いて、発光ダイオード111とフォトトランジスタ121との間にカードがある状態で、定電流ドライバ131が発光ダイオード111に流す電流の値を変化させていき、CPU141は、そのときのフォトトランジスタ121からの出力電圧の値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS15)。このとき、CPU141は、定電流ドライバ131が発光ダイオード111に流す電流の値の変化に応じてフォトトランジスタ121からの出力電圧の値が小さな値から変化した場合、その出力電圧の値が閾値を超えたかどうかを判定する。出力電圧の値と閾値との大小関係が変化したら、CPU141は、そのときの電流の値を第2の制御値として決定する(ステップS16)。
なお、ステップS13~S14の処理と、ステップS15~S16の処理とは、どちらを先に行っても良い。
Subsequently, while the card is placed between the light emitting diode 111 and the phototransistor 121, the constant current driver 131 changes the value of the current flowing through the light emitting diode 111, and the CPU 141 controls the current from the phototransistor 121 It is determined whether or not the magnitude relationship between the value of the output voltage and the preset threshold has changed (step S15). At this time, when the value of the output voltage from the phototransistor 121 changes from a small value according to the change in the value of the current that the constant current driver 131 flows to the light emitting diode 111, the CPU 141 detects that the value of the output voltage exceeds the threshold. determine whether or not When the magnitude relationship between the output voltage value and the threshold value changes, the CPU 141 determines the current value at that time as the second control value (step S16).
Either the processing of steps S13 to S14 or the processing of steps S15 to S16 may be performed first.

続いて、CPU141は、決定した第1の制御値と第2の制御値との間で、カードを検知するための電流値である検知制御値を決定する(ステップS17)。そして、CPU141は、決定した検知制御値を用いて調整した調整値(フォトトランジスタ121の出力電圧の値)と閾値とを比較して、それらの大小関係を出力する(ステップS18)。この大小関係が、発光ダイオード111とフォトトランジスタ121との間にカードがあるか無いかの判定結果となる。 Subsequently, the CPU 141 determines a detection control value, which is a current value for detecting the card, between the determined first control value and second control value (step S17). Then, the CPU 141 compares the adjustment value (the value of the output voltage of the phototransistor 121) adjusted using the determined detection control value with the threshold value, and outputs the magnitude relationship therebetween (step S18). This magnitude relationship is the result of determination as to whether or not there is a card between the light emitting diode 111 and the phototransistor 121 .

図5は、図3に示した発光ダイオード111に流れる電流の値とフォトトランジスタ121から出力される電圧の値との関係の一例を示すグラフである。 FIG. 5 is a graph showing an example of the relationship between the value of the current flowing through the light emitting diode 111 and the value of the voltage output from the phototransistor 121 shown in FIG.

図5の破線で示した関係が、発光ダイオード111とフォトトランジスタ121との間にカードが無い場合の電流値と出力電圧値(センサ電圧値)との関係である。図5に示すように、例えば、出力電圧値がVIHのときに、その出力電圧値が閾値を超えた場合に、CPU141はそのときの電流値If_hを第1の制御値とする。また、図5の一点鎖線で示した関係が、発光ダイオード111とフォトトランジスタ121との間にカードがある場合の電流値と出力電圧値との関係である。図5に示すように、例えば、出力電圧値がVILのときに、その出力電圧値が閾値を超えた場合に、CPU141はそのときの電流値If_lを第2の制御値とする。なお、電流値がある程度大きな値となると、それ以上大きな値へ変化させても、出力電圧値が一定の値となり、それ以上の値にはならないケースがある。その場合には、CPU141は、フォトトランジスタ121の出力が最大値となるときの電流値を第2の制御値とする。そして、CPU141は、第1の制御値であるIf_hと、第2の制御値であるIf_lとの間の電流値を検知制御値として決定する。検知制御値をIFとして、これらの関係を式で表すと、
If_h×M<IF<If_l×N … (式1)
となる。ここで、M>1であり、0<N<1である。また、このように決定した検知制御値IFを用いて検知を行っているうちに、If_hとIf_lとの差が小さくなってきた場合、発光ダイオード111や、フォトトランジスタ121のクリーニングを行う目安とするものであっても良い。
なお、図5に示したグラフでは、VIHがVILよりも高い電圧値となっているが、一般的には、発光ダイオード111の出力が飽和しない限り、VIHとVILとは互いに同程度の値となる。ただし、VILがVIHよりも高くなっても良い。
The relationship indicated by the dashed line in FIG. 5 is the relationship between the current value and the output voltage value (sensor voltage value) when there is no card between the light emitting diode 111 and the phototransistor 121 . As shown in FIG. 5, for example, when the output voltage value is VIH and the output voltage value exceeds the threshold value, the CPU 141 sets the current value If_h at that time as the first control value. 5 is the relationship between the current value and the output voltage value when the card is placed between the light emitting diode 111 and the phototransistor 121. The relationship indicated by the dashed line in FIG. As shown in FIG. 5, for example, when the output voltage value is VIL and the output voltage value exceeds the threshold, the CPU 141 sets the current value If_l at that time as the second control value. It should be noted that when the current value reaches a certain large value, even if the current value is changed to a larger value, there are cases where the output voltage value remains constant and does not exceed that value. In that case, the CPU 141 sets the current value when the output of the phototransistor 121 reaches the maximum value as the second control value. Then, the CPU 141 determines a current value between If_h, which is the first control value, and If_l, which is the second control value, as the detection control value. If the detection control value is IF and these relationships are represented by an equation,
If_h×M<IF<If_l×N (Formula 1)
becomes. where M>1 and 0<N<1. Further, when the difference between If_h and If_l becomes smaller while detection is performed using the detection control value IF determined in this way, it is used as a guideline for cleaning the light emitting diode 111 and the phototransistor 121. It can be anything.
In the graph shown in FIG. 5, VIH has a higher voltage value than VIL. Become. However, VIL may be higher than VIH.

本形態においては、CPU141が、カードが発光ダイオード111と発光ダイオード111からの光を検知するフォトトランジスタ121との間にある状態と無い状態とで、フォトトランジスタ121の出力値を定電流ドライバ131が調整し、調整された出力値である調整値と閾値との比較結果に基づいて、カードの有無を検知するための検知制御値を決定する。そのため、フォトトランジスタ121に流れる電流を調整するだけで、簡易的な構成でフォトトランジスタ121の出力値を調整するための制御値を設定することができる。 In this embodiment, the CPU 141 determines whether or not the card is between the light emitting diode 111 and the phototransistor 121 that detects the light from the light emitting diode 111. A detection control value for detecting the presence or absence of a card is determined based on the result of comparison between the adjustment value, which is the adjusted output value, and the threshold. Therefore, the control value for adjusting the output value of the phototransistor 121 can be set with a simple configuration only by adjusting the current flowing through the phototransistor 121 .

(第3の実施の形態)
図6は、本発明の媒体検知装置の第3の実施の形態を示す図である。本形態における媒体検知装置102は図6に示すように、発光ダイオード112と、フォトトランジスタ122と、可変抵抗器132と、CPU142と、電流源152とを有する。なお、図6には本発明の媒体検知装置102が具備する構成要素のうち、本形態に関わる主要な要素のみを示している。
(Third Embodiment)
FIG. 6 is a diagram showing a third embodiment of the medium detection device of the present invention. The medium sensing device 102 in this embodiment has a light emitting diode 112, a phototransistor 122, a variable resistor 132, a CPU 142, and a current source 152, as shown in FIG. It should be noted that FIG. 6 shows only main elements related to this embodiment among the constituent elements provided in the medium detection device 102 of the present invention.

発光ダイオード112は、順方向に電流を流すことで光を出力する発光部である。
フォトトランジスタ122は、発光ダイオード112が発光した光を検出する検知部である。フォトトランジスタ122は、検知した光の強度に応じた電圧を測定値として出力する。
可変抵抗器132は、フォトトランジスタ122の出力側に接続された出力調整部である。可変抵抗器132は、フォトトランジスタ122から出力される電流を基に、CPU142へ出力する電圧値を調整するための抵抗値を制御値として調整する。ここで調整された出力電圧が調整値となる。
CPU142は、可変抵抗器132が調整した調整値、つまり、可変抵抗器132が調整したフォトトランジスタ122が出力する電圧値と、あらかじめ設定された閾値との大小関係を判定する制御部である。また、CPU142は、判定した結果を出力する。さらに、CPU142は、発光ダイオード112とフォトトランジスタ122との間にカードが無い状態で、可変抵抗器132に対して抵抗値を変化させて、調整値と閾値とを比較し、それらの大小関係が変化したときの抵抗値を第1の制御値として決定する。また、CPU142は、発光ダイオード112とフォトトランジスタ122との間にカードがある状態で、可変抵抗器132に対して抵抗値を変化させて、調整値と閾値とを比較し、それらの大小関係が変化したときの抵抗値を第2の制御値として決定する。また、CPU142は、決定した第1の制御値と第2の制御値との間でカードの有無を検知するための抵抗値である検知制御値を決定する。なお、CPU142は、汎用のCPUを用いるものであっても良く、デジタル信号を入力するデジタル信号用端子1421にフォトトランジスタ122からの出力を接続するものであっても良い。デジタル信号用端子1421を用いれば、上述した閾値は、CPU142のデジタル信号用端子1421の仕様に基づいて、入力信号のレベルが「0」と「1」とのどちらであるかを判定するための基準値となる。
電流源152は、発光ダイオード111と接続され、発光ダイオード111の順方向に所定の大きさの電流を流す。
The light-emitting diode 112 is a light-emitting portion that outputs light by passing current in the forward direction.
The phototransistor 122 is a detection unit that detects light emitted by the light emitting diode 112 . The phototransistor 122 outputs a voltage corresponding to the intensity of the detected light as a measured value.
A variable resistor 132 is an output adjustment unit connected to the output side of the phototransistor 122 . The variable resistor 132 adjusts the resistance value for adjusting the voltage value to be output to the CPU 142 based on the current output from the phototransistor 122 as a control value. The output voltage adjusted here becomes the adjusted value.
The CPU 142 is a control unit that determines the magnitude relationship between the adjustment value adjusted by the variable resistor 132, that is, the voltage value output by the phototransistor 122 adjusted by the variable resistor 132, and a preset threshold value. Also, the CPU 142 outputs the determined result. Furthermore, the CPU 142 changes the resistance value of the variable resistor 132 in a state where there is no card between the light emitting diode 112 and the phototransistor 122, compares the adjustment value and the threshold value, and determines the magnitude relationship between them. The resistance value when it changes is determined as the first control value. In addition, the CPU 142 changes the resistance value of the variable resistor 132 while the card is placed between the light emitting diode 112 and the phototransistor 122, compares the adjustment value and the threshold value, and determines the magnitude relationship between them. The resistance value when it changes is determined as the second control value. The CPU 142 also determines a detection control value, which is a resistance value for detecting the presence or absence of a card, between the determined first control value and second control value. Note that the CPU 142 may be a general-purpose CPU, or may be one in which the output from the phototransistor 122 is connected to a digital signal terminal 1421 for inputting a digital signal. If the digital signal terminal 1421 is used, the above-described threshold is used to determine whether the level of the input signal is "0" or "1" based on the specifications of the digital signal terminal 1421 of the CPU 142. It becomes the reference value.
The current source 152 is connected to the light emitting diode 111 and causes a current of a predetermined magnitude to flow in the forward direction of the light emitting diode 111 .

以下に、図6に示した媒体検知装置102における媒体検知方法について説明する。図7は、図6に示した媒体検知装置102における媒体検知方法の一例を説明するためのフローチャートである。 A medium detection method in the medium detection device 102 shown in FIG. 6 will be described below. FIG. 7 is a flow chart for explaining an example of a medium detection method in the medium detection device 102 shown in FIG.

まず、電流源152を用いて発光ダイオード112の順方向に電流を流し、発光ダイオード112が発光すると(ステップS21)、フォトトランジスタ122が、その光を検知し、検知した光の強度に応じた電圧を測定値として出力する(ステップS22)。 First, current is passed through the light emitting diode 112 in the forward direction using the current source 152, and when the light emitting diode 112 emits light (step S21), the phototransistor 122 detects the light and generates a voltage corresponding to the intensity of the detected light. is output as a measured value (step S22).

続いて、発光ダイオード112とフォトトランジスタ122との間にカードが無い状態で、可変抵抗器132が抵抗値を変化させることでフォトトランジスタ122からCPU142のデジタル信号用端子1421へ出力される信号の出力電圧の電圧値を変化させていき、CPU142は、そのときのデジタル信号用端子1421に入力される電圧の値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS23)。このとき、CPU142は、可変抵抗器132の抵抗値の変化に応じてフォトトランジスタ122からデジタル信号用端子1421へ入力される電圧の値が小さな値から変化した場合、その電圧の値が閾値を超えたかどうかを判定する。電圧の値と閾値との大小関係が変化したら、CPU142は、そのときの可変抵抗器132の抵抗値を第1の制御値として決定する(ステップS24)。 Subsequently, with no card between the light-emitting diode 112 and the phototransistor 122, the variable resistor 132 changes the resistance value to output a signal from the phototransistor 122 to the digital signal terminal 1421 of the CPU 142. As the voltage value of the voltage is changed, the CPU 142 determines whether the magnitude relationship between the voltage value input to the digital signal terminal 1421 at that time and the preset threshold has changed (step S23). . At this time, when the value of the voltage input from the phototransistor 122 to the digital signal terminal 1421 changes from a small value according to the change in the resistance value of the variable resistor 132, the CPU 142 detects that the value of the voltage exceeds the threshold value. determine whether or not When the magnitude relationship between the voltage value and the threshold value changes, the CPU 142 determines the resistance value of the variable resistor 132 at that time as the first control value (step S24).

続いて、発光ダイオード111とフォトトランジスタ121との間にカードがある状態で、可変抵抗器132が抵抗値を変化させることでフォトトランジスタ122からCPU142のデジタル信号用端子1421へ出力される信号の出力電圧の電圧値を変化させていき、CPU142は、そのときのデジタル信号用端子1421に入力される電圧の値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS25)。このとき、CPU142は、可変抵抗器132の抵抗値の変化に応じてフォトトランジスタ122からデジタル信号用端子1421へ入力される電圧の値が小さな値から変化した場合、その電圧の値が閾値を超えたかどうかを判定する。電圧の値と閾値との大小関係が変化したら、CPU142は、そのときの可変抵抗器132の抵抗値を第2の制御値として決定する(ステップS26)。
なお、ステップS23~S24の処理と、ステップS25~S26の処理とは、どちらを先に行っても良い。
Subsequently, while the card is placed between the light emitting diode 111 and the phototransistor 121, the variable resistor 132 changes the resistance value to output a signal from the phototransistor 122 to the digital signal terminal 1421 of the CPU 142. As the voltage value of the voltage is changed, the CPU 142 determines whether the magnitude relationship between the voltage value input to the digital signal terminal 1421 at that time and the preset threshold has changed (step S25). . At this time, when the value of the voltage input from the phototransistor 122 to the digital signal terminal 1421 changes from a small value according to the change in the resistance value of the variable resistor 132, the CPU 142 detects that the value of the voltage exceeds the threshold value. determine whether or not When the magnitude relationship between the voltage value and the threshold value changes, the CPU 142 determines the resistance value of the variable resistor 132 at that time as the second control value (step S26).
Either the processing of steps S23 to S24 or the processing of steps S25 to S26 may be performed first.

続いて、CPU142は、決定した第1の制御値と第2の制御値との間で、カードを検知するための抵抗値である検知制御値を決定する(ステップS27)。そして、CPU142は、決定した検知制御値を用いて調整した調整値(フォトトランジスタ122の出力電圧の値)と閾値とを比較して、それらの大小関係を出力する(ステップS28)。この大小関係が、発光ダイオード112とフォトトランジスタ122との間にカードがあるか無いかの判定結果となる。 Subsequently, the CPU 142 determines a detection control value, which is a resistance value for detecting the card, between the determined first control value and second control value (step S27). Then, the CPU 142 compares the adjustment value (the value of the output voltage of the phototransistor 122) adjusted using the determined detection control value with the threshold value, and outputs the magnitude relationship therebetween (step S28). This magnitude relationship is the result of determination as to whether or not there is a card between the light emitting diode 112 and the phototransistor 122 .

図8は、図6に示した可変抵抗器132の抵抗値とフォトトランジスタ122から出力される電圧の値との関係の一例を示すグラフである。 FIG. 8 is a graph showing an example of the relationship between the resistance value of the variable resistor 132 and the voltage value output from the phototransistor 122 shown in FIG.

図8の破線で示した関係が、発光ダイオード112とフォトトランジスタ122との間にカードが無い場合の抵抗値と出力電圧値(センサ電圧値)との関係である。図8に示すように、例えば、出力電圧値がVIHのときに、その出力電圧値が閾値を超えた場合に、CPU142はそのときの抵抗値R_hを第1の制御値とする。また、図8の一点鎖線で示した関係が、発光ダイオード112とフォトトランジスタ122との間にカードがある場合の抵抗値と出力電圧値との関係である。図8に示すように、例えば、出力電圧値がVILのときに、その出力電圧値が閾値を超えた場合に、CPU142はそのときの抵抗値R_lを第2の制御値とする。なお、抵抗値がある程度大きな値となると、それ以上大きな値へ変化させても、出力電圧値が一定の値となり、それ以上の値にはならないケースがある。その場合には、CPU142は、フォトトランジスタ122の出力が最大値となるときの抵抗値を第2の制御値とする。そして、CPU142は、第1の制御値であるR_hと、第2の制御値であるR_lとの間の抵抗値を検知制御値として決定する。検知制御値をRとして、これらの関係を式で表すと、
R_h×M<R<R_l×N … (式2)
となる。ここで、M>1であり、0<N<1である。また、このように決定した検知制御値Rを用いて検知を行っているうちに、R_hとR_lとの差が小さくなってきた場合、発光ダイオード112や、フォトトランジスタ122のクリーニングを行う目安とするものであっても良い。
なお、図8に示したグラフでは、VIHがVIHよりも高い電圧値となっているが、これに限らない。
The relationship indicated by the dashed line in FIG. 8 is the relationship between the resistance value and the output voltage value (sensor voltage value) when there is no card between the light emitting diode 112 and the phototransistor 122 . As shown in FIG. 8, for example, when the output voltage value is VIH and the output voltage value exceeds the threshold value, the CPU 142 sets the resistance value R_h at that time as the first control value. 8 is the relationship between the resistance value and the output voltage value when there is a card between the light emitting diode 112 and the phototransistor 122. The relationship indicated by the dashed line in FIG. As shown in FIG. 8, for example, when the output voltage value is VIL and the output voltage value exceeds the threshold, the CPU 142 sets the resistance value R_l at that time as the second control value. When the resistance value reaches a certain large value, even if the value is changed to a larger value, the output voltage value becomes a constant value, and there are cases where the value does not exceed that value. In that case, the CPU 142 sets the resistance value when the output of the phototransistor 122 reaches the maximum value as the second control value. Then, the CPU 142 determines a resistance value between the first control value R_h and the second control value R_l as the detection control value. Assuming that the detection control value is R, these relationships are represented by an equation:
R_h×M<R<R_l×N (Formula 2)
becomes. where M>1 and 0<N<1. Further, when the difference between R_h and R_l becomes smaller while detection is being performed using the detection control value R determined in this manner, the cleaning of the light emitting diode 112 and the phototransistor 122 is taken as a guideline. It can be anything.
In addition, in the graph shown in FIG. 8, VIH has a higher voltage value than VIH, but it is not limited to this.

本形態においては、CPU142が、カードが発光ダイオード112と発光ダイオード112からの光を検知するフォトトランジスタ122との間にある状態と無い状態とで、フォトトランジスタ122の出力値をフォトトランジスタ122の出力側に接続された可変抵抗器132が調整し、調整された出力値である調整値と閾値との比較結果に基づいて、カードの有無を検知するための検知制御値を決定する。そのため、可変抵抗器132の抵抗値を調整するだけで、簡易的な構成でフォトトランジスタ122の出力値を調整するための制御値を設定することができる。 In this embodiment, the CPU 142 changes the output value of the phototransistor 122 depending on whether or not the card is between the light emitting diode 112 and the phototransistor 122 that detects light from the light emitting diode 112. A detection control value for detecting the presence or absence of the card is determined based on the result of comparison between the adjustment value, which is the output value adjusted by the variable resistor 132 connected to the side, and the threshold. Therefore, it is possible to set a control value for adjusting the output value of the phototransistor 122 with a simple configuration only by adjusting the resistance value of the variable resistor 132 .

以上、各構成要素に各機能(処理)それぞれを分担させて説明したが、この割り当ては上述したものに限定しない。また、構成要素の構成についても、上述した形態はあくまでも例であって、これに限定しない。また、各実施の形態を組み合わせたものであっても良い。 As described above, each function (process) is assigned to each component, but this assignment is not limited to the above. Moreover, the configurations of the constituent elements are also only examples, and are not limited to these. Moreover, what combined each embodiment may be used.

100,101,102 媒体検知装置
110 発光部
111,112 発光ダイオード
120 検知部
121,122 フォトトランジスタ
130 出力調整部
131 定電流ドライバ
132 可変抵抗器
140 制御部
141,142 CPU
151 抵抗器
152 電流源
1411,1421 デジタル信号用端子
Reference Signs List 100, 101, 102 medium detection device 110 light emitting unit 111, 112 light emitting diode 120 detection unit 121, 122 phototransistor 130 output adjustment unit 131 constant current driver 132 variable resistor 140 control unit 141, 142 CPU
151 resistor 152 current source 1411, 1421 digital signal terminal

Claims (5)

発光部と、
前記発光部が発光した光を検知し、検知した結果を示す値を出力する検知部と、
前記検知部が出力する値の大きさを、制御値を用いて調整する出力調整部と、
前記出力調整部が調整した調整値とあらかじめ設定された閾値との大小関係を判定し、該判定した結果を出力する制御部とを有し、
前記出力調整部は、前記制御値として、前記発光部に流れる電流の電流値または前記検知部の出力側に接続された抵抗器の抵抗値を用い、
前記制御部は、前記発光部と前記検知部との間にカードが無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第1の制御値として決定し、前記発光部と前記検知部との間に前記カードがある状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第2の制御値として決定し、前記第1の制御値のM倍(M>1)と前記第2の制御値のN倍(0<N<1)との間で前記カードの有無を検知するための制御値である検知制御値を決定する媒体検知装置。
a light emitting unit;
a detection unit that detects the light emitted by the light emitting unit and outputs a value indicating the detection result;
an output adjustment unit that adjusts the magnitude of the value output by the detection unit using a control value;
a control unit that determines the magnitude relationship between the adjustment value adjusted by the output adjustment unit and a preset threshold value, and outputs the determined result;
The output adjustment unit uses, as the control value, the current value of the current flowing through the light emitting unit or the resistance value of a resistor connected to the output side of the detection unit,
The control unit changes the control value for the output adjustment unit in a state where there is no card between the light emission unit and the detection unit, and the magnitude relationship between the adjustment value and the threshold is changed. is determined as a first control value, and in a state where the card is between the light emitting unit and the detecting unit, the control value is changed with respect to the output adjusting unit, and the adjustment is performed. The control value when the magnitude relationship between the value and the threshold value changes is determined as a second control value, and M times the first control value (M>1) and N times the second control value A medium detection device that determines a detection control value that is a control value for detecting the presence or absence of the card between (0<N<1) .
請求項に記載の媒体検知装置において、
前記制御部は、前記発光部と前記検知部との間に前記カードがある状態で、前記出力調整部に対して前記制御値を変化させても、前記調整値と前記閾値との大小関係が変化しない場合、前記検知部の出力が最大値となるときの前記制御値を前記第2の制御値とする媒体検知装置。
The media sensing device of claim 1 , wherein
Even if the control unit changes the control value for the output adjustment unit while the card is between the light emission unit and the detection unit, the magnitude relationship between the adjustment value and the threshold value does not change. The medium detection device sets the control value when the output of the detection unit reaches a maximum value when the output of the detection unit does not change, as the second control value.
請求項1または請求項2に記載の媒体検知装置において、
前記制御部は、有無を検知するカードごとに、前記発光部と前記検知部との間に該カードが無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を前記第1の制御値として決定し、前記発光部と前記検知部との間に該カードがある状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を前記第2の制御値として決定し、前記第1の制御値と前記第2の制御値との間で前記検知制御値を決定する媒体検知装置。
In the medium detection device according to claim 1 or claim 2 ,
The control unit causes the output adjustment unit to change the control value for each card whose presence/absence is to be detected in a state in which there is no card between the light emitting unit and the detection unit. determining the control value when the magnitude relationship with the threshold value changes as the first control value, and controlling the output adjusting unit in a state where the card is between the light emitting unit and the detecting unit; changing the control value and determining the control value when the magnitude relationship between the adjustment value and the threshold value changes as the second control value, and determining the first control value and the second control value; A media sensing device that determines the sensing control value between.
請求項1からのいずれか1項に記載の媒体検知装置において、
前記制御部は、CPU(Central Processing Unit)であり、前記出力調整部からの出力信号を前記CPUのデジタル信号用端子に入力する媒体検知装置。
In the medium sensing device according to any one of claims 1 to 3 ,
The control unit is a CPU (Central Processing Unit), and the medium detection device inputs an output signal from the output adjustment unit to a digital signal terminal of the CPU.
発光部が発光した光を検知し、検知した結果を示す値を出力する処理と、
前記出力する値の大きさを、前記発光部に流れる電流の電流値または前記検知した結果を示す値を出力する側に接続された抵抗器の抵抗値である制御値を用いて調整する処理と、
前記調整した調整値とあらかじめ設定された閾値との大小関係を判定する処理と、
前記発光部と前記光を検知するセンサとの間にカードが無い状態で、前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第1の制御値として決定する処理と、
前記発光部と前記光を検知するセンサとの間にカードある状態で、前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第2の制御値として決定する処理と、
前記第1の制御値のM倍(M>1)と前記第2の制御値のN倍(0<N<1)との間で前記カードの有無を検知するための制御値である検知制御値を決定する処理と、
前記検知制御値を用いて調整した調整値と前記閾値との大小関係を示す値を出力する処理とを行う媒体検知方法。
a process of detecting light emitted by the light emitting unit and outputting a value indicating the detection result;
a process of adjusting the magnitude of the output value using a control value, which is the current value of the current flowing through the light emitting unit or the resistance value of a resistor connected to the output side of the value indicating the detection result; ,
a process of determining the magnitude relationship between the adjusted adjustment value and a preset threshold;
The control value is changed in a state where there is no card between the light emitting unit and the sensor for detecting light, and the control value when the magnitude relationship between the adjustment value and the threshold value changes is changed to a first value. a process of determining as a control value;
The control value is changed in a state where the card is placed between the light emitting unit and the sensor for detecting light, and the control value when the magnitude relationship between the adjustment value and the threshold value changes is changed to a second value. a process of determining as a control value;
Detection control, which is a control value for detecting the presence or absence of the card between M times the first control value (M>1) and N times the second control value (0<N<1) a process of determining a value;
and outputting a value indicating a magnitude relationship between an adjustment value adjusted using the detection control value and the threshold.
JP2019012158A 2019-01-28 2019-01-28 MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD Active JP7239332B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019012158A JP7239332B2 (en) 2019-01-28 2019-01-28 MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD
CN202010078676.8A CN111487688A (en) 2019-01-28 2020-02-03 Medium detection device and medium detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019012158A JP7239332B2 (en) 2019-01-28 2019-01-28 MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD

Publications (2)

Publication Number Publication Date
JP2020118639A JP2020118639A (en) 2020-08-06
JP7239332B2 true JP7239332B2 (en) 2023-03-14

Family

ID=71794306

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019012158A Active JP7239332B2 (en) 2019-01-28 2019-01-28 MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD

Country Status (2)

Country Link
JP (1) JP7239332B2 (en)
CN (1) CN111487688A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236053A (en) 2001-02-07 2002-08-23 Tamura Electric Works Ltd Optical detector
JP2003306255A (en) 2002-04-15 2003-10-28 Canon Inc Medium detecting device and controlling method thereof, and image forming device
JP2009216489A (en) 2008-03-10 2009-09-24 Yamatake Corp Photosensor device and workpiece position detecting method using the same
US20180290465A1 (en) 2015-07-24 2018-10-11 Hewlett-Packard Development Company, L.P. Sensing media and a media tray

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2656649B2 (en) * 1990-05-18 1997-09-24 沖電気工業株式会社 Medium detection device
JP2890289B2 (en) * 1993-07-30 1999-05-10 株式会社田村電機製作所 Card reader device
JPH07120561A (en) * 1993-10-27 1995-05-12 Seiko Epson Corp Detecting apparatus
JPH10221467A (en) * 1997-02-03 1998-08-21 Sankyo Seiki Mfg Co Ltd Optical sensor output setting circuit and its setting method
JPH1120990A (en) * 1997-07-02 1999-01-26 Tec Corp Medium detecting device
JP2003307976A (en) * 2002-04-15 2003-10-31 Canon Inc Medium detector, control method therefor, and image formation device
KR20090067753A (en) * 2007-12-21 2009-06-25 노틸러스효성 주식회사 Method for automated compensation
JP5917980B2 (en) * 2012-03-30 2016-05-18 日本電産サンキョー株式会社 Information recording medium processing apparatus and signal processing method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002236053A (en) 2001-02-07 2002-08-23 Tamura Electric Works Ltd Optical detector
JP2003306255A (en) 2002-04-15 2003-10-28 Canon Inc Medium detecting device and controlling method thereof, and image forming device
JP2009216489A (en) 2008-03-10 2009-09-24 Yamatake Corp Photosensor device and workpiece position detecting method using the same
US20180290465A1 (en) 2015-07-24 2018-10-11 Hewlett-Packard Development Company, L.P. Sensing media and a media tray

Also Published As

Publication number Publication date
JP2020118639A (en) 2020-08-06
CN111487688A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
KR20130103381A (en) Voltage regulator
JP7239332B2 (en) MEDIUM DETECTION DEVICE AND MEDIUM DETECTION METHOD
KR102378520B1 (en) Semiconductor Apparatus and System
TWI333558B (en) Detecting device and detecting method of detected object by using optical sensor
US5248879A (en) Circuit for adjusting the sensitivity of a sensor using a digital counter and a low-pass filter
US20080030356A1 (en) Digital Measurement Transmitter With Current Signal
US10671103B2 (en) Voltage supply apparatus
JP5962097B2 (en) Recording material discrimination sensor and image forming apparatus
EP1755220B1 (en) Interface circuit
JP6672239B2 (en) Sensor device and image forming device
KR101997360B1 (en) Apparatus for detecting disconnection of inductive sensor
KR20110113383A (en) Multi-output power supply device
JPWO2021186635A5 (en)
CN114420071B (en) Brightness calibration method, brightness calibration device, electronic equipment and storage medium
JP6610162B2 (en) State determination device and state determination method
US11386773B1 (en) Fire alarm system
JP7055296B2 (en) Optical sensor and counter
JPH0679948B2 (en) Two-sheet insertion detector
JP6065516B2 (en) Information code reader
KR101245009B1 (en) Medium detecting sensor, leveling method thereof and financial device using the same
US10926555B2 (en) Switch and resistor array for detecting paper tray dimensions
JP2007180274A (en) Laser impairment detecting method, laser impairment detecting device, and image forming device
WO2019130939A1 (en) Analog signal input/output device and control method for analog signal input/output device
KR100642358B1 (en) Apparatus and methhod for controlling receving sensitivity of infrared rays signal in an electronics apparutus
JP2023150374A (en) Device and method for correcting temperature of optical sensor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221101

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221228

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230302

R150 Certificate of patent or registration of utility model

Ref document number: 7239332

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150