Abstract:
An improved currency validator having an electrical signal generating sensor for scanning an area of a bank note and generating a sequence of electrical signals in response to the currency identifying characteristics detected by the sensor in the area scanned is described. Circuitry is provided for measuring the intervals between the generated signals, classifying each of the measured intervals into one of a plurality of sets and determining the difference between the number of intervals in one of said sets and the number of intervals in another of said sets. By comparing the above difference with a constant, information concerning the validity or denomination of the bank note is obtained. Additional circuitry is described for normalizing measured intervals and set bounds to take into effect variations in the speed of transport of banknotes which are to be discriminated.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a method and apparatus for validating paper currency, particularly United States one, two and five dollar bills, and more particularly to such a method and apparatus in which the authenticity and denomination of paper currency is identified by sensing the characteristics of a piece of currency along a predetermined scan line. 
     2. Description of the Prior Art 
     A number of devices have been proposed which identify and distinguish between various denominations of U.S. paper currency or &#34;bills&#34;, but none of these devices has been completely satisfactory. 
     Genuine U.S. paper currency contains a variety of printed indicia which may be used to identify the currency as authentic, and also to distinguish between authentic currency of various denominations. 
     One indication of authenticity is the fact that certain areas on a U.S. bill are printed with ink with magnetic properties. For example, the portrait which appears in the center of every U.S. bill is, in a genuine bill, printed entirely with magnetic ink. The fanciful engraving which forms the printed border of each U.S. bill is likewise composed entirely of magnetic ink, as are the large capital letters or large numerals which appear to the right of the portrait and which identify the denomination of the bill (i.e., &#34;ONE&#34;, &#34;TWO&#34;, &#34;FIVE&#34;, etc.). In contrast, the green Treasury Department seal which underlies the denomination identifying letters or numerals to the right of the portrait, as well as the black Federal Reserve Bank seal which appears to the left of the portrait, are both printed in non-magnetic ink. 
     Each denomination U.S. bill is likewise characterized by the distance between the grid lines which comprise the background of the portrait field. In one dollar bills, for example, the space between vertical grid lines is equal to 0.008 inches. For two and five dollar bills, the grid line space is equal to 0.010 inches and 0.011 inches, respectively. 
     Prior art currency validators have been proposed which identify authentic U.S. bills and distinguish between bills of various denominations by measuring the average spacing between the vertical grid lines in the portrait areas of the bills. One such device is disclosed in U.S. Pat. No. 4,349,111 to Shah et al. 
     Identification of bills based on average grid line spacing is likely to lead to failures to distinguish between bills having relatively small differences in grid spacing. For example, certain commercial bill validators utilizing the average spacing technique cannot be used with both two dollar and five dollar bills, because the average grid line spacings are too similar. 
     Another problem with various prior art validators is that they may accept high denomination bills as valid lower denomination bills. 
     Many prior art currency validators require that the tested bill be inserted into the validator in a specific orientation (e.g., Federal Reserve seal first). Such devices result in authentic bills being rejected merely because of improper orientation. It is therefore desirable to provide a currency validator which is operationally insensitive to bill orientation. 
     Many of the prior art currency validators require careful regulation of the speed at which the bill is scanned for information. In such validators, even a slight variation in scanning speed, such as that resulting from an instantaneous drop in power line voltage, can cause authentic bills to be rejected and produce inaccuracies in the identification of bill denomination. It is therefore desirable to provide a currency validator which is insensitive to the speed at which a bill is scanned. 
     In order to avoid some of the problems of speed regulation, some prior art validators, such as disclosed in U.S. Pat. No. 4,464,787 to Fish et al, employ detectors at fixed positions to positively identify the position of the bill and thereby ascertain the bill area being tested. These validators, however, generally require a testing channel at least as long as the bill being tested. 
     SUMMARY OF THE INVENTION 
     A currency validator in accordance with the present invention has a plurality of sensors positioned to encounter a bill and generate electrical signals in response to certain features of the bill. The electrical signals are processed by a logic circuit, such as a microprocessor, to determine authenticity and denomination of the bill being tested. In the presently preferred embodiment, a histogram technique is employed to identify and distinguish certain features. 
     In the presently preferred embodiment for U.S. bills, described in greater detail below, information printed along a relatively narrow, horizontal, lengthwise path along the center of U.S. paper currency is utilized to accurately identify and distinguish between genuine bills of varying denominations. 
     A transmissive sensor is provided to detect the physical presence or absence of the bill, a reflective sensor is provided to detect optical information on the surface of the bill, and a magnetic sensor is provided to detect magnetic information on the surface of the bill. These three sensors are positioned so that they are encountered in sequence as a bill moves through the validator, with the reflective sensor and magnetic sensor being positioned to encounter the bill along a path which runs lengthwise through the center of the bill along its larger dimension. 
     The electric signals generated by the three sensors are relayed to a microprocessor having a read-only memory (ROM) and a random access memory (RAM). The signals are analyzed according to a program stored in ROM to determine whether the detected information indicates the presence of an authentic bill of proper denomination. 
     The signals generated by the reflective sensor and magnetic sensor are analyzed to determine the presence or absence of each magnetic region or non-magnetic space on the bill under test, as well as the width of each detected magnetic region and non-magnetic space and the characteristics detected in them, and to compare these values to known values for a genuine bill. 
     Information indicative of both authenticity and denomination is provided by the horizontal width of each of the printed areas mentioned above (which will hereafter be referred to as the &#34;portrait field&#34;, &#34;border field&#34;, &#34;black seal field&#34;, and &#34;denomination field&#34;). In addition, the horizontal width of the areas or &#34;spaces&#34; between each of these fields is also useful in determining bill authenticity and denomination. 
     Within each field, the number of lines, the horizontal space between adjacent lines, and the ratio of the cumulative non-magnetic area to the overall field size may all be used to further identify and distinguish between bills of varying denomination. 
     The signals generated by the magnetic sensor are utilized to determine the width of the border field of the bill under test, as well as the number of lines appearing therein, and to compare these values to known values for a genuine bill. 
     The vertical grid characteristics of the portrait field, previously noted, are also employed. In accordance with the preferred embodiment of the present invention, the signals generated by the magnetic sensor are utilized to determine the size of the spaces between magnetic ink lines of the bill under test. As noted above, the portrait area has a plurality of regularly spaced lines. The spacings are detected and these measured spaces are then organized into groups according to size, forming what will be referred to herein as a &#34;histogram.&#34; The difference in the number of spaces among groups is then analyzed to help determine bill authenticity and denomination. 
     The signals generated by the magnetic sensor are utilized to determine the width of the denomination field, as well as the ratio of the larger non-magnetic spaces within the denomination field to the overall field width, and to compare these values to known values for a genuine bill. 
     The present invention utilizes the signals generated by the various sensors to perform additional tests, described below, which further indicate whether the bill under test is a genuine bill of proper denomination. 
     After authenticity and denomination of the bill have been determined, the preferred embodiment performs a series of additional tests to insure that the bill is properly accetpted. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The detailed description of the invention will be made with reference to the accompanying drawings, wherein like numerals designate corresponding parts in the several figures. 
     FIG. 1 is a cross-sectional view of the device according to the present invention; 
     FIG. 2 is a plan view of the device taken along the line A--A of FIG. 1. 
     FIG. 3 shows a circuit diagram illustrating the power supply used for one embodiment of the present invention. 
     FIG. 4 shows a circuit diagram illustrating the control board used for one embodiment of the present invention. 
     FIG. 5 shows a circuit diagram illustrating the preamplifier board used for one embodiment of the present invention. 
     FIG. 6 shows a graph of the histogram illustrating a portion of the analysis of data performed by the present invention. 
     FIG. 7 shows a flow chart representing the steps which are used in analyzing data that is relied upon to determine the authenticity and denomination of U.S. bills. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The following detailed description is of the best presently contemplated mode of carrying out the invention. This description is not to be taken in a limiting sense; it is made merely for the purpose of illustrating the general principles of the invention. 
     FIGS. 1 and 2 show a currency validator 1 having a housing 2 containing a bill passageway 4 having an entry 6 and an exit 8. 
     Disposed on either side of bill passageway 4 are two continuous tractor belts 10 which are supported by parallel rollers 12. The rollers 12 are operably connected via a series of gears (not shown) to a motor 14. The motor controlled belts 10 act to advance a bill through passageway 4 in a forward direction (from left to right in FIG. 1). The motor 14 is reversible so that it can drive belts 10 in an opposite direction, reversing the direction of travel of the bill. 
     Positioned directly above each belt 10 is a set of wheels 16 which further assist the inserted bill in advancing through the passageway 4. 
     Adjacent entry 6 is a transmissive sensor 18 consisting of an optical transmitter 20 and an optical receiver 22 disposed on opposite sides of the bill passageway 4. Interruption of a light beam travelling from transmitter 20 to receiver 22 will cause receiver 22 to generate an electric signal indicating the presence of an object in the entry 6 of passageway 4. 
     Located directly above the approximate center of passageway 4 is a reflective sensor 24 comprising a second optical transmitter 26 and a second optical receiver 28, both of which are located in relatively close proximity on the same side of passageway 4. Reflective sensor 24 is positioned to detect and respond to the presence or absence of optical information on an object (such as a bill) positioned in passageway 4. If the surface of the object directly beneath the reflective sensor 24 is relatively reflective (as are the unprinted areas of U.S. bills) then the light emitted by transmitter 26 will be reflected by the surface of the object onto the receiver 28. If the surface is relatively unreflective (as are the printed areas of U.S. bills), or there is no object in the passageway 4, then the light emitted by transmitter 26 will not be reflected onto receiver 28. 
     Adjacent reflective sensor 24 is a magnetic sensor 30, which generates an electric signal in response to the presence of magnetic information on the surface of a bill fed immediately beneath the sensor. Positioned immediately beneath the magnetic sensor 30 is a roller wheel 32 rotatably connected to an axle 34. Axle 34 is in turn supported by spring supports 36, which act to bias the roller wheel 32 toward the magnetic sensor 30. The spring biased roller wheel 32 thereby acts to press the inserted bill firmly against the magnetic sensor 30, thereby ensuring accurate detection of magnetic information on the bill. 
     A permanent magnet 29 is located above the passageway between the entry 6 and the magnetic sensor 30. It enhances the signal produced by the magnetic sensor 30 by biasing the magnetic ink on the bill being tested. 
     The reflective sensor 24, the magnetic sensor 30 and the permanent magnet 29 are positioned along passageway 4 so that each of them will scan the middle portion of any bill passing through the passageway 4. 
     Adjacent the exit 8 and positioned beneath the center of the passageway 4 is a multi-pronged jam sensor 38. Jam sensor 38 is rotatably connected to the axle joining rollers 12. The jam sensor 38 may be rotated about this axle through an angle of at least 90° , from a first vertical position illustrated by the solid lines in FIG. 1 to a second horizontal position illustrated by the broken lines in the same FIGURE. The prongs 40 of the jam sensor 38 are spring biased so that in their normal position the prongs 40 are oriented vertically and protrude upward through the plane of the passageway 4, as indicated by the solid lines in FIG. 1. 
     The leading edge of an object advancing through the passageway 4 will encounter the prongs 40 and force the prongs 40 into the horizontal position indicated by the broken lines in FIG. 1. The prongs 40 will remain in this horizontal position, clear of the exit 8, until the object is removed from the passageway 4 either through the exit 8 or through the entrance 6. Removal of the object from the passageway 4 in either direction will allow the prongs 40 to return to their initial vertical orientation. The return of the jam sensor 38 to its original position is detected by an optical sensor 44, which generates an electric signal. 
     If an object is removed from passageway 4 via exit 8, the prongs 40 will prevent that object from being retrieved intact through the passageway 4. Jam sensor 38 is specifically designed to defeat what is referred to as the &#34;bill-on-a-string&#34; cheat mode. 
     The prototype validator previously mentioned has three principal electronic subassemblies, in the form of printed circuit boards named for their principal functions: the power supply board, the control board and the pre-amplifier board. The circuits on these boards are shown generally in FIGS. 3-5, respectively. The various other functions are divided among the control boards based upon physical location and available space. In the prototype validator, the power supply board is located below the bill passageway 4, the pre-amplifier board is located above the passageway 4 and the control board is located alongside the other parts of the validator. 
     FIG. 3 shows the power supply 46, the motor drive circuit 48, including a Sprague-type 2952B, DC motor driver chip 49, the validator drive motor M, the optical transmitter LED 20 of the transmissive sensor 18, and the optical transmitter LED 41 and the optical sensor 40 of the jam sensor 38 which transmits a signal indicative of a jam to the microprocessor 102. 
     FIG. 4 shows the control board which includes a microprocessor 102 and most of the directly associated circuits. In the preferred embodiment of the present invention, microprocessor 102 consists of the 8049 microprocessor manufactured by the Intel Corporation of Santa Clara, Calif. The microprocessor 102 contains a read-only memory (ROM) and, in this embodiment, a random access memory (RAM) which may be used to store data during operation, and which is capable of being written into and read from during the validation procedure. 
     The output from the photoresponsive section 22 of the transmissive sensor 18, shown in FIG. 5, is connected to a comparator circuit 100 which has its output connected to pin six of the second I/O port of the microprocessor 102, shown in FIG. 4. 
     A second comparator circuit 104, shown in FIG. 4, is connected to the output of the reflective sensor 24, shown in FIG. 5. The comparator circuit 104 has its output connected to the input pin T0 of the microprocessor 102. The LED portion 26, associated with the reflective sensor 24 is also shown in FIG. 5. It is controlled by a signal from pin 31 or pin 33 of the first I/O port of the microprocessor 102. 
     A third amplification circuit 106 is connected to the output of the magnetic sensor 30, both shown in FIG. 5. A flip flop circuit 108, shown in FIG. 4, is connected to the output of amplification circuit 106. It has one output line connected to the interrupt request input INT of the microprocessor 102, and the other line connected to pin 25 of the second I/O port of microprocessor 102 to receive a reset signal when the microprocessor 102 has acted on the &#34;interrupt&#34; request. 
     The &#34;deadman timer&#34; and reset circuit 116 monitors an output on the READ line, RD, of the microprocessor 102 for a continuing train of pulses, produced under control of the program, indicating that the microprocessor 102 is operating normally. So long as said pulses are received, capacitor C3 is kept in a discharged mode. If the pulses cease, indicative of a program failure in the microprocessor 102, the capacitor C3 charges causing the comparator 117 to send a reset signal to the reset input RST of the microprocessor 102. In normal power-up of the validator, the charging of the capacitor C4 resets the microprocessor 102. 
     A clock circuit 112, including a crystal or resonator Y1, fixes the frequency of operations and steps the microprocessor 102 through a series of operations based upon instructions stored within the microprocessor 102 or in an external program memory, such as read-only memory (ROM). The frequency produced by the clock circuit 112 is divided in the microprocessor by a factor of fifteen and the divided frequency signal appears as a periodic logic signal at Pin 11 of the microprocessor 102 which is called ALE. The signal is further divided in frequency by a factor of four by a divider circuit 114 and is fed into an input port T1 of the microprocessor 102. This clock derived signal is used to drive an internal eight-bit counter in the microprocessor 102. By looking at overflows of this internal counter CTR1 (not shown) and by use of two internal random access memory locations (RAM), an accurate time base is created within the microprocessor 102. The microprocessor 102 also includes two RAM extension registers CTR2 and CTR3 (not shown). Together, the counter CTR1 and these two registers CTR2 and CTR3 form a Time Base Counter (TBC). 
     Every individual signal generated by the transmissive sensor 18, reflective sensor 24, magnetic sensor 30 or optical sensor 44 may thereby be uniquely associated with the time value contained in the TBC at the time these signals are perceived by the microprocessor 102. The intervals between any one signal generated by the above four sensors 18, 24, 30 and 44, and a second signal from one of them may thereby also be determined by the difference in count contained in the TBC associated with the occurrence of the first signal and the count in the TBC associated with the occurrence of the second signal. Only the time value associated with an event is stored, not the event itself. Note also that the time value associated with a particular event is not directly related to a specific physical position on the bill. 
     To initiate operation of the validator, the leading edge of the bill to be tested is inserted into the entry 6 of the passageway 4. Interruption of the light beam between the optical transmitter 20 and the optical receiver 22 of the transmissive sensor 18 by the inserted bill generates a signal which starts the motor 14 moving in a forward direction. The inserted bill is then gripped between the wheels 16 and moving belt 10 and thereby advanced through passageway 4, travelling from left to right as shown in FIGS. 1 and 2, so that each point on the upward facing surface of the bill encounters first the reflective sensor 24 and then the magnetic sensor 30. 
     Interruption of the transmissive sensor 18 also establishes the starting point of the value or count stored in the TBC. Within a predetermined time after the interruption of the transmissive sensor, the magnetic sensor 30 must generate signals indicating the detection of two magnetic ink lines within a predetermined span of time. The detection of two lines having magnetic properties, as opposed to one line, is required because a single magnetic signal may be due to the presence of a spurious magnetic line on the bill or other spurious electric signal within the system. In contrast, the detection of two such signals within a short period of time indicates, within a reasonable degree of certainty, that the signals are due to the presence of engraved ink lines on the bill and not some spurious feature. 
     These magnetic signals are generated by the passage of magnetic material of the bill, first under the permanent magnet 29 to bias the magnetic material, and then under the magnetic head 30 where detection of the magnetic material will produce a small electrical signal. This signal is amplified by a pre-amplifier 101, shown in FIG. 5, to produce an analog signal at its output. This analog signal is converted into logic levels suitable for processing by the comparator circuit 106 which is located on the control board, shown in FIG. 4. These logic levels set a logic element, flip flop 108, whose output state is then sensed by the microprocessor 102. 
     The first magnetic signal which is followed within a predetermined length of time by a second magnetic signal causes the contents of the Time Base Counter to be stored in RAM. In a genuine bill, this first magnetic signal is an indication of a detection of the edge of the first magnetic field or border field. Each of the magnetic pulses in the border field causes a RAM location to be incremented. This provides a total count of the magnetic pulses in the border field. 
     The contents of the Time Base Counter associated with every subsequent signal generated by the magnetic sensor is likewise saved, but these subsequently saved values are immediately discarded if they are followed within a predetermined short period of time by a further subsequent value. This process of saving and immediately replacing in memory the most recent magnetic signal Time Base Counter values continues until a magnetic signal is not followed within a predetermined short length of time by a subsequent signal. The process of storing and replacing continues until there is a gap of predetermined size and the total count of magnetic pulses saved in RAM equals or exceeds a predetermined count stored in ROM. In a genuine bill, the last Time Base Counter value saved represents the end of the first magnetic field and the beginning of the first magnetic space or gap. 
     The fact that a first magnetic field has been detected is stored as a bit in a RAM location to be referred to as the Recognition Status Register. 
     The second magnetic field to be detected by the magnetic sensor 30 will be either the portrait field or the denomination field, depending upon how the bill was oriented when it was introduced into passageway 4. The present invention utilizes the interval between the final signal of the first magnetic field and the initial signal of the second magnetic field to determine bill orientation as follows. 
     After detection of the first magnetic field has been completed, the bill continues to be advanced past the magnetic sensor 30 until the initial magnetic line of the second magnetic field is detected by the magnetic sensor 30. The count in the time base counter TBC at the time of this event is stored in RAM. (As with detection of the initial line of the first magnetic region, the initial line of the second magnetic region will be recognized as such and stored only if followed within a predefined short span of time by another magnetic line.) 
     The interval between the initial line of the second magnetic region and the final line of the first magnetic region is calculated and its value is compared with a predetermined value stored in ROM. 
     If the calculated interval is greater than the value stored in ROM, then it is determined that the bill is in the &#34;portrait field first&#34; orientation (that is, the bill was inserted into the passageway 4 so that the portrait field is scanned by the magnetic sensor 30 prior to the time that the denomination field is scanned by the magnetic sensor 30). If the calculated interval is less than the value stored in ROM, then it is determined that the bill is in the &#34;denomination field first&#34; orientation (meaning that the denomination field is scanned by the magnetic sensor 30 prior to the portrait field.) 
     If the calculated interval is greater than a second, larger value stored in ROM, indicating that the interval between the first and second magnetic fields is larger than that found in a genuine U.S. bill, then the motor is reversed and the bill is rejected. 
     Assuming that the bill has been inserted portrait field first, the next field of interest to be detected by the magnetic sensor 30 will be the portrait field. 
     The first magnetic line of the portrait field to pass beneath the magnetic sensor 30 will cause the sensor 30 to generate a signal. The initial signal produced by the presence of the portrait field beneath the magnetic sensor 30 will be detected and cause the count or time stored in the Time Base Counter to be stored in RAM in the same manner as described above with respect to the initial signal of the border field. Additionally, a location in RAM will be used to keep total count of magnetic pulses in the portrait field. 
     Each subsequent magnetic line within the portrait field which passes beneath the magnetic sensor 30 will cause the sensor 30 to generate an additional electric signal. Each of the next sixteen signals which follow the initial signal will cause the count or time stored in the Time Base Counter to be stored in RAM. It will be noted that these sixteen values of time correspond to the detection by the magnetic sensor 30 of the vertical grid lines which (depending on bill orientation) comprise the left or right-hand side of the portrait field. 
     The next seventeen signals generated during the scanning of the portrait field will similarly cause the count or time stored in the Time Base Counter to be stored in RAM. Any additional signals generated will cause the count or time stored in the Time Base Counter to be stored in RAM and be added to the second set of seventeen values. As each additional value is added, the &#34;oldest&#34; value in the set will be discarded from RAM. In this manner, only the seventeen most recently generated values will be maintained in RAM. These values will correspond to the detection of vertical grid lines appearing on the trailing edge of the portrait field. 
     The end of the portrait field can occur after the following three conditions are met: (1.) the absence of magnetic signal for a time greater than a predetermined value stored in ROM (26 ms in the present embodiment); (2.) a total count of magnetic pulses in the portrait field greater than a predetermined value stored in ROM (40 in the present embodiment); and, (3.) a portrait field width greater than a predetermined value stored in ROM (160 ms in the present embodiment). The portrait field width is obtained by subtracting from the end count or end time of the portrait field the begin count or start time of the portrait field. This is stored in RAM and will be used to normalize or scale the data after the motor is stopped. 
     The last magnetic line of the portrait field to pass beneath the magnetic sensor 30 will generate a signal which will cause the count or time stored in the Time Base Counter to be stored in RAM in the same manner as described above with respect to the final signal of the border field. 
     The intervals between the adjacent values in each of the two sets of the seventeen values stored in memory will also be calculated and stored. It is noted that these calculated intervals will correspond to the spacing of vertical grid lines on both the right and left-hand sides of the portrait field. These calculated intervals will be used to determine bill authenticity and denomination in a manner which will be described below. 
     Again assuming entry of the bill portrait field first, the next field of interest scanned by the magnetic sensor will be the denomination field. 
     Passing of the first magnetic line of the denomination field beneath the magnetic sensor 30 will cause the magnetic sensor to generate an electric signal. The initial signal generated by the presence of the denomination field will be determined and the count indicative of time of occurrence will be stored in RAM in the manner described above with respect to the initial signal generated by the presence of the border field. 
     Each additional magnetic line within the denomination field which passes beneath the magnetic sensor 30 will cause the magnetic sensor 30 to generate an additional electric signal. Each such additional electric signal will also cause the count stored in the time base counter TBC to be stored in RAM. 
     The interval between successive electric signals within the denomination field is calculated and compared with a predefined constant. If the calculated interval between successive signals is greater than the predefined constant stored in ROM, then the value of the calculated interval is added to an accumulated interval value stored in RAM. The accumulated value thereby stored in RAM represents the accumulated widths of the &#34;gaps&#34; or larger non-magnetic areas within the denomination field. 
     The end of the denomination field can only occur after the absence of magnetic signals for a time greater than that of a predetermined value in ROM (41 ms in the present embodiment) and a field width exceeding a minimum value predetermined in ROM (100 ms in the present embodiment). 
     The last magnetic line of the denomination field to pass beneath the magnetic sensor 30 will generate a signal which will be detected and cause the count stored in the time base counter TBC to be stored in RAM in the same manner as described above with respect to the final signal of the border field. The denomination field bit is set in the recognition status register. 
     The interval between the denomination field and the portrait field is calculated and stored in memory. In the denomination field first orientation, this interval consists of the interval between the final signal of the denomination field and the initial signal of the portrait field. In the portrait field first orientation, this interval consists of the interval between the final signal of the portrait field and initial signal of the denomination field. 
     In either orientation, the calculated interval between the portrait field and denomination field is compared with a predetermined value stored in memory. If the calculated interval is larger than the predetermined value, indicating that the space between the portrait field and the denomination field is larger than in a genuine U.S. bill, the motor is reversed and the bill is rejected. 
     In addition to the magnetic sensor 30, the reflective sensor 24 is active while the bill is being transported. Its operation may be described as follows: 
     Any dark area of the bill that is detected by the reflective sensor 24 will cause the output of comparator circuit 104 to go low. This level will be sensed by the microprocessor 102 on pin one. If the output of comparator 104 stays low in excess of some minimum time (which is stored in ROM), then the optical detect bit is set in the recognition status register in RAM. The particular value N is presently selected so that any dark object which causes a continuous level output from the reflective sensor 24 while the bill is moved approximately 1/16 of an inch beneath the reflective sensor 24 will cause the optical detect bit of the recognition status register to be set. When the optical detect bit is set, an optical timer value is loaded into RAM. In the prototype this value is 48, representative of 0.6 inches at the nominal speed of movement of the bill. As the bill moves along passageway 4, the optical timer value in RAM will be decremented. If any magnetic pulse is detected, then the optical detect bit is cleared and the optical timer value is ignored. If the optical detect bit is not cleared and the value of the optical timer decrements to zero, then the seal detect bit of the recognition status register will be set. Note that the preferred value, which is stored in ROM, is such that the bill will be moved approximately 0.6 inches from the time that the optical detect bit is set until the seal detect bit can be set. This value is dependent upon the spacing between the reflective and magnetic sensors, which is approximately 0.5 inches in the embodiment of the present currency validator. Thus, for the seal detect bit to be set, there must be: 
     a. a dark line of some minimum width which is detected by the reflective sensor 24. 
     b. no output of the magnetic sensor 30 for approximately 0.5 inches before and until approximately 0.1 inch after optical activity by the reflective sensor 24 has first been detected. 
     If the bill has been inserted black seal first, then with a genuine bill the presence of optical signals and absense of magnetic signals in the black seal area after the first border field will cause the seal detect bit to be set in the recognition status register. 
     If the bill has been inserted in the denomination field first direction, then the reflective sensor 24 will respond to optical information in the denomination field after the first border field. However, the detection of magnetic activity in this region by magnetic sensor 30 will cause the optical detect bit to be cleared and preclude the seal detect bit from being set. Note that detection of magnetic activity, clearing of the optical detect bit and precluding the setting of the seal detect bit will also occur in the portrait area and in the first border field. With a genuine bill, the optical activity and absence of magnetic activity in the black seal region will cause the seal detect bit to be set. Once the seal detect bit of the recognition status register has been set, it remains set for the remainder of the bill processing. 
     The data collection will continue until the motor 14 is stopped. This occurs either at a fixed time after the transmissive sensor 18 is uncovered, or when a sufficient number of magnetic signals have been detected, indicating a fourth trailing border field. 
     After the motor is stopped the bill is retained in the passageway 4 while the collected data is analyzed. 
     The first step in the analysis of the data collected from the surface of the bill is the computation of what is referred to as the &#34;normalization constant&#34;. The normalization constant is a value equal to the ratio of the total portrait field width (i.e. the measured interval between the detection of the initial signal and final signal in the portrait field) and the known portrait field width of a genuine U.S. bill. The calculated normalization constant is a value which is used to correct for variations in the detected data due to changes in motor speed or condition of the bill. Use of the normalization constant removes the need for speed control and its associated sensors or electronics. 
     The microprocessor 102 also calculates a value which will be referred to as the percent denomination space. This value is equal to the ratio of the total accumulated denomination &#34;space&#34; (the larger magnetic gaps within the denomination field) to the denomination field width. The value of the percent denomination space may be indicative of bills of different denomination. 
     Each time the microprocessor has determined that it has successfully detected the conditions necessary for the beginning and ending of one of the magentic fields, (i.e. first or border field, denomination field, portrait field and trailing or back border field) then the bit associated with that field is set in the Recognition Status Register. The fact that the device scans the black, non-magnetic Federal Reserve Seal, i.e. the fact that the device detects the presence of an optical field and the absence of a magnetic field, is also stored in the Recognition Status Register. 
     After the bill has been stopped, the microprocessor checks to ensure that the first three field bits of the Recognition Status Register are set as well as the Seal Detection Bit. The trailing border bit is ignored in this test. If the device finds that these four bits are not set, then the bill is rejected. 
     In another test, the previously calculated portrait field interval (i.e. the interval between the initial signal of the portrait field and the final signal of the portrait field) is compared with both a minimum and a maximum allowable portrait field interval value stored in ROM. If the calculated portrait field interval falls outside the range of these predetermined minimum and maximum values (which vary from the known portrait field width by approximately plus or minus 20%), then the bill is rejected. 
     In another test, each of the previously calculated intervals between adjacent signals generated by the vertical gridline in the portrait field is compared against a predetermined maximum interval value stored in ROM. If any of the calculated intervals exceeds this predetermined maximum value, then the bill is rejected. 
     In another test, the previously calculated denomination field width (i.e. the interval between the initial magnetic pulse of the denomination field and the final magnetic pulse of the denomination field) is compared against a predetermined maximum value stored in ROM. If the calculated denomination field interval exceeds this predetermined maximum value, then the bill is rejected. 
     If all of the above criteria have been satisfied, the detailed analysis of the data developed from the portrait field proceeds. 
     As previously indicated, the horizontal distance between vertical grid lines in the portrait area of a U.S. bill are indicative of that bill&#39;s denomination. One dollar, two dollar and five dollar bills are uniquely identified from one another by grid line spacing values of 0.008 inches, 0.010 inches and 0.011 inches, respectively. Each of these three grid line spacing values, which will be referred to as &#34;seed&#34; values, is stored in ROM. In addition, a fourth grid line spacing seed value (which in the preferred embodiment of the present invention is equal to 0.007 inches) is also stored in ROM. This value, referred to as the &#34;0.007 reject criteria&#34;, is used to distinguish between two dollar bills and one hundred dollar bills in the manner described below. 
     It is recognized that the actual grid line spacing of even genuine one, two and five dollar bills will not always be precisely equal to one of the three seed values identified above. Instead, the actual values will vary over a small range centered about each seed value. Therefore, associated with each seed value is a &#34;window&#34; of maximum and minimum values which are acceptable as being equivalent to the seed value. The maximum and minimum window values associated with each seed value are also stored as constants in ROM. 
     Each seed value and its associated window may be thought of as a &#34;bin&#34; into which measured grid line spacings may be sorted according to size. Four such bins are illustrated in FIG. 6. The four bins illustrated in FIG. 6 are identified by the letters A, B, C and D, and correspond respectively to seed values of the 0.007 inch reject criteria, one dollar bills, two dollar bills and five dollar bills. 
     The actual grid line spacings of a bill may be measured and sorted according to size into these four bins, thereby forming a histogram of measured grid line spacings. It is expected that the largest number of grid line spacings will be sorted into the B bin if the measured bill is a genuine one dollar bill, the C bin if the measured bill is a genuine two dollar bill, and the D bin if the measured bill is a genuine five dollar bill. Further, there will be a number of spacings sorted into the A bin if the measured bill is a genuine one hundred dollar bill. A typical distribution of measured grid line spacings for a genuine one dollar bill is illustrated in FIG. 6. 
     The B, C or D bin containing the largest number of counts is therefore a useful indicator of the denomination of the bill. The absolute number of counts falling within each bin is also useful in identifying authentic bills and distinguishing between bills of various denomination. The difference in the number of counts between the bin containing the largest number of counts and the remaining bins is also a useful indicator of bill authenticity and denomination, as well as an indication of the confidence level of the measurement. 
     Initially, the previously calculated normalization constant is used to adjust (or &#34;normalize&#34;) each of the four seed values stored in ROM to correct for variations detected in scanning the bill. The normalized seed values, together with the windows stored in ROM, are used to form the four bins A, B, C and D, into which each of the calculated 34 portrait field intervals is counted. If one or more of the 34 calculated intervals is of such size that it cannot be sorted into any one of the bins A, B, C and D, then that interval is simply not counted. 
     After the histogram has been formed, and if none of the above tests has indicated the presence of an inauthentic bill, the authenticity and denomination of the bill is determined in accordance with the steps illustrated in the decision tree shown in FIG. 7. 
     As previously mentioned, the horizontal distance between the vertical grid lines in the portrait area of a U.S. one, two and five dollar bills allow these bills to be uniquely identified one from the other. One, two and five dollar bills are uniquely identified one from the other by grid line spacing of 0.008 inches 0.010 inches and 0.011 inches, respectively. However, the portrait areas of the US $10, $20, $50 and $100 have vertical grid lines with strong grid component spacing of either 0.010 inches and 0.011 inches, or mixtures of these. While identification of $1, $2, and $5 denomination bills may be uniquely determined by dependence upon identification of the grid spacing one from the other, these values are not sufficient to permit identification uniquely from the larger bill set of the seven values $1, $2, $5, $10, $20, $50 and $100. To uniquely identify a $1, $2, or $5 note from the seven bill set, criteria in addition to grid line spacing must be used to exclude the $10, $20, $50 and $100 dollar denominations. 
     If most counts fall within the B bin, then the difference in the number of counts between the B bin and the C bin, as well as the difference in the number of counts between the B bin and D bin, is calculated. If either calculated difference is less than a predefined constant K 1  (which, in the preferred embodiment of the present invention, is equal to 8), then a signal is generated which restarts the motor in reverse and the bill is rejected. 
     Note that the greater the degree to which the calculated value exceeds K 1 , the higher the confidence in the measurement. A calculated value considerably greater than K 1  indicates a measurement that is more perfect than one which is only slightly larger than K 1 . Since this calculated value is based upon the difference between components representative of different bill types, a large calculated value indicates a strong presence of the components representative of one bill and a weak presence of the components representative of other bills. Further, a large calculated value means that system noise and other factors which might pollute the measurement do not have a strong presence. 
     K 1  might be externally controlled or set to allow one to adjust the accuracy of denomination determination and bill acceptance/rejection ratios. If one were interested in having very accurate denomination identification, then K 1  might be set larger, with the concomitant result of higher good bill rejections. If lower rejection and higher acceptance is important, then K 1  might be lowered. 
     If each calculated difference is greater than or equal to K 1 , then the previously calculated percent denomination space ratio is compared to a predefined maximum allowable percent denomination space ratio for a one dollar bill, and is also compared to a predefined minimum allowable percent denomination space ratio for a one dollar bill. If this comparison indicates that the calculated percent denomination space ratio either exceeds the maximum allowable percent denomination space ratio, or is less than the minimum allowable percent denomination space ratio, then a signal is generated which reverses the motor and the bill is rejected. This particular percent denomination space ratio test is useful in distinguishing between authentic U.S. one dollar bills and &#34;clones&#34; (which are photocopies of legitimate currency, sometimes used in an effort to cheat currency validators). 
     If the calculated denomination space ratio falls between the minimum and maximum allowable percent denomination space ratios, then the bill is recognized as a genuine U.S. one dollar bill. 
     If the greatest number of counts falls within the D bin, then the difference in the number of counts between the D bin and the B bin, as well as the difference in the number of counts between the D bin and the C bin, is calculated. Each of these calculated values is then compared with a predefined constant K 5  stored in memory. In the preferred embodiment of the present invention K 5  is equal to 12. If either calculated difference is less than K 5 , the bill will be rejected. 
     Note that this value K 5  might be externally controlled or raised to increase the confidence of the test (resulting in the increase in rejected good bills as a result of requiring a more perfect test) or reduced to decrease the number of rejected good bills (if the number of undesirable bills did not exceed some arbitrary criterion). 
     If both calculated differences are greater than or equal to K 5 , then the previously calculated border field count is compared with a predefined border field count (which, in the preferred embodiment of the present invention, is equal to 40). If the calculated border field count is greater than the predefined border field count, the bill will be rejected. This comparison is useful in distinguishing between five dollar bills and ten dollar bills. 
     If the calculated border field count is less than the predefined border field count, then the previously calculated percent denomination space ratio is compared to a predefined maximum allowable percent denomination space ratio for a five dollar bill as well as a predefined minimum allowable percent denomination space ratio for a five dollar bill. If this comparison indicates that the calculated percent denomination space ratio either exceeds the maximum allowable percent denomination space ratio or is less than the minimum allowable percent denomination space ratio, then the bill is rejected. If the calculated denomination space ratio falls between the minimum and maximum allowable percent denomination space ratios, then the bill is recognized as a genuine U.S. five dollar bill. 
     If the greatest number of counts falls within the C bin, then the difference in the number of counts between the C bin and the B bin, as well as the difference in the number of counts between the C bin and the D bin, is calculated. Each of these calculated differences is then compared with a predefined constant K 2  stored in memory. In the preferred embodiment of the present invention K 2  is equal to 10. 
     (Note that this value K 2  might be externally controlled or raised to increase the confidence of the test (resulting in the increase in rejected good bills as a result of requiring a more perfect test) or reduced to decrease the number of rejected good bills (if the number of undesirable bills did not exceed some arbitrary criterion.) 
     If either one of the calculated bin count differences is less than K 2 , then the bill will be rejected. If both of the calculated bin count differences are greater than or equal to K 2 , then the number of counts falling in the A bin is compared with a predefined A count value stored in memory. In the preferred embodiment of the present invention, the predefined A count value is equal to 4. This test is useful in distinguishing between two dollar bills and one hundred dollar bills. 
     If the number of counts falling within the A bin is greater than or equal to the predefined A count value, then the bill will be rejected. If the number of counts falling within the A bin is less than the predefined A count value, then the previously calculated border field count is compared with a predefined border field count constant stored in ROM. In the preferred embodiment of the present invention, this predefined border field count constant is equal to 48. This comparison is useful in distinguishing between two dollar bills and fifty dollar bills. 
     If the calculated border field count is greater than the predefined border field count constant, then the bill will be rejected. If the calculated border field count is less than or equal to the predefined border field count constant, then the previously calculated denomination width is normalized using the normalization constant and compared to a first predefined normalized denomination width constant. In the preferred embodiment, this first predefined normalized denomination width constant is equal to 153 mS. This comparison is useful in distinguishing between two dollar bills and ten dollar bills, as well as distinguishing between two dollar bills and fifty dollar bills. 
     If the calculated normalized denomination width is less than the first predefined normalized denomination width constant, then the bill will be rejected. If the calculated normalized denomination width is greater than or equal to the first predefined normalized denomination width constant, then the calculated normalized denomination width will be compared with a second predefined normalized denomination width constant. In the preferred embodiment of the present invention, this second predefined denomination width constant is equal to 173.4 mS. 
     If this comparison indicates that the calculated denomination width is less than or equal to the second predefined denomination width constant, then the program will branch to the &#34;D bin count test&#34; described below. If this comparison indicates that the calculated denomination width is greater than the predefined second denomination width constant, then the previously calculated normalized interval between the portrait field and the denomination field will be compared to a predefined interval between the portrait field and the denomination field. In the preferred embodiment, this predefined interval is equal to 58.6 mS. This comparison between the calculated interval and the predefined interval constant is useful in distinguishing two dollar bills from ten dollar bills. 
     If the calculated interval between fields is greater than or equal to the predefined field interval constant, then the bill will be rejected. If the calculated interval between fields is less than the predefined field interval constant, then the number of counts in the D bin will be compared with a predefined D bin count stored in memory. In the preferred embodiment, this predefined D bin count is equal to 8. This test is useful in distinguishing between two dollar bills and ten dollar bills. 
     If the comparison between the calculated D bin count and the predefined D bin count constant indicates that the calculated D bin count is greater than or equal to the D bin constant, then the bill will be rejected. If the comparison indicates that the calculated D bin count is less than the predefined D bin count constant, then the previously calculated percent denomination space ratio will be compared to a predefined maximum allowable percent denomination space ratio for a two dollar bill as well as a predefined minimum allowable denomination space ratio for a two dollar bill. 
     If this comparison indicates that the calculated denomination space ratio either exceeds the maximum allowable denomination space ratio or is less than the minimum allowable denomination space ratio, then the bill will be rejected. If the calculated denomination space ratio falls between the minimum and maximum allowable denomination space ratio, then the bill will be recognized as a genuine U.S. two dollar bill. 
     At this point, if the bill has been identified by the foregoing tests as genuine and of correct denomination, a signal is generated which restarts the motor 14 in the forward direction. Subsequent to the restart of the motor 14, a number of additional tests are performed to insure that a validated bill is properly advanced through passageway 4 and exit 8. 
     Within a predetermined time after the restart of motor 14, the optical jam sensor 44 must detect the release of the jam sensor 38 from its horizontal position and a return of the jam sensor 38 to its vertical position (as shown by the unbroken lines in FIG. 1). The non-release of the jam sensor 38 within a certain time after the motor restart is an indication that the bill is either being held in passageway 4 or being removed through entrance 6. If the sensor 44 does not detect the release of the jam sensor 38 within the required time, then the motor 14 will be reversed and the bill will be rejected. This test is useful in defeating what is referred to as the &#34;bill-on-a-string&#34; cheat mode. 
     In addition, both while the motor 14 is off and after restart of motor 14, the number of signals generated by the reflective sensor 24 must remain below a certain predefined constant number. If the number of signals generated by the reflective sensor 24 exceeds this predefined constant number, the motor will be reversed and the bill will be rejected. An excessive number of signals generated by the reflective sensor 24 both while the motor 14 is off and after motor restart is an indication that the bill is being withdrawn from the passageway 4 through the entrance 6. This test is useful in defeating what is referred to as the &#34;bill-on-paper&#34; cheat mode. 
     From the above it will be seen that the present invention utilizes the spacing between the vertical grid lines in the portrait area of U.S. bills to determine the authenticity and denomination of such bills without calculating the average spacing between such grid lines. Instead, the present invention utilizes a histogram of grid spacing data to identify bill authenticity and denomination. Tests have shown that this histogram technique provides a valuable advance over the prior art. 
     For example, tests have shown a substantially higher acceptance rate for authentic one dollar, two dollar and five dollar bills using the present invention. Moreover, the present invention is capable of distinguishing between these bills of various denomination with a higher degree of accuracy than prior art validators. 
     The validator 1 can be programmed to operate in both &#34;teach&#34; and &#34;learn&#34; modes. The teach mode is employed in a validator which does not have all of the operational constants stored in ROM. The validator is taught by telling it that a known bill type will be inserted. The microprocessor then infers and stores in some kind of changeable memory the constants appropriate to this type bill. The learn mode is employed in a validator which stores one or more operational constants in changeable memory. In the learn mode, the microprocessor modifies these stored constants over a period of time, under program control, based upon experience with acceptable bills. Suitable changeable memory which might be used includes EEPROM, battery protected RAM, shadow RAM or other memory which can be changed by the microprocessor, but whose constants will not be affected by loss of power to the validator. 
     The present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. For example, while the preferred embodiment disclosed herein is designed for identifying and distinguishing among genuine U.S. one, two and five dollar bills, the principles of the present invention may also be utilized in identifying and distinguishing among higher denomination bills, as well as paper currency of countries other than the United States. While the preferred embodiment of the present invention disclosed herein utilizes a &#34;histogram&#34; technique for analyzing magnetic data collected from the portrait field of a U.S. bill, the same histogram technique may also be utilized to analyze data from other portions of the bill and to analyze optical information retrieved from the surface of the bill. 
     Further details of the operation of the preferred embodiment of the present invention are disclosed in the computer program listing which follows. 
     The presently disclosed embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims, rather than the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. ##SPC1##