Design and produce a paper counting display device. Two parallel plates (plate A and plate B) are connected to the measurement display circuit through wire a and wire b respectively. The device can measure and display between plate A and plate B. number of papers in between.
Introduction and demonstration video link: https://www.bilibili.com/video/BV1Sf4y1r7wQ
Since there is no buzzer, the LED flashing is used instead of the buzzer sound in the video. If you need to change to a buzzer, you only need to use an active buzzer, a transistor and a resistor, and control it through a GPIO.
The project is built using STM32F103C8T6 core board, OLED module and FDC2214 module.
For a detailed introduction to the FDC2214 module, please see the link: https://oshwhub.com/Mobyw/FDC2214RGHT
Wiring:
STM32 core board | OLED screen | STM32 core board | FDC2214 |
---|---|---|---|
PA5 | SCK/D0 | PB6 | SCL |
PA7 | SDA/D1 | PB7 | SDA |
PA3 | RES | ||
PA2 | DC | ||
PA4 | CS |
Onboard resources:
pin | Function |
---|---|
PA8 | KEY |
PC13 | led |
Made of plastic clips and copper sheets. The copper sheets are 0.8mm thick T2 copper plates. Taobao customization of 50*50mm is about 18 yuan.
When welding wires, you need to be careful to wrap the exposed parts of the wires well so as not to short-circuit. If you use a soldering iron, you may not be able to solder it due to rapid heat dissipation. You need to use a heat gun or an aluminum alloy PTC heating plate.
See the attachment or GitHub page for the software: https://github.com/Moby-C/NUEDC_2019_F_Paper_Counting
Developed using Keil, based on the SYM32F1 standard peripheral library.
Software modification method :
Modify the OLED screen pin definition : oled.h
modify the macro definition in and modify it accordingly in oled.c
the OLED_Init
function.
Modify the LED pin definition : oled.h
modify the macro definition in and modify it accordingly in oled.c
the OLED_Init
function.
Modify the KEY pin definition : key.h
modify the four macro definitions of KEY_PORT
, KEY_PIN
, KEY_CLK
and in.KEY
Modify the maximum number of measuring papers : main.c
modify MAXSIZE
the macro definition in.
During calibration and measurement, it is necessary to frequently short-circuit the two plates to prevent the charging of the capacitor from causing deviation in the measurement results.
When the number of sheets is less than 30, the measurement accuracy is higher than 95%. When the number of sheets is large, a deviation of one sheet may occur. Since the mechanical structure is relatively simple, if you want to improve the accuracy, you can optimize some mechanical structures and increase the number of measurements (20 measurements in the program).
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet