APP下载

Design of intelligent distinguishing system for slot machine based on PLC

2015-03-29WANGChunchangGUQiangANXiaohong

关键词:投币牛乳酪蛋白

WANG Chun-chang, GU Qiang, AN Xiao-hong

(College of Mechatronic Engineering, North University of China, Taiyuan 030051, China)



Design of intelligent distinguishing system for slot machine based on PLC

WANG Chun-chang, GU Qiang, AN Xiao-hong

(CollegeofMechatronicEngineering,NorthUniversityofChina,Taiyuan030051,China)

Due to the emergence of a large number of counterfeit notes and incomplete coins in the slot machine of self-service bus, to improve the automization of intelligent slot machine, based on multi-sensor testing technology, using programming logic controller (PLC) as the core of the whole system, the PLC hardware design and software design are accomplished for the first time to detect the counterfeit notes and coins. The system was tested by many groups of experiments. The results show that the system has reliable recognition rate, good flexibility and stability, reaching the accuracy of 97%.

intelligent slot machine; distinguishing system; programming logic controller (PLC)

As a reflection of city civilization, a bus should be a place where people exemplify virtue. However, there are always some freeloaders throwing worn notes, counterfeit notes or coins, or game currency into the money box. For example, Yueyang, a medium city in China, has received lots of spurious coins and notes nearly 60 000 yuan within half a year.

Taking self-service bus No.1 in Taiyuan for example, this paper presents the basic principle, hardware and software design of intelligent distinguishing system for slot machine based on programmable logic controller (PLC)[1-5]. According to the data collected by external sensors, the system can automatically control the pass in and out of paper currency and coins by PLC program. It has been proved that the system has high automatization, good stability and high accuracy. The paper focuses on detecting one yuan coin because statistics show that the false one yuan banknotes are rare and what more found are incomplete banknotes. Therefore, passengers must fully expand one yuan banknote when it is thrown into the money box[6-7].

1 Distinguishing system principle

The distinguishing system uses dual eddy current sensors to identify the coins, and the working principle is shown in Fig.1.

Fig.1 Detection schematic of dual eddy current sensors

The system works by the synergistic recognition of coilL1, which is a high frequency and reflection induction coil, and coilsL2andL3, which are low frequency and transmission induction coils. The former (L1) is used to detect the thickness of coin, and the latter (L2andL3) is used to detect the material of coin.

L2is a low frequency transmission coil with fixed voltageU1and frequency. Affected byL2,L3induces voltageU2, which has the same frequency asU1. When a coin passes the induction region, because the eddy current loss betweenL2andL3varies with the thickness of coin, the amplitude ofU2will change accordingly. Thus the high frequency coilL1generates high frequency alternating magnetic field. Since the distance between the coin and coilL1remains unchanged, the oscillation frequency of coilL1is only related to the material of the coin. Once its frequcney being tested, the coin material can be determined. Before the frequency signal from high frequency coil and the voltage signal from low frequency coil enter the PLC system, it is necessary to convert them into an unified standard signal(treated as a 0-10 V unipolar signal), and then they are transmitted to the analog module.

Infrared penetration technology is widely used to detect 100 or 50 yuan notes. Considering the cost and space, it is not suitable for detecting one yuan note. In this paper, distinguishing paper money takes advantage of infrared detection technology. Two pairs of infrared emitter tubes are put at the bottom of the paper money entrance and the width of them is slightly less than that of one yuan(only for one yuan note). Only the paper money completely obscures two pairs of infrared emitter tubes, can the output signal be changed from high level (5 V) to low level. This can prevent the entrance of the paper money with serious defection and passengers need to expand the paper fully.

2 Distinguishing system features

The existing distinguishing systems mostly use single chip microcomputer to control the system. This paper uses PLC for the first time by programming on a chip. The single chip microcomputer control system is based on combination of multiple modules, while PLC control system is likely a whole system. What is more important is that when slot machine works in complex situation, the distinguishing system based on single chip microcomputer can be influenced by external factors, so that some errors will occur. PLC distinguishing system has strong anti-interference ability, therefore it is suitable for harsh environment and can improve detection accuracy.

3 Hardware design

3.1 System requirements

Specific control requirements of the system are as follows:

1) Only throw one yuan coin and note into the intelligent slot machine and the notes needs to be expanded.

2) The system is scarcely affected by outside temperature and it can act as an ordinary coin slot during the power outage.

3) The system has perfect protection and alarm functions, high cost-performance ratio and can operate automatically and reliably.

3.2 Choices of hardware

1) High frequency and low frequency coils

According to the system requirements, the inductance of high frequency coilL1without load is 150 μH. It uses 10 mm magnetic core, 0.3 mm enameled wire, 14 kHz excitation frequency and 220 kHz working frequency. The inductance of low frequency coil without load is 400 μH, and it uses 20 mm framework and 0.5 mm enameled wire.

2) DC motor

Four DC motors with 12 V voltage rating and 2.2 W power rating are used to drive the genuine or false coin and paper money to appropriate channel.

3) PLC

PLC synthesizes communication technology, automatic control technology, computer technology and so on. As the core of the whole intelligent distinguishing system, PLC collects the input signal from sensors, transforms the signals and finally achieves the detection by means of appropriate calculations of the real signal preserved in PLC. The system uses Siemens S7-200PLC, DC/DC/relay, CPU224. There are three analog input signals attached to the expansion module EM235. S7-200PLC has rich instruction set, good reliability, flexible and simple programming, convenient repair, strong real-time control ability and communication ability, therefore, it is suitable for the detection. What is most important is it has high cost-performance ratio.

4 Software design

4.1 I/O allocation table

Before programming, the distribution of input and output needs to be determined first. The system uses six digital inputs, three analog inputs and ten digital outputs. Digital inputs are from I0.0 to I0.5, analog inputs are from AI0.0 to AI0.2, and digital outputs are from I0.0 to I1.1.CPU224 has 14 digital inputs and 10 digital outputs, and EM235 has four analog inputs and one analog output.

4.2 Flow chart

The system runs automatically under normal circumstances and indicator lamp lightens. In some special cases, we need to control it manually. The system will stop automatically if it reaches a certain heating value or fails. When false coin or paper money is thrown into the slot machine, the system will drive appropriate motor to withdraw them from the side door and then the alarm will sound.

Main flow chart is shown in Fig.2.

Fig.2 Flow chart of program

4.3 Ladder program

Ladder program is composed of main program, interrupt program and subroutine. The main program is responsible for system initialization, information acquisition of real-time system running state as well as output signals of eddy current sensor and infrared emitter tubes and system overall control. Subroutines achieves all sub-functions, including coin distinguishing subroutine, note distinguishing subroutine and counting subroutine.

1) Coin distinguishing subroutine

在对水牛乳理化性质方面的研究整理综述中,可以看出国外学者对水牛乳的研究起步较早,对水牛乳的乳成分及各成分的理化特性研究较为深入,特别是酪蛋白和脂肪球的结构。而国内对于水牛乳的研究起步较晚,研究主要集中在广西杂交水牛乳,目前关于中国水牛乳理化特性还较为浅显,仅对水牛乳的乳成分含量进行了初步研究,而关于中国广西杂交水牛乳的酪蛋白结构,脂肪球分布及活性物质的研究还较少。

After the voltage signal measured by low frequency coil of eddy current sensor and the frequency signal measured by high frequency coil are treated by the voltage transmitter, they immediately are transmitted to the analog input module. After being filtered and A/D conversion,the signals finally are compared with the standard signal in the system register simultaneously, they are compared with the maximum and the minimum values. If the value satisfies the standard range, namely, low frequency signal and high frequency signal are within the setting range, the coin will be put into the money box; otherwise it will be sent along the counterfeit money channel and the alarm will sound at the same time. The part of the program is shown in Fig.3.

Fig.3 Ladder program

2) Paper money distinguishing subroutine

Compared with the coin distinguishing subroutine, paper money distinguishing subroutine is not complicated. The input signal is equivalent to a switching signal. Low level is active. When the input signal is low level, the paper money is sent into the box, otherwise it will be sent along the counterfeit money channel.

3) Counting subroutine

When the genuine coin or note is put into the box, the counter will increase by 1 and the total in display screen will increase by 1. The maximum of the counter is 32 767. Before the power is off every time, the system will save the total of the counter. When the power is on again, the counter will begin to count from zero.

5 Experimental results and analysis

5.1 Measurement conditions

The distance between the coil and the coin measured is 1 mm, the width of infrared emission tube is 6 cm, experimental temperature is 45 ℃, and the enviroment is surrounded by severe electromagnetic interference.

Select randomly 200 genuine coins (100 of 1992 version and 100 of 2002 version), 100 game coins, 100 one yuan notes(the fifth edition of RMB) as well as and a total of 100 incomplete notes, foreign notes and toy notes.

5.3 Experimental process and data processing

The first group of experiments are to test the 200 genuine coins. After processed by the voltage transmitter, it can be seen that the data are mainly distributed in two regions. After excluding the discrete points, the standard low frequency voltage range of 1.88-1.91 V and standard high frequency voltage range of 5.64-5.67 V of 1992 version coin as well as standard low frequency voltage range of 2.07-2.09 V and standard high frequency voltage range of 5.64-5.67 V of 2002 version coin are determined.

The second group of experiments are to test false coins and the results are shown in Table 1.

Table 1 Experimental results

The third group of experiments are to randomly test the mixture of 100 one yuan notes and a total of 100 incomplete notes, foreign notes and toy notes. Finally, the results are a foreign note in the genuine note channel and two one yuan notes in the false note channel, which all are incomplete but acceptable.

The fourth group of experiments select randomly 200 geniue coins (100 of 1992 version and 100 of 2002 version), 100 mixture of game coins. In the same experimental environment, put randomly the 300 coins into the single chip microcomputer distinguishing system, and the results are shown in Table 2. The standard low frequency voltage range of 1.88-1.91V and standard frequency range of 267.6-267.8 kHz of 1992 version coin as well as standard voltage range of 2.07-2.09 V and standard frequency range of 267.6-267.8 kHz of 2002 version coin are determined.

Table 2 Experimental results

5.4 Experimental analysis

It can be seen from the experimental results that, in the same test environment, 39 of 300 coins cannot meet the requirement by SCM distinguishing system while 4 coins are not accurate by PLC discrimination system. The latter greatly improves the testing accuracy. It indicates that the PLC system can effectively distinguish the counterfeit coins.

6 Conclusion

The system works well in real time and has high automization, simple operation and reasonable price. Therefore, it can be applied to self-service bus for coin distinguishing system. If the product is further optimized, it will have good market prospects.

[1] LIU Yi-zhu, GUO Su-na. Design of coin recognition system based on eddy current transducer. Journal of He’nan Polytechnic University, 2010, 29(2): 229-232.

[2] CHEN Hai-yu, WANG Hui. Method of identifying false RMB paper currency based on multi-sensor. Sensor World, 2008, 14(5): 31-34.

[3] WANG Zhan-hua, WANG Shu-hai, MENG Jing. Design of bus intelligent coin-operated machine based on PIC16F877 microcontroller. Silicon Valley, 2009, (21): 20-21.

[4] YIN Jia-lin, TAN Xiao-hui, LUO Hua-fu. Interference factors analysis of PLC control system and its anti-interference measures. Control Engineering of China, 2013, 20(4): 766-768.

[5] GUO Yu, LI Yan-mei, WANG Peng. Design of coin-distinguishing system based on eddy current senor. Chinese Journal of Senors and Actuators, 2012, 25(4): 557-560.

[6] WANG Hua-xiang, ZHANG Shu-Ying. Principles and applications of senors. Tianjin: Tianjin University Press, 2003: 85-87.

[7] TA De-an, LIU Zhen-qing, TIAN Guang-chun. Propagation characteristics of ultrasonic guided-waves in pipes. Technical Acoustics, 2001, 20(3): 131-134.

基于PLC的智能投币机辨伪系统设计

王春常, 顾 强, 安晓红

(中北大学 机电工程学院, 山西 太原 030051)

针对近些年来公交车投币箱出现大量假币、 残币等不良现象, 且智能投币机的自动化程度需进一步提高, 本文综合应用多种传感器对投入的硬币和纸币信号进行采集, 首次采用PLC来作为整个系统辨伪的核心, 设计出了能同时辨伪1元硬币和纸币的PLC硬件系统和软件流程。 通过多组实验对系统进行了测试, 结果验证了此系统辨伪程度高, 运行稳定, 灵活性好, 准确率达到了97%, 可以应用到无人售票公交车上。

智能投币机; 辩伪系统; PLC

WANG Chun-chang, GU Qiang, AN Xiao-hong. Design of intelligent distinguishing system for slot machine based on PLC. Journal of Measurement Science and Instrumentation, 2015, 6(4): 368-372.

10.3969/j.issn.1674-8042.2015.04.011

WANG Chun-chang (wcc18334791845@163.com)

1674-8042(2015)04-0368-05 doi: 10.3969/j.issn.1674-8042.2015.04.011

Received date: 2015-08-11

CLD number: TP273 Document code: A

猜你喜欢

投币牛乳酪蛋白
蛋氨酸对奶牛乳腺酪蛋白合成及其上皮细胞自噬的影响
牛乳中脂肪掺假检测技术的研究进展
消毒鲜牛乳还要煮吗
投币畅饮(图片故事)
我是白骨精
放飞诚信的白鸽
酪蛋白磷酸肽-钙络合物对酸乳贮藏特性的影响
酪蛋白胶束结构和理化性质的研究进展
用毛细管电泳检测牦牛、犏牛和藏黄牛乳中β-乳球蛋白的三种遗传变异体
奇妙投币机