doc: document project

This commit is contained in:
King Kévin 2022-10-28 13:28:34 +02:00
parent 6d73e728c6
commit d700a2e92b
1 changed files with 21 additions and 6 deletions

View File

@ -1,4 +1,4 @@
This firmware template is designed for development boards based around [STM32 F4 series micro-controller](
Firmware for the crown counter.
@ -6,12 +6,14 @@ project
*describe project purpose*
The crow counter just counts how many (per day and in total) caps (e.g. crown cork) have entered the basket.
*described electronic details*
An infra-red LED and photo-detector create a light barrier, broken when crossed by caps.
An RTC keeps track of the days.
2 TM1637 7-segment displays show how many caps passed in total and today.
@ -26,11 +28,24 @@ This is required to map the user LED and button provided on the board
Connect the peripherals the following way (STM32F4xx signal; STM32F4xx pin; peripheral pin; peripheral signal; comment):
Connect the peripherals the following way:
- *list board to peripheral pin connections*
- IR LED: connected across 3.3V with potentiometer to adjust brightness
- IR photo-detector: PB5
- first TM1637 7-segment 4-digit display: CLK to PB6, DIO to PB7
- second TM1637 7-segment 4-digit display: CLK to PB8, DIO to PB9
- CR1220 to VBAT for the RTC
All pins are configured using `define`s in the corresponding source code.
at first I use a KY-032 infrared sensor detects when a cap passes through the basket.
this modules the infra-red LED (set to 38 kHz), and has an IR demodulator (at 38 kHz).
I though this would be less noise prone, particularly from external IR sources.
turns out it is a lot more.
I tested will the cap reflecting the IR, but this is sometimes to short, and the demodulator might not detect it.
I tested with the cap breaking the barrier, but the IR demodulator doesn't allow continuous IR burst detection and has a hard time detecting when it is broken and restarted.
in the end, a simple LED on and photo-detector to create a barrier is super simple and efficient.