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
Copy file name to clipboardExpand all lines: website/versioned_docs/version-fils_en/project/2026/andrei_marian.dulce/index.md
+45-31Lines changed: 45 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,23 +9,22 @@ A comprehensive bare-metal 2D scanning system and multi-sensor security alarm bu
9
9
:::
10
10
## Description
11
11
12
-
This project is an advanced, multi-layered active security and environmental monitoring hub built on the STM32. The core feature is a 2D scanning system using a VL53L0X Time-of-Flight (ToF) sensor mounted on a 28BYJ-48 stepper motor, which streams Cartesian coordinate data to a laptop via USB Bulk transfers to render a real-time radar map. Additional sensors provide intrusion detection and environmental telemetry.
12
+
This project is an advanced, multi-layered active security and environmental monitoring hub built on the STM32. The core feature is a 2D scanning system using a VL53L0X Time-of-Flight (ToF) sensor mounted on a 28BYJ-48 stepper motor, which performs a 180° back-and-forth sweep and streams 18-byte Cartesian coordinate frames to a laptop via USB CDC ACM to render a real-time radar map in Python (pygame). Additional sensors — a Doppler radar, vibration sensor, sound sensor, photoresistor, and BMP180 barometer — provide intrusion detection and environmental telemetry. Two RGB LEDs give local visual feedback for proximity zones and security status, while a PWM-driven buzzer sounds proximity alerts.
13
13
14
14
## Motivation
15
15
16
16
I chose this project because it combines precise motor control, real-time data acquisition from a vast array of sensors, and PC-device USB communication into a single robust system. It is a highly practical and technically challenging way to explore asynchronous embedded programming in Rust.
17
17
18
18
## Architecture
19
19
20
-

20
+

21
21
22
22
Main software and system components:
23
-
-**Scanning Module**: reads distance from VL53L0X via I2C and steps motor via GPIO.
24
-
-**Intrusion Detection Module**: reads Doppler radar, vibration, and sound sensors.
25
-
-**Access Control Module**: handles the 4x4 matrix keypad and IR receiver.
26
-
-**Environmental Module**: reads BMP180 (I2C) and photoresistors (ADC).
27
-
-**Local Feedback Module**: controls the 4-digit display, buzzer (PWM), and LEDs.
28
-
-**Communication Module**: sends serialized coordinate payloads via USB Bulk to the PC.
23
+
-**Scanning Module**: reads distance from VL53L0X via I2C (or generates mock ghost-room data when the sensor is unavailable) and steps the motor via GPIO in a strict ping-pong sweep.
24
+
-**Intrusion Detection Module**: reads Doppler radar (RCWL-0516), vibration (SW-420), and sound sensors with multi-sample polling to catch short pulses.
25
+
-**Environmental Module**: reads BMP180 temperature/pressure (I2C) and photoresistor ambient light (ADC) for night mode detection.
26
+
-**Local Feedback Module**: drives two RGB LEDs (proximity zones + security status) and a PWM buzzer for proximity alarms.
27
+
-**Communication Module**: streams serialized 18-byte ScanPoint payloads via USB CDC ACM to the PC, and receives single-byte motor commands (Auto/Right/Left/Stop).
29
28
30
29
## Log
31
30
@@ -47,14 +46,29 @@ Main software and system components:
47
46
48
47
## Hardware
49
48
50
-
The system uses an STM32 Nucleo-U545RE-Q as the central hub. It orchestrates a VL53L0X ToF sensor mounted on a 5V stepper motor for spatial scanning, alongside a suite of security sensors (Doppler radar, vibration, sound, keypad) and environmental sensors (BMP180, photoresistors). Everything is wired on a universal 830-point breadboard.
49
+
The system uses an STM32 Nucleo-U545RE-Q as the central hub. It orchestrates a VL53L0X ToF sensor mounted on a 5V stepper motor for spatial scanning, alongside a suite of security sensors (Doppler radar, vibration, sound) and environmental sensors (BMP180, photoresistor). Two RGB LEDs provide local visual feedback and a PWM buzzer handles proximity alerts. Everything is wired on a universal 830-point breadboard.
<em>Complete system schematic for the Smart 2D LiDAR Security Hub.</em>
56
55
</p>
56
+
### Breadboard Assembly
57
57
58
+

59
+
<palign="center">
60
+
<em>Breadboard wiring setup - view 1.</em>
61
+
</p>
62
+
63
+

64
+
<palign="center">
65
+
<em>Breadboard wiring setup - view 2.</em>
66
+
</p>
67
+
68
+

69
+
<palign="center">
70
+
<em>Breadboard wiring setup - view 3.</em>
71
+
</p>
58
72
### Bill of Materials
59
73
60
74
| Device | Usage | Price |
@@ -65,40 +79,40 @@ The system uses an STM32 Nucleo-U545RE-Q as the central hub. It orchestrates a V
65
79
|[28BYJ-48 5V Stepper Motor + ULN2003 Driver](https://www.optimusdigital.ro/en/stepper-motors/2487-step-by-step-28byj048-5v-motor-and-uln2003-driver-green-.html?search_query=28BYJ-48&results=1)| Motor for sensor sweeping | 15.00 RON |
|[BMP180 Sensor Module](https://sigmanortec.ro/Senzor-presiune-atmosferica-temperatura-BMP180-p126182252)| Temperature and pressure sensing (I2C) | 4.50 RON |
68
-
|[4x4 Matrix Keypad](https://www.optimusdigital.ro/en/touch-sensors/2441-tastatura-matriceala-4x4-cu-butoane.html?search_query=0104110000023537&results=1)| PIN code input for security | 4.00 RON |
69
-
|[0.56" 4-Digit 7-Segment Display](https://sigmanortec.ro/Display-digital-LED-0-56-4-digiti-7-segmente-Rosu-p128704274)| Local numerical data display | 10.00 RON |
|[embassy-usb](https://github.com/embassy-rs/embassy)| USB device stack | Implementing USB Bulk endpoints for PC communication |
90
-
|[embassy-sync](https://crates.io/crates/embassy-sync)| Async synchronization primitives | Providing Channels and Signals to safely move sensor data between tasks. |
91
-
|[embassy-embedded-hal](https://crates.io/crates/embassy-embedded-hal)|Adapter for Embedded HAL | Bridging Embassy drivers with the standard Rust embedded ecosystem. |
92
-
|[keypad-rs](https://crates.io/crates/keypad)| Matrix keypad driver | Scanning and debouncing the 4x4 input matrix |
93
-
|[postcard](https://crates.io/crates/postcard)| Compact binary serialization | Serializing coordinate and security data into tiny packets for USB transmission. |
94
-
|[serde](https://serde.rs/)| Data serialization framework | Core framework used by Postcard to define the structure of analytics sent to the PC. |
95
-
|[cortex-m](https://crates.io/crates/cortex-m)| ARM Cortex-M low-level access | Handling low-level CPU operations and critical sections. |
96
-
|[cortex-m-rt](https://crates.io/crates/cortex-m-rt)| Startup and runtime for ARM | Managing the reset handler and memory initialization of the STM32. |
97
-
|[panic-probe](https://crates.io/crates/panic-probe)| Debug panic handler | Catching code crashes and printing the stack trace over the debug probe. |
98
-
|[defmt](https://defmt.ferrous-systems.com/)| Deferred formatting | Providing high-efficiency logging to debug sensor values in real-time. |
99
-
|[micromath](https://github.com/tarcieri/micromath)|`no_std` math library | Computing trigonometric functions for coordinate mapping |
100
-
|[vl53l0x](https://crates.io/crates/vl53l0x)| ToF Sensor Driver | Reading distance data from your laser sensor over I2C. |
101
-
|[ht16k33](https://crates.io/crates/ht16k33)| Segment Display Driver | Controls the 7-segment display. |
101
+
|[embassy-usb](https://github.com/embassy-rs/embassy)| USB device stack | Implementing USB CDC ACM endpoints for PC communication |
102
+
|[embassy-sync](https://crates.io/crates/embassy-sync)| Async synchronization primitives | Channels and Signals to safely move sensor data between tasks |
103
+
|[embassy-embedded-hal](https://crates.io/crates/embassy-embedded-hal)| Adapter for Embedded HAL | Bridging Embassy drivers with the standard Rust embedded ecosystem |
104
+
|[embassy-futures](https://crates.io/crates/embassy-futures)| Future combinators |`join3` for running USB device, TX, and RX concurrently |
105
+
|[serde](https://serde.rs/)| Data serialization framework | Derive macros for ScanPoint and SystemStatus structs |
106
+
|[cortex-m](https://crates.io/crates/cortex-m)| ARM Cortex-M low-level access | Handling low-level CPU operations and critical sections |
107
+
|[cortex-m-rt](https://crates.io/crates/cortex-m-rt)| Startup and runtime for ARM | Managing the reset handler and memory initialization of the STM32 |
108
+
|[panic-probe](https://crates.io/crates/panic-probe)| Debug panic handler | Catching code crashes and printing the stack trace over the debug probe |
109
+
|[defmt](https://defmt.ferrous-systems.com/)| Deferred formatting | High-efficiency logging to debug sensor values in real-time |
110
+
|[defmt-rtt](https://crates.io/crates/defmt-rtt)| RTT transport for defmt | Sends defmt log frames over the debug probe's RTT channel |
111
+
|[micromath](https://github.com/tarcieri/micromath)|`no_std` math library | Computing sin/cos for polar-to-Cartesian coordinate mapping |
112
+
|[vl53l0x](https://crates.io/crates/vl53l0x)| ToF Sensor Driver | Reading distance data from the laser sensor over I2C |
113
+
|[bmp180-embedded-hal](https://crates.io/crates/bmp180-embedded-hal)| BMP180 Sensor Driver | Reading temperature and pressure over I2C |
114
+
|[static_cell](https://crates.io/crates/static_cell)| Static allocation | Safe `'static` references for USB buffers, channels, and shared I2C bus |
115
+
|[embedded-hal](https://crates.io/crates/embedded-hal)| Embedded HAL traits | Common trait interface used by sensor drivers |
0 commit comments