Field of the Invention- This invention relates to apparatus and methodsfor magnetic detection of counterfeit suspectdocuments. 
Background- Document counting and handling devices are knownwhich count, verify and stack a particular type ofdocument, such as currency. Among such devices arethose that utilize analog comparator circuits toverify whether the optical and magneticcharacteristics of a document falls within thresholdsset by discrete electronic components which bias thecomparator circuits. In order to adapt such devicesfor counting and verifying documents, which vary withrespect to optical or magnetic properties, it isnecessary to manually adjust the biasing components ofthe analog comparator circuits. However, theparticular combination of verification tests that maybe implemented in a document counting device of theprior art, which is adapted for one type of documentsuch as United States currency, may not be suitablefor another type of document, such as coupons, UnitedStates food stamps, or currencies of nations otherthan the United States. Accordingly, it would bedesirable to provide a control system for a documentcounting apparatus in which verification tests can beselectively enabled and in which verificationthresholds and procedures can easily be selected toconform to the characteristics or properties of avariety of documents. 
- It has been found that accurate verification ofdocuments based on optical and magnetic properties ofdocuments in a high-speed document counting device is complicated by the presence of electrical noise from avariety of noise sources within the counting device.In order to increase the reliability with whichdocuments are verified as genuine, it would bedesirable to provide a system for documentverification which is essentially immune to theinfluence of such electrical noise. 
- US-A-4 617 458 discloses a counterfeit detection circuitaccording to the preamble ofclaim 1. US-A-4 114 804 describesa counterfeit detection means comprising a rotatable roller forpressing the document to be examined on a magnetic transducer. 
Summary of Invention- The present invention provides an apparatus for examining documents accordingtoclaim 1 and a method of examining documents according toclaim 13. 
- In accordance with one feature of the presentinvention, a document counting and batching apparatusis provided with a control system governed by aprogrammable microprocessor. The microprocessor isconnected to a multi-channel analog-to-digital (A/D)converter which samples the analog signals fromoptical and magnetic document sensing devices. Aseach document is processed, the microprocessoraccumulates a plurality of sample values from thesensors via the A/D converter. The accumulated samplevalues are compared with programmable thresholdsand/or limit values in order to verify each documentas it is transported through the apparatus. Thethreshold and limit values used to verify the magneticproperties of the documents are each selected by theuser or easily reprogrammed for verification ofdifferent types of documents. Such reprogramming may,for example, be facilitated by replacement of a non-volatilememory containing verification parameters anda control program executed by the microprocessor. 
- According to another feature of the invention, thedocument counting apparatus incorporates a magneticdocument verification system for documents having amagnetic property and the system incorporates featuresfor reducing the influence of noise. The magneticdocument verification system employs a magnetic readhead for producing an induced electrical signal in response to the passage of a document having amagnetic property by the head. The magnetic head isrigidly mounted to a document guide plate. In oneembodiment of the invention, a magnet for enhancingthe magnetic property of the documents is also rigidlymounted in a fixed relationship to the magnetic readhead to form a unitary mechanical linkage with theread head. As documents are transported along theguide plate, a path constricting roller positionedabove the read head causes the documents to passadjacent the magnetic read head at a uniform proximitythereto. A signal conditioning circuit processes theinduced electrical signal from the read head toprovide a conditioned signal having a low noisecontent. In a preferred embodiment, the signalconditioning circuit includes a bandpass filter forremoving both high and low noise components of theinduced electrical signal from the magnetic read head.During the passage of a document past the magneticread head, multiple signal samples of the processedsignal are taken by an analog to digital converter toproduce a value which is accumulated by amicroprocessor. After the document has passed theread head, the accumulated value is averaged andcompared to one or more predetermined reference valuesin order to verify the document as possessingpredetermined or acceptable magnetic characteristicsor properties. 
- The invention provides anapparatus with acounterfeit detection system that is adaptable forverifying documents having differing magneticcharacteristics. Such documents, as the 50 Yuan noteissued by the People's Republic of China, tend to haveweaker and/or more localized magnetic characteristicsthan United States currency. In the detection and verification of relatively less magnetizabledocuments, an enhanced counterfeit detection system can beprovided with a high gain, low noise signalconditioning circuit for connecting the magnetic readhead with a control microprocessor. As eachdocument is transported past the read head, multiplesignal samples of the conditioned signal are taken byan analog to digital converter under the control of amicroprocessor. Each sample value is compared to oneor more reference values and the microprocessoraccumulates a count of the number of consecutivesample values which are within a predetermined rangerelative to the reference values. The accumulatedcount is, in turn, compared to one or more referencevalues associated with a genuine document to determinewhether the processed document has an acceptablemagnetic property. 
Brief Description of the Drawings- The foregoing summary, as well as thefollowingdetailed description of a preferred embodiment of thepresent invention, will be better understood when readin conjunction with the appended drawings, in which: 
- FIG. 1 is a perspective view of a documentcounting and batching apparatus in accordance with thepresent invention;
- FIG. 2A is a cross-sectional diagram showing thearrangement of mechanical components of the documentcounting and batching apparatus of FIG. 1 along theline 2A-2A of FIG. 1 with parts broken away;
- FIG. 2B is a side elevation view of the documentcounting and batching apparatus of FIG. 1 with thehousing removed, taken along the line 2B of FIG. 1;
- FIG. 2C is a side elevation view of the documentcounting and batching apparatus of FIG. 1 with the housing removed, taken along theline 2C of FIG. 1;
- FIG. 2D is a diagrammatic plan view showing thedrive train of the apparatus of FIG. 1 with the guideplates removed, the side plates broken, andoverlapping parts separated for clarity;
- FIG. 3A is a partial cross-sectional diagramshowing the location of optical and magnetic sensorswithin the document counting and batching apparatus ofFIG. 2A and showing an alternate stripper assemblywith some parts removed for clarity;
- FIG. 3B is a plan view of the stripper adjustmentmechanism of the stripper assembly of FIG. 3A takenalong the line 3B-3B;
- FIG. 3C is a perspective view of the stripperadjustment mechanism of FIG. 3A;
- FIG. 4 is a sectional plan view of the guideplate showing the location of optical and magneticsensors of FIG. 3 as viewed along line 4-4;
- FIG. 5A is a schematic block diagram of amagnetic signal conditioning circuit in accordancewith the present invention;
- FIG. 5B is a graphical representation of theinput and output waveforms of the circuit of FIG. 5A;
- FIG. 5C is a schematic diagram of a preferredembodiment of the circuit of FIG. 5A;
- FIG. 6A is a schematic block diagram of a controlsystem for the document counting and batchingapparatus according to the present invention;
- FIG. 6B is a schematic diagram of an electro-mechanicaltiming wheel for providing timing signalsto the control system of FIG. 6A;
- FIGS. 7A-7E are successive parts of a logicalflow diagram of the control procedure executed by thecontrol system of FIG. 6A, including alternativecounterfeit detection procedures;
- FIG. 8 is a plan view of the control panel of the apparatus of FIG. 1;
- FIG. 9 is a diagram of the reverse face of aChinese 50 yuan note with an indication of thelocation of the magnetic portion thereof;
- FIG. 10A is a schematic diagram of an alternativemagnetic signal conditioning circuit in accordancewith the present invention;
- FIG. 10B is a schematic diagram of a power supplycircuit for use with the circuit of Fig 10A; and
- FIG. 11 is a graphical representation of signalwaveforms produced by the signal conditioning circuitof FIG. 10A.
Detailed Description of the Preferred Embodiments
- A document counting andbatching apparatus 10 isshown in FIG. 1. In theapparatus 10, documents areplaced into ahopper 12 whereupon they are fed intotheapparatus 10 to be counted or batched. Afterpassing through theapparatus 10, the documents arestacked bystacker wheels 18 onto astacker plate 20.The apparatus has a control panel which includes adisplay 16, such as an LCD display, for presentingcounting, total, and status information to the user.Akeyboard 14 is provided for manually enteringcontrol commands to the apparatus. 
- In regard to the document transport mechanism,referring now to FIG. 2A, a stack ofdocuments 22 isshown placed into thehopper 12 and resting on ahopper plate 24. AnLED 65 andphotosensor 64 arealigned across thehopper 12 to detect the presence ofdocuments within thehopper 12. A pair of pickerrollers, of whichpicker roller 26 is typical, aremounted upon apicker roller shaft 28 that is locatedbeneath thehopper plate 24. Africtional pickersurface 30 extends around a portion of thecircumference of thepicker roller 26. Upon rotation of thepicker roller 26, thepicker surface 30 extendsthrough an aperture in thehopper plate 24,frictionally engages thelowermost documents 22, andurges them toward afeed roller assembly 32. 
- As thefeed roller 32 frictionally engages thelowermost documents, a stripper assembly generallydesignated 36 provides a stripping action in adirection that is counter to the rotation offeedroller 32 so that the documents are singled and fedthrough the apparatus one at a time as described morefully hereinafter. Thestripper assembly 36 is drivenby adrive shaft 48 on which is mounted adrive pulley40. Thedrive pulley 40 engages astripper frictionbelt 38 which rotates about thedrive pulley 40 and anidler pulley 42 mounted onidler shaft 44. Thestripper belt 38 is selected to have a lowercoefficient of friction with thedocuments 22 than theperipheral surface of thefeed roller 32 so that thestripping action does not overcome the feeding actionof thefeed roller 32. 
- It is often the case that the frictionalcharacteristics of documents, such as currency, aredependent upon the age and condition of the documentsand upon environmental characteristics, such ashumidity. In order to provide adjustment of thestripping friction applied to thedocuments 22 as theyare fed into the apparatus, theidler shaft 44 isprovided with rotatableeccentric bearings 46, whichmay be rotated to adjust the position of theidlershaft 44 relative to thedrive shaft 48. Suchadjustment alters the tension within thestripperfriction belt 38 and may be used to vary the normalforce applied to thedocuments 22 by the stripperfriction belt as the documents are fed into theapparatus 10. 
- A preferred alternative stripper assembly generally designated 36a is shown in FIG. 3A. Atension idler roller 70 engages thestripper belt 38between thedrive pulley 40 and an idler pulley 42a.The tension idler roller 70 maintains tension in thestripper belt 38 by preventing inward deformation ofthe loop formed by thestripper belt 38 as documentsare urged toward the surface of thestripper belt 38.The tension idler roller 70 is mounted upon anaxle 72which is suspended from thestripper drive shaft 48 bya pivotally mountedbracket 71. 
- As can be seen in FIG. 3B, anidler collar 47spins freely upon idler shaft 73a. The idler shaft73a is fastened to theside plates 33 and 34 byscrews113. Returning to FIG. 3A, it can be seen that thesurfaces of flanges 63a contact the surface of teedroller 32 so that documents remain in frictionalcontact with the feed roller and are advanced betweenthe flanges 63a and thefeed roller 32 along the guidepath. Returning to FIG. 3B, there is shown a bracketgenerally designated 114 pivotally supported upon theidler shaft 73a. A stub shaft 44a is fixed to thebracket 114 by ascrew 115 at one end of the stubshaft 44a. A tension adjusting pulley 42a isrotatably mounted upon the stub shaft 44a near the endof the stub shaft 44a opposite to thescrew 115. Asbest seen in FIG. 3A, the tension adjusting pulley 42aengages the lower end of thestripper friction belt38. 
- Turning to FIG. 3C, it is shown that thebracket114 has a pair ofjaws 106 and 107 at the opposite endof thebracket 114 with respect to the pivotallymounted end of thebracket 114 upon the idler shaft73a. Acam 117 is eccentrically mounted on anadjustment shaft 116 between thejaws 106 and 107. Ascan best be appreciated from the view of FIG. 3A,rotation of thecam 117 upon theadjustment shaft 116 causes the jawed end of thebracket 114 to pivot aboutthe pivotally mounted end of thebracket 114 uponshaft 73a. As thebracket 114 pivots, the stub shaft44a may be moved vertically up and down by virtue ofthe mounting of the stub shaft 44a to thebracket 114.Vertical translation of the stub shaft 44a causes thepulley 42a to decrease or increase the tension in thestripper belt 38 as the pulley 42a is respectivelymoved up or down. Accordingly, it should beappreciated that thecam 117 is captured or held bythe bracket to pivot the bracket about idler shaft73a, and other arrangements, other than the jawed end,could be employed for capturing the cam by thebracket. 
- Returning to the view of FIG. 3B, it is shownthat theadjustment shaft 116 is attached to thesidewall 34 by ascrew 119. Rotation of thecam 117 ispreferably effected by rotating athumbwheel 118 whichrotates freely upon theadjustment shaft 116 and maybe mounted to thecam 117 or formed of a single piecewith thecam 117. Thethumbwheel 118 preferablyextends through a slot in the rear 31 of the apparatusfor easy access thereto. When thestripper belt 38 isset to the desired tension, the position of thethumbwheel118 is frictionally maintained bycompression spring121 which is mounted uponadjustment shaft 116 betweenthethumbwheel 118 and theside wall 34. 
- The functional relationships among the mechanicalparts of theapparatus 10 may be appreciated from theviews of FIGS. 2A-2D. Adocument guide plate 50, asshown in FIG. 2A, is connected toside plates 33 and34 in a well known manner, such as by L-shapedbrackets of whichbracket 35 is typical. Thepicker shaft 28 is provided in journaledbearings 61inside plates 33 and 34, with twopickers 26 thereon. Thepicker shaft 28 has agear 27 thereon, which isengaged with anidler gear 25 onidler shaft 23, whichis journaled inbearings 29 inplates 33 and 34. 
- Theidler gear 25 is engaged with astripper gear39, onstripper drive shaft 48, which is journaled inbearings 49 inside plates 33 and 34. 
- Thestripper drive shaft 48 has a centrallylocated stripper drivepulley 40 keyed thereto. Astripper friction belt 38 is engaged withdrive pulley40 and with anidler pulley 42 on an adjustshaft 44. 
- A tension idler roller 70 is mounted on abracket71, which is supported by and free to pivot onshaft48 in a fashion similar to that shown in TechnitrolU.S. Patent No. 4,416,449 issued on November 22, 1983. 
- The adjustshaft 44 is engaged withside plates33 and 34 byeccentric bearing members 46, of wellknown type, which are rotatable and fixed in desiredpositions to impart a desired tension onstripperfriction belt 38. 
- Thedrive shaft 48 has a pair of pulleys 43thereon, as shown in FIG. 2D, outboard frompulley 40and keyed thereto, with O-rings 43a thereon forfrictional engagement with the sheets ofdocuments 22.Thedocument guide plate 50 is slotted (not shown) topermit the O-rings 43a to contact thedocuments 22.The pulleys 43 are rotated counter to the directionthat documents are fed into the apparatus so that theO-rings 43a provide additional stripping action. 
- The outer surface of thestripper friction belt38 contactsidler collar 132 of thefeed rollerassembly 32 when there are no documents presentbetween thefeed roller assembly 32 and thestripperfriction belt 38. Thefeed roller assembly 32 iskeyed tofeeder shaft 37, which is journaled inbearings 41 inside plates 33 and 34. 
- As shown in FIG. 2D, thefeed roller assembly 32includescentral idler collar 132 and feeder pulleys133 on each side keyed toshaft 37. The feederpulleys 133 have outer friction linings 32a forfrictionally engaging the documents as they areadvanced by thepickers 26. Theidler collar 132rotates freely upon thefeeder shaft 37 and thesurface of theidler collar 132 is recessed relativeto the feeder pulleys to accommodate the counter-rotationof thestripper friction belt 38. 
- Thefeeder shaft 37 has a pair ofadditional feedrollers 135, keyed thereto with O-rings 136 thereon,for frictional engagement withdocuments 22. Thefeeder shaft 37 has agear 45 which is engaged withidler gear 25. 
- Thefeeder shaft 37 at its end opposite togear45 has adrive pulley 122 keyed thereto. Atimingbelt 125 is engaged with thedrive pulley 122 andwith amotor pulley 322 onoutput shaft 323 of adrivingmotor 321 mounted toside plate 34 as is bestappreciated from the view of FIG. 2C. 
- The drivingmotor 321, shown in FIG. 2D, is ofconventional type and connected by motor controlcircuitry as described hereinafter to a source ofelectricity (not shown). 
- Thetiming belt 125 is also engaged with apulley59 on anaccelerator shaft 56, which is journaled inbearings inside plates 33 and 34. Theacceleratorshaft 56 has a pair ofaccelerator collars 52 thereon,which are keyed thereto and have smooth, outergrippingsurfaces 52a to grip and acceleratedocuments, as described more fully hereinafter. Apath constricting roller 62 is keyed to the centralportion of theaccelerator shaft 56. 
- Thetiming belt 125 is of the ridged type, which provides positive, non-slip driving between themotor321 andpulleys 122 and 59. 
- A pair of acceleratoridler rollers 54 areprovided in contact withsurfaces 52a ofcollars 52and mounted upon an acceleratoridler shaft 58. Theacceleratoridler shaft 58 is held by spring loadedcarriage assemblies 69 which are mounted to theunderside of the document guide plate. 
- Theaccelerator collars 52 androller 54 gripeach document and accelerates each document to providea gap between the documents, and to feed each documentsequentially to thestacker wheel 18. Thepathconstricting roller 62 urges documents against amagnetic sensor, as described more fully hereinafter. 
- Theaccelerator shaft 56 has atiming disc 74 ofwell known type thereon, keyed thereto, and with anLED/photosensor pair 75 and 78 of well known type,such as the HOA1870-31 detector available fromHoneywell mounted adjacent thereto. The photosensor78 scans thetiming disc 74, and provides a timingpulse to a central processor as described hereinafterfor each predetermined incremental movement of thedisc 74. The preferred incremental distance at whichtiming pulses are provided by thephotosensor 78 uponmovement of thedisc 74 is equivalent to approximatelyone millimeter of movement of the surface of theacceleration rollers 52a. 
- Theidler shaft 23 has an overrunningflywheelassembly 190 thereon, of well known type, whichincludes apulley 191, of well known type, with abelt192 engaged therewith and which pulley continues torotate aftershaft 23 is stopped by virtue of aconventional one-way clutch mechanism (not shown). 
- Thebelt 192 is engaged with apulley 193 onstacker shaft 194, which is journaled inbearings 95mounted inside plates 33 and 34. 
- Thestacker shaft 194 has a pair ofstackerwheels 18 keyed thereto which stack documents D onstacker plate 20. 
- The stacker wheels generally designated 18 have adrum portion 199, which is mounted to theshaft 194.The drum portion has a plurality of separatedcurvedfingers 196 raised above and extending therefrom at anangle, the fingers receiving the documents from theaccelerator collars 52 and stacking the documents oneat a time on theplate 20. 
- Thestacker plate 20 is also provided with a pairof separated vertically extending documents stops 68against which documents are stacked. 
- Returning to FIG. 2A, it can be seen that afterthe stripping action on the documents, the documentsare then advanced between thefeed roller 32 and anidler roller 63 mounted upon anidler shaft 73. Theidler roller 63 serves to maintain the frictionalengagement of the documents with the surface of thefeed roller 32 as the documents are advanced by thefeed roller 32 towardacceleration roller 52 mounteduponacceleration shaft 56. Theacceleration roller52 forms a nip with accelerationidler roller 54mounted upon accelerationidler shaft 58.Accelerationroller 52 and accelerationidler roller 54 increasethe speed of the document to provide a spacing betweendocuments advanced by thefeed roller 32.Acceleration rollers 52 and 54 are positioned closelyenough toward thefeed roller 32 and theidler roller63 alonglower guide plate 50 so that documents are incontinuous sequential contact with the nip between thefeed roller 32 and theidler roller 63, theacceleration rollers 52 and 54, and then the fingersof thestacker wheel 18. Such continuous contactobviates reliance upon inertial drift of the documentsto provide controlled transport through the apparatus. 
- After having been accelerated, documents continuealonglower guide plate 50 toward thestacker wheel18. The periphery of thestacker wheel 18 possesses aplurality ofextended fingers 196 which lift documentsfrom thelower guide plate 50 and place them upon thestacker plate 20. AnLED 67 and a photosensor 66 arealigned across thestacker plate 20 to detect thepresence of documents upon thestacker plate 20. Thephotosensors 64 and 66 may be photodiodes,phototransistors, or other equivalent devices. 
Document Sensors- In regard to sensing the documents as thedocuments pass through the apparatus, several controland computational operations are carried out by anapparatus control network as documents pass throughthe apparatus. In order to provide an accurate countof acceptable documents, the apparatus incorporatesmeans for detecting misted documents or documentswhich do not satisfy predetermined fitness orauthenticity criteria, collectively referred tohereinafter as error documents or counterfeit suspectdocuments. The apparatus is halted upon detection ofa misted or unfit document so that the user may removethe error document. A message indicating the type oferror is shown on thedisplay 16 upon detection of theerror document. Misfeed error document includechains, which are partially overlapping documents, anddoubles, which are completely overlapping documents.Chains are detected according to a length error whichis generated due to their unusual length relative toother documents of the same type. Doubles aredetected according to an opacity error which isgenerated due to their unusual opacity relative to anoperator-selected range. Fitness error documents include documents of improper dimensions and suspectedcounterfeit documents. Referring to the dimensions ofthedocument 100 shown in FIG. 4, a "half" error isdefined as failure to exceed a predetermined lengththreshold in the direction of the X-axis and an "off-width"error, sometimes referred to as a "short"error, is defined as failure to exceed a predeterminedwidth threshold in the direction of the Y-axis, asindicated in connection with thedocument 100 in FIG.4. 
- Several transducers are employed as part of theapparatus control system to sense characteristics ofdocuments passing through the apparatus in thevicinity ofacceleration rollers 52 and 54. As shownin FIG. 3A, a light source, such as center LED 81 ispositioned above thelower guide plate 50 near thecenter of the document guide path. The center LED 81emits light which is detected by an optical sensorsuch ascenter sensor 80 mounted beneath thelowerguide plate 50 to provide optical detection of thepresence of a document passing between theLED 81 andthesensor 80. As shown in FIG. 4, thecenter sensor80 is mounted within anaperture 51 in thelower guideplate 50. Aleft sensor 82 is mounted within anaperture 53 located toward the left side of thelowerguide plate 50. Aright sensor 84 is mounted withinanaperture 55 toward the right side oflower guideplate 50. The left andright sensor 82 and 84 areused to detect both the presence and the opacity ofthe left and right side segments (generally designated99 and 97 by the lines in FIG. 4) of the documentssensed by the sensors, as the documents aretransported along thelower guide plate 50 adjacentthe sensors. Theleft sensor 82 and theright sensor84 cooperate with respective left and right LED's 83and 85 shown in FIG. 6A. The LED's 83 and 85 are mounted within the upper guide plate in an arrangementsimilar to that ofcenter LED 81 andcenter sensor 80described in connection with FIG. 3A. It is notedthat the relative positions of LED's andphototransistors in the upper and lower guide plates,respectively, may be reversed without affecting thedetection of documents passing therebetween. It isfurther noted that light sources other than LED's andoptical detectors other than phototransistors mayalternatively be employed to obtain the detecting andsensing functions described herein. Lastly, it isnoted that the left, right, and center photosensorsare shown in FIG. 4 to be located on a line transverseor perpendicular to the guide path for the documents,although a different orientation of the sensors couldbe employed. 
- Magnetic sensing of the documents passing throughthe apparatus is also provided. Returning to FIG. 3A,a magnetic field detector, such asread head 86, ismounted upon acircuit board 90 beneath theguideplate 50 and positioned to protrude slightly above thesurface of thelower guide plate 50. The readhead 86is preferably a single full-track head manufactured byMichigan Magnetics Inc. of Vermontville, Michigan,having a nominal inductance of 300 mH, an impedance of2 kΩ at 1 Khz, and a DC resistance of 270 Ω. The readhead 86 provides an electrical signal indicative ofthe magnetic characteristics or magnetic property ofdocuments proceeding along thelower guide plate 50.In order to intensify the induced electrical signal, aflux source, such aspermanent magnet 88, ispositioned below thelower guide plate 50 to magnetizedocuments prior to their passage above the readhead86. 
- Mechanical vibration within the apparatus tendsto introduce unwanted variations in the electrical signal at the readhead 86, which may be due tovibrations inducing fluctuation in the relativepositioning of themagnet 88, theread head 86 and thedocuments passing above the readhead 86. In order tominimize vibration of themagnet 88 relative to thereadhead 86, themagnet 88 and the readhead 86 aremounted in a rigid, fixed relationship to form asingle mechanical unit. For example, in the preferredembodiment, thecircuit board 90 is attached to thelower guide plate 50 by a rigid mounting, such asstud92, andmagnet 88 is also attached to thelower guideplate 50 by a rigid mounting, such asstud 94.Mounting both the readhead 86 and themagnet 88 tothelower guide plate 50 constrains vibration ormovement of thehead 86 and themagnet 88 relative toeach other. Alternatively, it is noted that themagnet 88 may be rigidly mounted to thecircuit board90 upon which the readhead 86 is also mounted. 
- In order to minimize distance variations betweendocuments and the readhead 86, the path of thedocuments above the readhead 86 is constrained by apath constricting roller 62 which is keyed to theaccelerator shaft 56. The surface of the pathconstricting roller extends beneath theupper guideplate 60 to form a narrow gap in the vicinity of thereadhead 86. The narrow gap formed between thepathconstricting roller 62 and the readhead 86 ensuresthat documents which pass over the readhead 86 aresubstantially uniformly sensed or scanned by the readhead 86 for accurate detection of counterfeit suspectdocuments. Thepath constricting roller 62 providesuniform magnetic sensing of documents without causingjamming of documents having curled edges as oftenoccurs in prior art devices employing a stationarypath constricting member to perform a similarfunction. 
- The position of the readhead 86 relative to theoptical sensors 80, 82, and 84 is shown in FIG. 4.The readhead 86 protrudes through anaperture 57 inthelower guide plate 50 at a position that isslightly forward of theoptical sensors 80, 82 and 84with respect to the document transport direction asindicated byarrow 101. A document, such as a dollarbill generally designated 100, is transported alongthelower guide plate 50 in the direction indicated byarrow 101. United States bills, such asbill 100, arecharacterized by a centralnon-magnetic portion 104and a peripheral magneticink bearing portion 102.Thus, as thedollar bill 100 passes over the readhead86, the induced electrical signal produced by the readhead 86 will be characterized by two periods ofirregular activity indicative of the passage of theleading and trailing peripheral areas of the magneticink bearing portion 102 of thedollar bill 100. 
- The electrical signal generated by the readhead86 in response to the passage of a document isprocessed by a magneticsignal conditioning circuit110 shown in FIG. 5A. Theconditioning circuit 110performs several signal processing functions toextract and amplify the component of the electricalsignal from the readhead 86 into a form suitable foranalog-to-digital conversion. The readhead 86 isconnected to apickup circuit 120. Thepickup circuit120 produces apickup signal 210, a typical pickupwaveform which is shown in FIG. 5B. Thepickup signal210 is dominated by 60 Hz, 200 mv peak-to-peak leakagenoise from the apparatus power supply. For clarity ofexposition, noise components ofsignal 210 due tovibration and electronic noise from the motor are notshown. Time t1 indicates time at which the leadingedge of a document having a magnetic ink bearingperiphery begins to pass over the readhead 86. The pattern of ink upon the document causes a low-amplitudeoscillation of thepickup signal 210 havingfrequency components significantly in excess of 60 Hz.The low amplitude oscillation exhibits a momentarydecrease during passage of the non-magnetic portion ofthe document over the read head. After passage of thenon-magnetic portion of the document, the low-amplitudeoscillation is again present in thepickupsignal 210. Time t3 indicates the time at which thetrailing edge of the document passes over the readhead 86 and the low-amplitude oscillation ceases. Thefrequency content of the low-amplitude oscillationcaused by passage of a document is significantly belowthe frequency range of vibration noise and motornoise. Returning to FIG. 5A, thepickup signal 210is passed to apre-amplifier stage 130 which amplifiesthe pickup signal to a level suitable for extractingthe low-amplitude oscillation caused by the magneticink bearing portion of the document. The preamplifiedsignal is then passed to abandpass filter140. The lower and upper corner frequencies of thebandpass filter are selected to substantiallyeliminate the low frequency power supply noise and thehigh frequency vibration and motor noise from the preamplifiedsignal. A pass band ranging from about 250Hz to about 1600 Hz has been found to be suitable forthis purpose. Thebandpass filter 140 may be a singlestage bandpass amplifier or a two-stage amplifierincorporating in series a high-pass stage and a low-passstage. 
- Once the desired frequency range has beenextracted by thebandpass filter 140, the filteredsignal is passed to asecond amplifier stage 150. Thesecond amplifier stage 150 amplifies the filteredsignal to a level suitable for analog to digitalconversion and ultimately for threshold evaluation. Thesecond amplifier 150 preferably incorporates bothavariable gain stage 154 and a fixedgain stage 152.Thevariable stage 154 is provided so that the gain ofamplifier 150 may be adjusted to compensate for avariation in the pickup signal amplitude. Such avariation may be induced by a change in the operatingspeed of the apparatus. 
- After having been amplified to a suitable levelfor digital conversion, the amplified signal is passedto arectifier 160 which rectifies the amplifiedsignal so that subsequent integration will produce apositive value. The rectified signal is then passedto anintegrator 180 which integrates the rectifiedsignal. The integrator is designed to have a finiteintegration time. The finite integration time of theintegrator 180 reduces the sensitivity of theconditioning circuit 110 to momentary fluctuations ofthe rectified signal so that digital sampling of theintegrated signal will yield a sample value that isrepresentative of the magnetic characteristic orproperty of the document being sensed over a finitetime period. The finite integration time of theintegrator 180 also compensates for the time lagbetween magnetic and optical sensing due to thestaggered relative positions of the readhead 86 andtheoptical sensors 80, 82, and 84 along thelowerguide plate 50. A further benefit obtained by theintegrator is that the integrated signal does not fallto zero during the time that the non-magnetizedportion of a document is present over the readhead86. The upper limit of acceptable integration time isdetermined by the temporal spacing between documentswhich are fed through the apparatus. The integrationtime must be short enough to allow the integratedsignal to decay so that there is no carryover ofintegrated signal amplitude between successive documents. An integration time on the order of 2 mshas been found to be suitable for document countingspeed of about 1200 documents per minute.The integrated signal produced by the integratoris shown in FIG. 5B asconditioned signal 220. Theconditioned signal 220 is characterized by two peakvalues of about 4V which are substantially concurrentwith the passage of the magnetized peripheral portionof a document over the readhead 86. As can be seenby comparison of thepickup signal 210 with theconditioned signal 220, the influence of the 60 Hzpower supply noise is reduced to occasional spikes intheconditioned signal 220. The time period betweent1 and t3 during which a document passes over the readhead 86 is discernable by the large-scale rise andfall ofconditioned signal 220. The time periodduring which the document is above theoptical sensors80, 82, and 84 occurs during the interval between t2and t4. The optical detection interval lags slightlybehind the magnetic detection interval between t1 andt3. The finite integration time of theintegrator 180ensures that theconditioned signal 220 maintains asignificant positive amplitude concurrently with theoptical detection interval. 
- A detailed schematic circuit diagram of the conditioning circuit-  110 is shown in FIG. 5C. The circuit-  110 incorporates several linear operationalamplifier stages preferably based upon LM324 op-ampcircuits in order to accomplish the signal processingfunctions described in connection with FIG. 5B. Thepreferred component values pertaining to the conditioning circuit-  110 are listed in Table I. Thedetailed operation of the conditioning circuit-  110shown in FIG. 5C will be apparent to those skilled inthe art. To further enhance isolation from sources ofelectrical noise, a reference voltage is supplied from a virtual ground, such as a TLE2425 virtual ground, tothe bandpass filter stages 142 and 144, amplifierstages 152 and 154, and the rectifier-  160. The read head-  86 is biased by a voltage regulator, such as an LM7805-  5 volt DC regulator within the pickup circuit- 120. | Signal Conditioning circuit 110 Component Values |  | R1 - 20 KΩ | C1 - .01 µF | D1 - 1N914 |  | R2 - 10 KΩ | C2 - 1.0 µF | IC1 - LM324 |  | R3 - 330 KΩ | C3 - .10 µF | IC2 - TLE2425 |  | R4 - 75 KΩ | L1 - 300 Mh | IC3 - LM7805 |  | R5 - 10 KΩ |  | R6 - 47 KΩ |  | R7 - 27 KΩ |  | R8 - 220 Ω |  | R9 - 100 KΩ pot. |  | R10 - 1 MΩ |  | R11 - 100 KΩ |  
 
- During the passage of a document through thedocument processing apparatus, theoutput signal 220,which is designated in FIGS. 5A and 5B, of thesignalconditioning circuit 110 is sampled and digitized foreach incremental advance of thetiming wheel assembly77 by an analog-to-digital converter 304 shown in FIG.6A. The digital values thus obtained are accumulatedby aCPU 302 during a detection interval defined asthe interval between t2 and t4 that the document isdetected by the optical sensors. The digital valuesmay be accumulated, for example, by a summation of thevalues obtained during the detection interval.Alternatively, the accumulated value may represent anaverage of the sample values or a comparablestatistical measure of the digital values obtainedduring the detection interval. 
- After the detection interval ends at t4, theaccumulated value is compared to one or more referencevalues in order to verify that the accumulated value corresponds to the value for a genuine document havinga predetermined or acceptable magnetic characteristicor property. For example, the accumulated value maybe compared to reference values in the form of a lowerthreshold value and an upper limit value, which definea range of acceptable accumulated values according towhich a document can be identified as an acceptable orgenuine document. A procedure in which verificationof magnetic characteristics may be carried out inconjunction with other functions of a documentprocessing apparatus is described in more detailhereinafter in connection with FIGS. 7A-D. 
- It has been found that accumulating sample valuescorresponding to the magnetic characteristic of adocument and then comparing a representative value toone or more reference values, is an advantageousmethod of verifying the authenticity of documents.This procedure is particularly advantageous when theexamined document has sufficiently strong and/orspatially distributed magnetic qualities, whichreadily enables genuine documents to be reliablydistinguished from counterfeit suspect documents.Some documents, which are desired to be examined, mayhave magnetic ink bearing portions that are relativelylocalized and/or weaker in their magneticcharacteristics, as compared to U.S. currency. Forexample, as shown in FIG. 9, a 50yuan note 350 issuedby the People's Republic of China includes arelatively small area designated 352 in which ink withrelatively strong magnetic properties is located. Theink upon the remaining portion of the 50 yuan note isrelatively weak in regard to the magnetic propertiesthereof. The area designated 352 containing the inkwith relatively strong magnetic properties iscentrally located near the bottom of the reverse sideof the 50 yuan note designated 350. The obverse face (not shown) of the 50 yuan note 350 also includes alimited area in which ink having relatively strongmagnetic properties is present. Additionally, themagnetic ink used on the 50 yuan notes tends to havereduced magnetic properties than the magnetic ink usedon United States currency. A practical result of suchreduced magnetic characteristics for the ink on the 50yuan note is that thesignal conditioning circuit 110,as described in connection with FIGS. 5A-C, willexhibit a reduced response relative to the responseobtained in the processing United States currency.Hence, the electrical signal produced as a result ofdetecting the magnetic properties of a genuine 50 yuannote may not be reliably distinguished from electricalnoise sensed during passage of a counterfeit 50 yuannote through the counting apparatus. 
- In order to reliably verify a document, such asthe 50 yuan note, according to its magneticcharacteristics, an enhanced magnetic sensing andconditioning system, which has higher gain and reducedsusceptibility to noise relative to circuit-  110 ispreferably employed in the apparatus. Such anenhanced sensing and conditioning system is shownschematically in FIGS. 10A and 10B and includes read head-  360 and conditioning circuit 110a. The preferredcomponent values pertaining to the conditioningcircuit 110a are listed in Table II. | Signal Conditioning Circuit 110a Component Values |  | R1 - 10 KΩ | C1 - 10 µF | D1 - 1N914 |  | R2 - 10 MΩ | C2 - .005 µF | D2 - 3.8V Zener |  | R3 - 500 KΩ pot. | C3 - .1 µF | IC1 - LM324 |  | R4 - 75 KΩ |  | IC2 - MAX680 |  | R5 - 150 KΩ |  | R6 - 47 KΩ |  | R7 - 100 KΩ |  | R8 - 3 KΩ |  
 
- The readbead 360 is mounted within theprocessing apparatus in a manner similar to thatdescribed in connection with readhead 86 shown in FIG3A. Readhead 360 is connected with a DC power supplyas shown in FIG. 10B and provides a pick-up signalin response to passage of a document having amagnetic property. The readhead 360 is preferably amagnetoresistive transducer, such as a modelBS05N1HGAA currency recognition sensor manufactured byMurata Erie North America of Smyrna, Georgia. Thereadhead 360 does not require an external magneticfield to be applied within the document guide path,such as has been described previously in connectionwithpermanent magnet 88. Since a separate magnet,such asmagnet 88, is not needed, the influence ofrelative vibration between the readhead 360 and sucha separate magnet is eliminated. 
- In order to further reduce the influence ofelectrical noise, the signal conditioning circuit 110ais mounted within the apparatus at a location remotefrom the readhead 360 and remote from themotor 321.The electrical signal supplied isconducted through a shielded cable to the signalconditioning circuit 110a at the remote locationwithin the apparatus. The pick-up signalis capacitively coupled to the conditioningcircuit 110a and is received by a fixed-gain amplifiergenerally designed 366 in the conditioning circuit.Theamplifier 366 preferably includes an LM324operational amplifier that is connected with thebipolar 10 volt DCpower supply circuit 369 shown inFIG 10B. Thepower supply circuit 369 preferablyincludes a MAX680 DC/DC charge-pump convertermanufactured by Maxim Integrated Products ofSunnyvale, California. The dual 10 volt power supplyis connected withamplifier 366 as indicated and is connected to other components within the signalconditioning circuit 110a thus allowingamplifier 366to provide a greater variation of voltage in responseto the pick-up signal relative to the comparablecircuitry within conditioning circuit 110 (shown inFIG. 5A) utilizing a single-ended power supply. ThebipolarDC power supply 369 can be convenientlyoperated with a 5 volt DC signal that is compatiblewith logic circuitry employed elsewhere within theprocessing apparatus. 
- The amplified signal produced byamplifier 366 inresponse to the pick-up signal is capacitively coupledto the input of a variable-gain amplifier 368. Thevariable-gain amplifier 368 preferably includes apotentiometer R3 for adjusting the gain of theamplifier 368 to compensate for signals from documentshaving differing magnetic properties. For example,potentiometer R3 can be adjusted to provide arelatively low value of gain withinamplifier 368 forprocessing U.S. currency. For processing Chinesecurrency, or other documents having relatively weakmagnetic characteristics, potentiometer R3 can beadjusted to provide a relatively high value of gain.Alternative means for adjusting the gain ofamplifier368 may be employed in the practice of the invention,such as a gain selector switch arrangement, to providethe user with the ability to adapt the signalconditioning circuit 110a to the magneticcharacteristics of particular types of documents beingprocessed. 
- The output signal of the variable-gain amplifier368 is provided to the input of a high-pass filter370, which removes frequency components of theamplified signal that are below a predeterminedfrequency, such as below 300 Hz. The filtered signalfromfilter 370 is capacitively connected to a combined rectifier/integrator 372. Therectifier/integrator 372 provides rectification andintegration of the filtered signal. The operation ofrectifier/integrator 372 is similar to that previouslydiscussed in connection withrectifier 160 andintegrator 180 ofcircuit 110. 
- Since several of the stages of conditioningcircuit 110a include operational amplifiers that areconnected with the dual 10 volt power supply, it ispossible that signals as high as 10 volts could begenerated within the conditioning circuit 110a inresponse to documents with unusually strong magneticcharacteristics or in response to transient signals.It is desirable to limit the conditioned signalproduced by the signal conditioning circuit to a levelbelow 10 volts so that the conditioned signal will becompatible with lower voltages used by the logiccircuitry elsewhere in the apparatus. In order tolimit the voltage provided atoutput terminal 376 ofthe signal conditioning circuit 110a, aclippingcircuit 374 is connected between therectifier/integrator 372 andoutput terminal 376 tolimit the rectified and integrated signal. Theclipping circuit preferably includes a zener diode D2connected betweenterminal 376 and ground. The zenerdiode is selected to limit the voltage available atterminal 376 to a level, such as 3.8 volts or otherdesired voltage that is compatible with the referencelevel of the A/D converter that is to receive theconditioned signal fromterminal 376. A resistor R1is connected in series between therectifier/integrator and the zener diode D2 in orderto limit the current flowing within the diode D2 to anappropriate level. 
- Referring now to FIG. 11, there are shown variousvoltage waveforms that are representative of the pick-up signal designated 378 produced by the readhead360, the filtered signal designated 380 produced bythehigh pass filter 370 and the conditioned signaldesignated 382 that is received atoutput terminal376. These signals are representative of thoseproduced as a document, such as a 50 yuan note, passesalong the document path guide. For clarity, noisecomponents that are normally present within thewaveforms have been eliminated from the waveformsshown in FIG. 11. Time t1 indicates the time at whichthe leading edge of a document is detected within theguide path by the center photodetector. At time t1,the pick-upsignal 378 produced by the readhead 360exhibits a slight temporal variation due to couplingwith the AC power supply of the processing apparatus.The 60 Hz frequency of the AC power supply iseffectively blocked by the high-pass filter 370, thusfilteredsignal 380 and conditioned signal 382 aresubstantially flat at time t1. 
- As the document continues along the guide path,the magnetic ink bearing portion passes theread head360 causing the pick-upsignal 378 to exhibit severalhigh frequency oscillations having an amplitude ofabout 200 µV peak-to-peak. The high frequencyoscillations are amplified byamplifiers 366 and 368and are passed byhigh pass filter 370, which producesoscillations ofsignal 380 having an amplitude ofabout 1 V peak-to-peak. The oscillations ofsignal380 are then rectified and integrated to produce asustained pulse for theconditioned signal 382 havingan amplitude of about 2 volts during the intervalextending from time t2 to time t3. After time t3, themagnetic ink bearing portion of the document haspassed theread head 360, and hence, thewaveforms378, 380, and 382 exhibit no further significantsustained oscillations. At time t4, the trailing edge of the document passes the center photodetector, thusconcluding the document detection interval. 
- The signal conditioning circuit 110a may be usedto verify documents in accordance with the methoddescribed herein in connection withsignalconditioning circuit 110. Alternatively, the circuit110a can be used in the practice of an alternativemethod described hereinafter. 
- As can be seen in FIG. 11, the interval betweentime t2 and time t3, during which the conditionedsignal 382 exhibits a sustained pulse, is relativelybrief compared to the total detection interval fromtime t1 to time t4 during which a document is sensed bythe photodetector. The relatively brief nature of thepulse in theconditioned signal 382 between time t2and time t3 imposes an upper limit on the range ofaccumulated values that can be obtained by samplingthesignal 382 and summing the sampled values duringthe passage of genuine documents. The limited rangeof accumulated values, in turn, negatively influencesthe ability to make reliable distinctions betweengenuine documents and counterfeit suspect documents.Additionally, the relatively brief interval ofactivity in the waveforms associated with the passageof such documents renders the accumulation of samplevalues to be more sensitive to the influence ofspurious signals relative to the processing ofdocuments having stronger and/or larger magnetic inkbearing portions. For example, there is shown in FIG.11 for the pick-up signal 378 a noise spike occurringat time t5 during the detection interval. Theresulting pulse in theconditioned signal 382 due tothe spike at time t5 would contribute significantly tothe value of an accumulated sum of sampled values ofwaveform 382 taken at sampling intervals indicated bythe ticks along the lower time axis of FIG. 11. 
- In order to overcome the aforementioneddifficulties relative to the verification of documentshaving weak and/or highly localized magneticcharacteristics, an alternative method of verifyingdocuments can be used wherein a count is accumulatedbased upon the temporal characteristics of theconditioned signal 382. In the alternative method, acount, or accumulated value, is obtained by countingthe consecutive sampling intervals during which theconditioned signal of the conditioning circuit 110aexceeds a predetermined lower threshold value, VL,during the detection interval. The accumulated countis then compared to one or more reference values,associated with the duration of the pulse portion of aconditioned signal, that correspond with a genuinedocument. 
- Most preferably, the last-mentioned method forverification also includes the step of accumulating acount of sampling intervals during which the sampledvalue of the output signal of conditioning circuit110a exceeds an upper limit VH. In order to beidentified as a genuine document, the count of sampledvalues above VH must be less than a predeterminedmaximum reference value and the count of consecutivesampled values above VL must be greater than apredetermined minimum reference value. The manner inwhich the alternative method may be carried out andcombined with other functions of the documentprocessing apparatus will be described hereinafter inconnection with the logic flow diagram of FIG. 7E. 
Control Network- Operation of the counting and batching apparatusis monitored and governed by a control network asshown in FIG. 6A. A microprocessor, such asCPU 302,executes a control program stored in a non-volatile memory, such asROM 318. The control programcoordinates the functions of counting, batching,document testing, motor control, display control, userinput, and communication with external devices. TheCPU 302 is preferably a µPD78C10 manufactured byNippon Electric Company. TheCPU 302 is connected toa random access memory,RAM 319, having a number ofregisters for storing and retrieving informationduring execution of the control program. TheRAM 319may be an external RAM or may be monolithicallyintegrated with the microprocessor. TheCPU 302 isconnected to a multichannel analog-to-digital (A/D)conversion circuit 304. In the preferred embodimentA/D circuit 304 is monolithically integrated with theCPU 302. The A/D circuit 304 receives analog signalsfrom thesensors 66, 64, 80, 82, and 84, and from themagneticsignal conditioning circuit 110 and providesto theCPU 302 digital signals that correspond to thevarious analog signals. 
- AnLED control circuit 306 is connected betweentheCPU 302 and theLEDs 83 and 85. The LED controlcircuit is a multi-channel digital-to-analog converterwhich adjusts the brightness of the LEDs in responseto signals received from theCPU 302. Variation ofLED brightness levels is particularly important to theoperation of the right and leftsensor circuits 82 and84 since those circuits are used to determine both thepresence and the opacity of documents passing throughthe apparatus. The light level required for opacitytesting can be much greater than the light levelrequired for detecting the presence of a document.Since LED reliability decreases with increasingbrightness, it is desirable to operate the left andright LEDs at a high level only when opacity data isrequired. The particular brightness level required todetermine document opacity is dependent upon the type of document being counted or batched and it istherefore desirable to allow the user to specify thebrightness level used. TheLED control circuit 306further provides theCPU 302 with the capability toswitch the LEDs to the document detection brightnesslevel when the apparatus is in a stopped condition. 
- Akeyboard interface circuit 308 is connected totheCPU 302 and to thekeyboard 14 for allowing a userto specify or modify operating parameters duringexecution of the control program. Adisplay interface310 is connected to theCPU 302 for driving thedisplay 16 which provides count and status informationto the user. An RS-232interface driver 314 is alsoconnected to theCPU 302 so that the counting andbatching apparatus can interface with anexternaldevice 316. Theexternal device 316 may be a generalpurpose computer that is programmed to communicatewith the apparatus and control the apparatus accordingto a serial communication protocol. Theexternaldevice 316 may alternatively be a printer, such as athermal printer, for printing piece counts,denomination counts, and grand totals of dollaramounts of documents counted by the apparatus. TheCPU 302 is programmed to discriminate betweendifferent types of external devices according toconnectors or jumpers which are set on the serialinterface of the external device. External I/O viathe RS-232interface 314 may be employed either tocomplement or to replace direct entry of user commandsvia thekeyboard 14. 
- Amotor control circuit 312 is connected to theCPU 302 and is used to provide programmed control ofthemotor 321. The motor control circuit may turn themotor on and off, or vary the speed of the motor, inresponse to signals from theCPU 302. 
- TheCPU 302 includes an interrupt input INT which is connected via interruptline 79 to atiming wheelassembly 77. The timing wheel assembly which is shownschematically in FIG. 6B provides timing signals totheCPU 302 for use in coordinating the counting andsensor data accumulation functions during thetransport of documents through the counting andbatching apparatus. Thetiming wheel 74 is mountedupon theaccelerator shaft 56 so that the rotation ofthetiming wheel 74 is synchronized to the rotation oftheacceleration roller 52. 
- TheLED 75 andphotosensor 78 are positioned onopposite sides of thetiming wheel 74 as previouslydescribed and are aligned so that as thewheel 74rotates, asensor bias circuit 76 produces a pulsecoincident with the passage of each radial slotbetween theLED 75 and thesensor 78. The output ofthesensor bias circuit 76 is transmitted by theinterruptline 79 to an interrupt port of theCPU 302.Preferably, the number of radial slots intiming wheel74 is such that approximately 66 interrupt pulses aregenerated as a document passes between theacceleration rollers 52 and 54. In terms of distance,an interrupt pulse is generated by the timing wheelassembly for approximately each millimeter ofcircumferential revolution of theacceleration roller52. 
- A preferred control routine for controllingoperation of the apparatus is shown in FIGS. 7A-7D asa flow diagram. The control routine encompasses thefunctions of command I/O, sensor data accumulation,sensor data evaluation, and document counting.Referring to FIG. 7A,initial step 224 is executed todetermine the operational mode and configuration ofthe apparatus. Duringstep 224, the CPU determineswhether an external device is connected via the RS-232interface. If an external device is detected, the RS-232 lines are tested for the presence of jumpersindicating whether the external device is a computerwith which theCPU 302 will interact or whether theexternal device is a printer to which theCPU 302 willsend output only. It is noted that references withinthis specification to user input via the keyboard andoutput via the display are also applicable to inputfrom the external device and output to the externaldevice, if it was determined instep 224 that such anexternal device is detected as connected in thesystem. 
- Instep 226 pertinent initialization selections,such as the denomination of documents to be counted,batch or counting mode selection, batch size,operating speed, and verification options are input tothe control procedure. The user may also cyclethrough a display loop instep 226 to obtain displaysof accumulated piece counts, denomination countsand/or totals. The accumulated counts and/or totalsmay optionally be printed on the printer or uploadedto the host if the apparatus is connected to suchexternal devices via the RS-232 port. Requesting thedisplay of the accumulated counts and/or totals causesthe counts/and or totals to be updated according to arun count. The run count is a register in which isstored the number of documents counted since the mostrecent display request. The run count is resetsubsequent to each total display request. Wheneverthe grand total value count is requested, theCPU 302calculates the grand total value from the individualdenomination counts which may be stored inRAM 319 orin internal CPU registers. 
- Also instep 226, several threshold values usedfor error detection may be selected either by userinput or from data previously stored in ROM. Thedocument opacity level may also be selected by the user duringstep 226. The selected opacity leveldetermines the brightness level at which the left andright LEDs 83 and 85 are lit during opacity testing.Magnetic detection of counterfeit suspect documentsand/or opacity evaluation may be enabled or disabledby the user instep 226. If counterfeit suspectdetection (CFS) is chosen, the threshold value againstwhich magnetic data will be compared is selected bythe CPU according to the specified operating speed.Such selection is necessitated by the dependence ofthe magnitude of the electrical signal produced by themagnetic read head 86 upon the speed at whichdocuments pass by or adjacent the readhead 86. Inthe preferred embodiment, the user can select betweena high operating speed, on the order of 1200 documentsper minute, and a low operating speed, on the order of600 documents per minute. The low speed option isprovided so that the user may visually determine thepresence of counterfeit suspect documents by watchingthe documents as they are counted. Such visualcounterfeit suspect determination may complement orreplace magnetic counterfeit suspect determination.It has been found that a document counting speed onthe order of 600 documents per minute is sufficientlyslow to enable visual verification of documents. 
- Initialization selections may be downloaded viathe RS-232 interface or manually entered via thekeyboard 14 which is shown in greater detail in FIG.8. Thekeyboard 14 includes several switches by whichthe user may enter commands and select options asdescribed in connection withstep 226 of the controlprocedure. Thekeyboard 14 includes keys labeledSTART/STOP, CONT, BATCH, DENOM SELECT, DENOM TOTAL,GRAND TOTAL, CLEAR TOTAL, SPEED, CFS, and DOUBLEDETECT. The START/STOP key is a momentary switchwhich is pressed to start and stop operation of the apparatus. The CONT key is a momentary switch used torestart the counting and batching apparatus after theoperation has been interrupted. Operation of the CONTkey provides a signal to the counting and batchingapparatus to restart operation and to continue thepresent count subsequent to detection and removal of acounterfeit suspect document or subsequent tooperation of the START/STOP key. The DENOM SELECT keyis used duringstep 226 of the control procedure tocycle through a list or menu to select that thedenomination of bills to be counted in a particularrun or to specify a piece count without regard todenomination. The DENOM TOTAL key is used to displayaccumulated totals of each denomination counted or thetotal piece count. The GRAND TOTAL key is pressed todisplay the sum of the accumulated dollar amounts ofthe individual denominations. The CLEAR TOTAL keyresets the displayed accumulated total to zero. IfCLEAR TOTAL is operated during display of the GRANDTOTAL, then all denomination totals are reset. 
- The CFS key is used duringstep 226 to togglemagnetic counterfeit suspect detection "on" or "off".The DOUBLE DETECT key is used duringstep 226 toselect the LED brightness level for opacity testingor to disable opacity testing. The SPEED key is usedduringstep 226 to select between the high operatingspeed and the low operating speed. The BATCH key isused duringstep 226 to select batch operation and thebatch size. When selection of the initializationparameters instep 226 is completed, the motor isstarted and the control procedure then passes to step228 upon depression of the START key. 
- Instep 228, several variables pertaining todocument testing are set to zero. As each documentpasses through the apparatus, the length of thedocument is measured by the count of timing pulses that occur while thecenter sensor 80 detects thepresence of each document. The counting and batchingapparatus is stopped if an unusually large number oftiming pulses are counted while the center sensor iscovered indicating the presence of a document. Thesetwo counts - the length count and the idle count - arereset instep 228 between the passage of eachdocument. Two flags which are used to test for off-widthdocuments - a right sensor flag and a leftsensor flag - are also reset instep 228. 
- Proceeding fromstep 228 to step 230, severalregisters ofRAM 319, which are used to accumulatedocument testing data, are reset. During the passageof each document, running totals of the left and rightsensor signals, the magnetic signal conditioningcircuit output, and the number of detected interruptpulses are accumulated in respective registers ofRAM319. The totals stored in those registers are resetinstep 230 between the passage of each document. 
- Proceeding fromstep 230 to step 232, thepresence of a document is detected according to thevalue of the A/D channel corresponding to thecentersensor 80. If the center sensor signal value is belowa predetermined detection threshold, the controlprocedure branches to step 234 and waits for aninterrupt pulse from the timing wheel. When aninterrupt pulse is received instep 234, the controlprocedure continues to step 236 wherein the idle countis incremented. Then, instep 238, the idle count iscompared to a predetermined limit. If, instep 238,the idle count does not exceed the limit, then thecontrol procedure returns to step 232. If, instep238, the idle count does exceed the idle limit, thencontrol passes to step 268 wherein the apparatus ishalted and then to step 270 wherein the controlprocedure awaits further input. Fromstep 270, the control procedure may branch to step 226 uponreceiving further initialization commands or theprocedure may branch to step 228 upon detection ofdocuments placed into the hopper. In general, thecontrol path taken fromstep 270 is dependent upon thestatus condition which led tostep 270 and the natureof the action taken by the user or the input from anexternal device. 
- If, instep 232, the center document sensor doesregister the presence of a document, then the controlprocedure passes to step 233 of FIG. 7B as indicatedby the continuation label B. Instep 233, twoconditions are tested to determine whether the motorshould be halted. The first condition is whether thestacker count has reached a value indicative of afull stacker less one document. Due to the highoperating speed of the apparatus, the documenttransport mechanism cannot be instantaneously stopped.Consequently, if the stacker is about to become full,such a determination must be made when the leadingedge of each document is detected. Likewise, if theapparatus is running in batch mode, a determination ismade instep 233 whether the document presentlydetected by the center sensor would be the finaldocument of a batch. If either of these twoconditions are met, the control procedure passes tostep 235 in which the motor control circuit begins toshut the motor down using a well-known dynamic brakingtechnique. When the motor control circuit has begunto brake the motor or if neither condition wassatisfied instep 233, then the control procedurepasses to step 240. 
- Step 240 is the first step of adata accumulationloop 200 during which running totals of sensor dataare generated as each document passes through theapparatus. 
- When an interrupt pulse is detected in step 240,the control procedure passes to step 242 wherein thedocument length count is incremented. From step 242,the control procedure passes to step 244. At step 244a flag is checked which is indicative of the rightsensor having previously detected a document. Duringthe first iteration of thedata accumulation loop 200,the right flag will not have been set and control willpass to step 246. Instep 246, the A/D channelcorresponding to the right sensor will be polled tosample the right sensor signal in order to determinethe presence of a document along the right side of thelower guide plate 50. If a document is detected, thecontrol procedure proceeds to step 248 wherein theright sensor flag is set and the brightness of theright LED is set by theLED control circuit 306according to the opacity level selected instep 226and the control procedure proceeds to step 252. If,instep 246, a document is not detected along theright side of thelower guide plate 50, then thecontrol procedure proceeds directly to step 252 andthe right LED remains at the document detectionbrightness level. Off-width document detection occurswhen either the left sensor flag or right sensor flagis not set during the documentdata accumulation loop200. Once the right sensor flag is set instep 248,then subsequent execution ofstep 244 will cause thecontrol procedure to branch to step 250. Instep 250,the A/D channel corresponding to the right sensor issampled and accumulated in a register ofRAM 319 andthe control procedure passes to step 252. The opacitydata which is A/D converted from the rightsensor instep 250 typically exhibits considerablesmall-scale variation. In order to clearly delineatebetween a normal document and a more opaque document,such as a double document, the opacity data is preferably coarsely quantized into a few broad rangeswhich are numerically weighted so that the effect ofsmall-scale opacity variation is reduced.Discrimination between single and double documents canbe adequately accomplished using only four levels ofopacity data quantization. 
- Beginning atstep 252, a similar decisionsequence is conducted for the left document sensor aswas conducted for the right sensor in steps 244-250.If the left flag is found to be set instep 252, thenthe control procedure passes to step 258 wherein theleft sensor level is measured, quantized, andaccumulated. If, instep 252, the left flag is notfound to be set, then the control procedure proceedsto step 254. Instep 254, the left sensor is sampledand compared to a threshold to determine if a documentis present at the left side of the guide plate. If adocument is detected instep 254, then the controlprocedure proceeds to step 256 wherein the left flagis set. Also instep 256, theCPU 302 issues a signalto theLED control circuit 306 to increase thebrightness of theleft LED 83 to the opacity detectionlevel selected instep 226. Fromstep 256, thecontrol procedure passes to step 260. If, instep 254,a document was not detected at the left photosensor,then the control procedure passes directly to step260. 
- Instep 260, the A/D channel corresponding to theoutput of the magneticsignal conditioning circuit 110is sampled and accumulated. A control procedure thenpasses to step 262 wherein the A/D channel of thecenter sensor is again sampled to determine thepresence of a document. If a document is stilldetected by the center detector, then the controlprocedure returns to step 240 to continue thedataaccumulation loop 200. When, instep 262, a document is no longer detected, then thedata accumulation loop200 is finished, and the control procedure branches tostep 263 to begin a data evaluation phase of thecontrol procedure shown in FIG. 7C as indicated by thecontinuation label C. 
- Beginning atstep 263, the first of a series oftests is performed on the data accumulated during thedata accumulation phase. It is noted that dataevaluation tests can be made in other logicalsequences than that shown in FIG. 7B. Instep 263,the length count reached during thedata accumulationloop 200 is compared to a length threshold value. Ifthe length count is less than the length threshold,then the control procedure proceeds to step 265 inwhich the user is notified via thedisplay 16 of a"half" error. Fromstep 265, the control procedurepasses as indicated by the continuation label D2 tostep 267 shown in FIG. 7D wherein the run count isreset, and then it proceeds to step 269, wherein themotor is halted. Then, instep 271, the controlprocedure awaits a signal from the stacker photosensorthat the documents have been removed from the stacker.If, instep 263 of FIG. 7C, the length count exceedsthe lower threshold value, then the control procedureproceeds to step 264. 
- Atstep 264, the length count taken during thedata accumulation loop 200 is compared to a lengthupper limit value. If the length upper limit value isexceeded by the length count, then a messageindicating a chain error is shown by the displayand/or output to the RS-232 port instep 266. Fromstep 266, the control procedure passes as indicated bycontinuation label D2 to step 267 shown in FIG. 7Dwherein the run count is reset and then proceeds tostep 269, wherein the motor is halted. Then, instep271, the control procedure awaits a signal from the stacker photosensor that the documents have beenremoved from the stacker. If, instep 264 of FIG. 7C,the length upper limit is not exceeded, the controlprocedure proceeds to step 272, wherein the lengththreshold and upper limit are updated according to apredetermined adaptation factor. The upper and lowerlength limits are preferably adjusted between eachdocument to bracket the length of the most recentlymeasured document by a predetermined proportion. Suchproportional adaptation of the lower and upper lengthlimits allows the apparatus to continuously adapt tovariations of motor speed and/or minor variations indocument length. 
- After the document length limits are updated instep 272, the accumulated magnetic data is divided bythe length count to produce an average magnetic testvalue instep 274.
 The evaluation routine then proceeds to step 276wherein the right flag is checked. If the right flagwas not set during thedata accumulation loop 200,then the routine proceeds to step 278 wherein the useris informed, by an appropriate display, of an off-widthdocument error. Fromstep 278, the controlprocedure passes as indicated by continuation label D2passes to step 267 of FIG. 7D, wherein the run countis reset and then to step 269 wherein the motor ishalted. Then, instep 271, the control procedureawaits a signal from the stacker photosensor that thedocuments have been removed from the stacker. If, instep 276 of FIG. 7C, the right flag is found to beset, then the routine proceeds to check the left flaginstep 280 with similar results if the left flag isfound not to be set. If the left flag is set, thecontrol procedure proceeds to step 282.
 
- Instep 282, the contents of the left and rightopacity data accumulation registers are compared to their respective threshold values determined instep226. If the count on either of the opacity dataaccumulation registers exceeds the respectivethreshold value, then the user is informed of anerror, such as a double error, instep 284. Fromstep284, the control procedure passes as indicated bycontinuation label D2 to step 267 of FIG. 7D whereinthe run count is reset and then passes to step 269wherein the motor is halted. Then, instep 271, thecontrol procedure awaits a signal from the stackerphotosensor that the documents have been removed fromthe stacker. If instep 282 of FIG. 7C, the countsrelated to the accumulated opacity data registers arebelow the respective thresholds or if double detectionwas disabled instep 226, then the control procedureproceeds to step 286 of FIG. 7D as indicated bycontinuation label D1. 
- Instep 286, the evaluation routine determineswhether counterfeit suspect testing (CFS) is enabled.If CFS detection is enabled, then the controlprocedure proceeds to step 288. Instep 288, theaverage magnetic test value determined instep 274 iscompared to a predetermined threshold value. If theaverage magnetic test value does not exceed thepredetermined threshold, the user is provided with anindication of a counterfeit suspect error in step 290and the motor is halted. Since the document transportmechanism cannot be instantaneously stopped, both thecounterfeit suspect and the next document in the inputstack, if any, are delivered to the stacker as themotor is halted in step 290. The control procedurethen passes to step 291 in which normal operation isresumed by removal of the counterfeit suspect and thenext document from the stacker, placing the nextdocument back into the hopper, and pressing the CONTkey. After the CONT key is pressed instep 291, the control procedure returns to step 228 of FIG. 7A asindicated by continuation label A and thus bypassescounting either the counterfeit suspect or thesubsequent document delivered to the stacker plate. 
- If instep 286 it was found that CFS detectionwas disabled or if, instep 288, the CFS threshold wasexceeded, then the control procedure proceeds to step292. 
- Instep 292, the run count and the stacker countare incremented. The stacker count is used to ensurethat the capacity of the stacker is not exceeded. Thestacker count is reset whenever the stacked documentsare removed from the stacker. The run count is thenumber of documents that have been detected since themost recent execution ofstep 226 of FIG. 7A. 
- Proceeding fromstep 292 to step 294, a branch ismade to step 296 if the apparatus is set to run inbatch mode. If, instep 296, the count of documentshas reached the specified batch size, then the user isprovided with an indication of a complete batch instep 298. Since the imminent completion of the batchhad been detected instep 233, by the time that step298 is reached, the motor has sufficiently slowed sothat the present document is the final documentdelivered to the stacker plate. Fromstep 298, thecontrol procedure continues to step 271 and waits forremoval of the batch from the stacker plate. 
- If, in step 294, the apparatus was determined notto be operating in batch mode or if, instep 296,batch completion was not detected, then the controlprocedure passes to step 295 wherein the stacker countis tested to determine whether the stacker plate isfilled to its capacity. If the stacker plate is notdetermined instep 295 to be full, then the controlprocedure returns to step 228 in order to prepare toaccumulate data for the next document. If the stacker plate is full, the control procedure passes to step297 wherein an appropriate indication is made that thestacker is full. Fromstep 297, the control procedurepasses to step 271 and awaits removal of documentsfrom the stacker. 
- Step 271 is reached whenever a batch iscompleted, the stacker is full, or an error other thana counterfeit suspect has been detected. Duringstep271, the user (or the controlling host) is informed ofthe status of the apparatus. In order to clear theerror or to otherwise resume counting, the documentsmust be removed from the stacker. In contrast to thedetection of counterfeit suspects, the detection ofother errors also causes uncertainty in the count.For example, ifstep 271 has been reached as theresult of a double error, the operator cannot becertain whether to remove two or three documents fromthe hopper in order to resume normal counting. Thedouble error may have been generated by thesimultaneous passage of two documents or by thepassage of a single document of unusual opacity. Inorder to avoid corruption of the integrity of theaccumulated counts and totals, detection of errorsother than counterfeit suspect errors causes the runcount to be reset and the operator must remove all ofthe documents from the stacker plate atstep 271 andeither return them to the hopper or terminatecounting. Similarly, the other two conditions whichmay lead to step 271 - completion of a batch or a fullstacker - require removal of all of the documents fromthe stacker plate. When the stacker photosensorindicates that the documents have been removed fromthe stacker plate, operation resumes and the controlprocedure passes to step 273. 
- Step 273 is a procedure to ensure that thedocument counter is not left in a "hidden document" condition. A hidden document is a document which mayhave been the last document in the hopper and was fedfrom the hopper but not delivered to the stackerduring the motor halting operation which precededstep271. Since such a document would not be visible tothe operator, and there would be no other documentsremaining in the hopper, a test is made instep 273 todetermine whether the hopper is empty as determined bythe hopper photosensor. If the hopper is empty, thenthe motor is restarted and allowed to run for one idletimeout interval so that any hidden document will bedelivered to the stacker plate. Then, instep 275,the stacker plate count is reset since all documentshave been removed from the stacker plate, and thecontrol procedure returns to step 226. 
- Portions of the foregoing control procedurerelative to the detection of counterfeit suspectdocuments can be modified in order to carry out thealternative method for detecting counterfeit suspectdocuments which was mentioned in connection with thesignal conditioning circuit 110a. In the modifiedarrangement for the control procedure for practicingthe alternative method, the CPU accumulates (i) afirst count of consecutive sampled values of theconditioned magnetic detection signal that exceed afirst predetermined reference value and (ii) a secondcount of sampled values that exceed a secondpredetermined reference value. These first and secondaccumulated counts are each compared with one or morereference values associated with a genuine document inorder to verify each document. Specifically, thealternative procedure utilizes counting registers foraccumulating the count and a flag register forindicating whether a document has passed or failed theverification comparison. These registers areinitially cleared prior to the detection interval insteps 228 and 230 of the control procedure. 
- In the alternative document verification method,step 260 of the control procedure in FIG. 7B isreplaced by a procedure shown in FIG. 7E and labeled260a. 
- Referring now to FIG. 7E, the A/D converter isoperated by the controller instep 400 to obtain asampled value of the conditioned signal from theconditioning circuit 110a. Then, instep 402, thecontroller compares the sampled value obtained instep400 with a predetermined reference value, VL,representing a minimum threshold value. If thesampled value does not exceed VL, then the controlprocedure branches to step 418, wherein the countingregister that is used to count the consecutive samplesabove VL is reset. The controller then proceeds tostep 414, which is explained later herein. 
- If, instep 402, the sampled value is determinedto exceed VL, then the controller proceeds to step404. Instep 404, the counting register formaintaining the count of consecutive samples exceedingVL is incremented. This register is hereinafterreferred to as the "low count" register. Then, thecontroller proceeds to step 406. 
- Instep 406 the value contained within the lowcount register is compared to a predeterminedreference value corresponding to the minimum number ofconsecutive samples in excess of VL that are requiredin order to identify a document as genuine. If theaccumulated value of the low count register exceedsthe predetermined reference value, then the controlprocedure proceeds to step 408, wherein a flagregister is set to indicate that the requisite minimumcounting value has been exceeded and that theverification test has been passed by the documentrelative to the value of the low count register. The controller then proceeds to step 410. 
- If, instep 406, the value of the low countregister does not exceed the requisite minimum, thenthe controller proceeds to step 410. 
- Instep 410, the sampled value obtained instep400 is compared with a predetermined limit value, VH.If the sampled value is found to exceed VH, then thecontroller proceeds to step 412, wherein anotherregister, the "high count" register is incremented.The controller then proceeds to step 414. 
- If, instep 410, the sampled value is not foundto exceed VH, then the controller proceeds to step414. 
- Instep 414, the value accumulated within thehigh count register is compared with a predeterminedreference or maximum value above which a document isto be identified as a counterfeit suspect document.If the contents of the high count register aredetermined to exceed the predetermined maximum value,then the controller proceeds to step 416, wherein thepass flag register is set to indicate a counterfeitsuspect document. The controller then proceeds tostep 262 of the control procedure shown in FIG. 7B.If, instep 414, the value accumulated within the highcount register does not exceed the predeterminedmaximum value, then the controller proceeds fromstep414 to step 262 of FIG. 7B, and execution continues aspreviously described herein. 
- As can be appreciated relative to the procedureshown in FIG. 7E, the pass flag register indicatessuccessful verification of a genuine document. If thepass flag register is not set, then such conditionindicates that the document is a counterfeit suspectdocument. A counterfeit document is indicated if aninsufficient number of consecutive sampled values wereabove the low threshold VL or if a predetermined number of sampled values were above the high limitvalue, VH, during the document detection interval. Itis noted that these two criteria can be implemented ina combined manner as has been described or,alternatively, either of the two verification criteriacan be used singly, if desired. 
- In the practice of the alternative documentverification method, it is noted that the counterfeitdocument detection step 288 described in connectionwith FIG. 7D is modified to consist essentially ofdetermining whether the pass flag indicates detectionof a counterfeit suspect document. 
- From the foregoing disclosure and theaccompanying drawings, it can be seen that the presentinvention provides certain novel and useful featuresthat will be apparent to those skilled in thepertinent art. In particular, there has beendescribed an improved document counting and batchingapparatus wherein optical and magnetic verificationtests are conducted according to programmable digitalthresholding of sensor signals and wherein reliabilityis enhanced by reducing the influence of electricalnoise upon sensor signals. 
- The terms and expressions which have beenemployed are used as terms of description and not oflimitation and there is no intention in the use ofsuch terms and expressions of excluding anyequivalents of the features and elements shown anddescribed, or portions thereof, but it is recognizedthat various modifications are possible within thescope of the invention as claimed.