Skip to content

Commit 91bf5af

Browse files
aryuqqrootPOPAGEORGEMATEI
authored
Project (#1045)
* Project * project * Project * Project * Project * Project * Project * Project * Project * Project * Update schematic and project photos * Update schematic and documentation * Update schematic and documentation * Update schematic and documentation --------- Co-authored-by: root <root@Ariana> Co-authored-by: POPAGEORGEMATEI <119328898+POPAGEORGEMATEI@users.noreply.github.com>
1 parent 54f3929 commit 91bf5af

5 files changed

Lines changed: 141 additions & 0 deletions

File tree

38.4 KB
Loading
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Autonomous Vehicle with Dynamic Path Replanning
2+
**An autonomous robotic system capable of navigating along a predefined path and dynamically adapting its route in real time to avoid obstacles.**
3+
4+
:::info
5+
**Author:** ariana.pelcaru \
6+
**GitHub Project Link :** https://github.com/UPB-PMRust-Students/acs-project-2026-aryuqq
7+
:::
8+
9+
## Description
10+
11+
The Autonomous Vehicle with Dynamic Path Reconfiguration demonstrates intelligent navigation in environments with unpredictable obstacles. Under normal conditions, it follows a predefined path using embedded control logic.
12+
13+
The vehicle continuously monitors its surroundings with distance sensors to detect obstacles in real time. When an obstacle is detected, the system analyzes the data, recalculates an alternative route, and adjusts its movement to safely avoid collisions while continuing toward its destination.
14+
15+
## Motivation
16+
17+
Autonomous vehicles have the potential to significantly improve safety and efficiency in real-world transportation systems. Human error remains one of the main causes of accidents, especially in dynamic and unpredictable environments where quick reactions are required.
18+
This project was inspired by the idea of reducing such risks by enabling a system that can perceive obstacles and react instantly without human intervention.
19+
20+
## Architecture
21+
The main architectural components of the autonomous vehicle system are:
22+
23+
- **STM32 Main Controller (Nucleo Board)** – central processing unit that runs the real-time control loop, handles sensor input, decision-making, and actuator control for navigation.
24+
25+
- **Ultrasonic Sensor (HC-SR04)** – used for real-time obstacle detection in front of the robot; triggers avoidance logic when distance is below a defined threshold.
26+
27+
- **Motor Driver (L298N) + DC Motors** – provides bidirectional control of the drive system, allowing forward movement, reverse motion, and turning maneuvers based on navigation decisions.
28+
29+
- **Servo Motor (Steering/Scanning System)** – controls directional scanning of the environment, enabling the system to evaluate left/right paths when obstacles are detected.
30+
31+
- **ST7735 TFT Display** – visual output module used to render the robot’s map, movement trail, obstacle positions, and system status messages in real time.
32+
33+
- **Buzzer (Audio Alert System)** – provides immediate acoustic feedback when an obstacle is detected or when avoidance behavior is triggered.
34+
35+
- **Power Supply (Battery Pack)** – ensures autonomous operation of the system by powering all modules, including motors, sensors, and microcontroller.
36+
37+
38+
![alt text](arhitecture_schematic.webp)
39+
40+
## Project Photos
41+
42+
![alt text](photo1.webp)
43+
44+
![alt text](photo2.webp)
45+
46+
![alt text](photo3.webp)
47+
48+
## Log
49+
50+
### Week 20-26 Apr
51+
- This week, I focused on defining the overall architecture of the autonomous vehicle project based on STM32. I worked on shaping the main system modules (sensing, control, actuation, and user interface) and clarified how they interact in a real-time embedded system.
52+
- I also worked on the project documentation, writing the initial structure and describing the main functionalities and expected system behavior.
53+
- In addition, I made a first draft of the required components (HC-SR04 sensor, L298N motor driver, DC motors, servo motors) and researched their roles in the system.
54+
- Connected the Hardware
55+
- Tested the sensors
56+
57+
### Week 11-17 May
58+
- This week, I started the software development for the autonomous vehicle, implementing the main control logic
59+
- I also improved the hardware structure by redesigning the connections and layout to ensure better compatibility and stable operation of all components together.
60+
61+
### Week 19 - 27 May
62+
63+
- Completed the software implementation
64+
- Completed the final design
65+
- Finalized the documentation
66+
67+
68+
## Hardware
69+
70+
- **Microcontroller:** STM32 Nucleo Board
71+
- **Sensor:** HC-SR04 Ultrasonic Sensor
72+
- **Actuators:** DC Motors, Servo Motor
73+
- **Motor Driver:** L298N Motor Driver
74+
- **Display:** ST7735 LCD Display
75+
- **Input:** ON/OFF Button
76+
- **Other:** Breadboard, jumper wires, battery pack, Buzzer
77+
78+
79+
## Software Design
80+
81+
### Description
82+
83+
#### 1. Design Patterns:
84+
85+
- **Controller / Manager pattern** (Motor control, Display manager, Sensor handler)
86+
- **State machine navigation logic** for autonomous obstacle avoidance
87+
- **Circular buffer processing** for movement trail visualization
88+
- **Event-driven asynchronous execution** using Embassy runtime
89+
90+
#### 2. Key Features:
91+
92+
- **Autonomous obstacle detection and avoidance** using ultrasonic distance sensing
93+
- **Real-time navigation decision making** with left/right path evaluation
94+
- **Graphical map visualization** with robot tracking and obstacle marking
95+
- **Servo-based environmental scanning** for route analysis
96+
- **PWM motor speed and steering control**
97+
- **Audio warning system** using buzzer feedback on obstacle detection
98+
- **Continuous position tracking with trail fading effect**
99+
100+
## Bill of Materials
101+
102+
### Hardware
103+
104+
| Device | Usage | Price | Link |
105+
|--------|------|-------|------|
106+
| STM32 Nucleo Board | Main controller | ~50–120 RON | https://ro.rsdelivers.com/product/stmicroelectronics/nucleo-f030r8/stmicroelectronics-stm32-nucleo-64-mcu-development/8029412??cm_mmc=RO-PLA-DS3A-_-google-_-CSS_PMAX_RO_EN_Catch-All-APRIL26-_--_-&matchtype=&&s_kwcid=AL!14853!3!!!!x!!&gclsrc=aw.ds&gad_source=1&gad_campaignid=23736421110&gbraid=0AAAAADxE2BaCPLsfTln0p4lXSlR_I6PeK&gclid=CjwKCAjw5s_QBhAdEiwADD_gBkeMIJsm4ndLVWnCTqbiwNYLKSDluTfOigp-Ow376m_SSJX9eYVeyBoC86YQAvD_BwE |
107+
| HC-SR04 Ultrasonic Sensor | Obstacle detection | ~15 RON | https://www.optimusdigital.ro/ro/senzori-senzori-ultrasonici/2328-senzor-ultrasonic-de-distana-hc-sr04-compatibil-33-v-i-5-v.html?search_query=Senzor+Ultrasonic+de+Distan%C8%9Ba+HC-SR04++%28Compatibil+3.3+V+%C8%99i+5+V%29&results=9 |
108+
| L298N Dual Motor Driver | Motor control | ~15 RON | https://www.optimusdigital.ro/en/brushed-motor-drivers/145-l298n-dual-motor-driver.html |
109+
| DC Motors + Wheels Set (4x) | Robot movement | ~50 RON | https://www.emag.ro/set-motoreductor-cu-roata-4-bucati-3874783591881/pd/DMXQ1DYBM/ |
110+
| SG90 Servo Motor | Steering / scanning | ~27 RON | https://www.conexelectronic.ro/senzori-si-module-pentru-platforme-de-dezvoltare/15482-MINISERVOMOTOR-SG90-9G.html |
111+
| LCD 1.8” TFT Display (optional alternative) | Graphical display | ~61 RON | https://www.emag.ro/display-lcd-1-8-inch-general-128x160-digital-3-3v-pentru-arduino-emag-b-gd-0017/pd/D5XYV8YBM/ |
112+
| ON/OFF Button | System control | ~1–2 RON | https://www.optimusdigital.ro/ro/butoane-i-comutatoare/7377-comutator-kcd10-101.html?search_query=Comutator+KCD10-101&results=1 |
113+
| Breadboard | Prototyping | ~5 RON | (Generic component) |
114+
| Dupont Wires (Male-Female) | Connections | ~5 RON | https://www.emag.ro/10-x-fire-dupont-mama-tata-20cm-ai306-s459/pd/DZJ66JBBM/ |
115+
| Dupont Wires (Male-Male) | Connections | ~5 RON | https://www.emag.ro/10-x-fire-dupont-tata-tata-20cm-ai308-s451/pd/DV8M9WBBM/ |
116+
| Active Buzzer 3V | Audio feedback / alerts | ~5 RON | https://www.optimusdigital.ro/en/buzzers/635-3v-active-buzzer.html |
117+
| Battery x4 | Power supply | ~88 RON | https://www.optimusdigital.ro/ro/acumulatori-li-ion/13662-us18650vtc5c-2600mah-30a.html?search_query=Murata+US18650VTC5C+2600mAh+-+30A&results=1 |
118+
| Battery Support | Battery holder | ~8 RON | https://www.optimusdigital.ro/ro/suporturi-de-baterii/991-suport-de-baterii-4x18650.html?search_query=Suport+de+Baterii+4x18650&results=2 |
119+
120+
### Software
121+
122+
| Library | Description | Usage |
123+
|---------|-------------|-------|
124+
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async runtime for embedded systems | Handles concurrent task execution for sensor reading, obstacle detection, motor control, and display updates |
125+
| [embassy-time](https://github.com/embassy-rs/embassy) | Embedded timing utilities | Manages delays for ultrasonic measurements, motor timing, servo positioning, and display refresh cycles |
126+
| [embassy-stm32](https://docs.embassy.dev/embassy-stm32/) | STM32 Hardware Abstraction Layer | Provides access to GPIO, PWM timers, SPI communication, and peripheral initialization |
127+
| [embassy-stm32::gpio](https://docs.embassy.dev/embassy-stm32/) | GPIO control module | Controls motor driver pins, trigger signal, buzzer output, and reads ultrasonic echo input |
128+
| [embassy-stm32::spi](https://docs.embassy.dev/embassy-stm32/) | SPI communication interface | Drives communication with the ST7735 display |
129+
| [embassy-stm32::timer::simple_pwm](https://docs.embassy.dev/embassy-stm32/) | PWM timer control | Generates PWM signals for DC motor speed control and servo positioning |
130+
| [embedded-hal](https://github.com/rust-embedded/embedded-hal) | Embedded hardware abstraction traits | Standardized peripheral access across drivers |
131+
| [embedded-hal-bus](https://github.com/rust-embedded/embedded-hal) | Shared bus abstraction | Provides exclusive SPI device access for display communication |
132+
| [mipidsi](https://github.com/almindor/mipidsi) | TFT display driver | Controls the ST7735s display initialization and rendering |
133+
| [embedded-graphics](https://github.com/embedded-graphics/embedded-graphics) | 2D graphics rendering library | Draws robot map, obstacle markers, movement trail, countdown screen, and interface graphics |
134+
| [defmt](https://github.com/knurling-rs/defmt) | Lightweight embedded logging framework | Logs robot state, distance measurements, obstacle detection, and navigation decisions |
135+
| [defmt-rtt](https://github.com/knurling-rs/defmt) | RTT transport for defmt logs | Sends debugging information to host during execution |
136+
| [panic-probe](https://github.com/knurling-rs/panic-probe) | Panic handler for embedded debugging | Reports runtime crashes and diagnostic errors during development |
137+
138+
# Links
139+
1. [Lab Materials](https://pmi.acs.pub.ro/)
140+
2. [About Rust](https://docs.rust-embedded.org/book/)
141+
3. [Youtube_Video](https://www.youtube.com/watch?v=kPSBpfUpHt0)
123 KB
Loading
80.3 KB
Loading
103 KB
Loading

0 commit comments

Comments
 (0)