Article detection device and method for detecting the article

Abstract: An article detection device includes: a light emission unit (1) for emitting a detection light (DL) for irradiation onto an article; a light reception unit (2) for receiving a light (RL) reflected from the article; an analog-to-digital converter (3) for converting the reflected light to a digital signal; a first register (4a) for storing the digital signal after being sampled using a first sampling signal having a first period; a second register (4b) for storing the digital signal after being sampled using a second sampling signal having a second period shorter than the first period; and a control unit (5) for generating the first and second sampling signals to be sent to the first and second registers, reading the digital signal stored in the first and second registers, calculating a difference between the digital signals in the first register and second register, comparing an absolute value of the difference with a predetermined threshold value, and detecting the article when the absolute value is larger than the threshold value.

Description: The present invention relates to a device and a method for detecting the presence of an article, more particularly, it relates to an article detection device used with a bar code reader. Recently, bar code readers are widely utilized for management of goods in a POS (Point Of Sales) system. In general, there are two types of bar code readers, i.e., an installed type and a handheld type. The former is large and installed in a counter of large store. This type has a plurality of scanning beams (laser beams) to be irradiated onto a bar code symbol so that it is possible to provide highly precise detection of the bar code symbol regardless of a direction of entry of the article into an scanning area of the laser beam. Further, in general, this type has an article detection device for detecting the entry of the article into the scanning area of the laser beam before the laser beam is turned on. Since the laser beam is turned on after detection of the article, it is possible to extend the life of a laser beam source. In general use, the operator of a bar code reader sits behind the article. However, the light reflected from the operator should not be detected as an article by the article detection device. Further, random external light (ambient light), for example, fluorescent lamps and sunlight, exists around the article, and the light reflected from the operator and the ambient light have an undesirable influence on the detection of the bar code symbol. Accordingly, it is necessary to eliminate the influence of this reflected light so as to increase the reliability of detection of articles. It is therefore desirable to provide an article detection device (i.e. device for detecting the presence of an article), and a method for detecting the presence of an article, in which the presence of an article can be reliably detected regardless of the influence of ambient light reflected from various sources. US-A-4 694 182 discloses a hand held bar code reader using a modulated laser diode as a light source. By modulating the diode, and timing the reading detector accordingly, the effects of strong ambient light can be subtracted out. EP-A-0 323 848 discloses a device and a method according to the preambles of accompanying claims 1 and 12. Detection of the presence of an article is achieved using an article detection circuit which integrates and smooths a received light signal, and which generates an article detection signal to activate a main light source and a bar code reader. GB-A-2 114 792 discloses an apparatus for recognising optical code markings which employs photoreceivers for detecting the presence or absence of an article. In accordance with the present invention, there is provided a device for detecting the presence of an article, including: a light emission unit for emitting detection light onto an article; and a light reception unit for receiving light reflected from the article; and characterised by : an analog-to-digital converter for converting the reflected light to a digital signal; a first register for storing the digital signal after being sampled using a first sampling signal having a first period; a second register for storing the digital signal after being sampled using a second sampling signal having a second period shorter than the first period; and a control unit for generating the first and second sampling signals to be sent to the first and second registers, reading the digital signal stored in the first and second registers, calculating a difference between the digital signals in the first register and second register, comparing an absolute value of the difference with a predetermined threshold value, and detecting the presence of an article when the absolute value is larger than a threshold value. In one embodiment, the article detection device further comprises: an AC-amplifier connected to the light reception unit for amplifying the reflected light; a sample/hold unit connected between the AC-amplifier and the A/D converter for sampling and holding an alternating signal amplified by the AC-amplifier; and a modulation unit for generating a pulse modulation signal to be sent to a drive unit which pulse-drives the light emission unit; wherein the control unit further generates control signals to be sent to the modulation unit, the sample/hold unit, and the A/D converter to control the operation of these units. In another embodiment, the control unit comprises a storage unit for storing a number of sampling times and storing a threshold value comprised of a first and second threshold values. In still another embodiment, the sample/hold unit comprises a maximum sample/hold circuit for sampling and holding a maximum value of the alternating signal, a minimum sample/hold circuit for sampling and holding a minimum value of the alternating signal, and a differential amplifier for amplifying a difference between the outputs of the maximum sample/hold circuit and the minimum sample/hold circuit. In still another embodiment, the sample/hold unit further comprises a first delay unit for delaying a first sampling signal, and a second delay unit for delaying a second sampling signal, the first sampling signal is input to the maximum sample/hold circuit, and the second sampling signal is input to the minimum sample/hold circuit. In still another embodiment, an article detection device further comprises: a difference calculation unit having a differential amplifier for calculating a difference between a level of background reflected light and a lower limitation level, the background reflected light being detected from the background of the article, and the lower limitation level being adjusted in accordance with the intensity of the background reflected light in an adjusting mode; and detection means for detecting a change in amount of light based on the resultant data of the above calculation to eliminate the influence of the ambient light. In still another embodiment, the intensity of the background reflected light is determined by a reference reflection face having a predetermined reflection rate. In still another embodiment, the article detection device comprises a sample/hold circuit for sampling and holding the output of the differential amplifier, an adjusting circuit for adjusting the lower limitation level, a first A/D converter for converting the output of the differential amplifier to a digital value, a second A/D converter for converting the output of the sample/hold circuit to a digital value, and a third A/D converter for converting the output of the adjusting circuit to a digital value. In still another embodiment, the article detection device further comprises an adjusting unit for adjusting the gain of an amplifier connected to the light reception element, and a reference voltage generation unit for generating first and second reference voltages to be supplied to the amplifier, wherein the adjustment of the gain of the amplifier is performed in such a way that when ambient light does not exceed a predetermined threshold level, the first reference voltage is selected and the gain is adjusted to a high level, and when the ambient light does exceed a predetermined threshold level, the second reference voltage is selected and the gain is adjusted to a low level. In still another embodiment, the adjusting unit comprises a plurality of analog switches, a first analog switch being used for switching the gain between the high level and the low level, a second analog switch is used for switching between detection of ambient light and the light reflected from an article, and a third analog switch is used for switching the reference voltage between the first and the second reference voltages. The switching of these analog switches is performed by selection signals generated by the control unit. In still another embodiment, the control unit comprises a microprocessor. As another aspect of the present invention, a method for detecting the presence of an article comprises the steps of: emitting detection light to be irradiated onto an article; and receiving light reflected from the article; and is characterised by the further steps of : converting the light reflected to a digital signal; storing the digital signal in a first register after being sampled using a first sampling signal generated by the control unit and having a first period; and storing the digital signal in a second register after being sampled using a second sampling signal generated by the control unit and having a second period shorter than the first period. In the control unit, the steps of: reading the digital signal stored in the first and second registers; calculating a difference between the digital signals in the first register and second register; comparing an absolute value of the difference with a predetermined threshold value; and detecting the presence of an article when the absolute value is larger than the threshold value, are carried out. In another embodiment, the detecting step further comprises the step of: defining first and second threshold values included in the threshold value, detecting the presence of an article when the absolute value is larger than the first threshold value, and detecting that an article is not present when the absolute value is smaller than the second threshold value. In still another embodiment, the detecting step further comprises the steps of: checking whether or not a number of sampling times reaches a predetermined number of sampling times when the absolute value is smaller than the first threshold value, and returning to previous sampling steps. In still another embodiment, the detecting step further comprises the steps of: checking whether or not a number of sampling times reaches a predetermined number of sampling times when the absolute value is larger than the second threshold value, returning to a previous sampling step of the second sampling signal when the number of sampling times does not reach a predetermined number of times, and detecting that an article is not present when the absolute value is smaller than the second threshold value or when the number of sampling times reaches a predetermined number of times. In still another embodiment, a method for detecting an article further comprises the steps of: setting a first and second reference voltage, detecting ambient light before detecting the presence of an article; comparing the ambient light with a predetermined threshold value; and adjusting the gain of an amplifier in accordance with the ambient light so as to switch between first and second reference voltages. In still another embodiment, a method for detecting an article further comprises the steps of: calculating a difference between a level of background reflected light and a lower limitation level in an adjusting mode; and detecting a change in amount of light based on resultant data of the above calculation to eliminate the influence of the ambient light. In the drawings: Fig. 1A is a view for explaining an article detection area and a bar code read area of a bar code reader; Fig. 1B is a basic circuit of an article detection unit shown in Fig. 1A; Fig. 1C is a view for explaining an article detection signal from a comparator shown in Fig. 1B; Fig. 2A is a basic block diagram of an article detection device according to a first embodiment of the present invention; Fig. 2B is a signal timing chart of the article detection device shown in Fig. 2A; Fig. 3 is a detailed block diagram of the article detection device shown in Fig. 2A; Fig. 4 is a flowchart for explaining processing of signals in the circuit shown in Fig. 3; Figs. 5A to 5F are signal timing charts for explaining the first embodiment; Fig. 6A is a basic block diagram of an article detection unit according to a second embodiment of the present invention; Fig. 6B is a view for explaining the principle of the second embodiment; Fig. 7 is a detailed block diagram of the second embodiment shown in Fig. 6A; Fig. 8 is a diagram showing waveforms of each block shown in Fig. 7; Fig. 9 is a detailed block diagram of a third embodiment of the present invention; Fig. 10 is a flowchart for explaining a processing of signals in the circuit shown in Fig. 9; Fig. 11 is a flowchart for explaining the processing of ambient light shown in Fig. 10; and Fig. 12 shows the timing of selection signals of the-circuit shown in Fig. 9. Before describing the preferred embodiments, an explanation will be given of the conventional art. Figure 1A is a view for explaining an article detection area and a bar code read area of a bar code reader. As shown in the drawing, the bar code reader is basically constituted by an article detection unit and a bar code read unit. An article detection light is emitted from the article detection unit in the range of the article detection area (slanted area) to detect the presence of an article. The laser beam is emitted from the bar code read unit to read the bar code symbol of the article. The article detection area RA overlaps with the bar code read area SA to realize precise detection of the article. When the article detection unit detects an article in the article detection area RA, the laser beam source is turned on and the laser beam is emitted onto the bar code symbol. Figure 1B is a basic circuit of the article detection unit shown in Fig. 1A. The detection light DL is emitted from the light emission element 1, and the light reflected from the article RL is received by the light reception element 2 and amplified by the amplifier 6a. In the comparator 6b, the amplified signal is compared with the threshold level Vth and the article detection signal DS is output when the amplified signal is larger than the threshold level Vth. Figure 1C is a view for explaining an article detection signal DS from the comparator 6b. As shown in the drawing, when the reflected light level RL exceeds the threshold level Vth, the article detection signal DS is emitted from the comparator 6b. That is, although various detection lights are reflected from the article and the background, the light level reflected from the article itself is larger than the threshold level Vth. In this case, the reflection light level RL fluctuates in accordance with a color in the background. For example, when the operator wears white, the reflected light level RL becomes large. Accordingly, when the reflected light from the background accidentally exceeds the threshold level Vth as shown by dotted line RL′, the undesired reflected light RL′ is detected as the article detection signal. Figure 2A is a basic block diagram of an article detection device according to a first embodiment of the present invention. In Fig. 2A, the same reference numbers as used in Fig. 1A are attached to the same components in this drawing. Reference number 3 denotes an analog-to-digital converter, 4a and 4b registers, and 5a control unit. Further, M1 denotes a first sampling signal, and M2 denotes a second sampling signal. The signal Sd from the A/D converter is input in parallel to the first register 4a and the second register 4b. The first register 4a stores the signal Sd after being sampled using the sampling signal M1 having a first period T1, and the second register 5b stores the signal Sd after being sampled using the sampling signal M2 having a second period T2. The period of the sampling signal M2 is shorter than that of the sampling signal M1. The control unit 5 generates the first and second sampling signals M1 and M2 which are applied to the first and second registers 4a and 4b. Further, the control unit 5 calculates the difference between the data stored in the first and second registers 4a and 4b, compares the absolute value of that difference with the threshold value, and detects the article when the absolute value exceeds the threshold value. Figure 2B is a signal timing chart of the device shown in Fig. 2A. As shown in the drawing, the period T2 of the sampling signal M2 is considerably shorter than that of the sampling signal M1. For example, the period T1 may be set to 5 sec, and the period T2 set to 2 msec. The light reflected from the background is detected during the period T1 of the sampling signal M1, and the light reflected from the article is detected during the period T2 of the sampling signal M2. Accordingly, as explained in detail hereinafter, the article is detected when the absolute value of the difference between the reflection level of the background and that of the article exceeds the predetermined threshold value. Figure 3 is a detailed block diagram of the article detection device shown in Fig. 2A. Reference number 7 denotes a modulation unit, 8 a drive unit, 9 an alternating (AC) amplifier, and 10 a sample/hold unit. Further, CTLa to CTLc denote control signals generated from the control unit 5 to control the operation of these units 3, 7, and 10, C1 and C2 denote the number of sampling times, Vth1 denotes a threshold level when an article is present, and Vth2 denotes a threshold level when an article is not present. These values of C1, C2 and Vth1, Vth2 are store in a storage means of the control unit 5. The modulation unit 7 generates a pulse modulation signal Sm to the drive unit 8 in response to the control signal CTLa. The drive unit 8 drives the light emission element 1 in response to the pulse modulation signal Sm so that a pulsed detection light DL is emitted from the element 1. The reflection light RL from the article is received by the light reception element 2 and alternatively amplified by the AC-amplifier 9. The amplified signal Sa is input to the sample/hold unit 10 for sampling and holding the amplified signal. The control unit 5 is constituted by, for example, a microprocessor (CPU). Since the detection light DL is emitted in pulses, it is possible to extend the life of the element 1, and to reduce power consumption. Figure 4 is a flowchart for explaining the processing of signals in the circuit shown in Fig. 3. 1 ○ First, the CPU initializes each unit. 2 ○ Next, the CPU resets the number of times C1 of the sampling signal M1 to "0". Further, the digital signal Sd is input to the first register 4a in response to the sampling period of the sampling signal M1. 3 ○ The CPU sends the sampling signal M2 to the second register 4b. The digital signal Sd is input to the second register 4b in response to the period of the sampling signal M2. Next, the CPU reads the sampling data D1 using the sampling signal M1 from the first register 4a and the sampling data D2 using the sampling signal M2 from the second register 4b. Further, the CPU calculates the difference between the sampling data D1 and the sampling data D2 (i.e., D1 - D2), obtains the absolute value |D1 - D2| of the difference, and compares the absolute value |D1 - D2| with the threshold value Vth1. 4 ○ In step 3 ○, when the absolute value |D1 - D2| is not larger than the threshold value Vth1 ("NO"), the CPU judges that an article is not detected, and updates the number of times C1 of the sampling to C1 +1. The CPU then checks whether or not the number of times C1 has reached the predetermined number of times X1. When the number of times C1 reaches X1, i.e., C1 = X1 ("YES"), the process returns to the step 2 ○ to start from C1 = 0. If the number of times C1 has not reached X1, i.e., C1 ≠ X1 ("NO"), the process returns to the step 3 ○ to read the data D1. 5 ○ In step 3 ○, when the absolute value |D1 - D2| is larger than the threshold value Vth1 ("YES"), the CPU judges that an article is present, and performs the processing for the case in which are article is present. That is, the CPU starts the bar code read unit to irradiate the laser beam onto the bar code. 6 ○ The CPU then again reads the data D2 in the period T2 from the register 4b to ensure precise detection of the article. That is, the CPU again calculates the difference between the sampling data D1 and the sampling data D2 (i.e., D1 - D2), obtains the absolute value |D1 - D2|, and compares the absolute value |D1 - D2| with the threshold value Vth2. 7 ○ In step 6 , when the absolute value |D1 - D2| is not smaller than the threshold value Vth2 ("NO"), the CPU judges that an article may be present in the detection area, and updates the number of times C2 of the sampling to C2 +1. The CPU then checks whether or not the number of times C2 has reached the predetermined number of times X2. If the number of times C2 has not reached X2, i.e., C2 ≠ X2 ("NO"), the process returns to the step 6 ○ to repeat from the step 6 ○. When the number of times C2 reaches X2, i.e., C2 = X2 ("YES"), the process proceeds to the step 8 ○. In this case, the CPU judges that the article is present, but it has not moved into detection area. 8 ○ In step 6 ○, when the absolute value |D1 - D2| is smaller than the threshold value Vth2 ("YES"), and when the article is present, but it has not moved into the detection area, the CPU performs the processing for the case in which no article is present in the detection area. That is, the CPU resets the number of times C2 of the sampling to "0", and the process returns to the step 2 ○. Figures 5A to 5F are signal timing charts of the present invention. In Fig. 5A, the ordinate denotes the intensity of light reflected from the background or an article. The article detection unit detects the reflected light RL1 of the background changing from intensity "2" to intensity "4", and also detects the reflected light RL2 of the article changing from intensity "0" to intensity "4". In this case, the change of the reflection light intensity RL2 of the article is quite large because the article is present in front of the article detection unit for every reading operation. In Figs. 5B and 5C, the period T1 of the sampling signal M1 is very large compared with the period T2 of the sampling signal M2. As explained above, for example, the period T1 is set to 5 sec, and the period T2 is set to 2 msec. In this case, the period T1 is used for sampling the light reflected from the background, and period T2 is used for sampling the light reflected from the article. In Figs. 5D and 5E, the data D1 denotes the sampling data stored in the register (R1) 4a based on the period T1, and the data D2 denotes the sampling data stored in the register (R2) 4a based on the period T2. In Fig. 5F, this chart shows the absolute value of the difference between the data D1 and the data D2. That is, the CPU subtracts the data D2 from the data D1, and obtains absolute value |D1 - D2|. Further, the absolute value |D1 - D2| is compared with the predetermined threshold value. Accordingly, in the present invention, since two different sampling periods T1 and T2 are used for detecting the background and the article and the absolute value |D1 - D2| is compared with the threshold values Vth1 and Vth2, it is possible to eliminate the influence of the light reflected from the background so that it is possible to perform precise detection of the article. Further, as shown in step 8 ○, when the CPU judges that an article exists but does not move, since the CPU performs the processing for the base in which no article is present, it is possible to reduce the necessary time for detecting the article. The article detection unit according to the present invention can of course be applied to another type of system instead of a bar code reader. Figure 6A is a basic block diagram of the article detection unit according to a second embodiment of the present invention. This embodiment is advantageous for detection of an article in a case where the background moves. In Fig. 6A, reference number 11 denotes a difference calculation unit, and 12 denotes a detection unit for detecting a change in amount of light. These units are provided in the article detection unit. Briefly, the difference calculation unit 11 substracts a lower limitation level LL from the background reflected light RS and obtains a difference value D thereof. The detection unit 12 detects the change in the amount of light based on the difference light value D as explained in detail hereinafter. Figure 6B is a view for explaining the principle of the second embodiment. In Fig. 6B, the ordinate denotes the output level of the light reception element, and the abscissa denotes the distance from the article to the article detection unit. The line O-P-Q (dotted line) denotes the relationship between the output and the distance. As is obvious from the drawing, the output level linearly reduces in proportion to the distance. In this case, the lower limitation level is defined by movement of the background as explained below. When the output level (i.e., reflected light level) is limited by the lower limitation level LL, the output light lower than the limitation level LL is not detected by the article detection unit. Accordingly, the light to be detected by the article detection unit can be expressed by the line O′-P′-Q′ (solid line). In other words, it is possible to consider that the distance from the article to the article detection unit is close to a distance L1. Therefore, it is possible to eliminate a light reflected from the background which moves in the detection area. Figure 7 is a detailed block diagram of the second embodiment shown in Fig. 6A, and Figure 8 is waveforms of each block shown in Fig. 7. In Fig. 7, reference number 2a denotes an optical-to-electrical (O/E) converter, and 13 a high-pass (H/P) filter. 17a denotes a maximum sample/hold (S/H) circuit, 17b a minimum sample/hold circuit, 18 and 20a differential amplifiers (DIF-AMP), 19 a sample/hold circuit, and 22a and 22b delay circuits. The registers 21a and 21b correspond to the registers 4a and 4b in Fig. 3, and the CPU 24 corresponds to the control unit 5 in Fig. 3. Further, reference number 25 denotes an adjusting circuit for the lower limitation level, and 26 denotes an A/D converter. The signal A amplified by the AC amplifier 14 is input to the maximum and minimum sample/hold circuits 17a and 17b. The signal A is shown by the solid line in Fig 8, and the signals B and C are shown by the dotted lines in Fig. 8. The maximum sampling/holding operation is performed in response to a sample/hold signal CTL1-DLY generated from the delay circuit 22a, and the minimum sampling/holding operation is performed in response to a sample/hold signal CTL2-DLY generated from the delay circuit 22b. Signals CTL1 and CTL2 are the sample/hold signals before being delayed by the delay circuits. The signals CTL1 and CTL2 are generated from the CPU 24. In this case, each pulse width of the CTL1-DLY and the CTL2-DLY is narrower than that of the CTL1 and CTL2. This is because it is necessary to use the flat portion of the signal A. That is, the signal CTL1-DLY synchronizes with the signal A, and is used for sampling the maximum range (flat portion) of the reflection light of the signal A. Similarly, the signal CTL2-DLY synchronizes with the signal A, and is used for sampling the minimum range (flat portion) of the reflection light of the signal A. The differential amplifier 18 amplifies the difference value between the signals B and C and obtains the signal D shown in Fig. 8. The sample/hold circuit 19 outputs the signal E in response to the sample/hold signal CTL3 from the CPU 24. The differential amplifier 20a calculates the difference between the signal E and the lower limitation level LL, and the difference value is converted to a digital signal by the A/D converter 20. The register 21a stores the digital signal in response to the sampling signal CTL4 from the CPU, and the register 21b stores the digital signal in response to the sampling signal CTL5 from the CPU. The adjusting circuit 25 is constituted by a resistor r1 and a variable resistor r2, and is provided for adjusting the lower limitation level by means of the variable resistor r2. The adjustment of the lower limitation level is explained in detail hereinafter. The lower limitation level LL is adjusted before the detection of the article is started (i.e., adjustment mode). The signal E is converted to the digital signal S1 by the A/D converter 23 and the digital signal S1 is input to the CPU as the adjustment mode. In the adjustment mode, the detection light DL is emitted in pulses from the light emission element 1. Next, a reference reflection face (not shown) is provided instead of the article at the distance L1 (for example, L1 = 40 cm) from the article detection unit. The reference reflection face has a reference reflection rate (for example, 30%). The detection light DL is reflected by the reference reflection face, and received by the light reception element 2. The received signal is transferred to the sample/hold circuit 19 through the units 13, 14, 17a, 17b, and 18. The digital signal S1 from the A/D converter 23 is displayed on a display apparatus (not shown). The lower limitation level LL is adjusted by the variable resistor r1 in reference to the display. Further, the lower limitation level LL is converted to a digital signal S2 by the A/D converter 26 and displayed on the display apparatus. Accordingly, the operator adjusts the variable resistor r1 (signal S2) so as to coincide with the digital signal S1 of the A/D converter 23. The adjusted lower limitation level LL indicates the reflected light level from the background. Figure 9 is a detailed block diagram of a third embodiment of the present invention. The same reference numbers as used in Fig. 7 are attached to the same components in this drawing. This embodiment is provided as a countermeasure for ambient light, for example, fluorescent light and sunlight existing in the article detection area. When this ambient light is strong, the light reflected from the article is disturbed so that it is not possible to precisely detect the article. In Fig. 9, AS1 to AS5 denote analog switches, and 27 denotes a reference voltage generation circuit. Further, Vref1 and Vref2 denote first and second reference voltages, and IV an inverter. The analog switch AS1 is provided for adjusting the gain of the amplifier (AMP) 2a by switching between the resistor r1 and the resistor r2. This switching operation is performed by a selection signal CTL8 from the CPU 24 in response to the intensity of the ambient light. The output of the amplifier 2a is input to the analog switch AS2 shown by a symbol * ○ , as well as to Filter 13. The high-pass H/P filter 13 is provided for cutting the DC components or low frequency components contained in the ambient light. The analog switch AS2 is switched by a selection signal CTL9 after being inverted by the inverter IV. The output of the amplifier 2a is input to the A/D converter 20 through the analog switch AS2. The analog switch AS3 is switched by the selection signal CTL9 and the signal E is input to the A/D converter 20 through the analog switch AS3. Figure 10 is a flowchart for explaining the processing of signals in the circuit shown in Fig. 9. This flowchart is the same as shown in Fig. 4 except for the step 2 ○. Accordingly, an explanation is given of the step 2 ○, and explanation of other steps is omitted. In step 2 ○, the CPU resets the number of times C1 of the sampling signal M1 to "0". Next, the CPU performs the processing of the ambient light as explained in detail in Fig. 11, and performs the selection of the gain of the amplifier 2a and the selection of the reference voltage of the A/D converter 20. Further, the digital signal from the A/D converter 20 is input to the first register 21a in response to the sampling signal CTL4. Figure 11 is a flowchart for explaining the processing of the ambient light shown in Fig. 10, and Figure 12 is a timing of selection signals. The operation is explained in detail with reference to Figs. 9, 11 and 12. (1) The CPU 24 turns off the selection signal CTL9 which is input to the analog switches AS2 and AS3. Accordingly, the analog switch AS3 is turned off, but the analog switch AS2 is turned on because the selection signal CTL9 is inverted by the inverter IV. Accordingly, the output of the amplifier 2a is input to the A/D converter 20. During this time, the detection light DL is not emitted from the light emission element 1. Accordingly, the light reception element 2 receives only ambient light from the background. This ambient light is input to the A/D converter 20 through the analog switch AS2 (through the symbol * ○), and converted to the digital signal S3 thereby. (2) Next, the CPU 24 turns on the selection signal CTL6, and turns off the selection signal CTL7. Based on the selection signals CTL6 and CTL7, the analog switch AS4 is turned on and the analog switch AS5 is turned off. Accordingly, the reference voltage Vref1 having high voltage is applied to the A/D converter 20. AT the same time, the CPU 24 turns off the selection signal CTL8 so as to turn off the analog switch AS1. Since the resistor r2 is cut off from a feedback loop of the amplifier the gain of the amplifier 2a is increased because only resistor r1 exists in the feedback loop. (3) In above situation, the CPU 24 reads the sampling signal S3, which indicates the intensity of the ambient light, from the A/D converter 20. Further, the CPU compares the sampling signal S3 with a threshold value Vth3 of the ambient light. (4) When the sampling signal S3 exceeds the threshold value Vth3 ("YES"), it is possible to consider that the intensity of the ambient light is larger than the threshold value Vth3. Accordingly, the CPU 24 turns off the selection signal CTL6, and turns on the selection signal CTL7 as shown by dotted line in Fig. 12. Accordingly, the high reference voltage Vref1 is cut off by the analog switch AS4, and the low reference voltage Vref2 is applied to the A/D converter 20 through the analog switch AS5. Further, the CPU 24 turns on the selection signal CTL8 as shown by dotted line in Fig. 12 so as to turn on the analog switch AS1. Since the resistors r1 and r2 are connected in the feedback loop of the amplifier, the gain of the amplifier is decreased by these resistors. (5) When the sampling signal S3 does not exceed the threshold value Vth3 ("NO"), the state of the selection signals CTL6 to CTL9 is maintained as shown by the solid lines in Fig. 12. That is, the amplifier 2a is set to a high gain state, and the reference voltage is set to the high reference voltage side. Further, the CPU turns on the selection signal CTL9 when the sampling signal S3 does not exceed the threshold value Vth3, or when the amplifier is set to the low gain. When the selection signal CTL9 is turned on, the analog switch AS2 is turned off and the analog switch AS3 is turned on. Accordingly, the sample/hold circuit (S/H) 19 is connected to the A/D converter 20 through the analog switch AS3.

Claims: A device for detecting the presence of an article, comprising: light emission means (1) for emitting detection light (DL) for irradiation onto an article; and light reception means (2) for receiving reflected light (RL) from the article; characterised by : an analog-to-digital (A/D) converter (3) for converting the reflected light (RL) to a digital signal (Sd); a first register (4a) for storing the digital signal (Sd) after being sampled using a first sampling signal (M1) having a first period (T1); a second register (4b) for storing the digital signal (Sd) after being sampled using a second sampling signal (M2) having a second period (T2) shorter than the first period (T1); and control means (5) for generating the first and second sampling signals (M1, M2) to be sent to the first and second registers (4a, 4b), reading the digital signal stored in the first and second registers (4a, 4b), calculating a difference between the digital signals in the first register (4a) and second register (4b), comparing an absolute value of the difference with a predetermined threshold value (Vth), and detecting the presence of an article when the absolute value is larger than the threshold value (Vth). An article detection device as claimed in claim 1, further comprising: an AC-amplifier (9) connected to the light reception means (2) for amplifying the reflected light (RL); a sample/hold means (10) connected between the AC-amplifier (9) and the A/D converter (3) for sampling and holding an alternating signal amplified by the AC-amplifier (9); and modulation means (7) for generating a pulse modulation signal (Sm) to a drive unit (8) which pulse-drives the light emission means (1); wherein the control means (5) further generates control signals (CTLa, CTLb, CTLc) to be sent to the modulation means (7), the sample/hold means (10), and the A/D converter (3) to control operation of these means (3, 7, 10). An article detection device as claimed in claim 1, wherein the control means (5) comprises a storage means for storing number of sampling times (C1, C2) for the first and second sampling signals (M1, M2), and storing the threshold value (Vth) comprised of a first and second threshold values (Vth1, Vth2). An article detection device as claimed in claim 2, wherein the sample/hold means (10) comprises a maximum sample/hold circuit (17a) for sampling and holding a maximum value of the alternating signal, minimum sample/hold circuit (17b) for sampling and holding a minimum value of the alternating signal, and a differential amplifier (18) for amplifying a difference between outputs of the maximum sample/hold circuit (17a) and the minimum sample/hold circuit (17b). An article detection device as claimed in claim 4, wherein the sample/hold means (10) further comprises a first delay means (22a) for delaying a first sampling signal (CTL1), and a second delay means (22b) for delaying a second sampling signal (CTL2), the first sampling signal (CTL1) being input to the maximum sample/hold circuit (17a), and the second sampling signal (CTL2) being input to the minimum sample/hold circuit (17b). An article detection device as claimed in claim 1, further comprising: difference calculation means (11) having a differential amplifier (20a) for calculating a difference between a level of background reflected light and a lower limitation level, the background reflected light being detected from the background of an article, and the lower limitation level being adjusted in accordance with the intensity of the background reflected light in an adjusting mode; and detection means (12) for detecting a change in the amount of light based on resultant data from the above calculation to eliminate the influence of the background reflected light. An article detection device as claimed in claim 6, wherein the intensity of the background reflection light is determined by a reference reflection surface having a predetermined reflection rate. An article detection device as claimed in claim 6, wherein the detection means comprises a sample/hold circuit (19) for sampling and holding an output of the differential amplifier (18), an adjusting circuit (25) for adjusting a lower limitation level (LL), a first A/D converter (20) for converting an output of the differential amplifier (20a) to a digital value, a second A/D converter (23) for converting the output of the sample/hold circuit (19) to a digital value, and a third A/D converter (26) for converting the output of the adjusting circuit (25) to a digital value. An article detection device as claimed in claim 1, further comprising an adjusting means for adjusting the gain of an amplifier (2a) connected to the light reception element (2), and a reference voltage generation means (27) for generating a first and second reference voltages (Vref1, Vref2) to be supplied to the amplifier (2a), wherein the adjustment of the gain of the amplifier (2a) is performed in such a way that, when ambient light does not exceed a predetermined threshold level, the first reference voltage (Vref1) is selected and the gain is adjusted to a high level state, and when the ambient light exceeds a predetermined threshold level, the second reference voltage (Vref2) is selected and the gain is adjusted to a low level state. An article detection device as claimed in claim 9, wherein the adjusting means comprises a plurality of analog switches (AS1 to AS5), a first analog switch (AS1) being used for switching the gain between the high level state and the low level state, analog switches (AS2, AS3) being used for switching the detection light between the ambient light and the light reflected from an article, and analog switches (AS4, AS5) being used for switching the reference voltage between the first and the second reference voltages (Vref1, Vref2), further, switching of these analog switches being performed by selection signals (CTL6 to CTL9) generated from the control means (24). An article detection device as claimed in claim 1, 3 or 10, wherein the control means (5, 24) comprises a microprocessor (CPU). A method for detecting the presence of an article, comprising the steps of: emitting detection light (DL) for irradiation onto an article; and receiving reflected light (RL) from the article; and characterised by the further steps of : converting the reflection light (RL) to a digital signal (Sd); storing the digital signal (Sd) in a first register (4a) after being sampled using a first sampling signal (M1) generated by control means (5) and having a first period (T1); and storing the digital signal (Sd) in a second register (4b) after being sampled using a second sampling signal (M2) generated by the control means (5) and having a second period (T2) shorter than the first period (T1); in the control means (5): reading the digital signal stored in the first and second registers (4a, 4b); calculating a difference between the digital signals in the first register (4a) and second register (4b); comparing an absolute value of the difference with a predetermined threshold value (Vth); and detecting the presence of an article when the absolute value is larger than the threshold value (Vth). A method for detecting an article as claimed in claim 12, wherein the detecting step further comprises the steps of: defining a first and second threshold values (Vth1, Vth2) included in the threshold value (Vth), detecting the presence of an article when the absolute value is larger than the first threshold value (Vth1), and detecting that an article is not present when the absolute value is smaller than the second threshold value (Vth2). A method for detecting an article as claimed in claim 13, wherein the detecting step further comprises the steps of: checking whether or not a number of sampling times (C1) reaches a predetermined number of times (X1) when the absolute value is smaller than the first threshold value (Vth1), and returning to previous sampling steps. A method for detecting an article as claimed in claim 13, wherein the detecting step further comprises the steps of: checking whether or not a number of sampling times (C2) reaches a predetermined number of times (X2) when the absolute value is larger than the second threshold value (Vth2), returning to the previous sampling step of the second sampling signal (M2) when the number of times (C2) of sampling does not reach a predetermined number of times (X2), and detecting that an article is not present when the absolute value is smaller than the second threshold value (Vth2) or when the number of sampling times (C2) reaches a predetermined number of times (X2). A method for detecting an article as claimed in claim 12, further comprising the steps of: setting a first and second reference voltage (Vref1, Vref2), detecting ambient light before detecting the presence of an article; comparing the ambient light with a predetermined threshold value; and adjusting the gain of an amplifier (2a) in accordance with the ambient light so as to switch between a first and second reference voltages. A method for detecting an article as claimed in claim 12, further comprising the steps of: calculating a difference between a level of background reflected light and a lower limitation level in an adjusting mode; and detecting a change in amount of light based on resultant data from the above calculation to eliminate the influence of the background reflected light.

Inventors: ISHII TAKESHI, ITO MOTOHIKO, KASHIWAZAKI TOMOYUKI, KATOH HIROAKI, KAWAI HIROAKI, KITAMURA NOBUYUKI, OYAMA YOSHIHIRO, SASAKI TATSUO, SATO SHINICHI, SHINODA ICHIRO, TAKAHASHI TAMOTSU, WATANABE MITSUO, ISHII, TAKESHI, ITO, MOTOHIKO, KASHIWAZAKI, TOMOYUKI, KATOH, HIROAKI, KAWAI, HIROAKI, KITAMURA, NOBUYUKI, OYAMA, YOSHIHIRO, SASAKI, TATSUO, SATO, SHINICHI, SHINODA, ICHIRO, TAKAHASHI, TAMOTSU, WATANABE, MITSUO
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1990
Main classification: G01S17
IPC codes: G01S17, G06K7