他们逼我做卧底

2019 Question F: Paper counting display device +496874A

 
Overview

The author's contact information is QQ: 1010053598. The source code was updated to version V1.3 on April 28. The project was rewritten using Lichuang EDA. The attachment contains the code, AD version PCB, and reference papers. The algorithm is very simple, mainly function fitting and filtering algorithms. For question F in the 2019 Electronic Design Competition, the plate capacitance is detected through FDC2214, and the number of sheets is calculated through the algorithm. 0-60 stable measurement demonstration link: https://www.bilibili.com/video/BV1Qf4y1s7Cz/

Question analysis

The paper counting device in 2019 is of the same type in principle as the gesture detection in 2018. Both reflect changes in the plate spacing or dielectric changes through the capacitance value of the parallel plates. There are several points to note in the question: 1. The shape of the electrode plate is a square of 50mm±1 mm. 2. The length of the electrode plate wire is 500mm±5mm. 3. It has short circuit detection function. 4. One-button start measurement and the results will be given within 5 seconds.

Design ideas

System Block Diagram: Picture 1.png

FDC2214 collects the capacitance value between plates and analyzes it through STM32, then displays it accordingly on OLED.

The h project was redrawn using Lichuang EDA. The attachment contains code, AD version PCB, and reference papers. The algorithm is very simple, mainly function fitting and filtering algorithms. For question F in the 2019 Electronic Design Competition, the plate capacitance is detected through FDC2214, and the number of sheets is calculated through the algorithm. 0-60 pictures of stable measurement objects:   Problem analysis The paper counting device in 2019 is of the same type in principle as the gesture detection in 2018. They both reflect changes in the plate spacing or dielectric changes through the capacitance value of the parallel plates. There are several points to note in the question: 1. The shape of the electrode plate is a square of 50mm±1 mm. 2. The length of the electrode plate wire is 500mm±5mm. 3. It has short circuit detection function. 4. One-button start measurement and the results will be given within 5 seconds. Design idea system block diagram: 

FDC2214 collects the capacitance value between plates and analyzes it through STM32, then displays it accordingly on OLED.

Principle description

Parallel plate capacitor formula:  According to the parallel plate capacitor formula, it can be seen that when the dielectric constant and the area opposite the plate remain unchanged, C and D are inversely proportional. Therefore, C and D must be expressed by a linear function. Collect the capacitance values ​​of all paper numbers from 1 to 60, and use matlab for function fitting.

From the matlab fitting results, we can see that pictures 1-30 have excellent functional correlation. By back-solving the function expression and transplanting it into the program, you can get the number of sheets under different capacitance values. The core algorithm is:

Collect three points in calibration mode and use these three points to perform function fitting. Using this function, you can calculate the number of all papers within a range of three points. In the range of 1-60 sheets, it is impossible to use only three points for 1-60 sheets due to the interference of the number of papers and various environmental and institutional factors. This program uses segmented fitting to improve accuracy 1, 5, 10 10, 15, 20 20, 25, 30 30, 35, 40 40, 45, 50 50, 55, 60 The accuracy of the results after the above segmentation Reach 100%

Physical display

postscript

This topic in 2019 is the most popular. FDC2214 took two years to solve. The algorithm is still a very simple brute force function fitting. 1-30 sheets can be easily achieved. The main reason is that after 30 sheets, as the number of sheets increases, the capacitance difference between adjacent numbers is very small, so the stability of the reading is very high at this time. During calibration and measurement Values ​​for the same reference point cannot differ by more than 0.3%. After 30 photos, I mainly took the following measures: 1. Improve the stability of the FDC2214 hardware and the ripple processing of the FDC2214 board. The pile of boards on Taobao basically have no filtering processing at all, and the readout data is very floating. 2. The hardware structure is strictly unified. 3. Use heavy objects to compact the pole pieces to squeeze out the air between the papers in the pole pieces as much as possible to reduce the impact.

After the above processing, the number of measured papers increased to 65, and the measurement success rate within 65 sheets was 99%. PS: Is there anyone who has more than 65 sheets? Can you share it in the comment area?



参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-22 12:39:20

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号