The present invention relates to bar code readers or scanners and particularly to systems for use in or with such readers or scanners for translating the analog signals resulting from the reading of the bar code as it is scanned into corresponding pulses.
The invention is useful in bar code readers or scanners of various types in which the bar code is moved relative to the scanner and where the scanner is held stationary and a beam is swept across the code. The illumination from the code is photo detected to produce an analog signal having transitions (changes in relative polarity from a relatively high to a relatively low polarity as the illumination changes due to the black bars and the white spacing therebetween). The invention is applicable for translating such analog signals into a corresponding train of pulses. These pulses contain information as to the symbol represented by the code (usually numbers or letters depending upon the code protocol). One such protocol is the universal product code or UPC which is used on grocery and other products.
In U.S. Pat. No. 4,360,798, a circuit is shown and described in connection with FIGS. 13a to c thereof, for providing a pulse train in response to an analog bar code signal. In order to avoid noise and the effect of ambient light, the bar code signals are AC coupled through a capacitor to one input of a comparator while the other input of the comparator has applied thereto the output of a positive and negative peak detector circuit. The comparator switches when the peak detector circuit output and the analog signal become relatively higher or relatively lower in amplitude. Noise can produce false transitions in the analog signal which are followed by the detector circuit. Thus, the output pulse train from the comparator may likewise have false transitions in the pulse train. A more serious problem results from DC offsets due to ambient light (such as sun light) which is seen by the photo detector. These offsets cause a DC voltage to be added to the analog signal as presented to the comparator and to the peak detector. The analog signals then float or drift in amplitude and the relationship between the peaks thereof and the peaks of the analog signal drift correspondingly. The output pulse train from the comparator then has transitions which are undefined in time and result in pulse trains having timing of pulses which do not correspond identically with the spacing of the bars of the code. A system which is not affected by such DC offsets, processes the analog signal to differentiate the signals twice. The second derivative is used to find the pea of the first derivative and thereby precisely locate the edges of the bars of the code. Complex analog circuitry is then required.
It is the principal object of the present invention to provide an improved system for translating an analog bar code signal into pulses having edges which precisely correspond to the edges of the bars of the code as the code is scanned or read and which does not require complex circuitry such as the double derivative circuitry discussed above.
It is a further object of the present invention to provide an improved system for translating analog bar code signals into corresponding pulses which is less subject to false transitions due to noise and ambient light conditions than translating systems heretofore suggested (sometimes inaccurately called digitizers because the pulse signal contains the information as to the bar code in analog form in accordance with the spacing in time of the edges of the pulses of a pulse train which spacing is an analog function).
Briefly described, a system for translating an analog bar code signal resulting from the scanning of the bars of a bar code having edges spaced from each other, the signal increasing and decreasing in amplitude as the edges of the bars are scanned, makes use of means for differentiating the analog bar code signal to provide a first signal having peak amplitudes of opposite relative polarity which are spaced from each other in accordance with the spacing of the bar edges. The system also has means for integrating the differentiated signal to provide a second signal having peak amplitudes also opposite relative polarity and less than the peak amplitudes of the differentiated bar code signal. The system makes use of the differentiated and integrated bar code signals for generating a train of pulses having edges occurring when the differentiated and integrated signals are one of the opposite relative polarities thereof and also when the integrated and differentiated signals are of the other of their opposite relative polarities. The use of the differentiated bar code signal (the first derivative) enables the bar code edges (which occur during transitions in the analog signal) to be located while excluding the affects of DC offsets due to ambient illumination and the like. The differentiating circuit may be designed to exclude from the differentiated signal false peaks due to high frequency noise. The integrator or delay means is preferably designed to follow both the positive and negative going portions of the differentiated signal and produce an output which follows the differentiated signal but is reduced in amplitude and delayed in time. The relative amplitudes of the differentiated and integrated signals are in predetermined amplitude relationship (e.g. of equal amplitude) at times corresponding to the peaks of the differentiated signal (and therefore to the edges of the bars of the code). A comparator circuit which compares the integrated and differentiated signal then provides means for generating the corresponding pulse train with transitions (pulse edges) having spacing identical to the edges of the bars of the code, but occurring slightly later in time than when the bar edges are scanned.
The foregoing and other objects, features and advantages of the invention, as well as a presently preferred embodiment thereof will become more apparent from a reading of the following description in connection with the accompanying drawings in which:
FIG. 1 is a schematic diagram of a system for translating the analog bar code signal from a bar code reader into a corresponding train of pulses;
FIG. 2 is a series of wave forms of the optical and electrical signals occurring in the operation of the system shown in FIG. 1; and
FIG. 3 shows portions of two of the wave forms illustrated in FIG. 2.
Referring to the drawings, there is shown the analog electronics of a bar code reader, specifically the photo detector (PD) 10. The photo detector 10 receives illumination from the bars of the code which is low when light is reflected or scattered from the bars and high in intensity when light is reflected from the white region between the bars. Two of the bars of a code are shown in FIG. 2 in terms of the illumination received therefrom by the photo detector 10. The bars have leading edges 12 and 16 and lagging edges 14 and 18. These edges are spaced from each other in accordance with the width of the bars and the spacing therebetween. The symbol represented by the code depends upon this spacing. As the photo detector is effectively scanned across the code (such scanning occurring as a bean: sweeps across the code or when a wand containing the photo detector is moved across the code) an electrical signal results which is amplified in an amplifier 20. The output of the amplifier as seen at TP.sub.1 changes from a relatively positive amplitude which to a relatively negative amplitude occurs at the crossover points indicated at 22, 24, 26 and 28. The horizontal line through these points, thus, is the base line above which the output is relatively positive and below which the output is relatively negative. TP.sub.1 thus represents the analog bar code signal.
A differentiator 30 provides a signal indicated at TP.sub.2 having peaks of relative opposite amplitude 32 and 34 and 36 and 38 coincident with the crossovers 22, 24 and 26, 28. These peaks are also coincident with the edges 12, 14, 16 and 18 of the bars, as shown in FIG. 1. The differentiator uses a circuit provided by an operational amplifier 40, the noninverting input of which is connected to reference potential (ground). The inverting input is connected through a resistor R.sub.1 and capacitor C.sub.1 to the output of the amplifier 20. A resistor R.sub.2 is connected between the output of the operational amplifier 40 and the inverting input thereof. C.sub.1 and R.sub.2 define the differentiator and determine the time constant thereof. R.sub.2 is shunted by another capacitor C.sub.2. R.sub.1 and C.sub.2 and the amplifier 40 define a low pass filter which blocks the transmission of high frequency noise components in the bar code signal.
The output of the differentiator is applied to an integrating or delay circuit 42 having a storage capacitor C.sub.3 shunted by a resistor R.sub.3 which principally determines the time constant thereof. This time constant is suitably longer than the differentiator's time constant. Suitable time constants in the differentiator 30 and in the integrating circuit 42 may be 100 microseconds and 25 milliseconds, respectively. The integrating circuit includes two uni-directionally conductive devices (diodes D.sub.1 and D.sub.2) connected in parallel between the output of the differentiator and the C.sub.3, R.sub.3 circuit. In other words, the diodes are connected in reverse polarity. The diodes preferably have equal voltage drops due to the equal internal resistance which they present to the signal which is being integrated and delayed. These voltage drops may be of the order of one-half to one volt. The amplitude of the differentiated output signal TP.sub.2 may be approximately five volts peak to peak. Because of the voltage drop in the diodes D.sub.1 and D.sub.2 and the integrating time constant of the R.sub.3, C.sub.3 circuit, the voltage across C.sub.3 is less than and slightly delayed behind the differentiator's output voltage, as shown in FIG. 3 by the dash line curve.
The output pulse train indicated at TP.sub.3 is generated by a comparator 44 having noninverting and inverting inputs. The differentiator's output voltage is applied through a resistor R.sub.4 to the noninverting input of the comparator, while the voltage across the capacitor C.sub.3 of the integrating or delay circuit 42 is applied to the inverting input of the comparator 44. R.sub.4 is a trimming resistor which adjusts the magnitude of the output voltage from the differentiator 30 as applied to the comparator 44, so at the voltage on the capacitor C.sub.3 differs from the peak voltage by approximately the drop in the diodes D.sub.1 and D.sub.2 Another resistor R.sub.5 is connected between the output and the inverting input of the comparator so as to provide hysteresis so that the comparator does not reset immediately.
It will be observed from FIGS. 2 and 3 that when the relative amplitudes of relatively positive polarity of the voltage on the capacitor C.sub.3 and the differentiator output voltage are equal i.e., in a predetermined amplitude relationship, the comparator 44 will switch and provide a negative going edge corresponding to the edge 12 of the bar code but delayed slightly due to the integrating or delaying circuit time constant and the voltage drop across the diode D.sub.1. When the voltages are of opposite polarity (and of the predetermined amplitude relationship), the comparator again switches and provides a positive going leading edge. The positive and negative going leading edges are spaced in time identically to the spacing in time of the edges 12 and 14 of the first bar of the code. Similarly, the comparator will switch and provide negative and positive going edges having a spacing identical to the spacing of the edges 16 and 18 of the second bar of the code.
In the event that is desirable to reset the output of the comparator to a level corresponding to the white region between the black bars of the code, the integrating circuit can be discharged by placing a low resistance shunt across the capacitor C.sub.3. A field effect transistor 46 and a resistor 48 are used for the this purpose.
From the foregoing description, it will be apparent that there has been provided an improved system for translating analog bar code signals into corresponding pulse trains, which system is not effect ed by ambient light conditions or noise. Variations and modifications in the herein described system, within the scope of the invention, will undoubtedly suggest themselves to those skilled in the art. Accordingly, the foregoing description should be taken as illustrative and not in a limiting sense.