JP2020118639A - Medium detector and medium detection method - Google Patents

Medium detector and medium detection method Download PDF

Info

Publication number
JP2020118639A
JP2020118639A JP2019012158A JP2019012158A JP2020118639A JP 2020118639 A JP2020118639 A JP 2020118639A JP 2019012158 A JP2019012158 A JP 2019012158A JP 2019012158 A JP2019012158 A JP 2019012158A JP 2020118639 A JP2020118639 A JP 2020118639A
Authority
JP
Japan
Prior art keywords
value
control value
unit
control
medium
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.)
Granted
Application number
JP2019012158A
Other languages
Japanese (ja)
Other versions
JP7239332B2 (en
Inventor
春樹 沖藤
Haruki Okifuji
春樹 沖藤
上村 吉治
Kichiji Kamimura
吉治 上村
穣 田中
Minoru Tanaka
穣 田中
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 Instruments 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)

Abstract

To set a control value for adjusting the output value of a sensor by a simple configuration.SOLUTION: A detection unit 120 detects the light emitted by a light emitting unit 110 and outputs a value that indicates the detection result, and an output adjustment unit 130 adjusts the magnitude of the value outputted by the detection unit 120 using a control value. The control unit 140 determines the relative magnitude of an adjustment value adjusted by the output adjustment unit and a preset threshold, outputs the result of determination, changes the control value for the output adjustment unit 130 while there is no medium between the light emitting unit 110 and the detection unit 120 and determines a control value when the relative magnitude of the adjustment value and the threshold has changed as a first control value, changes the control value for the output adjustment unit 130 while there is the medium between the light emitting unit 110 and the detection unit 120 and determines a control value when the relative magnitude of the adjustment value and the threshold has changed as a second control value, and determines a detection control value between the first and second control values that is a control value for detecting the presence of the medium.SELECTED DRAWING: Figure 1

Description

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

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

特開平10−221467号公報Japanese Patent Laid-Open No. 10-214467

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

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

上記課題を解決するため、本発明の媒体検知装置は、発光部と、
前記発光部が発光した光を検知し、検知した結果を示す値を出力する検知部と、
前記検知部が出力する値の大きさを、制御値を用いて調整する出力調整部と、
前記出力調整部が調整した調整値とあらかじめ設定された閾値との大小関係を判定し、該判定した結果を出力する制御部とを有し、
前記制御部は、前記発光部と前記検知部との間に媒体が無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第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,
The output adjusting unit has a control unit that determines the magnitude relationship between the adjustment value adjusted and a preset threshold value, and outputs the result of the determination,
The control unit changes the control value with respect to the output adjustment unit in a state where there is no medium between the light emitting unit and the detection unit, and the magnitude relationship between the adjustment value and the threshold value changes. When the control value is determined as the first control value, the control value is changed with respect to the output adjustment unit in the state where the medium is between the light emitting unit and the detection unit, and the adjustment is performed. The control value when the magnitude relationship between the value and the threshold changes is determined as the 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 in that a detection control value which is a control value for determining is determined.

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

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

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

本発明において、媒体検知装置は、前記制御部は、前記検知制御値を前記第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, the setting can be made within a range that is unlikely to affect the determination as to whether or not there is a card between the light emitting unit and the detection unit.

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

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

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

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

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

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

本発明の媒体検知装置の第1の実施の形態を示す図である。It is a figure which shows 1st Embodiment of the medium detection apparatus of this invention. 図1に示した媒体検知装置における媒体検知方法の一例を説明するためのフローチャートである。6 is a flowchart for explaining an example of a medium detecting method in the medium detecting 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に示した発光ダイオードに流れる電流の値とフォトトランジスタから出力される電圧の値との関係の一例を示すグラフである。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 value of the voltage 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 a medium detection device of the present invention. As shown in FIG. 1, the medium detection device 100 according to this embodiment includes a light emitting unit 110, a detection unit 120, an output adjustment unit 130, and a control unit 140. The medium detection device 100 is used by being mounted in, for example, a device that conveys and processes a card (medium) such as a card reader or a card issuing machine. It should be noted that FIG. 1 shows only the main components related to the present embodiment among the components included 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 by passing a current.
The detection unit 120 detects the light emitted by the light emitting unit 110. The detection unit 120 also outputs a value indicating the detection result to the control unit 140.
The output adjustment unit 130 adjusts the magnitude of the value output by the detection unit 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 adjustment value.
The control unit 140 determines the magnitude relationship between the adjustment value adjusted by the output adjusting unit 130 and a preset threshold value. Further, the control unit 140 outputs the result of the determination. This output indicates output (notification) to the outside of the medium detection device 100, and starts (continues)/ends display, output using sound, vibration, printing, transmission to an external device, or card processing. It means a trigger output for performing (interrupting). The same applies to the following description. Further, the control unit 140 changes the control value with respect to the output adjusting unit 130 in a state where there is no medium such as a card (hereinafter, referred to as a card) between the light emitting unit 110 and the detecting unit 120, and adjusts the adjustment value. And a threshold value are compared, and the control value when the magnitude relationship between them is changed is determined as the first control value. Further, the control unit 140 changes the control value with respect to the output adjustment unit 130 in the state where the card is located between the light emitting unit 110 and the detection unit 120, compares the adjustment value with the threshold value, and compares them. The control value when the relationship changes is determined as the second control value. Further, the control unit 140 determines a detection control value that 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における媒体検知方法の一例を説明するためのフローチャートである。 Hereinafter, a medium detection method in the medium detection device 100 shown in FIG. 1 will be described. FIG. 2 is a flow chart for explaining an example of the 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 detection unit 120 detects the light and outputs a measurement value which is the detection result (step S2).

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

続いて、制御部140は、決定した第1の制御値と第2の制御値との間で、カードを検知するための制御値である検知制御値を決定する(ステップS7)。そして、制御部140は、決定した検知制御値を用いて調整した調整値と閾値とを比較して、それらの大小関係を出力する(ステップS8)。この大小関係が、発光部110と検知部120との間にカードがあるか無いかの判定結果となる。 Subsequently, the 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 with the threshold value, and outputs the magnitude relationship between them (step S8). This magnitude relationship serves as a determination result as to whether or not there is a card between the light emitting unit 110 and the detection unit 120.

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

(第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. As shown in FIG. 3, the medium detection device 101 in this embodiment includes a light emitting diode 111, a phototransistor 121, a constant current driver 131, a CPU (Central Processing Unit) 141, and a resistor 151. It should be noted that FIG. 3 shows only the main elements relating to the present embodiment among the constituent elements included 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 unit that outputs light by passing a current in the forward direction.
The phototransistor 121 is a detection unit that detects the light emitted by the light emitting diode 111. The resistor 151 is connected to the phototransistor 121 and GND (ground) and has a predetermined resistance value. The phototransistor 121 outputs a current according 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 also input to the CPU 141 as a measurement value.
The 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 constant current driver 131 adjusts the magnitude of the current flowing through the light emitting diode 111 to adjust the output voltage of the phototransistor 121. The output voltage of the phototransistor 121 adjusted here becomes the adjustment value.
The CPU 141 sets the output voltage value output from the phototransistor 121 according to the adjustment value adjusted by the constant current driver 131, that is, the current value flowing through the light emitting diode 111 adjusted by the constant current driver 131, and a preset threshold value. Is a control unit that determines the magnitude relationship of. The CPU 141 also outputs the result of the determination. Further, the CPU 141 changes the current value with respect to 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 and the threshold value, and the magnitude relationship between them is determined. The current value when changed is determined as the first control value. Further, the CPU 141 changes the current value with respect to the constant current driver 131 in a state where the card is provided between the light emitting diode 111 and the phototransistor 121, compares the adjustment value with the threshold value, and compares the magnitude relationship between them. The changed current value 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. Note that the CPU 141 may use a general-purpose CPU, or may connect the output from the phototransistor 121 to a digital signal terminal 1411 for inputting a digital signal. If the digital signal terminal 1411 is used, the above-mentioned threshold value is for determining whether the level of the input signal is “0” or “1” based on the specifications of the digital signal terminal 1411 of the CPU 141. It becomes the reference value.

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

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

続いて、発光ダイオード111とフォトトランジスタ121との間にカードが無い状態で、定電流ドライバ131が発光ダイオード111に流す電流の値を変化させていき、CPU141は、そのときのフォトトランジスタ121からの出力電圧の値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS13)。このとき、CPU141は、定電流ドライバ131が発光ダイオード111に流す電流の値の変化に応じてフォトトランジスタ121からの出力電圧の値が小さな値から変化した場合、その出力電圧の値が閾値を超えたかどうかを判定する。出力電圧の値と閾値との大小関係が変化したら、CPU141は、そのときの電流の値を第1の制御値として決定する(ステップS14)。 Then, 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 causes the phototransistor 121 to operate at that time. It is determined whether the magnitude relationship between the output voltage value and the preset threshold value has changed (step S13). At this time, when the value of the output voltage from the phototransistor 121 changes from a small value in accordance with the change in the value of the current passed through the light emitting diode 111 by the constant current driver 131, the CPU 141 causes the value of the output voltage to exceed the threshold value. 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, with the 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 causes the phototransistor 121 to operate at that time. It is determined whether the magnitude relationship between the output voltage value and the preset threshold value has changed (step S15). At this time, when the value of the output voltage from the phototransistor 121 changes from a small value in accordance with the change in the value of the current passed through the light emitting diode 111 by the constant current driver 131, the CPU 141 causes the value of the output voltage to exceed the threshold value. 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 of the processing of steps S13 to S14 and 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 (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 between them (step S18). This magnitude relationship serves as a determination result 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 shown in FIG. 3 and the value of the voltage output from the phototransistor 121.

図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 shown by the broken 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. Further, the relationship indicated by the alternate long and short dash line in FIG. 5 is the relationship between the current value and the output voltage value when there is a card between the light emitting diode 111 and the phototransistor 121. As shown in FIG. 5, for example, when the output voltage value is VIL and the output voltage value exceeds the threshold value, 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 becomes a large value to some extent, the output voltage value becomes a constant value even if the current value is changed to a larger value, and the output voltage value does not exceed the value in some cases. 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 the current value between the first control value If_h and the second control value If_l as the detection control value. If the detection control value is IF and these relationships are expressed by equations,
If_h×M<IF<If_l×N (Equation 1)
Becomes Here, M>1 and 0<N<1. Further, when the difference between If_h and If_l becomes small while the detection is performed using the detection control value IF thus determined, the light emitting diode 111 and the phototransistor 121 are used as a standard for cleaning. It may be one.
Although VIH has a voltage value higher than VIL in the graph shown in FIG. 5, generally, VIH and VIL are approximately the same value as long as the output of the light emitting diode 111 is not saturated. Become. However, VIL may be higher than VIH.

本形態においては、CPU141が、カードが発光ダイオード111と発光ダイオード111からの光を検知するフォトトランジスタ121との間にある状態と無い状態とで、フォトトランジスタ121の出力値を定電流ドライバ131が調整し、調整された出力値である調整値と閾値との比較結果に基づいて、カードの有無を検知するための検知制御値を決定する。そのため、フォトトランジスタ121に流れる電流を調整するだけで、簡易的な構成でフォトトランジスタ121の出力値を調整するための制御値を設定することができる。 In the present embodiment, the CPU 141 determines that the constant current driver 131 outputs the output value of the phototransistor 121 depending on whether the card is between the light emitting diode 111 and the phototransistor 121 that detects light from the light emitting diode 111. The detection control value for detecting the presence/absence of the card is determined based on the comparison result of the adjustment value which is adjusted and the adjusted output value and the threshold value. Therefore, the control value for adjusting the output value of the phototransistor 121 can be set with a simple structure 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. As shown in FIG. 6, the medium detection device 102 according to this embodiment includes a light emitting diode 112, a phototransistor 122, a variable resistor 132, a CPU 142, and a current source 152. It should be noted that FIG. 6 shows only the main components related to the present embodiment among the components included 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 unit that outputs light by passing a current in the forward direction.
The phototransistor 122 is a detection unit that detects the light emitted by the light emitting diode 112. The phototransistor 122 outputs a voltage corresponding to the detected light intensity as a measurement value.
The 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 output to the CPU 142 as a control value based on the current output from the phototransistor 122. The output voltage adjusted here becomes the adjustment value.
The CPU 142 is a control unit that determines a magnitude relationship between an adjustment value adjusted by the variable resistor 132, that is, a voltage value output by the phototransistor 122 adjusted by the variable resistor 132 and a preset threshold value. Further, the CPU 142 outputs the determination result. Further, the CPU 142 changes the resistance value with respect to 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 with the threshold value, and compares the magnitude relationship between them. The resistance value when changed is determined as the first control value. Further, the CPU 142 changes the resistance value with respect to the variable resistor 132 in the state where the card is between the light emitting diode 112 and the phototransistor 122, compares the adjustment value with the threshold value, and compares the magnitude relationship between them. The resistance value when changed is determined as the second control value. Further, the CPU 142 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. The CPU 142 may use a general-purpose CPU, or may connect the output from the phototransistor 122 to a digital signal terminal 1421 for inputting a digital signal. If the digital signal terminal 1421 is used, the above-mentioned threshold value 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 supplies a current of a predetermined magnitude in the forward direction of the light emitting diode 111.

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

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

続いて、発光ダイオード112とフォトトランジスタ122との間にカードが無い状態で、可変抵抗器132が抵抗値を変化させることでフォトトランジスタ122からCPU142のデジタル信号用端子1421へ出力される信号の出力電圧の電圧値を変化させていき、CPU142は、そのときのデジタル信号用端子1421に入力される電圧の値とあらかじめ設定された閾値との大小関係が変化したかどうかを判定する(ステップS23)。このとき、CPU142は、可変抵抗器132の抵抗値の変化に応じてフォトトランジスタ122からデジタル信号用端子1421へ入力される電圧の値が小さな値から変化した場合、その電圧の値が閾値を超えたかどうかを判定する。電圧の値と閾値との大小関係が変化したら、CPU142は、そのときの可変抵抗器132の抵抗値を第1の制御値として決定する(ステップS24)。 Subsequently, in the state where there is no card between the light emitting diode 112 and the phototransistor 122, the variable resistor 132 changes the resistance value to output the signal output from the phototransistor 122 to the digital signal terminal 1421 of the CPU 142. The voltage value of the voltage is changed, and the CPU 142 determines whether or not the magnitude relationship between the voltage value input to the digital signal terminal 1421 at that time and a preset threshold value 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 in accordance with the change in the resistance value of the variable resistor 132, the CPU 142 causes the voltage value to exceed 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, with the card between the light emitting diode 111 and the phototransistor 121, the variable resistor 132 changes the resistance value to output a signal output from the phototransistor 122 to the digital signal terminal 1421 of the CPU 142. The voltage value of the voltage is changed, and the CPU 142 determines whether the magnitude relationship between the value of the voltage input to the digital signal terminal 1421 at that time and a preset threshold value 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 in accordance with the change in the resistance value of the variable resistor 132, the CPU 142 causes the voltage value to exceed 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 of steps S23 to S24 and 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 (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 between them (step S28). This magnitude relationship serves as a determination result 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 shown in FIG. 6 and the value of the voltage output from the phototransistor 122.

図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 shown by the broken 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. The relationship indicated by the alternate long and short dash line in FIG. 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. As shown in FIG. 8, for example, when the output voltage value is VIL and the output voltage value exceeds the threshold value, the CPU 142 sets the resistance value R_l at that time as the second control value. In addition, when the resistance value becomes a large value to some extent, the output voltage value becomes a constant value even if the resistance value is changed to a larger value, and the output voltage value does not exceed the value in some cases. 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 the resistance value between the first control value R_h and the second control value R_l as the detection control value. When the detection control value is R and these relationships are expressed by equations,
R_h×M<R<R_l×N (Equation 2)
Becomes Here, M>1 and 0<N<1. Further, when the difference between R_h and R_l becomes small while the detection is performed using the detection control value R thus determined, the light emitting diode 112 and the phototransistor 122 are cleaned as a standard. It may be one.
Although VIH has a voltage value higher than VIH in the graph shown in FIG. 8, the present invention is not limited to this.

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

以上、各構成要素に各機能(処理)それぞれを分担させて説明したが、この割り当ては上述したものに限定しない。また、構成要素の構成についても、上述した形態はあくまでも例であって、これに限定しない。また、各実施の形態を組み合わせたものであっても良い。 In the above description, each function is assigned to each function (process), but this allocation is not limited to the above. Also, regarding the configuration of the constituent elements, the above-described form is merely an example, and the present invention is not limited to this. Also, a combination of the embodiments may be used.

100,101,102 媒体検知装置
110 発光部
111,112 発光ダイオード
120 検知部
121,122 フォトトランジスタ
130 出力調整部
131 定電流ドライバ
132 可変抵抗器
140 制御部
141,142 CPU
151 抵抗器
152 電流源
1411,1421 デジタル信号用端子
100, 101, 102 Medium detection device 110 Light emitting part 111, 112 Light emitting diode 120 Detection part 121, 122 Phototransistor 130 Output adjustment part 131 Constant current driver 132 Variable resistor 140 Control part 141, 142 CPU
151 Resistor 152 Current Source 1411, 1421 Digital Signal Terminal

Claims (8)

発光部と、
前記発光部が発光した光を検知し、検知した結果を示す値を出力する検知部と、
前記検知部が出力する値の大きさを、制御値を用いて調整する出力調整部と、
前記出力調整部が調整した調整値とあらかじめ設定された閾値との大小関係を判定し、該判定した結果を出力する制御部とを有し、
前記制御部は、前記発光部と前記検知部との間に媒体が無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第1の制御値として決定し、前記発光部と前記検知部との間に前記媒体がある状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第2の制御値として決定し、前記第1の制御値と前記第2の制御値との間で前記媒体の有無を検知するための制御値である検知制御値を決定する媒体検知装置。
A light emitting part,
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,
The output adjusting unit has a control unit that determines the magnitude relationship between the adjustment value adjusted and a preset threshold value, and outputs the result of the determination,
The control unit changes the control value with respect to the output adjustment unit in a state where there is no medium between the light emitting unit and the detection unit, and the magnitude relationship between the adjustment value and the threshold value changes. When the control value is determined as the first control value, the control value is changed with respect to the output adjustment unit in the state where the medium is between the light emitting unit and the detection unit, and the adjustment is performed. The control value when the magnitude relationship between the value and the threshold changes is determined as the second control value, and the presence or absence of the medium is detected between the first control value and the second control value. A medium detection device that determines a detection control value, which is a control value for.
請求項1に記載の媒体検知装置において、
前記出力調整部は、前記制御値として、前記発光部に流れる電流の電流値を用いる媒体検知装置。
The medium detection device according to claim 1,
The output detection unit is a medium detection device that uses a current value of a current flowing through the light emitting unit as the control value.
請求項1に記載の媒体検知装置において、
前記出力調整部は、前記制御値として、前記検知部の出力側に接続された抵抗器の抵抗値を用いる媒体検知装置。
The medium detection device according to claim 1,
The medium detection device wherein the output adjustment unit uses, as the control value, a resistance value of a resistor connected to an output side of the detection unit.
請求項1から3のいずれか1項に記載の媒体検知装置において、
前記制御部は、前記検知制御値を前記第1の制御値のM倍(M>1)と前記第2の制御値のN倍(0<N<1)との間で決定する媒体検知装置。
The medium detection device according to any one of claims 1 to 3,
The medium detection device, wherein the control unit determines the detection control value between M times (M>1) the first control value and N times (0<N<1) the second control value. ..
請求項1から4のいずれか1項に記載の媒体検知装置において、
前記制御部は、前記発光部と前記検知部との間に前記媒体がある状態で、前記出力調整部に対して前記制御値を変化させても、前記調整値と前記閾値との大小関係が変化しない場合、前記検知部の出力が最大値となるときの前記制御値を前記第2の制御値とする媒体検知装置。
The medium detection device according to any one of claims 1 to 4,
Even if the control unit changes the control value with respect to the output adjustment unit in a state where the medium is present between the light emitting unit and the detection unit, the magnitude relationship between the adjustment value and the threshold value remains unchanged. A medium detection device in which the control value when the output of the detection unit reaches a maximum value is the second control value when it does not change.
請求項1から5のいずれか1項に記載の媒体検知装置において、
前記制御部は、有無を検知する媒体ごとに、前記発光部と前記検知部との間に該媒体が無い状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を前記第1の制御値として決定し、前記発光部と前記検知部との間に該媒体がある状態で、前記出力調整部に対して前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を前記第2の制御値として決定し、前記第1の制御値と前記第2の制御値との間で前記検知制御値を決定する媒体検知装置。
The medium detection device according to any one of claims 1 to 5,
The control unit changes the control value with respect to the output adjustment unit in the state where the medium is not present between the light emitting unit and the detection unit for each medium for detecting the presence or absence of the adjustment value. The control value when the magnitude relationship with the threshold value is changed is determined as the first control value, and in the state where the medium is between the light emitting unit and the detection unit, By changing the control value, the control value when the magnitude relationship between the adjustment value and the threshold value is changed is determined as the second control value, and the first control value and the second control value are determined. A medium detection device that determines the detection control value between the medium detection device and the medium detection device.
請求項1から6のいずれか1項に記載の媒体検知装置において、
前記制御部は、CPU(Central Processing Unit)であり、前記出力調整部からの出力信号を前記CPUのデジタル信号用端子に入力する媒体検知装置。
The medium detection device according to any one of claims 1 to 6,
The medium detection device, wherein the control unit is a CPU (Central Processing Unit) and inputs an output signal from the output adjustment unit to a digital signal terminal of the CPU.
発光部が発光した光を検知し、検知した結果を示す値を出力する処理と、
前記出力する値の大きさを、制御値を用いて調整する処理と、
前記調整した調整値とあらかじめ設定された閾値との大小関係を判定する処理と、
前記発光部と前記光を検知するセンサとの間に媒体が無い状態で、前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第1の制御値として決定する処理と、
前記発光部と前記光を検知するセンサとの間に媒体が無い状態で、前記制御値を変化させて、前記調整値と前記閾値との大小関係が変化したときの前記制御値を第2の制御値として決定する処理と、
前記第1の制御値と前記第2の制御値との間で前記媒体の有無を検知するための制御値である検知制御値を決定する処理と、
前記検知制御値を用いて調整した調整値と前記閾値との大小関係を示す値を出力する処理とを行う媒体検知方法。
A process of detecting the light emitted by the light emitting unit and outputting a value indicating the detection result,
A process of adjusting the size of the output value using a control value,
A process of determining a magnitude relationship between the adjusted adjustment value and a preset threshold value;
The control value is changed in a state where there is no medium between the light emitting unit and the sensor for detecting the light, and the control value when the magnitude relationship between the adjustment value and the threshold value changes is set to the first value. The 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 that detects the light, and the control value when the magnitude relationship between the adjustment value and the threshold value changes is set to the second value. The process of determining as a control value,
A process of determining a detection control value that is a control value for detecting the presence or absence of the medium between the first control value and the second control value;
A medium detection method for performing a process of outputting a value indicating a magnitude relationship between an adjustment value adjusted using the detection control value and the threshold value.
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 true JP2020118639A (en) 2020-08-06
JP7239332B2 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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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 (6)

* 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
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 (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
JP7239332B2 (en) 2023-03-14
CN111487688A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
KR900008632B1 (en) Optical media monitoring device
JP4646613B2 (en) Method, device and instrument for monitoring instrument alignment
WO2010038476A1 (en) Transmission input circuit
JP2020118639A (en) Medium detector and medium detection method
US20180156671A1 (en) Temperature sensing apparatus and temperature sensing method thereof
KR102227589B1 (en) Power supply voltage monitoring circuit, and electronic circuit including the power supply voltage monitoring circuit
JP2008232707A (en) Infrared touch switch
US20080030356A1 (en) Digital Measurement Transmitter With Current Signal
KR101124042B1 (en) multi-output power supply device
EP2677289B1 (en) State detecting device
WO2020061798A1 (en) Method and sensor system with integrated calibration mechanism
JP2006292488A (en) Apparatus for measuring temperature distribution
JP2015197820A (en) Electronic device and image forming apparatus
EP1755220B1 (en) Interface circuit
JP6672239B2 (en) Sensor device and image forming device
US11248951B2 (en) Sensor device including a sensor for carrying out surrounding-area monitoring with the aid of sonic waves
JP6610162B2 (en) State determination device and state determination method
CN106954290B (en) Power judgment method and semiconductor microwave heating equipment
CN108604897B (en) Drive circuit of insulated gate semiconductor element
JP4089176B2 (en) Smoke detector sensitivity test method
JP7197318B2 (en) NOISE DETECTION DEVICE AND NOISE DETECTION METHOD
KR20140120776A (en) Receiver
JP2018159641A (en) Voltage supply device
KR20190065020A (en) Apparatus for detecting disconnection of inductive sensor
JP2002300462A (en) Camera system

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