An advanced dual-ESP32 wireless flight safety system featuring precision VL53L1X Laser ToF distance sensing, progressive multi-sensory warnings, 2.42" OLED telemetry UI, live web configuration, and dual DC motor flight controls.
Integrated modular architecture providing real-time terrain evaluation and progressive warning triggers.
High-accuracy laser Time-of-Flight sensors measuring ground clearance (Altitude) and forward terrain (Obstacle) up to 4 meters away with mm accuracy.
Peer-to-peer 2.4 GHz wireless protocol ensures sub-10ms latency telemetry transfer between MAIN sensor rig and SUB telemetry display unit.
Synchronized RGB LED, adaptive active buzzer frequency, alternating DFPlayer audio warnings, and OLED inverted display flashing.
On-board WiFi AP dashboard (GPWS-Gateway) allowing dynamic threshold tuning for altitude, obstacle distance, and voice audio volume saved to NVS flash.
Dual dual-axis joysticks with center-deadzone mapping driving L298N dual DC motors via 8-bit PWM speed control.
Smart 1.5-second long-press power toggle via Joystick 1 switch with single-event detection, startup and shutdown voice confirmation.
Distributed dual-ESP32 architecture communicating seamlessly over ESP-NOW wireless links.
Dynamic warning escalation based on proximity thresholds with interactive OLED telemetry test.
| Alert Level | Altitude Boundary | Obstacle Boundary | RGB LED | Active Buzzer | OLED Display Text |
|---|---|---|---|---|---|
| Safe | ≥ 30.0 cm | ≥ 50.0 cm | Solid Green | Off | STATUS: SAFE |
| Warning | 15.0 – 30.0 cm | 25.0 – 50.0 cm | Blinking Yellow | Synced Beep (150–500ms) | WARNING: LOW ALT / OBSTACLE |
| Critical | < 15.0 cm | < 25.0 cm | Fast Blinking Red | Fast Beep (50–150ms) | DANGER: LOW ALT! / OBSTACLE! |
ALT+OBS! and
audio alerts automatically alternate between both warning tracks each 3-second cycle.
Dedicated MP3 voice tracks providing instant auditory pilot warnings.
Pinout configurations for both ESP32 units.
| Component | Pin | ESP32 GPIO | Operating Notes |
|---|---|---|---|
| VL53L1X #1 (Altitude) | SDA / SCL | GPIO 21 / GPIO 22 | Shared I2C Bus |
| VL53L1X #1 (Altitude) | XSHUT | GPIO 13 | Address dynamically changed to 0x30 |
| VL53L1X #2 (Obstacle) | SDA / SCL | GPIO 21 / GPIO 22 | Shared I2C Bus |
| VL53L1X #2 (Obstacle) | XSHUT | GPIO 26 | Keeps default I2C address 0x29 |
| L298N Motor Driver A | IN1 / IN2 / ENA | GPIO 32 / 33 / 18 | Motor A Direction & PWM Speed (8-bit) |
| L298N Motor Driver B | IN3 / IN4 / ENB | GPIO 25 / 4 / 19 | Motor B Direction & PWM Speed (8-bit) |
| Component | Pin | ESP32 GPIO | Operating Notes |
|---|---|---|---|
| 2.42" OLED Display | SDA / SCL / VCC | GPIO 21 / 22 / 5V (VIN) | I2C Address 0x3C. Requires 5V supply for 2.42" SSD1306/SSD1309 panels.
|
| Joystick 1 (Motor A Control) | VRx / VRy / SW | GPIO 34 / 35 / 32 | SW Switch long-press (1.5s) triggers System Power Toggle |
| Joystick 2 (Motor B Control) | VRx / VRy / SW | GPIO 33 / 36 / 26 | Analog read on ADC1 channel (WiFi compatible) |
| RGB LED (Common Cathode) | R / G / B | GPIO 16 / 17 / 18 | Visual indicator (Green/Yellow/Red) |
| Active Buzzer | Signal | GPIO 19 | Auditory alert generator |
| DFPlayer Mini Module | TX (pin 3) / RX (pin 2) | GPIO 23 / 4 | RX connected via 1kΩ inline resistor to mitigate noise. |
The ESP32 SUB unit creates a standalone Access Point allowing real-time calibration of distance safety thresholds and volume levels straight from any mobile browser or computer.
| Parameter | Default | Description |
|---|---|---|
altSafe |
30.0 cm | Altitude Safe boundary |
altWarn |
15.0 cm | Altitude Warning/Critical threshold |
obsSafe |
50.0 cm | Obstacle Safe boundary |
obsWarn |
25.0 cm | Obstacle Warning/Critical threshold |
volume |
25 (0–30) | DFPlayer speaker volume level |