You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* added for the first time as a test
* updated project with architecture and schematic
* added link
* changes
* moved the folder with pictures
* update
* changed index
* changed images
* img
* changed the schemat image format
* modified index.md
---------
Co-authored-by: Irina Bradu <72762129+irina-b-dev@users.noreply.github.com>
Copy file name to clipboardExpand all lines: website/versioned_docs/version-acs_cc/project/2026/ana_sorina.ciurea/index.md
+81-34Lines changed: 81 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,35 +10,68 @@ An intelligent trash bin that encourages recycling through automation and reward
10
10
11
11
## Description
12
12
13
-
This project consists of building a smart recycling bin using an STM32 microcontroller programmed in Rust. The system improves user interaction by automatically opening the lid and rewarding users for recycling using NFC technology.
13
+
This project consists of building a smart recycling bin using an STM32 microcontroller
14
+
programmed in Rust with the Embassy async framework. The system automates lid control
15
+
and rewards users for recycling via RFID card scanning.
14
16
15
-
The bin detects hand movement to open automatically and allows users to scan an NFC card to receive rewards. Additionally, recyclable items can be identified using NFC tags attached to packaging.
17
+
An HC-SR04 ultrasonic sensor continuously measures the distance in front of the bin.
18
+
When a hand is detected closer than 30 cm, a servo motor (SG90) opens the lid and a
19
+
passive buzzer emits a short confirmation beep. When no obstacle is detected, the lid
20
+
closes automatically.
21
+
22
+
Users can scan an RFID card using the RC522 module to receive 200 recycling points per
23
+
scan. Points accumulate across reboots, as they are stored persistently in the STM32's
24
+
internal Flash memory using a magic-number validation scheme to ensure data integrity.
25
+
26
+
The system runs two concurrent async tasks: one handling the ultrasonic sensor, servo,
27
+
and buzzer logic, and one dedicated to RFID scanning and Flash storage — both managed
28
+
by the Embassy executor.
16
29
17
30
## Motivation
18
31
19
32
I chose this project to explore embedded systems programming in Rust and to build a real-world application that promotes recycling. The combination of low-level programming and hardware interaction makes this project both challenging and practical.
20
33
21
34
## Architecture
22
35
23
-
The system consists of the following main components:
24
-
25
-
-**STM32 microcontroller** – central unit running Rust code
26
-
-**Proximity sensor (IR/ultrasonic)** – detects when a user approaches
27
-
-**Servo motor** – controls lid opening and closing
28
-
-**NFC module (RC522)** – reads user cards and product tags
36
+
-**STM32 Nucleo (STM32F411RE)** – central unit running Rust code
37
+
with the Embassy async framework
38
+
-**HC-SR04 ultrasonic sensor** – detects hand proximity (threshold: 30 cm)
39
+
-**Servo motor (SG90)** – controls lid opening (90°) and closing (0°)
40
+
via PWM on TIM3 at 50 Hz
41
+
-**RC522 RFID module** – reads ISO 14443A cards via SPI1,
42
+
awards 200 points per scan
43
+
-**KY-006 passive buzzer** – emits a confirmation beep (2 kHz)
44
+
when the lid opens
45
+
-**Internal Flash memory** – persistent storage for RFID points
46
+
across reboots (offset 504 KB, magic-number validated)
29
47
30
48
31
49
### System Flow
32
50
33
-
1.**Proximity Sensor detects hand** → Lid opens automatically
34
-
2.**NFC Card is scanned** → System registers and you receive bonuses
35
-
3.**When lid opens** → Speaker beeps and servo motor
51
+
The system runs two independent async tasks concurrently:
3.**distance < 30 cm** → servo opens lid (90°) + buzzer beeps 200 ms
57
+
4.**distance ≥ 30 cm or timeout** → servo closes lid (0°)
58
+
59
+
#### Task 2: RFID + Flash
60
+
61
+
1.**On boot** → restores points from Flash (validated via magic number);
62
+
if no previous data, starts from 0
63
+
2. User can optionally scan an RFID card **at any time** to collect +200 bonus points,
64
+
saved persistently to Flash with a 2s cooldown between scans
65
+
3. Points accumulate independently of the lid mechanism — scanning
66
+
and recycling are two separate interactions
36
67
37
68
### Architecture Diagram
38
69
39
70

40
71
41
-
The STM32 microcontroller acts as the central controller, receiving input from sensors and the NFC module, and controlling the servo motor and LEDs accordingly.
72
+
The STM32 microcontroller acts as the central controller, receiving input
73
+
from the HC-SR04 sensor and RC522 RFID module, and controlling the servo
74
+
motor and buzzer accordingly.
42
75
43
76
## Log
44
77
@@ -51,27 +84,35 @@ The STM32 microcontroller acts as the central controller, receiving input from s
51
84
- Tested GPIO and basic components
52
85
53
86
### Week 19 - 25 May
54
-
- Integrated sensors and servo motor
55
-
- Began NFC integration
87
+
- Integrated HC-SR04 ultrasonic sensor with servo and buzzer logic
88
+
- Integrated RC522 RFID module via SPI1
89
+
- Implemented persistent point storage in internal Flash
90
+
- Finalized two-task async architecture with Embassy
56
91
57
92
## Hardware
58
93
59
94
The system is built around an STM32 Nucleo board and integrates multiple sensors and actuators.
0 commit comments