MINE GUARD (SIH26025)
AI-Enabled Mine Subsidence Monitoring & Early-Warning System (Ministry of Coal)
Role: System Architecture, Firmware & Web Prototype Lead
- Firmware Memory
- 6.4% RAM · 9.9% Flash
- Tier 3 PlatformIO ESP32-S3 build
- Software Tests
- 42 / 42 Vitest
- Tier 4 automated CI suites
- Synthetic ML Recall
- 93.00% Recall · 83.60% Acc
- Tier 5 1,000 synthetic vectors
- Target Unit BOM
- INR 4,850 (Projected)
- Tier 1 design cost estimate
01 · Problem Definition & Objectives
Engineering Problem
Underground coal mining operations (bord-and-pillar depillaring and longwall extraction) face unexpected ground convergence, roof sagging, and surface subsidence hazards. Imported commercial subsurface monitoring stations cost approximately INR 1,50,000 to 4,50,000 per station, restricting dense multi-station colliery coverage.
Intended Outcomes
- Architect an open subsurface node concept targeting INR 4,850 projected unit BOM across COTS sensing, ESP32-S3 compute, and sub-GHz LoRa IN865 communication.
- Implement deterministic ESP32-S3 C++ / FreeRTOS firmware exporting static EWMA and MAD Z-score thresholds generated by a Python anomaly pipeline.
- Provide a real-time statutory operations dashboard aligned with Coal Mines Regulations (CMR) 2017 Regulation 112 with explicit separation between synthetic scenarios and pending physical field integration.
02 · System Architecture
Architecture & Signal Flow
Combines an ESP32-S3 Embedded C++ / FreeRTOS firmware framework (PlatformIO, SX1262 LoRa IN865, BNO085/MPU6050 tilt driver, ADS1220 24-bit ADC driver), a Python Edge AI anomaly pipeline (EWMA, MAD Z-scores) exporting static C headers, and an interactive Next.js 16, TypeScript, and Supabase operations dashboard.
Tilt & Strain Sensing Drivers
I2C (0x4A/0x68) & SPIBNO085/MPU6050 inclinometer driver + ADS1220 24-bit sigma-delta strain bridge interface.
Firmware implemented · partial bench probe
Edge TinyML Filter & LoRa Packet
ESP32-S3 + SX1262 (865.2 MHz)N=30 circular buffer, EWMA + MAD Z-score thresholds, 20-byte CRC-16 packet with 300s/10s adaptive interval.
Compiles deterministically (Tier 3)
Ingestion & Analytics Backend
POST /api/telemetry/ingest + SupabaseZod validation, Pearson spatial correlation, 5-state risk engine, and immutable audit tables.
Software tested (42/42 Vitest)
DGMS CMR 2017 Dashboard
Next.js 16 + TypeScript12 operational views, vector mine panel canvas, shift sign-off workflow, and Form IV compliance view.
Live web demonstrator (synthetic telemetry)
03 · Implementation & Design Rationale
Technical Implementation Details
- Firmware (`firmware/src/`): Implements circular buffer (N = 30), dynamic telemetry interval switching (300 s nominal to 10 s on alert), and a packed 20-byte CRC-16 LoRa binary packet format for SX1262 (865.2 MHz).
- Edge AI Pipeline (`ml/`): Synthetic geotechnical vector generator and evaluator (`ml/evaluate_model.py`, seed = 123) exporting deterministic anomaly thresholds as static C headers (`ml/tinyml_export.py`) without heap allocation.
- Operations Dashboard (`src/`): 12 interactive views built with Next.js, TypeScript, Zod ingestion validation (`/api/telemetry/ingest`), Supabase PostgreSQL with RLS, and a 5-state risk engine (Normal to Critical).
Key Engineering Decisions
- Exported Python Edge AI EWMA/MAD Z-score thresholds as static C headers for deterministic on-device execution without dynamic heap allocation.
- Designed spatial Pearson cross-station correlation (r > +0.75) and multi-modal agreement rules in the analytics engine to reduce single-sensor false positives.
- Scoped dashboard telemetry explicitly as calibrated synthetic simulation while physical multi-sensor integration and statutory certification remain future work.
04 · Verified Individual Contributions
My Direct Engineering Work
- Designed the strata monitoring software prototype and ESP32-S3 firmware framework in PlatformIO
- Led system architecture, 10-tier evidence documentation, and interactive dashboard prototyping (Next.js, TypeScript, Supabase)
- Built Python Edge AI anomaly pipeline (EWMA, MAD Z-scores) exporting C headers
Technical Challenges
- Preventing single-sensor vibration spikes from escalating false subsidence alarms across underground panels
- Maintaining strict honesty between Tier 1 BOM projections, Tier 5 synthetic ML benchmarks, Tier 7 owner-reported bench probes, and missing raw field logs
05 · Verified Outcomes & Future Scope
Verified Results & Demonstrations
- ESP32-S3 PlatformIO firmware compiles cleanly with 0 errors (6.4% RAM, 9.9% Flash utilization).
- Digital platform passes ESLint (0 errors/warnings), 42/42 automated Vitest tests across 9 suites in CI, and builds all 21 Next.js routes.
- Reproducible synthetic Python ML benchmark (`ml/evaluate_model.py`, 1,000 samples) achieves 93.00% anomaly recall and 83.60% accuracy.
Proposed Future Scope (Not Yet Implemented)
- Complete physical multi-sensor bus integration across BNO085 inclinometer, ADS1220 strain bridge, and geophone transducer with committed raw calibration CSV logs.
- Conduct physical sub-GHz RF propagation trials beyond the laboratory bench.
- Pursue statutory intrinsic safety (Ex i) and CIMFR / DGMS certification prior to any underground colliery evaluation.