Method of correcting coin data and apparatus for inspecting coins

Abstract: A method of correcting coin data and an apparatus for inspecting coins are disclosed. Determination data is formed on the basis of data read out from a permanent memory, and authenticity and determination of coins are determined on the basis of the readout data. At the same time, maximum and minimum values corresponding to physical characteristics of coins are obtained. When the number of stored coins reaches a predetermined number or an operating time reaches a predetermined duration, the obtained values are updated. When such updating is performed a predetermined number of times, a standard deviation is also updated.

Description: Background of the Invention The present invention relates to a method of correcting coin data and an apparatus for inspecting coins, wherein data for discriminating authenticity and denominations of coins inserted in an automatic vending machine, a public telephone booth, and the like is corrected. An inspection apparatus of this type is disclosed in U.S.P. NO. 3,918,565. In this apparatus, physical characteristics, such as the thickness, diameter and the like of a coin are detected by detectors as electrical signals. Upper and lower limit values corresponding to detection outputs of the respective physical characteristics are stored in a memory. The upper and lower limit values are compared with the outputs from the detectors to determine authenticity and denomination of coins. All data corresponding to all denominations (types) of coins and their physical characteristics and the corresponding upper and lower limit values must be read out from a memory, and detection outputs corresponding to the numbers of denominations and physical characteristics must be compared with the upper and lower limit values. For this reason, high-speed determination operations cannot be performed, and power consumption is increased. In addition, if these operations are performed by a processor, a program is complicated and a time margin for other control operations is decreased. Since high-speed determination operations cannot be performed, a determination time is prolonged. Therefore, a coin insertion time interval is limited, and design of coin paths is also limited. In order to solve the above problems, an arrangement disclosed in U.S.P. NO. 4,660,705 is proposed. In this arrangement, physical characteristic determination signals for coins are stored at bit positions corresponding to the denominations at addresses of a memory. The physical characteristics of coins are detected by detectors as electrical signals. These detection outputs are converted into digital signals by an A/D converter, and the digital signals are used as memory address signals, thereby using the contents of the memory as authenticity determination signals. The conventional methods described above, however, must correct sensor outputs upon changes in environmental changes, and deterioration over time must also be corrected to result in a complex correction circuit. In addition, initialization must be performed at each installation site, resulting in poor operability. Other inspection apparatus comprising self tuning mecanism are disclosed in EP-A-0155126 and WO-A-8001963. The apparatus described in EP-A-0155126 comprises at least one sensor producing an output signal indicative of a parameter characteristic of the tested coins. A programmed microprocessor, which stores acceptance limits, interrogates the sensor, and determines whether the output signal from the coin sensor is indicative of a valid coin, stores a signal based on the output signal for each valid coin, calculates a statistical function based on the stored signal and finally computes and stores new acceptance limits based on the stored signals for a predetermined number of previously accepted coins. For example, this acceptance limits are determined using a running average of the parameter (statistical function) plus or minus a stored, preestablished constant or percentage of the running average. WO-A-8001963 describes a device for discrimination of objets (for example coins) to be inspected. The data generated by an objet inserted in the device and representing at least one physical characteristic is compared by a decision logic with limit values contained in a memory, and the decision logic decides whether the object must be accepted or not. Data corresponding to accepted objects is processed in a computer, and is further used, with other stored data, so as to calculate a new mean value ( x ) and a new quadratic means ( x 2 ), and to determine corrected limit values. Summary of the Invention It is, therefore, a principal object of the present invention to provide a method of correcting coin data and an apparatus for inspecting coins, wherein environmental changes such as a change in coin discrimination path, a change in sensor characteristic, a change in coin, and a change in sensor circuit performance can be automatically compensated. According to an aspect of the present invention, there is provided a method of correcting coin data used in a coin inspecting apparatus as set out in claim 1. According to another aspect of the present invention, there is provided an apparatus for inspecting coins as set out in claim 10. According to the present invention, determination data is formed on the basis of data read out from a permanent memory, and coins are determined on the basis of the readout data. At the same time, maximum and minimum values corresponding to physical characteristics of coins are obtained. When the number of stored coins reaches a predetermined number or an operating time reaches a predetermined duration, the obtained values are updated. In addition, when such updating is performed a predetermined number of times, standard deviations are also updated. Brief Description of the Drawings Fig. 1 is a flow chart showing a main routine according to an embodiment of the present invention; Figs. 2 and 3 are flow charts showing subroutines of the flow chart in Fig. 1; Fig. 4 is a block diagram showing the embodiment to which the present invention is embodied; Fig. 5 is a data table of a memory; and Figs. 6A to 6F are views showing states of changes in authentic coin determination data. Description of the Preferred Embodiment Fig. 4 shows an arrangement of an apparatus for inspecting coins according to an embodiment of the present invention. Oscillation coils L 1 and L 2 oppose reception coils L 3 and L 4 through a coin path 1. An oscillator 2 is connected to the oscillation coils L 1 and L 2 . The oscillator 2 forms a signal having a predetermined frequency. A magnetic field formed by the oscillation coils L 1 and L 2 in response to the signal from the oscillator 2 is received by the reception (oscillation) coils L 3 and L 4 . Detectors 3a and 3b which respectively consist of a light-emitting element and a light-receiving element are arranged on a coin slot side of the path 1 to detect insertion of a coin and supplies a start command to the respective components. The reception coils L 3 and L 4 are connected to inputs of amplifiers 4 and 5, respectively. Inputs to the oscillator 2 and the amplifiers 4 and 5 are detected by detectors 6 to 8, respectively. One of the detected signals is selected by a multiplexer 9. The signal selected by the multiplexer 9 is supplied to an A/D converter 10. The selected signal can be sequentially converted into an 8-bit digital signal. The 8-bit digital signal is supplied to a CPU 11. For this reason, when a coin inserted into the path 1 passes along the path 1, outputs from the oscillator 2 and the amplifiers 4 and 5 are changed in accordance with its material, thickness, and diameter. Outputs from the detectors 6 to 8 are changed accordingly. Of signals output through the A/D converter 10, a peak value of a signal corresponding to the detector 6 is discriminated by the CPU 11, thereby obtaining data representing the material of the coin. A peak value of a signal corresponding to the detector 7 is similarly discriminated to obtain data representing the thickness of the coin. A value at a crossing point of the changes in outputs from the detectors 7 and 8 is similarly discriminated to obtain data representing the diameter of the coin. Detection of these physical characteristics is disclosed in detail in "Coin Discrimination Apparatus" (Japanese Patent Application No. 59-76620) filed by the present applicant. A detection output from a temperature sensor 12 arranged near the coils L 1 to L 4 is also supplied to the multiplexer 9 as needed. The respective inputs to the multiplexer 9 are sequentially and repetitively selected by a selection signal SEL from the CPU 11. The selected signal is supplied to the CPU 11 through the A/D converter 10. The CPU 11 is connected to an input/output interface 13 and a ROM 14 through a single data bus 15. Denomination signals C1 to C4 which represent coin determination results are input to the CPU 11 through the interface 13. The contents of the ROM 14 are read out by an address designation signal supplied from the CPU 11 through an address bus 16. Coin physical characteristic determination signals are stored together with programs in the ROM 14. A RAM 17 backed up by a battery 18 is also arranged. The CPU 11 executes the programs stored in the ROM 14 and accesses necessary data with respect to the RAM 17, thereby performing predetermined operations to be described later. Fig. 5 shows contents of the ROM 14 and the contents of a denomination data area allocated in the RAM 17. In the ROM 14, addresses 800 (hexadecimal notation) to 8FF are assigned to a material block 21; addresses 900 to 9FF, to a thickness block 22; and addresses A00 to AFF, to a diameter block 23. Bits B 7 to B 5 of bits B 7 to B 0 correspond to denominations A to C of coins. A logic "0" signal is stored at an address represented by each physical characteristic detection data. A logic "0" signal is stored at an address represented by detection data of each physical characteristic allowance range. Since the material and thickness data partially overlap due to the allowance regardless of coin denominations A to C in the blocks 21 and 22, logic "0" signals are stored in the blocks 21 and 22 in the same manner as described above. The diameter allowances of the coin denominations in the block 23 are the same, so that logic "0" signals are stored in the same manner as described above. Of the output data from the A/D converter 10 which correspond to the detection outputs from the coils L 1 to L 4 used as the detectors, the material data obtained by the CPU 11 is used to designate a read address of the block 21. When the diameter data is used to designate a read address of the block 23, the corresponding contents are read out from the ROM 14 and are sent to the CPU 11. If the output from the A/D converter 10 is given as an 8-bit signal, the two lower hexadecimal digits of addresses 800 to AFF are designated, and upper hexadecimal digits 8, 9, and A correspond to the blocks 21 to 23, respectively. Therefore, the CPU 11 adds predetermined information to this address data, and the resultant data is sequentially sent through the address bus 16. For example, if the material data, the thickness data, and the diameter data are given as D5 ("11010101"), 9E ("10011110"), and E7 ("11100111"), respectively, addresses 8D5, 99E, and AE7 of the blocks 21, 22, and 23 are accessed, so that the data contents "01011111", "00111111", and "00111111" are sequentially read out, respectively. The content of a denomination data area 24 is cleared to all "0"s. This updated content is logically ORed with the content of the block 21. The OR product is then written in the denomination data area 24. This OR product is then ORed again with the content of the block 22. The current content of the denomination data area 24 is updated by this resultant OR product. Similarly, the current content of the denomination data area 24 is logically ORed with the content of the block 23, and the resultant product is stored in the denomination data area 24. In the above case, bits B 7 of all the blocks 21 to 23 are "0"s, respectively, so that bit B 7 of the denomination data area 24 is set to be logic "0" accordingly. Therefore, each physical characteristic is determined to be allowable as one for the denomination A. When the denomination signals C 1 to C 4 are output through a decoder or the like, a denomination of a coin inserted through a coin slot can be immediately detected. If the content "10111111" shown in parentheses is read out from the block 22 due to wrong addressing, the content of the denomination data area 24 is updated to "11111111". Logic "0" disappears from the content of the denomination data area 24, so that the inserted coin is a counterfeit coin, thus indicating "NG", i.e., a message representing that the inserted coin cannot be allowed. Fig. 1 is a flow chart showing the above operations of the CPU 11. When the program starts or runs, a backup state of the RAM 17 is checked in step 100 to determine whether the RAM backup is in the past. This can be determined such that a key word is written in a RAM and checked whether it is accurately read out at the start of the program. If YES in step 100, there is a high possibility of destruction of the determination data. Coin data addition memories (Σx20 and Σx100), square addition memory (Σx 2 ), and coin count memories (n20 and n100) which determine authentic ones of the coins inserted in the coin slot are cleared in step 101. In step 102, an average value x and a standard deviation a as data associated with an authentic coin are read out from the ROM 14. The readout data are stored in the RAM 17 in step 103. Thereafter, RAM determination data, i.e., maximum and minimum values x ±3σ are obtained by using the readout data x and σ in step 104, thereby setting the determination data. It should be noted that the operation in step 104 is actually executed in a subroutine in Fig. 2, and a description of the subroutine will be made after the description of Fig. 1 is completed. When formation of the RAM determination data is completed in step 104, coin insertion is determined in step 105. In step 106, data (i.e., material, diameter, and thickness) of an inserted coin are measured. It is then determined in step 107 whether the inserted coin is an authentic coin. If YES in step 107, the authentic coin is stored in step 108. In step 109, the addition memories (Σx20 and Σx100) are incremented in step 109. A squared value of the measured data is added to the square addition memories (Σx 2 and Σ(x100) 2 ). The coin count memories (n20 and n100) are incremented by one each. It is then determined in step 110 whether the number of authentic coins is 100. At this time, the number of authentic coins does not reach 100, and NO is obtained in step 110. When the number of authentic coins reaches 20, YES is obtained in step 111. An average value x 20 is obtained from the addition memory Σx20 and the coin count memory n20 in step 112. A new average value x a is obtained from the average value data x stored in the RAM 17 and the average value x 20 of 20 authentic coins in step 113. The average value x of the RAM 17 is updated to the value x a in step 114. The RAM determined data, i.e., the average value x a is read out from the RAM 17 and the standard deviation a is read out from the RAM 17. By using these readout data, determination data x a ± 3σ is obtained by the subroutine in Fig. 2, thereby constituting a determination data table. Therefore, the authentic coin range is shifted to a range suitable for the inserted authentic coins. However, the range width is kept unchanged. When this processing is completed, the coin count memory n20 and the average value memory Σx20 are cleared in step 116, and the flow returns to step 105. When additional coins are inserted through the coin slot and the number of authentic coins reaches 100, YES is obtained in step 110. An average value x 100 is obtained by data from the addition memory Σx100 and the coin count memory n100 in step 118. In step 119, a new standard deviation σ a is obtained by data from the square addition memory Σx 2 , the addition memory x100, and the coin count memory n100. The resultant value is limited to fall within a predetermined range, e.g., the range of 1 to 5 so as to prevent a discrimination error in steps 120 to 123. In step 124, the standard deviation and the average value in the RAM 17 are updated to the values obtained in steps 118 and 119, respectively. By using the new data, the RAM determination data, i.e., x 100 ±3σ a are obtained in step 125. A new determination data table is formed by the subroutine in Fig. 2. Thereafter, the coin count memory n100, the addition memory εx100, and the square addition memory Σx 2 are cleared in step 126. In step 116, the memories n20 and Σx20 are cleared, and the flow then returns to step 105. Fig. 2 is a subroutine for forming the RAM determination data in steps 104, 115, and 125. The maximum value x +3σ and the minimum value x -3σ are calculated in step 150. The calculated maximum and minimum values are stored in the RAM in step 151. A RAM determination data table is formed by using the maximum and minimum values in step 152. Step 152 is executed by a subroutine shown in Fig. 3. Fig. 3 is a flow chart for forming the RAM determination table represented by the blocks 21 to 23 (left side of Fig. 5). In step 200, a sum of the minimum value and a bias address is set as a minimum table address. The bias addresses are the most significant digits "8", "9", and "A" in the blocks 21, 22, and 23 in Fig. 5, respectively. A sum of the maximum value and a bias address is set as a maximum table address in step 201. In step 202, a coin denomination bit position is set. That is, one of the positions of bits 5, 6, and 7 in Fig. 5, i.e., any one of bits for denominations A, B, and C is designated. In step 203, the determination data table address is set to be, e.g., address 800 for the block 21. It is determined in step 204 whether the current determination data table address is equal to or larger than the minimum data table address and is equal to or smaller than the maximum table address. This is performed to determine an allowable address range for authentic coin data. If NO in step 204, the bit of interest of the determination data table address is set to be "1" in step 206. Memory areas at addresses 800, 900, and A00 of the blocks 21, 22, and 23 do not represent authentic coin ranges. "1"s are written at bits 5 to 7 in each of the blocks 21, 22, and 23. However, if the bit of interest at address 800 is bit 7, only this bit is set at logic "1" because the address is the table start address. A value obtained by adding the determination data table address by one is given as a new determination data address in step 207. In step 208, it is determined whether the new determination data table address is a table end. At this moment, the current address is obtained by adding one to the table start address and is not a table end address. NO is obtained in step 208, and the flow then returns to step 204. Decision in step 204 is performed to repeat the same operations as described above. If YES in step 204, the bit of interest of the determination data table is set to "0" in step 205. For example, bit 7 of the block 21 at address 801 is set to "0". The loop of steps 204 to 208 is repeated until the determination data table address coincides the table end address, e.g., address 8FF for the block 21. At this time, since YES is obtained in step 208, the flow advances to step 209. It is determined in step 209 whether operations for all denominations are completed. In this case, only the operation for one denomination, i.e., for the block 21 is completed, and the flow returns to step 200. The same operation as described above is repeated. Data for the next coin denomination, e.g., the block 22 is written. When processing progresses, operations for all coin denominations are completed. YES is obtained in step 209, and this subroutine is completed. The flow returns to step 152 in Fig. 2. The subroutine in Fig. 2 is also ended. At this time, the flow returns to step 104, 115 or 125 (Fig. 1) at which an interrupt is formed. Figs. 6A to 6F show changes in authentic coin ranges when processing by the method of the present invention is performed. Fig. 6A shows an initial state, Fig. 6B shows a state in which the number of coins determined to be authentic coins reaches 20, Fig. 6C shows a state in which 20 additional authentic coins are increased, so that a total number of authentic coins reaches 40, Fig. 6D shows a state in which a total number of authentic coins reaches 60, Fig. 6E shows a state in which a total number of authentic coins reaches 80, and Fig. 6F shows a state in which a total number of authentic coins reaches 100. Letters a and b respectively in Figs. 6D and 6E represent returned coins. The authentic coins are counted independently of the number of calls. The RAM determination data are formed in steps 104, 115, and 125 and are addressed in accordance with the material block 21, the thickness block 22, and the diameter block 23 in Fig. 5. For this reason, the bias addresses are respectively added to the data obtained in steps 104, 115, and 125 and are assigned to predetermined address locations. In the above embodiment, the predetermined number is 20, and an integer of an integer multiple of the predetermined number is 5. However, these values are not limited to 20 and 5 times. For example, an integer of a multiple may be replaced with a noninteger, e.g., 5.3. The variation range is given by 3σ but may be replaced with 4σ. In addition, an object to be stored is not limited to a coin. The predetermined number may be the predetermined number of coins or calls. In addition, the predetermined number may be replaced with a predetermined time. Updating of the average value and the standard deviation may be performed every predetermined number of coins. Alternatively, this method may be applied to the upper/lower limit value scheme (Mars scheme) in addition to the determination table scheme. According to the present invention as has been described above, the determination data is updated in accordance with the data of the stored objects every time the number of stored objects reaches a predetermined number or the operation time of the machine reaches a predetermined duration. Therefore, the environmental changes such as a change in discrimination path, a change in sensor, a change in object, and a change in sensor circuit can be automatically compensated.

Claims: A method for correcting coin data used in a coin inspecting apparatus in which data representing one of physical characteristics of an inserted coin is generated (105, 106) and used to determine the authenticity and the denomination of the inserted coin, in said method : maximum and minimum values for said physical characteristic representing authentic coins are obtained (150) from reference data consisting of a reference average value ( x ) and a standard deviation (σ) for said physical characteristic, a determination data table is constituted by using said maximum and minimum values, the authenticity and the denomination of the inserted coin is determined on the basis of the maximum and minimum values, by using said generated data which is digital data, in order to designate a read address of the determination data table, the data content of this address being read out from the table and used to determine the authenticity and the denomination of the coin, said generated data is stored for each inserted coin determined to be authentic (108), each time a first predetermined measurement parameter is detected (111) : a first average value ( x 20 ) is calculated (112) from said stored data, a new average value ( x a ) is calculated (113) from said first average value ( x 20 ) calculated from said stored data and said reference average value ( x ), said reference average value ( x ) is updated (114) to said new average value ( x a ), said maximum and minimum values are corrected (115, 150), by using said new average value ( x a ) and said standard deviation (σ), and are further used for constituting a determination data table (115, 152) which is used for determining the authenticity and the denomination of coins inserted in the apparatus after the first predetermined measurement parameter is detected, each time a second predetermined measurement parameter, which is a multiple of said first predetermined measurement parameter, is detected (110), a second average value ( x 100 ) is calculated (118) from said stored data, a new standard deviation (σ a ) is calculated (119) from said stored data, said standard deviation (σ) is updated (124) to said new standard deviation (σ a ) and said reference average value ( x ) is updated (124) to said second average value ( x 100 ), said maximum value and minimum value are corrected, by using said second average value ( x 100 ) and said new standard deviation (σ a ) (125, 150), and are further used for constituting a determination data table (125, 152) which is used for determining the authenticity and the denomination of the coins inserted in the apparatus after said second predetermined measurement parameter is detected. A method according to Claim 1, characterised in that said reference data, prior to the first detection of said first predetermined measurement parameter, is data prestored in a memory as initial determination data (102, 103). A method according to Claim 1 or Claim 2, characterised in that said first predetermined measurement parameter is a number of inserted coins determined to be authentic (111). A method according to Claim 1 or Claim 2, characterised in that said first predetermined measurement parameter is an operating time of said coin inspecting apparatus. A method according to any one of Claims 1 to 4, characterised in that the second predetermined measurement parameter is a predetermined integer multiple of the first predetermined measurement parameter. A method according to any one of Claims 1 to 5, characterised in that the new standard deviation (σ a ) is limited to a predetermined range (120, 121, 122, 123). A method according to any one of Claims 1 to 6, characterised in that said determination data table is constituted by : obtaining maximum and minimum addresses for said table by adding a predetermined bias address to the maximum and minimum values, respectively (200, 201) and forming said determination data table by setting a bit logic of a predetermined bit position to be an allowable bit between the maximum and minimum addresses (203, ... 208). A method according to Claim 7, characterised in that the determination data table is formed by generating the maximum and minimum addresses from the maximum and minimum values corresponding to each denomination of the coins being inspected so that the allowable bit at each bit position corresponding to an authentic coin for each denomination of the coins is set (202, 209). A method according to Claim 7 or Claim 8, characterised in that, said generated data representing several physical characteristics, the determination data table is formed in units of physical characteristics (21, 22, 23) by adding different bias addresses to the maximum and minimum values corresponding to said several physical characteristics of the coin. An apparatus for inspecting coins comprising detecting means (6, 7, 8) for detecting an electrical signal representing one of the physical characteristics of an inserted coin ; converting means (10) for transforming this electrical signal into digital data ; determining means for determining the authenticity and the denomination of the inserted coin on the basis of maximum and minimum values for said physical characterictic representing authentic coins ; storing means (108) for storing said digital data for each inserted coin determined to be authentic ; new average value ( x a ) calculating means for calculating from said stored data a new average value ( x a ) to be used for correcting said maximum and minimum values, characterised in that, it further comprises : maximum/minimum value calculating means (150) for obtaining said maximum and minimum values from reference data consisting of a reference average value ( x ) and a standard deviation (σ) of said physical characteristic ; maximum/minimum value correcting means (115, 125) for correcting said maximum and minimum values, on the basis of at least one of the updated reference average value ( x a , x 100 ) and the updated standard deviation (σ a ) ; a determination data table, accessed by said digital data, for storing data associated with the authentic coin as a result of the determination made by said determining means, constituting means (152) for constituting said determination data table from the maximum and minimum values, first average value ( x 20 ) calculating means (112) for calculating from said stored data, each time a first predetermined measurement parameter is detected, a first average value ( x 20 ) to be used consequently by said new average value ( x a ) calculating means (113) for calculating said new average value ( x a ) from said first average value ( x 20 ) and said reference average value ( x ) ; first updating means (114) for storing consequently said new average value ( x a ) as said reference average value ( x ) ; second average value ( x 100 ) calculating means (118) for calculating from said stored data, each time a second predetermined measurement parameter, which is a multiple of said first predetermined measurement parameter, is detected (110), a second average value ( x 100 ) ; new standard deviation calculating means (119) for calculating from said stored data a new standard deviation (σ a ) each time said second predetermined measurement parameter is detected ; second updating means (124) for storing consequently said new standard deviation (σ a ) as said standard deviation (σ) and said second average value ( x 100 ) as said reference average value. An apparatus according to Claim 10, further comprising forming means for obtaining maximum and minimum addresses of said table by adding a predetermined bias address to the maximum and minimum values respectively (200, 201), and for constituting said determination data table by setting a bit logic of a predetermined bit position to be an allowable bit between the maximum and minimum addresses (203, ..., 208).

Inventors: KAI OSAMU, KAI, OSAMU, KAI, OSAMU C/O TAMURA ELECTRIC WORKS, LTD.
Applicants: TAMURA ELECTRIC WORKS LTD, TAMURA ELECTRIC WORKS, LTD.
Application year: 1989
Main classification: G07F3
IPC codes: G07D5