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.
What we actually shipped.
Runs the whole show — YOLOv8n via TFLite, sensor polling, and the local Flask server the dashboard talks to.
Handles the fiddly interrupt-heavy sensor bus so the Pi can stay focused on vision.
Long-range low-power radio for node-to-node handoff when Wi-Fi isn't around.
Measures distance to obstacles on the road surface — our lane-obstruction tripwire.
Detects surface moisture and triggers the slippery-road warning.
Watches for smoke and combustible gases — the first hint of a fire or leak.
On-device readout: node ID, IP, and current status. Great for demos and even better for debugging on a ladder.
New Delhi District Grid — a fixed coordinate profile stands in for GPS while the mesh matures.
How MRAI grew up.
- Sep 2025Sketch on a napkin
First conversation, in class after seeing a news story about an accident that no one reported.
- Nov 2025First 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.
- Feb 2026Rain sensor + siren wired up
Actuators finally worked. Our neighbours called to ask us to stop.
- Jul 2026Node talks to the network
The ESP32 started posting authenticated sensor JSON into this dashboard. No laptop in the middle.
- Aug 2026First 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.
- Sep 2026Prototype v2 assembled
Soldered harness, enclosure, OLED status panel, LoRa radio. The hardware exists. What's left is testing it honestly.
What we got wrong.
Every one of these cost us a weekend. They're the reason the current build works.
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.
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.
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.
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.
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.