Paper money detection device and method based on capacitance sensing

文档序号:192889 发布日期:2021-11-02 浏览:53次 中文

阅读说明:本技术 一种基于电容感测的纸币检测装置及方法 (Paper money detection device and method based on capacitance sensing ) 是由 黄健 于 2021-09-01 设计创作,主要内容包括:本发明公开了一种基于电容感测的纸币检测装置及方法,当纸币的种类和数量发生变化时,会引起两个覆铜板之间的寄生电容的容量变化,电容感测传感器会感知这种微弱的变化,将其转换为高精度的数字量输出,软件处理后可得到纸币的数量和种类。本发明无复杂机械装置,可准确检测纸币的数量,具有成本低、设备简单、识别率高的优点。(The invention discloses a paper money detection device and method based on capacitance sensing, when the type and the number of paper money change, the capacity change of parasitic capacitance between two copper-clad plates can be caused, a capacitance sensing sensor can sense the weak change and convert the weak change into high-precision digital quantity to be output, and the number and the type of the paper money can be obtained after software processing. The invention has no complex mechanical device, can accurately detect the number of paper money and has the advantages of low cost, simple equipment and high recognition rate.)

1. A paper money detecting device based on capacitance sensing, characterized by comprising: an oscillating circuit, a capacitive sensing sensor (7) and a microprocessor (8); the capacitance sensing sensor (7) is respectively connected with the oscillating circuit and the microprocessor (8).

2. The capacitance sensing-based banknote detection apparatus according to claim 1, wherein the oscillation circuit comprises: a variable capacitor, a first capacitance (6), a first inductance (5); the variable capacitor, the first capacitance (6) and the first inductance (5) are all connected in parallel on the capacitive sensing sensor (7) and are all connected to ground.

3. The capacitance sensing-based banknote detection apparatus according to claim 2, wherein the variable capacitor comprises: the copper-clad plate comprises a first single-sided copper-clad plate (1), a second single-sided copper-clad plate (2), a first isolation plate (3) and a second isolation plate (4); a first isolation plate (3) and a second isolation plate (4) are arranged between the inner sides of the first single-sided copper-clad plate (1) and the second single-sided copper-clad plate (2); a hole is formed between the first isolation plate (3) and the second isolation plate (4) and used for placing paper money; the outer sides of the first single-sided copper-clad plate (1) and the second single-sided copper-clad plate (2) are respectively connected with two ends of the first capacitor (6) and the first inductor (5).

4. The paper currency detection device based on capacitance sensing of claim 3, wherein the first single-sided copper-clad plate (1) and the second single-sided copper-clad plate (2) have the same area; the first isolation plate (3) and the second isolation plate (4) are made of polytetrafluoroethylene.

5. The banknote detection apparatus based on capacitive sensing according to claim 1, wherein said capacitive sensing sensor (7) is an FDC2214 capacitive sensing sensor.

6. The capacitive sensing based banknote detection apparatus according to claim 1, wherein said microprocessor (8) employs an STM32H743IIT6 single chip microcomputer.

7. The banknote detection apparatus based on capacitive sensing according to claim 1, wherein said capacitive sensing sensor (7) is connected to said microprocessor (8) through an IIC interface.

8. A paper money detection method based on capacitance sensing is characterized by comprising the following steps:

s1, monitoring data of the oscillating circuit through the capacitance sensing sensor (7), and collecting the monitored data by the microprocessor (8);

s2, initializing the IIC interface and a timer in the microprocessor (8);

s3, reading the monitoring data of the capacitance sensing sensor (7) by adopting the initialized IIC interface, and removing interference through a mean value filtering algorithm; and then the microprocessor (8) is adopted to analyze and process the filtered monitoring data.

9. A banknote detection method based on capacitive sensing according to claim 8, wherein said S1 is embodied as:

s1.1, carrying out data monitoring on an oscillating circuit through a capacitance sensing sensor (7), and calculating to obtain the oscillating frequency of the oscillating circuit;

s1.2, calculating the reference working frequency of the capacitance sensing sensor (7);

s1.3, converting the oscillation frequency of the oscillation circuit into a 28-bit binary number based on the S1.1-S1.2;

s1.4, the microprocessor (8) carries out data acquisition on the converted 28-bit binary number through an IIC interface.

10. The capacitance sensing-based banknote detection method according to claim 9, wherein said S3 further comprises:

initializing the serial port and the LCD display screen, sending the filtered monitoring data to the cloud end through the initialized serial port for data analysis and curve drawing, and displaying the data on the initialized LCD display screen; then obtaining a linear relation between the measured value and the number of the paper money according to the drawn curve; and finally, identifying the type and the number of the paper money according to the linear relation.

Technical Field

The invention relates to the field of paper money detectors, in particular to a paper money detection device and method based on capacitance sensing.

Background

The paper money counter is a mechanical device for automatically counting paper money and has the functions of automatically counting and identifying counterfeit money. The prior art discloses a paper money detection device based on DSP + CPLD, which detects paper money by using an image processing technology and also discloses a method for acquiring and processing images of paper money by using an infrared transmission technology. However, the above method is greatly affected by light and the hardware is complicated. Software needs to analyze and process a large amount of image data, algorithm complexity is high, and recognition rate is low. And the whole equipment is complex and the cost is high.

Disclosure of Invention

The invention aims to provide a paper money detection device and method based on capacitance sensing, which can accurately identify the number of different paper money at high speed.

In order to achieve the above object, the present invention provides a paper money detecting apparatus based on capacitance sensing, including: an oscillating circuit, a capacitive sensing sensor and a microprocessor; the capacitance sensing sensor is respectively connected with the oscillating circuit and the microprocessor.

Preferably, the oscillation circuit includes: a variable capacitor, a first inductor; the variable capacitor, the first capacitance and the first inductance are all connected in parallel on the capacitance sensing sensor and are all grounded.

Preferably, the variable capacitor includes: the first single-sided copper-clad plate, the second single-sided copper-clad plate, the first isolation plate and the second isolation plate; a first isolation plate and a second isolation plate are arranged between the inner sides of the first single-sided copper-clad plate and the second single-sided copper-clad plate; a hole is formed between the first isolation plate and the second isolation plate and used for placing paper money; the outer sides of the first single-sided copper-clad plate and the second single-sided copper-clad plate are respectively connected with two ends of the first capacitor and two ends of the first inductor.

Preferably, the areas of the first single-sided copper-clad plate and the second single-sided copper-clad plate are the same; the first isolation plate and the second isolation plate are made of polytetrafluoroethylene.

Preferably, the capacitive sensing sensor employs an FDC2214 capacitive sensing sensor.

Preferably, the microprocessor adopts an STM32H743IIT6 singlechip.

Preferably, the capacitive sensing sensor is connected to the microprocessor through an IIC interface.

A paper money detection method based on capacitance sensing specifically comprises the following steps:

s1, monitoring data of the oscillating circuit through the capacitance sensing sensor, and collecting the monitored data by adopting a microprocessor (8);

s2, initializing the IIC interface and a timer in the microprocessor;

s3, reading the monitoring data of the capacitance sensing sensor by adopting the initialized IIC interface, and removing interference through a mean value filtering algorithm; and then the microprocessor is adopted to analyze and process the filtered monitoring data.

Preferably, the S1 is specifically:

s1.1, carrying out data monitoring on an oscillating circuit through a capacitance sensing sensor, and calculating to obtain the oscillating frequency of the oscillating circuit;

s1.2, calculating the reference working frequency of the capacitance sensing sensor;

s1.3, converting the oscillation frequency of the oscillation circuit into a 28-bit binary number based on the S1.1-S1.2;

and S1.4, the microprocessor acquires data of the converted 28-bit binary number through an IIC interface.

Preferably, the S3 further includes:

initializing the serial port and the LCD display screen, sending the filtered monitoring data to the cloud end through the initialized serial port for data analysis and curve drawing, and displaying the data on the initialized LCD display screen; then obtaining a linear relation between the measured value and the number of the paper money according to the drawn curve; and finally, identifying the type and the number of the paper money according to the linear relation.

Compared with the prior art, the invention has the following technical effects:

when the type and the number of the paper money are changed, the capacity change of parasitic capacitance between two copper-clad plates can be caused, the capacitance sensing sensor can sense the weak change and convert the weak change into high-precision digital quantity to be output, and the number and the type of the paper money can be obtained after software processing. The invention has no complex mechanical device, can accurately detect the number of paper money and has the advantages of low cost, simple equipment and high recognition rate. The invention also carries out software programming on the device, determines the linear relation between the number of the paper money and the measured value through a large number of experiments, and verifies that the device can accurately measure the number of different paper money. Different banknotes can be identified according to the difference between the slope and the initial value. And can realize high-speed measurement identification. The measurement accuracy and range can be further increased if the copper plate is selected properly. The whole device has the advantages of simple hardware circuit, strong anti-interference capability, high recognition rate, high precision, high speed, low cost and the like, and can be used for accurately detecting the number of paper money.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.

FIG. 1 is a view showing an overall structure of a detecting apparatus according to an embodiment of the present invention;

fig. 2 is an internal structural view of a variable capacitor according to an embodiment of the present invention;

FIG. 3 is a circuit diagram of a detecting device according to an embodiment of the present invention;

FIG. 4 is a flow chart of a method of an embodiment of the present invention;

FIG. 5 is a graph of a 100 dollar banknote measurement according to an embodiment of the invention;

the device comprises a first single-sided copper-clad plate 1, a second single-sided copper-clad plate 2, a first isolation plate 3, a second isolation plate 4, a first inductor 5, a first capacitor 6, a capacitance sensing sensor 7 and a microprocessor 8.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.

Example 1

Referring to fig. 1, the present invention provides a banknote detecting device and method based on capacitance sensing, including: an oscillating circuit, a capacitive sensing sensor 7 and a microprocessor 8; the capacitive sensing sensors 7 are connected to an oscillation circuit and a microprocessor 8, respectively.

Wherein, the oscillating circuit includes: a variable capacitor, a first capacitance 6 (denoted by C) and a first inductance 5 (denoted by L); the variable capacitor, the first capacitance 6 and the first inductance 5 are all connected in parallel on the capacitive sensing sensor 7 and are all connected to ground (virtual ground).

Wherein, variable capacitor includes: the first single-sided copper-clad plate 1, the second single-sided copper-clad plate 2, the first isolation plate 3 and the second isolation plate 4; the first single-sided copper-clad plate 1 and the second single-sided copper-clad plate 2 are placed up and down, and the positions can be reversed, so long as the outer sides of the two single-sided copper-clad plates are copper-clad surfaces; the first single-sided copper-clad plate 1 and the second single-sided copper-clad plate 2 have the same area (length is 15cm, width is 10cm, thickness is 1mm), and are spaced at a certain distance, a first isolation plate 3 and a second isolation plate 4 are arranged between the inner sides of the first single-sided copper-clad plate and the second single-sided copper-clad plate, the distance d is 1.5cm, polytetrafluoroethylene is adopted as a material, and the reference is shown in FIG. 2; a hole is formed between the first isolation plate 3 and the second isolation plate 4 and is used for placing a certain amount of paper money; the outer sides of the first single-sided copper-clad plate 1 and the second single-sided copper-clad plate 2 are respectively connected with two ends of a first capacitor 6 and a first inductor 5, and a parasitic capacitor C can be generated to a virtual ground due to the fact that the variable capacitor is variablexAnd the C and the L are connected in parallel to form an oscillating circuit.

When a stack of paper money is put in a hole between two copper clad plates, the change of the capacitance of the two copper clad plates to the ground can be caused, and at the moment, a capacitance sensing sensor is adopted for detection to sense the weak change, namely the capacitance change caused by the paper medium, and the weak change is converted into a digital quantity up to 28-bit binary number for output; finally, the number and the type of the paper money can be obtained after the paper money is processed by the microprocessor. The invention adopts a high-precision capacitive sensing sensor FDC 2214; the microprocessor adopts STM32H743IIT6 singlechip.

Based on this, the present invention further provides a banknote detection method based on capacitance sensing, which specifically includes the following steps, as shown in fig. 4:

s1, monitoring data of the oscillating circuit through the capacitance sensing sensor 7, and collecting the monitored data by the microprocessor 8;

wherein, the calculation expression of the capacitance is as follows:

wherein A represents the area of one plate electrode and the unit is m2(ii) a d represents the distance between the plates in m; c is capacitance, and the unit is F; ε is the dielectric constant with respect to air. In addition, the relative dielectric constants of common dielectrics are shown in table 1:

TABLE 1

From the equation (1), the capacitance C is proportional to the dielectric constant ∈ and the area a of the plate electrodes, and inversely proportional to the distance d between the plate electrodes. For the paper money detection device, an upper single-sided copper-clad plate and a lower single-sided copper-clad plate form a variable capacitor. According to the formula (1), when no paper money is put in, the area A and the distance d are unchanged, and the medium epsilon is composed of polytetrafluoroethylene and air and is kept unchanged; after paper money with different thicknesses is put in, the areas A of the two single-sided copper-clad plates are fixed, but the distance between the medium epsilon and different media is changed, namely the proportion of different media is different along with the increase of the thickness, and the dielectric constant of the medium epsilon formed by combining the two media is changed. By detecting such a change by the capacitance sensing sensor, the kind and the number of bills can be identified.

Therefore, the present invention employs the capacitive sensing sensor FDC2214 to sense the small capacitance change, and the operation principle is shown in FIG. 3, wherein C isxIs a variable capacitor, and generates a parasitic capacitance C to a virtual groundxThe voltage is shown to be connected with C, L in parallel to form an oscillating circuit;

then, the oscillation frequency f of the oscillation circuit is calculatedsThe expression is as follows:

in the formula (2), l is inductance and has a value of 18uH; c is capacitance and takes the value of 33 pF; cxIs a parasitic capacitance; f. ofsIs the oscillation frequency of the oscillating circuit. As can be seen from the equation (2), after l is fixed at 18uF and C is fixed at 33pF, the oscillation frequency fsAnd CxThe square root of (a) is inversely proportional.

In actual measurement, a reference operating frequency of the capacitive sensing sensor FDC2214 is to be set, which is expressed as:

in the formula (3), frefIs a reference frequency; f. ofclkAn active crystal oscillator of 40MHz is generally selected for the input frequency of the capacitive sensing sensor FDC2214, and the precision is high; CHx _ FREF _ DIVIDER is f after frequency division by selecting two division factorsrefIs 20 MHz;

finally, dividing the frequency frefAnd converting the digital quantity output into a binary number with 28 bits, wherein the expression is as follows:

in the formula (4), frefThe reference frequency after frequency division is 20 MHz; f. ofsIs the oscillation frequency, DATA, of the oscillating circuitxIs the corresponding 28-bit binary number after conversion. Therefore, the weak change of the external parasitic capacitance can be converted into binary number output with the bit number as high as 28, and then the binary number output is connected with various microprocessors through IIC interfaces for collection and processing.

S2, initializing the IIC interface and a timer in the microprocessor (8);

when the IIC is initialized, the SDA pin of the IIC interface data line is PA11 of STM32H743IIT6, and the SCL pin of the IIC interface clock line is PA12 of STM32H743IIT 6. And then, after successfully reading the device ID number 0x3055 of the FDC2214 according to a certain time sequence, the IIC initialization work is completed. The value of channel 0 of FDC2214 is read once, initialized to 50ms for the timer.

And S3, reading the numerical value of the FDC2214 channel 0 by using an IIC interface, removing interference by using a mean filtering algorithm, and analyzing and processing the filtered monitoring data by using the microprocessor 8 to identify the type and the quantity of the paper money.

The invention can also initialize serial ports, LCD display screens and the like, and the serial port initialization baud rate is 115200; the liquid crystal screen initially displays time and date values. And then sending the filtered monitoring data to a computer through a serial port, analyzing the data in MATLAB, drawing a curve, and displaying the curve on an LCD screen. Then obtaining a linear relation between the measured value and the number of the paper money according to the drawn curve; and identifying the type and the number of the paper money according to the linear relation.

The MATLAB software compiling environment is KEIL5.0, and the program is written in C language. After the compiling is passed, the program is downloaded to the STM32H743IIT6 processor chip for testing, which comprises the following steps:

the invention puts different types of paper money into the gap of the variable capacitor, and increases the number from 1 to obtain a group of test data. The obtained product is transmitted to a computer through a serial port and analyzed and processed under MATLAB.

First, 100 dollar banknotes were placed and the number was increased from 1 opening to obtain the following set of test data, as shown in Table 2:

TABLE 2

These data were curve-fitted under MATLAB to give the curves shown in figure 5. From FIG. 5, a linear relationship between the measured value y and the number x of banknotes can be obtained, expressed as

y=-9.525*x+62980…………(5)

And calculating the number of the paper sheets according to the linear relation. In addition, the entire recognition process requires only 50ms at most, regardless of the banknote thickness. The test result shows that the method can quickly and accurately identify the number of different paper money.

In summary, the invention designs a paper money detection device and a detection method based on the capacitance sensing technology, when the type and the number of paper money change, the capacity change of the variable capacitance between two copper-clad plates can be caused, the capacitance sensing sensor can sense the weak change and convert the weak change into high-precision digital quantity for output, and the number and the type of the paper money can be obtained after software processing. The invention has no complex mechanical device, can accurately detect the number of paper money and has the advantages of low cost, simple equipment and high recognition rate. The invention also carries out software programming on the device, determines the linear relation between the number of the paper money and the measured value through a large number of experiments, and verifies that the device can accurately measure the number of different paper money. Different banknotes can be identified according to the difference between the slope and the initial value. And can realize high-speed measurement identification. The measurement accuracy and range can be further increased if the copper plate is selected properly. The whole device has the advantages of simple hardware circuit, strong anti-interference capability, high recognition rate, high precision, high speed, low cost and the like, and can be used for accurately detecting the number of paper money.

The above-described embodiments are merely illustrative of the preferred embodiments of the present invention, and do not limit the scope of the present invention, and various modifications and improvements of the technical solutions of the present invention can be made by those skilled in the art without departing from the spirit of the present invention, and the technical solutions of the present invention are within the scope of the present invention defined by the claims.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种自动售货机的展览装置及展览方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!