Skip to content

Commit ad707c8

Browse files
authored
Added webp hardware images and finalized documentation (#1421)
* Added webp hardware images and finalized documentation * fix: replace failing base64 svg with webp schematic
1 parent c57ca3f commit ad707c8

7 files changed

Lines changed: 45 additions & 34 deletions

File tree

70.9 KB
Loading
103 KB
Loading
72.7 KB
Loading

website/versioned_docs/version-fils_en/project/2026/andrei_marian.dulce/index.md

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ A comprehensive bare-metal 2D scanning system and multi-sensor security alarm bu
99
:::
1010
## Description
1111

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.
1313

1414
## Motivation
1515

1616
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.
1717

1818
## Architecture
1919

20-
![System Architecture Diagram](./schematic.svg)
20+
![System Architecture Diagram](./schematic.webp)
2121

2222
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).
2928

3029
## Log
3130

@@ -47,14 +46,29 @@ Main software and system components:
4746

4847
## Hardware
4948

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.
5150

5251
### Schematics
53-
![System Architecture Diagram](./lidarsecurityhub.svg)
52+
![KiCAD Schematic](./lidarsecurityhub.webp)
5453
<p align="center">
5554
<em>Complete system schematic for the Smart 2D LiDAR Security Hub.</em>
5655
</p>
56+
### Breadboard Assembly
5757

58+
![Breadboard Photo 1](./img1.webp)
59+
<p align="center">
60+
<em>Breadboard wiring setup - view 1.</em>
61+
</p>
62+
63+
![Breadboard Photo 2](./img2.webp)
64+
<p align="center">
65+
<em>Breadboard wiring setup - view 2.</em>
66+
</p>
67+
68+
![Breadboard Photo 3](./img3.webp)
69+
<p align="center">
70+
<em>Breadboard wiring setup - view 3.</em>
71+
</p>
5872
### Bill of Materials
5973

6074
| Device | Usage | Price |
@@ -65,40 +79,40 @@ The system uses an STM32 Nucleo-U545RE-Q as the central hub. It orchestrates a V
6579
| [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 |
6680
| [RCWL-0516 Doppler Radar Sensor](https://sigmanortec.ro/Senzor-Doppler-Radar-RCWL-0516-p125423439) | Microwave motion detection | 6.20 RON |
6781
| [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 |
7082
| [Passive Buzzer 3.3V](https://www.optimusdigital.ro/en/buzzers/12247-3-v-or-33v-passive-buzzer.html?search_query=0104210000081527&results=1) | Proximity audio alarm (PWM) | 3.00 RON |
7183
| [Photoresistors](https://www.optimusdigital.ro/en/others/28-5528-photoresistor.html?search_query=0104210000002072&results=1) | Ambient light sensing (ADC) | 7.60 RON |
7284
| [Vibration / Tilt Sensor](https://sigmanortec.ro/Senzor-vibratie-miscare-inclinare-p126008775) | Tamper detection | 6.00 RON |
7385
| [Microphone / Sound Sensor](https://sigmanortec.ro/Modul-microfon-senzor-sunet-p126025149) | Acoustic trigger | 5.00 RON |
74-
| 10x LED 5mm (Mixed colors) | Directional and status visual indicators | 5.00 RON |
75-
| [Transistors (2N2222, BC547) & Diodes (1N4148)] | Signal switching and protection | 10.00 RON |
76-
| [Assorted Resistors (220Ω, 330Ω, 1kΩ, 4.7kΩ, 10kΩ)] | Current limiting and pull-ups/downs | 5.00 RON |
86+
| 2× RGB LED 5mm (Common Cathode + Common Anode) | Proximity zones and system status indicators | 5.00 RON |
87+
| [Transistors (2N2222) & Diodes (1N4148)] | Buzzer transistor driver and flyback protection | 10.00 RON |
88+
| [Assorted Resistors (330Ω, 1kΩ, 10kΩ)] | Current limiting (LEDs) and pull-ups/downs | 5.00 RON |
7789
| [Capacitors (100uF, 470uF, 100nF)] | Power filtering and decoupling | 15.00 RON |
7890
| [Dupont Wires (M-M, M-F, F-F)] | Establishing connections | 25.00 RON |
7991
| [Switches & PCB Buttons] | Power control and inputs | 15.00 RON |
80-
| **Total** | | **286.56 RON** |
92+
| **Total** | | **272.56 RON** |
8193

8294
## Software
8395

8496
| Library | Description | Usage |
8597
|---------|-------------|-------|
86-
| [embassy-stm32](https://github.com/embassy-rs/embassy) | Async HAL for STM32 | Hardware access for I2C, GPIO, ADC, and PWM |
87-
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async task executor | Schedules concurrent firmware tasks |
98+
| [embassy-stm32](https://github.com/embassy-rs/embassy) | Async HAL for STM32 | Hardware access for I2C, GPIO, ADC, PWM, and USB |
99+
| [embassy-executor](https://github.com/embassy-rs/embassy) | Async task executor | Schedules 7 concurrent firmware tasks |
88100
| [embassy-time](https://github.com/embassy-rs/embassy) | Embedded timers | Delay management and periodic sensor polling |
89-
| [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 |
102116

103117

104118
## Links
72.7 KB
Loading

website/versioned_docs/version-fils_en/project/2026/andrei_marian.dulce/schematic.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.
45.7 KB
Loading

0 commit comments

Comments
 (0)