Skip to content

Commit 78357ad

Browse files
horatiuopreagithub-classroom[bot]irina-b-dev
authored
Project/horatiu.oprea (#1287)
* first_comm * add deadline * Asign Repo * Project documentation starter * Documentatie * Final Documentation * Image pb solved * Final pull * No .png * Resize * Reshape + Del * Original README.md * Lower-case names * Maybe * Final * Low_Case --------- Co-authored-by: github-classroom[bot] <66690702+github-classroom[bot]@users.noreply.github.com> Co-authored-by: Irina Bradu <72762129+irina-b-dev@users.noreply.github.com>
1 parent f0ab392 commit 78357ad

4 files changed

Lines changed: 31 additions & 11 deletions

File tree

website/versioned_docs/version-acs_cc/project/2026/horatiu.oprea/architecture_diagram.drawio.svg

Lines changed: 4 additions & 0 deletions
Loading

website/versioned_docs/version-acs_cc/project/2026/horatiu.oprea/Documentatie.drawio.svg renamed to website/versioned_docs/version-acs_cc/project/2026/horatiu.oprea/documentatie.drawio.svg

File renamed without changes.

website/versioned_docs/version-acs_cc/project/2026/horatiu.oprea/index.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,47 @@ Embedded systems and control theory are two domains I wanted to explore simultan
2020

2121
## Architecture
2222

23-
The system is structured around four main architectural components that form a closed control loop:
23+
The system is structured around 4 main architectural components that form a closed control loop:
2424

2525
**Sensor** — The VL53L0X laser Time-of-Flight sensor is mounted at the top of the tube and measures the distance to the ball via I2C. This gives the current height y(t).
2626

2727
**Controller** — The STM32 Nucleo-U545RE-Q runs the PID algorithm in an Embassy async task at a fixed 20ms cycle. It reads the current height from the sensor, computes the error relative to the target, and produces a control output u(t) in the range 0–100%.
2828

2929
**Actuator** — The Delta PFB0412EN-E fan receives a PWM signal at 25kHz directly on its dedicated blue wire. The duty cycle of this signal determines the fan speed, which controls the airflow and thus the ball's position.
3030

31-
**User Interface** — Four potentiometers provide analog inputs via ADC: one sets the target height, and three adjust Kp, Ki, Kd in Manual mode. A 1602 I2C LCD displays system state. A toggle switch selects between Auto and Manual mode.
31+
**User Interface** — Four potentiometers provide analog inputs via ADC: one sets the target height in Auto Mode, and three adjust Kp, Ki, Kd in Manual mode. A ST7920 LCD displays system state using SPI. A toggle switch selects between Auto and Manual mode.
3232

33-
## Closed Control Loop
33+
## Architecture Diagram
3434

35-
![Closed Loop Diagram](Documentatie.drawio.svg)
35+
![Architecture Diagram](architecture_diagram.drawio.svg)
3636

3737
## Log
3838

39-
### Week 5 - 11 May
39+
### Week 6 - 12 April
40+
**Chose the project task**
41+
42+
### Week 13 - 19 April
43+
**Initial Documentation**
44+
45+
### Week 20 - 26 April
46+
**Final Documentation**
47+
48+
### Week 4 - 10 May
49+
**Tested HW Components**
4050

41-
### Week 12 - 18 May
51+
### Week 11 - 17 May
52+
**Built HW Part and Startet the SW Part**
4253

43-
### Week 19 - 25 May
54+
### Week 18 - 24 May
55+
**Finished the SW Part and Final Design**
4456

4557
## Hardware
4658

4759
The project uses an STM32 Nucleo-U545RE-Q (Cortex-M33) as the main microcontroller, programmed in Rust with the Embassy async framework. The VL53L0X laser ToF sensor communicates over I2C and provides distance measurements with millimeter precision. The Delta PFB0412EN-E axial fan (40x40x28mm, 12V) features a native PWM control input, allowing direct speed control from the STM32 without a MOSFET driver stage. Four 10kΩ potentiometers provide analog inputs for height target and PID tuning. A 1602 LCD with I2C backpack shares the I2C bus with the sensor. A toggle switch selects the operating mode. The fan is powered by a dedicated 12V DC adapter; the STM32 and all logic components are powered via USB (5V), with the onboard regulator supplying 3.3V to the sensor and potentiometers. All grounds are tied to a common reference on the breadboard.
4860

4961
### Schematics
5062

51-
_KiCad schematic to be added here in SVG format._
63+
![alt text](pingpong_levitation.webp)
5264

5365
### Bill of Materials
5466

@@ -57,10 +69,10 @@ _KiCad schematic to be added here in SVG format._
5769
| [STM32 Nucleo-U545RE-Q](https://www.st.com/en/evaluation-tools/nucleo-u545re-q.html) | Main microcontroller — runs PID algorithm in Rust/Embassy | already owned |
5870
| [VL53L0X Laser ToF Sensor](https://www.optimusdigital.ro/ro/senzori-senzori-de-distanta/3309-modul-senzor-de-distanta-cu-laser-vl53l0x.html) | Measures ball height inside the tube via I2C | [25 RON](https://www.optimusdigital.ro) |
5971
| [Delta PFB0412EN-E Fan 12V](https://www.digikey.com) | Propeller fan — controls airflow in the tube via PWM | already owned |
60-
| [LCD 1602 I2C](https://www.optimusdigital.ro/ro/optoelectronice-lcd-uri/2894-lcd-cu-interfata-i2c-si-backlight-albastru.html) | Displays current height and PID constants | [15 RON](https://www.optimusdigital.ro) |
72+
| [LCD ST7920](https://www.optimusdigital.ro/ro/optoelectronice-lcd-uri/2894-lcd-cu-interfata-i2c-si-backlight-albastru.html) | Displays current height and PID constants | [15 RON](https://www.optimusdigital.ro) |
6173
| Potentiometer 10kΩ (x4) | Height target (x1) + Kp, Ki, Kd tuning (x3) | [5 RON x4](https://www.optimusdigital.ro) |
6274
| Toggle Switch | Selects Auto / Manual operating mode | [3 RON](https://www.optimusdigital.ro) |
63-
| Breadboard MB102 + YuRobot power module | Prototyping platform with integrated power supply | [20 RON](https://www.optimusdigital.ro) |
75+
| Breadboard MB102 - 830 pins | Prototyping platform with integrated power supply | [20 RON](https://www.optimusdigital.ro) |
6476
| DC Jack Module 5.5x2.1mm (breadboard) | Connects 12V adapter to breadboard for fan power | [7 RON](https://www.optimusdigital.ro) |
6577
| Resistor 100Ω | Protects STM32 PWM pin from fan input impedance | [1 RON](https://www.optimusdigital.ro) |
6678
| Jumper Wire Kit (120 pcs) | All signal and power connections on breadboard | [15 RON](https://www.optimusdigital.ro) |
@@ -75,12 +87,16 @@ _KiCad schematic to be added here in SVG format._
7587
| [embassy-stm32](https://github.com/embassy-rs/embassy) | Async HAL for STM32 microcontrollers | Peripheral access: PWM, I2C, ADC, GPIO |
7688
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async task executor for embedded systems | Runs sensor, control and display tasks concurrently |
7789
| [embassy-time](https://github.com/embassy-rs/embassy) | Timers and delays for Embassy | Fixed 20ms control loop timing |
90+
| [embassy-spi](https://github.com/UPB-PMRust/lab-solutions/tree/main/lab05) | Driver for ST7920-based LCD displays | Renders height and PID values |
7891
| [vl53l0x](https://crates.io/crates/vl53l0x) | Driver for VL53L0X ToF sensor | Reads ball distance over I2C |
79-
| [hd44780-driver](https://crates.io/crates/hd44780-driver) | Driver for HD44780-based LCD displays | Renders height and PID values on 1602 LCD |
8092
| [defmt](https://github.com/knurling-rs/defmt) | Efficient logging framework for embedded Rust | Debug output during development via RTT |
8193
| [defmt-rtt](https://github.com/knurling-rs/defmt) | RTT transport for defmt | Sends log messages to host over USB |
8294
| [panic-probe](https://github.com/knurling-rs/panic-probe) | Panic handler for embedded Rust | Reports panics via defmt |
8395

96+
## Closed Control Loop
97+
98+
![Closed Loop Diagram](documentatie.drawio.svg)
99+
84100
## Links
85101

86102
1. [Embassy — Async framework for embedded Rust](https://embassy.dev)
36.8 KB
Loading

0 commit comments

Comments
 (0)