Skip to content
MargRakshak AI — Roadside Hazard Detection NetworkPre-pilot · Corridor New DelhiSpec v3.0 · Build 2026.11
MRAI logo
MRAI
by UniWebs
All clear
14ms
The story · मार्ग रक्षक · Class 11

Two classmates. One stubborn idea.

Margrakshak AI (MRAI) started as a bold brainstorming session between two 11th-grade classmates, Kavy and Saksham. We got tired of reading tragic news headlines about road accidents where victims lost their lives simply waiting for someone to notice and call for help.

We asked ourselves: What if the road could look after itself? What if every lamp post had a brain?

We designed MRAI to be a quiet guardian — combining a Raspberry Pi running edge AI with an ESP32 handling local road sensors. If something goes wrong, MRAI doesn't wait for a phone call. It acts instantly.

The name Mirai (未来, "future") is a nod to what this could grow into — a mesh of quiet guardians, one on every corner, learning the shape of a normal day so they can recognise an abnormal one.

Inside the box

What we actually shipped.

Raspberry Pi 3B (1GB)

Runs the whole show — YOLOv8n via TFLite, sensor polling, and the local Flask server the dashboard talks to.

ESP32 co-processor

Handles the fiddly interrupt-heavy sensor bus so the Pi can stay focused on vision.

LoRa SX1276

Long-range low-power radio for node-to-node handoff when Wi-Fi isn't around.

HC-SR04 Ultrasonic Sensor

Measures distance to obstacles on the road surface — our lane-obstruction tripwire.

Rain Sensor (YL-83)

Detects surface moisture and triggers the slippery-road warning.

Smoke Sensor (MQ-2)

Watches for smoke and combustible gases — the first hint of a fire or leak.

OLED System Display

On-device readout: node ID, IP, and current status. Great for demos and even better for debugging on a ladder.

Simulated Static Location Profile

New Delhi District Grid — a fixed coordinate profile stands in for GPS while the mesh matures.

Timeline

How MRAI grew up.

  1. Sep 2025
    Sketch on a napkin

    First conversation, in class after seeing a news story about an accident that no one reported.

  2. Nov 2025
    First working YOLO on Pi

    About 2–4 fps at 640×384 after brutal quantization — so we taught the sensors to wake it only when needed. It saw a chair and called it a bus. We celebrated anyway.

  3. Feb 2026
    Rain sensor + siren wired up

    Actuators finally worked. Our neighbours called to ask us to stop.

  4. Jul 2026
    Node talks to the network

    The ESP32 started posting authenticated sensor JSON into this dashboard. No laptop in the middle.

  5. Aug 2026
    First runner-up, Round 2

    The breadboard build placed first runner-up in the Round 2 city competition. It also made every weakness obvious, which is what Prototype v2 is answering.

  6. Sep 2026
    Prototype v2 assembled

    Soldered harness, enclosure, OLED status panel, LoRa radio. The hardware exists. What's left is testing it honestly.

Honest engineering

What we got wrong.

Every one of these cost us a weekend. They're the reason the current build works.

The model saw crashes everywhere

Our first collision rule was pure bounding-box overlap. Two cars passing in adjacent lanes looked identical to a rear-ending. We added a persistence window — boxes must overlap AND stop moving for 1.2 s — and the false alarms went to near zero.

The rain sensor lied in the sun

YL-83 readings drifted badly once the board warmed up, so a dry afternoon reported WET. We now sample a rolling median and re-baseline every 10 minutes instead of trusting a single reading.

The Pi thermal-throttled running video non-stop

Full-resolution inference cooked the CPU inside twenty minutes. Quantizing YOLOv8n to INT8 and dropping to 640×384 kept accuracy usable and the board under 60 °C.

We wired the siren before the fuse

One shorted GPIO pin later, we learned to breadboard actuators behind a relay and a fuse. Saksham redesigned the harness; nothing has let out smoke since.

Engineering update · hardware paused

The node is on the shelf. The system isn't.

We'll be straight about it: Prototype v2 has been disassembled. Between 11th-grade coursework, no external funding and limited bench time, we couldn't keep a physical node alive long enough to finish the soak run and staged hazard trials. No test results were collected, so none are claimed here.

What survives is everything that doesn't need a soldering iron: the authenticated ingestion API, device keys, incident engine, offline sweeper, control room, BOM and wiring documents. When we secure parts, lab access or a student grant, a rebuilt node can plug straight back in — and bench testing resumes exactly where it stopped.

Try it yourself

See the pole react in real time.

Use the demo panel in the corner — trigger a crash, turn on rain, spike the smoke sensor, or block the ultrasonic beam. Then jump into the live feed or telemetry to watch the whole system change together.