super_star

2019 (Title F) Paper Counting Display Device +662763A

 
Overview

1. System design

This design uses the STM32F103 microcontroller as the control core, and uses the capacitance sensor FDC2214 to detect the capacitance of the capacitor composed of two electrode plates in real time. The fitting algorithm is used to calculate the number of papers corresponding to the capacitance value in sections. At the same time, the paper quantity test results are displayed on the OLED LCD screen has the characteristics of high accuracy, simple structure and low production cost. The STM32C8T6 microcontroller is selected as the microprocessor for control. The STM32 microcontroller has fast data processing speed, rich functions, and a relatively simple interface. Using TI's FDC2214. The FDC2214 capacitive sensing is suitable for applications ranging from proximity detection. It has high resolution and is suitable for the detection of small signals and high-frequency signals. It is a low-power, low-cost non-contact sensing technology. OLED is used as the display module. OLED is self-luminous, does not require a backlight, has high contrast, is thin, has a wide viewing angle, and has fast response speed. It is suitable for IIC and SPI communication methods.

20210422_175530.jpg

20210422_175543.jpg

 

2. Working principle of FDC2214

The frequency of the FDC2214 sensor is expressed as: Connect an inductor and capacitor to the input end of each detection channel of the chip to form an LC circuit. A typical choice is a 18uH shielded SMD inductor in parallel with a 33pF capacitor. The measured capacitance sensing end is connected to the LC circuit, which will generate an oscillation frequency, and the measured capacitance value can be calculated based on the frequency value. The FDC2214 sensor frequency is expressed as: image.pngwhere: DATAx: the conversion result of the DATA_CHx register; fREFX: the reference frequency of channel x; the data output (DATAx) of FDC2214 is expressed as: The sensing capacitance measured by the FDC2214 sensor is expressed as: changing the plate spacing, resulting in The capacitance value between the plates changes, which causes the LC circuit oscillation frequency to change. According to the frequency value, the raw data of the sensor between the parallel plates can be known. We measured the corresponding capacitance values ​​of 40 pieces of paper and used matlab curve fitting to generate a curve. However, in the actual process, we found that many values ​​were not on this curve, so we used piecewise fitting, 1-10 is an interval, 11-20 is an interval, 21 to 30 is an interval, and 31 to 40 is an interval. It is found that using this method can make the points all on this fitting curve, and the accuracy rate is 100%. 0-40 direct fitting result curves: image.png image.png image.png

The result curve after our piecewise fitting: 0-10

image.png

11-20

image.png

21-30

image.png

31-40

image.png

3. Filter algorithm

Continuously sample N times (N =30), find the maximum and minimum values ​​of the N sample values, and sum the N sample values. Subtract the maximum and minimum values ​​from the summation result and average it. This method can effectively overcome fluctuation interference caused by accidental factors, and has a good filtering effect on measured parameters when measuring paper thickness is subject to greater external interference.

4. Test plan and result analysis

We perform curve fitting by measuring the corresponding capacitance value and the corresponding number of sheets multiple times, and taking the average value as the benchmark value. image.png

Error Analysis

1. Interference from the external environment to the LC oscillation frequency. External electromagnetic waves, static electricity, etc. will cause interference to the sensor frequency, causing the theoretically analyzed frequency to be different from the actual frequency. There is an error in the read data, and a shielding device needs to be added to reduce the error.

2. The quality factor of the inductor is too low. The inductor produces different self-resonant signals at different frequencies. If the quality factor is too low, it will affect the value of the inductor and cause errors. Using an inductor with a high quality factor can reduce this error.

3. The parallel plates are not pressed tightly, or the weight is not in the middle, causing one side to tilt up. As a result, there is too much air gap between the parallel plates, which will affect the dielectric constant between the two plates, causing the capacitance value to be affected by the medium. The influence of electrical constants produces errors.

Video link
https://www.bilibili.com/video/BV15p4y1b7NF?share_source=copy_web

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-09 16:31:52

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号