Skip to content

Commit 1174f51

Browse files
authored
Smart Bin Documentation (#947)
* Smart Bin Documentation * Documentation Fix * Changed image format * Added classroom git repository * Hardware Documentation Update * FINAL Hardware Documentation * Updated photo name
1 parent 46ea739 commit 1174f51

3 files changed

Lines changed: 97 additions & 0 deletions

File tree

7.13 KB
Loading
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Smart Bin
2+
3+
:::info
4+
5+
**Author:** Robert Postolache
6+
**GitHub Project Link:** https://github.com/UPB-PMRust-Students/acs-project-2026-RobertP1021
7+
8+
:::
9+
10+
## Description
11+
12+
Smart Bin is a trash bin that automatically sorts waste without any user intervention. When it detects a hand nearby, it opens a flap and lets the object fall onto an internal analysis platform. There, humidity, metal, and weight sensors analyze the object and classify it into one of three categories: wet, dry, or metal. A motor then rotates the container platform until the correct one is in position, after which the object is released. If a container is full, the system refuses to accept new waste for that category.
13+
14+
## Motivation
15+
16+
My motivation to tackle this project came from my daily commute to work. Every day, before getting on the metro, I would buy a coffee cup and something to eat. Sometimes, if the metro was in the station, I hurriedly threw the cup and the food wrapper in the nearest trash bin, without looking for the correct label. So while I was searching for a project idea, I remembered that it would be nice to have a trash bin that could automatically sort the waste, without me having to worry about it.
17+
18+
## Architecture
19+
20+
Smart Bin is built around an STM32U545RE-Q Nucleo board that coordinates all sensors and actuators through firmware written in Rust with Embassy.
21+
22+
**Main flow:**
23+
24+
1. The proximity sensor detects a hand at the entry and the first servo opens the entry flap
25+
2. The object falls onto the analysis platform where the following are read simultaneously:
26+
- humidity sensor
27+
- metal sensor
28+
3. Based on the readings, the microcontroller classifies the object as WET / DRY / METAL
29+
4. The fill level of the target container is checked (one infrared sensor per container)
30+
5. If the container is available: the stepper motor rotates the turntable to the correct position, the second servo releases the object
31+
6. The display shows feedback to the user about the classification result and if a container is full or not
32+
33+
**Interfaces used:**
34+
- SPI: ST7735 LCD Display
35+
- PWM: servo × 2
36+
- GPIO: stepper motor, metal sensor, infrared reflective sensors × 3
37+
- ADC: humidity sensor
38+
39+
![Architecture Diagram](./arhitecture_final.webp)
40+
41+
## Log
42+
This will be updated as I continue developing the project
43+
44+
### Week 5 - 11 May
45+
I bought the hardware components, and mapped out the pin connections. I started testing each component with simple and minimal code.
46+
47+
### Week 12 - 18 May
48+
I completed the initial testing for each component, and presented them to the lab assistant.
49+
50+
### Week 19 - 25 May
51+
TODO
52+
53+
## Hardware
54+
55+
### Schematics
56+
57+
![Hardware Schematic](./pm_proiect_schematic.webp)
58+
59+
### Bill of Materials
60+
61+
| Device | Usage | Price |
62+
|--------|-------|-------|
63+
| [STM32U545RE-Q Nucleo](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html) | Microcontroller | 90 RON |
64+
| [Servo Motor SG90 × 2](https://www.optimusdigital.ro/en/servomotors/26-sg90-micro-servo-motor.html?search_query=SG90&results=5) | Entry flap + platform trapdoor | 13,99 RON × 2 |
65+
| [TCRT5000 Reflective Photoelectric Sensor x 3](https://www.optimusdigital.ro/en/optical-sensors/42-tcrt5000-photoelectric-sensor.html?search_query=TCRT5000&results=4) | Container fill level detection | 1.49 RON × 3 |
66+
*OR*
67+
| [TCRT5000 Infrared Line Sensor Module with Adjustable Sensitivity x 3](https://www.optimusdigital.ro/en/optical-sensors/2415-modul-senzor-infrarou-de-linie-cu-sensibilitate-reglabila.html?search_query=TCRT5000&results=4) | Container fill level detection | 3.87 RON × 3 |
68+
| [ULN2003 Stepper Driver + 5V Stepper Motor](https://www.optimusdigital.ro/en/stepper-motors/101-stepper-motor-with-uln2003-driver.html?search_query=stepper&results=97) | Stepper motor control for turntable | 16.97 RON |
69+
| [HR202L Resistive Humidity Sensor](https://www.optimusdigital.ro/en/humidity-sensors/590-senzor-rezistiv-de-umiditate-hr202l.html?search_query=rain+sensor&results=46) | Humidity sensor for wet/dry | 3.99 RON |
70+
*OR*
71+
[Rain Sensor Module](https://www.optimusdigital.ro/en/humidity-sensors/5775-rain-sensor-module.html?search_query=rain+sensor&results=46) | Humidity sensor for wet/dry | 9.99 RON |
72+
| [Senzor inductiv de proximitate - LJ12A3-4-Z/BX](https://ardushop.ro/ro/senzori/2182-senzor-inductiv-de-proximitate-lj12a3-4-z-bx-6427854033659.html) | Inductive proximity sensor for metal detection | 15.57 RON |
73+
| [Senzor Ultrasonic de Distanță HC-SR04+](https://www.optimusdigital.ro/ro/senzori-senzori-ultrasonici/2328-senzor-ultrasonic-de-distana-hc-sr04-compatibil-33-v-i-5-v.html?search_query=HC+SR04&results=15) | Ultrasonic sensor for hand detection | 14.99 RON |
74+
| [1.8 Inch 128 x 160 SPI TFT LCD Display Module ST7735 51/AVR/STM32/ARM 8/16 Bit ](https://www.amazon.de/-/en/Inch-Display-Module-ST7735-STM32/dp/B0B5RVX9BJ/ref=sr_1_5?crid=3OK9OD7CNSDQD&dib=eyJ2IjoiMSJ9.3_7bMaePwHiqT1VxJiDDYqMcf3MEYLs08db-A_noB2P4Km6v76rcO_IJ4UkdW2pKzx1nqF7hgj7hQwZO4oEUuQME23v1ycsK3XGmjYy8MhmZR3uXl4h4CjTXwQsQCQTv8zN5mkAJJkTlzr5h6mszg0E6Sb5RWU9VKmjLE18jA_CcQnokLxzeciWPpmBwJ2cjKuT4iVTUluNs2XoKtIuE8sIS5NBn381Fxy5ooGhK3CQ.FA72fIsMv7lud416DvWnN5Qno7Ko7FT2j4F5Fz0FYQE&dib_tag=se&keywords=ST7735+LCD+Display&qid=1776722780&sprefix=st7735+lcd+display%2Caps%2C199&sr=8-5) | Display for user feedback | 45.86 RON |
75+
| Breadboard + Jumper Wires | Connections | 15 RON |
76+
| Resistors assorted | Pull-ups, current limiting | 5 RON |
77+
78+
## Software
79+
80+
| Library | Description | Usage |
81+
|---------|-------------|-------|
82+
| [embassy-stm32](https://github.com/embassy-rs/embassy) | Async HAL for STM32 | Pin control, PWM, SPI, ADC |
83+
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async executor for embedded | Running concurrent tasks |
84+
| [embassy-time](https://github.com/embassy-rs/embassy) | Async timers and delays | Timing for sensors and motors |
85+
| [embassy-embedded-hal](https://github.com/embassy-rs/embassy) | Embedded HAL adapters for Embassy | SPI bus sharing for display |
86+
| [embedded-graphics](https://github.com/embedded-graphics/embedded-graphics) | 2D graphics library for embedded | Rendering text on the display |
87+
| [embedded-hal](https://github.com/rust-embedded/embedded-hal) | Hardware abstraction layer traits | PWM control for servo motors |
88+
| [mipidsi](https://github.com/almindor/mipidsi) | Display driver for MIPI displays | ST7735 display driver |
89+
| [display-interface-spi](https://github.com/therealprof/display-interface) | SPI display interface | SPI communication with ST7735 |
90+
91+
92+
## Links
93+
94+
1. [Embassy - Async framework for embedded Rust](https://embassy.dev/)
95+
2. [STM32U545RE-Q Nucleo Documentation](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html)
96+
3. [embedded-graphics](https://github.com/embedded-graphics/embedded-graphics)
97+
4. [PM Course Website](https://embedded-rust-101.wyliodrin.com/)
25.9 KB
Loading

0 commit comments

Comments
 (0)