JPH04364592A - Optical reader - Google Patents

Optical reader

Info

Publication number
JPH04364592A
JPH04364592A JP3140155A JP14015591A JPH04364592A JP H04364592 A JPH04364592 A JP H04364592A JP 3140155 A JP3140155 A JP 3140155A JP 14015591 A JP14015591 A JP 14015591A JP H04364592 A JPH04364592 A JP H04364592A
Authority
JP
Japan
Prior art keywords
light
value
reference value
receiving element
light emitting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3140155A
Other languages
Japanese (ja)
Inventor
Satoru Kuwabara
悟 桑原
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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP3140155A priority Critical patent/JPH04364592A/en
Publication of JPH04364592A publication Critical patent/JPH04364592A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)

Abstract

PURPOSE:To provide an optical reader which is low-priced and does not receive the influence of the change with the passage of time due to the dust, etc., and the dispersion of the detected substance. CONSTITUTION:A photo transistor 79b outputs a signal in accordance with the light from a light emitting part 79a reflected by the detected substance. A CPU 70 successively stores a maximum value VMAX and a minimum value VMIN of an output signal into a RAM 72, and sets a reference value VREF at the middle of the maximum value VMAX and the minimum value VMIN. Subsequently, by comparing the reference value VREF and the output value of the photo transistor 79b, the binary information recorded at the detected substance is recognized. So as to set the reference value VREF at the middle of the maximum value VMAX and the minimum value VMIN, the CPU 70 changes a PWM duty, adjusts the light emitting quantity of the light emitting part 79a and recognizes the binary information recorded at the detected substance subsequently.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、光学検出器を用いてバ
ーコード等の2値化情報を読み取る光学読み取り装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an optical reading device that uses an optical detector to read binary information such as a bar code.

【0002】0002

【従来の技術】従来の光学的読み取り装置の構成を図1
1に示す。この光学読み取り装置は例えば、LEDや半
導体レーザーのような発光素子91が発する光線を被検
出体に照射し、その反射光をフォトダイオードやフォト
トランジスタ等の受光素子93で検出する。前記受光素
子93は反射光の強さに応じた信号を出力する。この出
力を増幅器94で増幅して、比較基準値と共に比較器9
5に入力すると、比較器95が出力と比較基準値との大
小を比較して、ハイ信号またはロー信号の2値情報を出
力する。
[Prior Art] Figure 1 shows the configuration of a conventional optical reading device.
Shown in 1. This optical reading device irradiates a detected object with a light beam emitted by a light emitting element 91 such as an LED or a semiconductor laser, and detects the reflected light with a light receiving element 93 such as a photodiode or a phototransistor. The light receiving element 93 outputs a signal according to the intensity of the reflected light. This output is amplified by an amplifier 94 and sent to a comparator 9 together with a reference value for comparison.
5, the comparator 95 compares the output with a comparison reference value and outputs binary information of a high signal or a low signal.

【0003】また、上記光学的読み取り装置は、発光素
子91の発光量を調整するための可変抵抗器92を備え
たり、上記比較基準値を調整する可変抵抗96を備えて
いる。
The optical reading device also includes a variable resistor 92 for adjusting the amount of light emitted from the light emitting element 91, and a variable resistor 96 for adjusting the comparison reference value.

【0004】0004

【発明が解決しようとする課題】しかしながら、従来の
装置では、光学素子91の発光量のばらつきは、例えば
LEDの輝度で数倍、フォトトランジスタの出力電流で
数倍程度と大きく、それを補正するため、前記可変抵抗
92や可変抵抗96等の調整手段が必要になったる。さ
らに、上記光学的読み取り装置を複写や印刷等の特性を
バーコード信号として入力する装置として複写機やプリ
ンタ等の機械に組み込む場合、光学読み取り装置が大型
化するうえ、価格も高くなるため、複写機の小型化や低
価格化の妨げになっていた。
[Problems to be Solved by the Invention] However, in the conventional device, the variation in the amount of light emitted from the optical element 91 is large, for example, several times in the brightness of the LED, and several times in the output current of the phototransistor, and it is necessary to correct it. Therefore, adjusting means such as the variable resistor 92 and the variable resistor 96 is required. Furthermore, if the above-mentioned optical reading device is incorporated into a machine such as a copying machine or printer as a device for inputting characteristics such as copying or printing as a barcode signal, the optical reading device becomes large and expensive, so This was an impediment to making machines smaller and cheaper.

【0005】また、機械に組み込んで使用する場合、埃
や塵等によって光学素子91や受光素子93が汚れて、
正しく2値化情報を検出できなくなったり、素子自体の
特性のばらつきにより個々の機械において発光素子91
と受光素子93の距離が異なるため、機械に組み込んだ
状態での再調整が必要となっていた。
Furthermore, when used in a machine, the optical element 91 and the light receiving element 93 may become dirty due to dirt, dust, etc.
The light emitting element 91 may not be correctly detected in each machine due to the inability to correctly detect binary information or variations in the characteristics of the element itself.
Since the distance between the light-receiving element 93 and the light-receiving element 93 is different, it is necessary to readjust the light receiving element 93 after it is assembled into the machine.

【0006】さらに、被検出物の汚れや印刷濃度のばら
つきによって、読み取り精度が低下することがあった。
[0006]Furthermore, the reading accuracy may be lowered due to dirt on the object to be detected or variations in print density.

【0007】本発明は、上述した問題点を解決するため
になされたものであり、その目的とするところは、安価
であり、かつ埃等による経時変化や被検出物のばらつき
の影響を受けない光学読み取り装置を提供することにあ
る。
The present invention has been made to solve the above-mentioned problems, and aims to be inexpensive and not affected by changes over time due to dust or the like or by variations in objects to be detected. An object of the present invention is to provide an optical reading device.

【0008】[0008]

【課題を解決するための手段】この目的を達成するため
に第1の発明の光学読み取り装置では、被検出物に光を
照射する発光素子と、被検出物が反射した光を受光し、
その受光量に応じた検出値を出力する受光素子と、受光
素子の出力値と基準値とを比較することにより、被検出
物上の2値情報を認識する認識手段とからなる光学読み
取り装置において、受光素子の出力値の最大値と最小値
を記憶する記憶手段と、記憶手段に記憶された最大値と
最小値の中間に前記基準値を変更する基準値変更手段と
を備えている。
[Means for Solving the Problems] In order to achieve this object, the optical reading device of the first invention includes a light emitting element that irradiates light onto an object to be detected, a light emitting element that receives light reflected by the object to be detected,
In an optical reader comprising a light receiving element that outputs a detected value according to the amount of light received, and a recognition means that recognizes binary information on the detected object by comparing the output value of the light receiving element and a reference value. , storage means for storing maximum and minimum output values of the light receiving element, and reference value changing means for changing the reference value to an intermediate value between the maximum and minimum values stored in the storage means.

【0009】また、第2の発明の光学読み取り装置は、
被検出物に光を照射する発光素子と、被検出物が反射し
た光を受光し、その受光量に応じた検出値を出力する受
光素子と、受光素子の出力値と基準値とを比較すること
により、被検出物上の2値情報を認識する認識手段とか
らなる光学読み取り装置において、受光素子の出力値の
最大値と最小値を記憶する記憶手段と、基準値が記憶手
段に記憶された最大値と最小値の中間に位置するように
、前記発光素子の発光量または前記受光素子の感度の少
なくとも一方を調整する調整手段を備えている。
[0009] Furthermore, the optical reading device of the second invention includes:
A light-emitting element that irradiates light onto the object to be detected, a light-receiving element that receives the light reflected by the object and outputs a detected value according to the amount of received light, and compares the output value of the light-receiving element with a reference value. Accordingly, in an optical reading device comprising a recognition means for recognizing binary information on an object to be detected, the storage means stores the maximum and minimum output values of the light receiving element, and the reference value is stored in the storage means. The light emitting device includes an adjusting means for adjusting at least one of the amount of light emitted by the light emitting element and the sensitivity of the light receiving element so that the amount of light is located between the maximum value and the minimum value.

【0010】0010

【作用】上記の構成を有する第1の発明の光学読み取り
装置では、被検出物に光を照射しつつ被検出物を走査し
、受光素子が被検出物の反射光を受光し、受光量に応じ
た検出値を出力する。そして、前記受光素子の出力の最
大値と最小値を記憶手段に記憶し、基準値変更手段がそ
の最大値と最小値の中間に基準値を設定する。その後、
認識手段が設定された基準値と受光素子の出力値とを比
較することで、被検出物上の2値化情報を認識する。
[Operation] In the optical reading device of the first invention having the above configuration, the object to be detected is scanned while irradiating the object with light, and the light receiving element receives the reflected light from the object to be detected, and the amount of light received is adjusted accordingly. Outputs the detected value accordingly. Then, the maximum value and the minimum value of the output of the light receiving element are stored in the storage means, and the reference value changing means sets the reference value between the maximum value and the minimum value. after that,
The recognition means recognizes the binary information on the object to be detected by comparing the set reference value and the output value of the light receiving element.

【0011】また、第2の発明の光学読み取り装置では
、前記記憶手段に記憶された最大値と最小値の中間の値
と基準値とが等しくなるように、調整手段が発光素子の
発光量や受光素子の感度を調整する。
Further, in the optical reading device of the second aspect of the invention, the adjusting means adjusts the amount of light emitted from the light emitting element so that the intermediate value between the maximum value and the minimum value stored in the storage means becomes equal to the reference value. Adjust the sensitivity of the light receiving element.

【0012】0012

【実施例】以下、第1の発明を具体化した一実施例を図
面を参照して説明する。尚、情報を読みとった後の処理
については、特開平1−280758号公報により詳細
に説明されているので、ここでは情報の付加方法や読み
取り方法の部分についてのみ記述する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment embodying the first invention will be described below with reference to the drawings. Incidentally, since the processing after reading the information is explained in detail in Japanese Patent Laid-Open No. 1-280758, only the information adding method and reading method will be described here.

【0013】図2は感光記録媒体収納カセット11の概
略図であり、長尺状の感光記録媒体12は、送り軸14
に巻かれた状態でカセット11内に収納されている。カ
バー15は前記感光記録媒体12を遮光するとともに、
前記送り軸14と巻取り軸24を支持している。前記巻
取り軸24には、図3に示すバーコードによる特性情報
80が付加されている。この情報は4ビットのスタート
情報部80aと、感光記録媒体の特性を示す9ビットの
特性情報部80bより構成され、スタート情報部80a
の内容「1110」は特性情報部80bには表われない
組合せとなっている。
FIG. 2 is a schematic diagram of the photosensitive recording medium storage cassette 11, in which the elongated photosensitive recording medium 12 is placed on the feed shaft 14.
It is stored in the cassette 11 in a wound state. The cover 15 shields the photosensitive recording medium 12 from light, and
The feed shaft 14 and the winding shaft 24 are supported. Characteristic information 80 in the form of a bar code shown in FIG. 3 is added to the winding shaft 24. This information consists of a 4-bit start information section 80a and a 9-bit characteristic information section 80b indicating the characteristics of the photosensitive recording medium.
The content "1110" is a combination that does not appear in the characteristic information section 80b.

【0014】前記カセット11をカラー複写機等の画像
形成装置に装着すると、図4に示すように、前記巻取り
軸24は、画像形成装置に取り付けられている軸押え2
5とローラー78を介して接触する。軸押え25の巻取
り軸24と対向する面には、光学式読み取りセンサ79
が配置されており、前記特性情報80と対向するよう設
置される。なお、画像形成装置の構成については、特開
平1−280758号公報により、詳細に説明されてい
るので、ここでは省略する。
When the cassette 11 is installed in an image forming apparatus such as a color copying machine, the winding shaft 24 is moved by the shaft presser 2 attached to the image forming apparatus, as shown in FIG.
5 through a roller 78. An optical reading sensor 79 is mounted on the surface of the shaft presser 25 facing the winding shaft 24.
is arranged, and is installed so as to face the characteristic information 80. Note that the configuration of the image forming apparatus is explained in detail in Japanese Patent Application Laid-Open No. 1-280758, so a description thereof will be omitted here.

【0015】次に本実施例の概略回路構成を図1に示す
。CPU70には、ROM71、RAM72、A/D変
換器73、モータ駆動回路76が接続されている。この
モータ駆動回路76は、前記巻取り軸24に接続された
モータ(図示せず)を駆動する。
Next, a schematic circuit configuration of this embodiment is shown in FIG. A ROM 71, a RAM 72, an A/D converter 73, and a motor drive circuit 76 are connected to the CPU 70. This motor drive circuit 76 drives a motor (not shown) connected to the winding shaft 24.

【0016】光学式読み取りセンサ79は、発光部79
aとフォトトランジスタ79bとにより構成されている
。この発光部79aが本発明の発光素子を構成し、前記
フォトトランジスタ79bが受光素子を構成する。
The optical reading sensor 79 includes a light emitting section 79
a and a phototransistor 79b. This light emitting portion 79a constitutes a light emitting element of the present invention, and the phototransistor 79b constitutes a light receiving element.

【0017】前記A/D変換器73は、フォトトランジ
スタ79bの出力が接続されており、前記特性情報80
の反射光に応じたフォトトランジスタ79bの出力をデ
ジタルデータに変換する。
The A/D converter 73 is connected to the output of the phototransistor 79b, and receives the characteristic information 80.
The output of the phototransistor 79b corresponding to the reflected light is converted into digital data.

【0018】また、CPU70には、積分回路75を通
して定電流回路74が接続されている。積分回路75に
は前記CPU70よりPWM信号が入力されており、積
分回路75の出力に比例して定電流回路74が発光部7
9aを定電流駆動する。PWM信号のデューティにより
、発光部79aの発光量が制御できる。
Further, a constant current circuit 74 is connected to the CPU 70 through an integrating circuit 75. A PWM signal is input from the CPU 70 to the integrating circuit 75, and the constant current circuit 74 controls the light emitting section 7 in proportion to the output of the integrating circuit 75.
9a is driven with constant current. The amount of light emitted from the light emitting section 79a can be controlled by the duty of the PWM signal.

【0019】RAM72は前記フォトトランジスタ79
bの受光量の最大値を記憶する最大値記憶エリア(その
記憶内容を「VMAX」とする)72a、フォトトラン
ジスタ79bの最小値を記憶する最小値記憶エリア(そ
の記憶内容を「VMIN」とする)72b、フォトトラ
ンジスタ79bの受光量の平均値を記憶する平均値記憶
エリア(その記憶内容を「VAV」とする)72c、読
み取り回数記憶エリア(その記憶内容を「SAMPLE
」とする)72d、基準値記憶エリア(その記憶内容を
「VREF」とする)72e、PWMデューティ記憶エ
リア(その記憶内容を「DUTY」とする)72f等の
各エリアより構成されている。
The RAM 72 has the phototransistor 79
A maximum value storage area 72a (its storage contents are referred to as "VMAX") for storing the maximum value of the amount of light received by the phototransistor 79b, and a minimum value storage area (its storage contents are referred to as "VMIN") for storing the minimum value of the phototransistor 79b. ) 72b, an average value storage area for storing the average value of the amount of light received by the phototransistor 79b (the storage content is referred to as "VAV") 72c, a reading number storage area (the storage content is designated as "SAMPLE")
”) 72d, a reference value storage area (its storage contents are “VREF”) 72e, and a PWM duty storage area (its storage contents are “DUTY”) 72f.

【0020】次に、図5、図6を参照して本実施例の動
作説明を行う。
Next, the operation of this embodiment will be explained with reference to FIGS. 5 and 6.

【0021】図4に示すように画像記録装置にカセット
11がセットされると、CPU70よりモータ駆動回路
76に信号が送られ(S1)、モータ(図示せず)が回
転することにより前記巻取り軸24が回転し、光学式読
み取りセンサ79は特性情報80を走査することになる
。さらに、この時、CPU70よりPWM信号が一定デ
ューティで送出され(S2)、発光部79aが一定輝度
で光ることで、特性情報80に投光される。
As shown in FIG. 4, when the cassette 11 is set in the image recording apparatus, a signal is sent from the CPU 70 to the motor drive circuit 76 (S1), and the motor (not shown) rotates to perform the winding process. As the shaft 24 rotates, the optical read sensor 79 will scan the characteristic information 80 . Further, at this time, the CPU 70 sends out a PWM signal with a constant duty (S2), and the light emitting section 79a emits light with a constant brightness, thereby projecting light onto the characteristic information 80.

【0022】そして、データ読み取りが図9のデータ読
み取り処理ルーチンに従って行われる(S3)。
Data reading is then performed according to the data reading processing routine shown in FIG. 9 (S3).

【0023】データ読み取り処理ルーチンでは、まず、
読み取り回数記憶エリア72dの記憶内容「SAMPL
E」がリセットされ(S11)、次に、前記受光データ
が1msec毎に16回読み取られ、その平均値「VA
V」が算出されて平均値格納エリア72cに格納される
(S12)。
In the data reading processing routine, first,
The memory content of the reading number storage area 72d is “SAMPL”.
E" is reset (S11), and then the received light data is read 16 times every 1 msec, and the average value "VA
V'' is calculated and stored in the average value storage area 72c (S12).

【0024】そして、最大値記憶エリア72aの記憶内
容「VMAX」と平均値格納エリア72cの記憶内容「
VAV」とが比較され(S13)、最大値「VMAX」
より平均値「VAV」が大きい時(S13:YES)は
、最大値記憶エリア72aに平均値「VAV」が格納さ
れ(S14)、その値が最大値「VMAX」とされる。 そして、後述のS17が実行される。
[0024]Then, the storage content "VMAX" of the maximum value storage area 72a and the storage content "VMAX" of the average value storage area 72c are stored.
VAV” is compared (S13), and the maximum value “VMAX” is
When the average value "VAV" is larger (S13: YES), the average value "VAV" is stored in the maximum value storage area 72a (S14), and the value is set as the maximum value "VMAX". Then, S17, which will be described later, is executed.

【0025】一方、最大値「VMAX」より平均値「V
AV」が小さい時(S13:NO)は、最小値記憶エリ
ア72bの記憶内容「VMIN」と前記平均値「VAV
」が比較され(S15)、最小値「VMIN」より平均
値「VAV」が小さいとき(S15:YES)は、最小
値記憶エリア72bに平均値「VAV」が格納され(S
16)、その値が最小値「VMIN」とされる。そして
、後述のS17が実行される。
On the other hand, the average value “V
AV" is small (S13: NO), the storage content "VMIN" of the minimum value storage area 72b and the average value "VAV
” are compared (S15), and when the average value “VAV” is smaller than the minimum value “VMIN” (S15: YES), the average value “VAV” is stored in the minimum value storage area 72b (S15).
16), the value is set as the minimum value "VMIN". Then, S17, which will be described later, is executed.

【0026】さらに、最大値「VMAX」より平均値「
VAV」が小さく(S13:NO)、且つ最小値「VM
IN」より平均値「VAV」が大きいとき(S15:N
O)は、後述のS17が実行される。
Furthermore, the average value “VMAX” is calculated from the maximum value “VMAX”.
VAV” is small (S13: NO), and the minimum value “VM
When the average value “VAV” is larger than “IN” (S15:N
In case O), S17, which will be described later, is executed.

【0027】S17において読み取り回数記憶エリア7
2dの記憶内容である読み取り回数値「SAMPLE」
に1が加えられ、読み取り回数値「SAMPLE」が2
00を越えたか否かが判断される(S18)。読み取り
回数値「SAMPLE」が200を越えなければ(S1
8:NO)、前記S12以下が再び実行され、読み取り
回数値「SAMPLE」が200を越えると(S18:
YES)、即ち、上記のS12〜S17のサイクルが2
00回行なわれると、この処理を終了する。
[0027] In S17, the number of readings storage area 7
2d's memory content is the number of readings "SAMPLE"
1 is added to ``SAMPLE'', and the read count value ``SAMPLE'' becomes 2.
It is determined whether or not the value exceeds 00 (S18). If the number of readings “SAMPLE” does not exceed 200 (S1
8: NO), the above S12 and subsequent steps are executed again, and when the reading count value "SAMPLE" exceeds 200 (S18:
YES), that is, the cycle of S12 to S17 above is 2
When the process is repeated 00 times, this process ends.

【0028】その後、最大値記憶エリア72aに記憶さ
れている最大値「VMAX」と最小値記憶エリア72b
に記憶されている最小値「VMIN」との中間の値を算
出して、その値を基準値記憶エリア72eに基準値「V
REF」として格納する(S4)。
After that, the maximum value "VMAX" stored in the maximum value storage area 72a and the minimum value storage area 72b
The intermediate value between the minimum value "VMIN" and the minimum value "VMIN" stored in the
REF" (S4).

【0029】基準値「VREF」の設定が終了すると、
この基準値「VREF」と次の読み取りデータとを比較
して、2値データとして認識する(S5)。そしてCP
U70では、その測定値を順次RAM72に記録すると
ともに、スタート情報「1110」(黒:1、白:0)
のデータを検出するのを待つ(S5,S6)。スタート
情報を検出したら、設定された基準値「VREF」と比
較することで、特性情報80を読み取る(S7)。この
例では「110110010」を読み取ることになる。
[0029] When the setting of the reference value "VREF" is completed,
This reference value "VREF" is compared with the next read data and recognized as binary data (S5). And C.P.
In U70, the measured values are sequentially recorded in RAM72, and the start information "1110" (black: 1, white: 0)
Waits for the detection of data (S5, S6). When the start information is detected, the characteristic information 80 is read by comparing it with the set reference value "VREF" (S7). In this example, "110110010" will be read.

【0030】この実施例においては、CPU70が図5
、6に示すフローチャートを実行することにより本発明
の基準値変更手段と認識手段が構成される。
In this embodiment, the CPU 70 is shown in FIG.
, 6 constitute the reference value changing means and recognition means of the present invention.

【0031】図7は、本実施例の光学読み取り装置の出
力結果を示すものであり、図7(a)に光学式読み取り
センサ79の出力が最大で且つ、光学式読み取りセンサ
79と特性情報80との距離dが最小の時の出力REF
1を、図7(b)に光学センサ79aの出力が最小で距
離dが最大の時の出力REF2とを示す。この時の特性
情報80の黒濃度は、マクベス濃度1.0という低い値
を用いているため、実際よりかなり白黒の濃度差が小さ
くなっている。
FIG. 7 shows the output results of the optical reading device of this embodiment, and FIG. 7(a) shows the maximum output of the optical reading sensor 79 and the characteristic information 80 The output REF when the distance d from
1 and FIG. 7B shows the output REF2 when the output of the optical sensor 79a is the minimum and the distance d is the maximum. Since the black density of the characteristic information 80 at this time uses a low value of Macbeth density of 1.0, the difference in density between black and white is considerably smaller than in reality.

【0032】このとき、本実施例の光学読み取り装置は
、REF1の場合、図6に示すデータ読み取り処理ルー
チンにより基準値「VREF」が3.5Vに設定され、
また、REF2の場合、基準値「VREF」が0.8V
に設定される。この設定された基準値「VREF」に基
づいて2値データの認識が行なわれるので、いかなる条
件においても、本実施例の光学読み取り装置は正しく特
性情報80を読みとることができる。
At this time, in the case of REF1, the optical reading device of this embodiment sets the reference value "VREF" to 3.5V by the data reading processing routine shown in FIG.
In addition, in the case of REF2, the reference value "VREF" is 0.8V
is set to Since the binary data is recognized based on the set reference value "VREF", the optical reading device of this embodiment can correctly read the characteristic information 80 under any conditions.

【0033】なお、最大値「VMAX」と最小値「VM
IN」は、情報として必ず、白黒両方出現するであろう
距離を走査した場合の、おおよその値で良く、中間値も
おおよその値で問題ない。また、白黒どちらかの値より
一定値移動させた値を基準値としてもよい。
[0033] Note that the maximum value "VMAX" and the minimum value "VM
IN' may be an approximate value when scanning a distance where both black and white information will necessarily appear, and the intermediate value may also be an approximate value. Alternatively, a value shifted by a certain value from either the black or white value may be used as the reference value.

【0034】次に、第2の発明を具体化した一実施例を
図8、9に基づいて説明する。
Next, an embodiment embodying the second invention will be described based on FIGS. 8 and 9.

【0035】この実施例の構成は、第1の発明の実施例
と同一の構成を有するので、その説明は省略し、動作に
ついて図8、9を参照して説明する。
The configuration of this embodiment is the same as that of the first embodiment of the invention, so a description thereof will be omitted, and the operation will be explained with reference to FIGS. 8 and 9.

【0036】図4のようにカセット11がセットされる
と、CPU70よりモータ駆動回路に信号が送られ(S
21)、モータ(図示せず)が回転することにより前記
巻取り軸24が回転し、光学式読み取りセンサ79は特
性情報80を走査することになる。所定の基準値「VR
EF」(例えば、VREF=128)を予め基準値格納
エリア72eに格納しておく(S22)。その後、発光
部79aの発光量を決定するために、PWMデューティ
決定処理ルーチンが実行される(S22)。
When the cassette 11 is set as shown in FIG. 4, a signal is sent from the CPU 70 to the motor drive circuit (S
21) When the motor (not shown) rotates, the winding shaft 24 rotates, and the optical reading sensor 79 scans the characteristic information 80. The predetermined reference value “VR
EF" (for example, VREF=128) is stored in the reference value storage area 72e in advance (S22). Thereafter, a PWM duty determination processing routine is executed to determine the amount of light emitted from the light emitting section 79a (S22).

【0037】図9をPWMデューティ決定ルーチンのフ
ローチャートを示す。まず、PWMデューティ記憶エリ
ア72fの記憶内容「DUTY」に初期値128(S3
1)を格納する。そして、上述の第1の発明の実施例と
同様に、図6に示すデータ読み取り処理ルーチンを実行
し、最大値「VMAX」と最小値「VMIN」を算出す
る(S3)。
FIG. 9 shows a flowchart of the PWM duty determination routine. First, the initial value 128 (S3
1) is stored. Then, similarly to the first embodiment of the invention described above, the data reading processing routine shown in FIG. 6 is executed to calculate the maximum value "VMAX" and the minimum value "VMIN" (S3).

【0038】その後、最大値格納エリア72aに記憶さ
れている最大値「VMAX」と基準値記憶エリア72e
に記憶されている基準値「VREF」の差V0を算出し
(S32)、V0<0の場合は(S33:NO)、最大
値「VMAX」と最小値「VMIN」の間に基準値「V
REF」が存在しないため、PWMデューティ記憶エリ
ア72fの記憶内容「DUTY」を大きく増加させ(S
35)、再度データ読み取り処理ルーチンを実行する(
S3)。
After that, the maximum value "VMAX" stored in the maximum value storage area 72a and the reference value storage area 72e are
Calculate the difference V0 between the reference value "VREF" stored in (S32), and if V0<0 (S33: NO), the reference value "V
REF" does not exist, the storage content "DUTY" in the PWM duty storage area 72f is greatly increased (S
35), Execute the data reading processing routine again (
S3).

【0039】一方、V0>0(S33:YES)の場合
は、基準値「VREF」と最小値「VMIN」の差V1
を算出し(S35)、V1<0の場合(S36:NO)
は、最大値「VMAX」と最小値「VMIN」の間に基
準値「VREF」が存在しないため、PWMデューティ
記憶エリア72fの記憶内容「DUTY」を大きく減少
させ(S37)、再度データ読み取り処理ルーチンを実
行する(S3)。
On the other hand, if V0>0 (S33: YES), the difference V1 between the reference value "VREF" and the minimum value "VMIN"
is calculated (S35), and if V1<0 (S36: NO)
Since the reference value "VREF" does not exist between the maximum value "VMAX" and the minimum value "VMIN", the stored content "DUTY" of the PWM duty storage area 72f is greatly reduced (S37), and the data reading processing routine is executed again. (S3).

【0040】V1>0の場合は(S36:YES)、最
大値「VMAX」と最小値「VMIN」の間に基準値「
VREF」が存在することになり、前記V0と前記V1
の差の絶対値が10未満に達したか否かが判定される(
S38)。
[0040] If V1>0 (S36: YES), there is a reference value "VMAX" between the maximum value "VMAX" and the minimum value "VMIN".
VREF" exists, and the V0 and V1
It is determined whether the absolute value of the difference has reached less than 10 (
S38).

【0041】V0とV1の差の絶対値が10以上(S3
8:NO)の場合は、V0とV1の大小関係を比較して
(S39)、V0−V1>0の場合(S39:YES)
、PWMデューティ記憶エリア72fの記憶内容「DU
TY」から2減少させ(S40)、再度データ読み取り
処理ルーチンを実行する(S3)。一方、V0−V1<
0の場合(S39:NO)、PWMデューティ記憶エリ
ア72fの記憶内容「DUTY」を2増加させて(S4
1)、再度データ読み取り処理ルーチンを実行する(S
3)。
[0041] The absolute value of the difference between V0 and V1 is 10 or more (S3
8: NO), compare the magnitude relationship between V0 and V1 (S39), and if V0-V1>0 (S39: YES)
, the memory contents of the PWM duty storage area 72f “DU
TY" is decreased by 2 (S40), and the data reading processing routine is executed again (S3). On the other hand, V0−V1<
In the case of 0 (S39: NO), the memory content "DUTY" of the PWM duty storage area 72f is increased by 2 (S4
1) Execute the data reading processing routine again (S
3).

【0042】上記S3〜S41の各ステップを繰り返し
てPWMデューティ記憶エリア72fの記憶内容「DU
TY」を増減することにより、前記V0と前記V1の差
の絶対値が10未満(S37:YES)になると、PW
Mデューティ決定処理ルーチンが終了する。
[0042] By repeating each of the steps S3 to S41, the storage contents of the PWM duty storage area 72f are
When the absolute value of the difference between V0 and V1 becomes less than 10 (S37: YES) by increasing or decreasing PW
The M duty determination processing routine ends.

【0043】このPWMデューティ決定処理ルーチンに
よって、基準値「VREF」が最大値「VMAX」と最
小値「VMIN」のほぼ中央にくるように、発光部79
aの発光量が決定され、白黒の検出レベルの差が最大と
なる。
By this PWM duty determination processing routine, the light emitting section 79 is adjusted so that the reference value "VREF" is approximately at the center between the maximum value "VMAX" and the minimum value "VMIN".
The amount of light emitted by a is determined, and the difference between black and white detection levels becomes maximum.

【0044】デューティ決定後は、図5と同様にスター
トビットを検出して、特性データを読み取ることになる
(S5〜S7)。
After the duty is determined, the start bit is detected and the characteristic data is read in the same way as in FIG. 5 (S5 to S7).

【0045】実験による確認結果を図10に示す。この
図は最悪条件まで部品がばらついた場合に、自動的に発
光部79aのデューティを変化させた場合のものであり
、白黒レベル差3Vを確保することができている。
The experimental confirmation results are shown in FIG. This figure shows the case where the duty of the light emitting section 79a is automatically changed when the parts vary to the worst condition, and a black-white level difference of 3V can be secured.

【0046】また、発光部79aの発光量を変化させる
かわりに、フォトトランジスタ79bの感度(検出抵抗
の抵抗値や増幅器の増幅率)を変化させてもよい。
Furthermore, instead of changing the amount of light emitted from the light emitting section 79a, the sensitivity of the phototransistor 79b (the resistance value of the detection resistor or the amplification factor of the amplifier) may be changed.

【0047】さらに、上記実施例のように特性情報は軸
に記録する必要はなく、シート状のものに記録しても良
い。
Further, the characteristic information does not need to be recorded on the shaft as in the above embodiment, but may be recorded on a sheet.

【0048】[0048]

【発明の効果】以上詳述したことから明らかなように、
本発明によれば、発光素子が被検出物に光を照射し、そ
の反射光を受光素子で検出しながら、自動的に2値判別
の基準値を設定したり、基準値が受光素子の出力の最大
値と最小値の中間に位置するように発光素子の発光量や
受光素子の感度を調整することができる。
[Effect of the invention] As is clear from the detailed description above,
According to the present invention, while the light emitting element irradiates light onto the object to be detected and the light receiving element detects the reflected light, a reference value for binary discrimination is automatically set, and the reference value is the output of the light receiving element. The amount of light emitted by the light emitting element and the sensitivity of the light receiving element can be adjusted so that the amount of light emitted by the light emitting element and the sensitivity of the light receiving element are located between the maximum value and the minimum value.

【0049】従って、光学読み取り装置の簡素化や無調
整化が可能となり大幅な価格低減効果がある。さらに、
部品のばらつきや、粉塵等の影響、さらには被検出物の
ばらつきを自動的に補正できるため、非常に安定性の高
い光学読み取り装置を構成できる。
Therefore, it is possible to simplify the optical reading device and eliminate the need for adjustment, resulting in a significant cost reduction effect. moreover,
Since variations in parts, the effects of dust, etc., and even variations in objects to be detected can be automatically corrected, it is possible to configure an extremely stable optical reading device.

【図面の簡単な説明】[Brief explanation of the drawing]

【図1】本光学読み取り装置の概略回路構成図である。FIG. 1 is a schematic circuit configuration diagram of the present optical reading device.

【図2】感光記録媒体収納カセットの概略斜視図である
FIG. 2 is a schematic perspective view of a photosensitive recording medium storage cassette.

【図3】被検出物の特性情報を示す図である。FIG. 3 is a diagram showing characteristic information of an object to be detected.

【図4】感光記録媒体収納カセットを収納した状態を示
す側面図である。
FIG. 4 is a side view showing a state in which the photosensitive recording medium storage cassette is stored.

【図5】第1の発明の動作をしめすフローチャートであ
る。
FIG. 5 is a flowchart showing the operation of the first invention.

【図6】データ読み込み処理ルーチンを示すフローチャ
ートである。
FIG. 6 is a flowchart showing a data reading processing routine.

【図7】光学読み取り装置の出力を示した図である。FIG. 7 is a diagram showing the output of the optical reading device.

【図8】第2の発明の動作フローチャートを示す図であ
る。
FIG. 8 is a diagram showing an operation flowchart of the second invention.

【図9】PWMデューティ決定処理ルーチンを示すフロ
ーチャートである。
FIG. 9 is a flowchart showing a PWM duty determination processing routine.

【図10】光学読み取り装置の出力を示した図である。FIG. 10 is a diagram showing the output of the optical reading device.

【図11】従来の光学読み取り装置の構成図である。FIG. 11 is a configuration diagram of a conventional optical reading device.

【符号の説明】[Explanation of symbols]

79a  発光部(発光素子) 79b  フォトトランジスタ(受光素子)72   
 RAM(記憶手段)
79a Light emitting part (light emitting element) 79b Phototransistor (light receiving element) 72
RAM (memory means)

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  被検出物に光を照射する発光素子と、
被検出物が反射した光を受光し、その受光量に応じた検
出値を出力する受光素子と、受光素子の出力値と基準値
とを比較することにより、前記被検出物上の2値化情報
を認識する認識手段とからなる光学読み取り装置におい
て、受光素子の出力値の最大値と最小値を記憶する記憶
手段と、記憶手段に記憶された最大値と最小値の中間に
前記基準値を変更する基準値変更手段とを有することを
特徴とする光学読み取り装置。
[Claim 1] A light-emitting element that irradiates light onto an object to be detected;
A light receiving element receives the light reflected by the detected object and outputs a detection value according to the amount of received light, and by comparing the output value of the light receiving element and a reference value, the binarization on the detected object is performed. An optical reading device comprising a recognition means for recognizing information, a storage means for storing the maximum and minimum values of the output value of the light receiving element, and a reference value located between the maximum and minimum values stored in the storage means. An optical reading device comprising: a reference value changing means for changing a reference value.
【請求項2】  被検出物に光を照射する発光素子と、
被検出物が反射した光を受光し、その受光量に応じた検
出値を出力する受光素子と、受光素子の出力値と基準値
とを比較することにより、前記被検出物上の2値化情報
を認識する認識手段とからなる光学読み取り装置におい
て、受光素子の出力値の最大値と最小値を記憶する記憶
手段と、前記基準値が記憶手段に記憶された最大値と最
小値の中間に位置するように、前記発光素子の発光量ま
たは前記受光素子の感度の少なくとも一方を調整する調
整手段とを有することを特徴とする光学読み取り装置。
[Claim 2] A light-emitting element that irradiates light onto an object to be detected;
A light receiving element receives the light reflected by the detected object and outputs a detection value according to the amount of received light, and by comparing the output value of the light receiving element and a reference value, the binarization on the detected object is performed. An optical reader comprising a recognition means for recognizing information, a storage means for storing maximum and minimum output values of the light receiving element, and a reference value located between the maximum and minimum values stored in the storage means. 1. An optical reading device comprising: adjusting means for adjusting at least one of the amount of light emitted by the light emitting element or the sensitivity of the light receiving element so that the light emitting element is positioned in the same position as the light emitting element.
JP3140155A 1991-06-12 1991-06-12 Optical reader Pending JPH04364592A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3140155A JPH04364592A (en) 1991-06-12 1991-06-12 Optical reader

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3140155A JPH04364592A (en) 1991-06-12 1991-06-12 Optical reader

Publications (1)

Publication Number Publication Date
JPH04364592A true JPH04364592A (en) 1992-12-16

Family

ID=15262151

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3140155A Pending JPH04364592A (en) 1991-06-12 1991-06-12 Optical reader

Country Status (1)

Country Link
JP (1) JPH04364592A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002342703A (en) * 2002-03-13 2002-11-29 Olympus Optical Co Ltd Information reproduction system
JP2002366885A (en) * 2002-03-13 2002-12-20 Olympus Optical Co Ltd Information reproduction system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002342703A (en) * 2002-03-13 2002-11-29 Olympus Optical Co Ltd Information reproduction system
JP2002366885A (en) * 2002-03-13 2002-12-20 Olympus Optical Co Ltd Information reproduction system

Similar Documents

Publication Publication Date Title
US7990826B2 (en) Recording medium type discrimination apparatus, recording apparatus, and discrimination method
US7586592B2 (en) Sheet recognizing device and method
GB2227093A (en) Apparatus for adjusting optical sensors
JP3822824B2 (en) Medium detection method and apparatus, and printing apparatus
US6966713B2 (en) Print media edge detection method and apparatus
US6713775B2 (en) Method to correct for sensitivity variation of media sensors
US5331428A (en) Automatic offset and gain control in a document scanner
US6075621A (en) Image sensing apparatus and shading correction method
US20020002410A1 (en) Information acquisition method and apparatus
US7885559B2 (en) Light amount measuring device, image forming apparatus, and toner density measuring apparatus
JPH04364592A (en) Optical reader
US5138674A (en) Image reader capable of detecting blank documents
JP2007206167A (en) Image forming apparatus and control method therefor
JP2000306036A (en) Device, method and system for optical reading
JP2001175799A (en) Photodetector device, brightness/darkness information code reader and its adjusting method
JP2021190774A (en) Image reading device, image forming apparatus, and foreign substance detection method
CA2063070C (en) White level detection circuit for an optical image reader
US6550677B1 (en) Code reader and code reading method for reading hole code
JP2005271369A (en) Image forming device and method of correcting image forming position
JP2551344B2 (en) Photo sensor circuit for medium detection
KR100602262B1 (en) Image forming apparatus and method for perceiving print media thereof
KR940003119B1 (en) Circuit and method for adjusting automatic exposure
EP0569063B1 (en) Automatic offset and gain control in a document scanner
JPH07291523A (en) Device for detecting program searching mark of roll paper
US20210266420A1 (en) Multi-mode scanning camera system and method