走马观花

2019 Question F: Paper Counting Display Device

 
Overview

1. Question requirements and content

      Use A and B electrode plates (size: square with side length 50mm±1 mm), wires a and b (size: length 500mm±5mm) and measuring circuit to measure the number of papers between the two plates. The number of measurements is 1 to 30, and the circuit has functions such as self-calibration and short-circuit detection.

 

2. Design ideas

      Measuring the number of papers is actually measuring the capacitance composed of paper and two-pole plates. The number of papers can be measured indirectly by measuring the equivalent capacitance.

 

3.Principle analysis

      The circuit consists of the following parts:

      1) The power supply part provides +3.3V (microcontroller) and ±9V voltage (operational amplifier);

      2) The waveform generates electricity. Generate positive waves to provide signal source for the measurement circuit;

      3) Detection circuit. Detect the ratio of plate capacitance to reference capacitance (operational amplifier principle);

      4) Filter circuit. Filter out power frequency interference (very important);

      5) Amplitude detection circuit. Convert the detection circuit output into the corresponding voltage;

      6) Main control circuit. Perform ADC detection, button detection, buzzer control, display control, etc.

 

      Specific principle: Use the operational amplifier detection principle in the capacitance detection principle to convert the capacitance value of the plate capacitor into the corresponding voltage.

    buJdDIxIJ5J7vftQDv5uzVo3R7amAvc0KBvanTpi.png

      Since the distance between the two plates in the formula is proportional to the number of papers, the output voltage increases linearly with the number of papers, and has very good linearity, which is convenient for actual measurement and conversion.

      All the premise is that the capacitive reactance of Cf is greater than the resistance of Rf.

 

4. Physical picture display

 

Physical mapThe soldering flying wire is an AC signal wire; the red thin flying wire is a DC signal wire (the original IO for detecting AD was burned out, so I replaced it); the black thin flying wire is useless.

 

5. Debugging process

      1) The first step is to debug the output of the positive wave generating circuit. Its output amplitude depends on the power supply voltage of the subsequent operational amplifier (generally around 0.05~0.1), and the frequency is preferably greater than 100khz;

      2) Debugging the detection circuit. Select the size of capacitor C0 (reference capacitor). The principle is to make the output voltage equal to the maximum reliable output voltage when the number of sheets of paper is 30, in order to obtain the maximum resolution (the amount of output voltage change consisting of a single sheet of paper). If conditions permit, you can first measure the size of the plate (one side is about 200pf), and then select according to the actual circuit;

      3) Adjust the filter circuit. (Basically no problem) Its purpose is to filter out the interference of power frequency signals;

      4) Debug the peak detection circuit to achieve the minimum error. If conditions permit, it is recommended to use the effective value detection circuit, and its accuracy will be greatly improved.

      5) Debugging the program. It is relatively simple and can be written according to your own habits, mainly for ADC detection problems.

 

6. Video demonstration

      Video address: https://www.bilibili.com/video/BV1Xi4y1N7gE/

 

7. Source code attachments

     See attachment at the end of the article

     Attachment 1: Program source code

     Attachment 2: Existing problems and solutions (some problems have been solved on 2021-3-17).

     Attachment 3: Instructions (some notes)

 

Note: This project has been updated.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-08-04 01:01:20
  • STM8 clock problem
  • About the role of return
  • Today is different
  • Low Power RF Low Noise Amplifier
  • Real-World EMI Control
  • Wince changed to rom-only file system, and found that explorer.exe could not start

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号