Inspiration
Many small beaches, youth sports fields, and campus events still clear people out only after someone hears thunder. Professional lightning warning systems exist but are expensive, so I built a low-cost station that detects lightning and warns everyone nearby automatically.
What it does
- Detects lightning and estimates the storm's distance (1–40 km).
- Rejects false alarms: man-made electrical noise is logged as a "disturber" but never triggers the alarm.
- Warns people on site with a flashing LED and buzzer siren when a strike is within a set distance.
- Alerts phones without internet: the station hosts its own Wi-Fi and dashboard; open phones get a full-screen warning, sound, and vibration.
- All-clear countdown: each strike restarts it (15 s for the demo; the real rule is 30 minutes).
- Simulation mode: a handheld wand triggers clearly labeled simulated strikes, with distance estimated from its radio signal strength.
How I built it
- Hardware: ESP32, AS3935 lightning sensor, LED, and passive buzzer in a 3D-printed enclosure.
- Sensing: lightning emits radio bursts. The sensor's LC antenna resonates near 500 kHz, at f=1/(2*pi*sqrt(LC)). My calibration routine tests all 16 tuning-capacitor settings and picks the one closest to 500 kHz.
- Firmware: the ESP32 reads sensor events over SPI, runs the alarm and countdown, and serves the dashboard from its own access point. The wand is a second ESP32 communicating over ESP-NOW.
Challenges I ran into
- Power: an audio amplifier drew enough current to crash the ESP32, so I switched to a directly driven buzzer.
- A failed INT connection: the firmware now polls the sensor over SPI instead.
- Indoor electrical noise from chargers, laptops, and Wi-Fi, which led to mounting the sensor on a mast.
Accomplishments I'm proud of
- A working system: detection, alarm, offline phone alerts, and an all-clear countdown.
- A real-time dashboard served entirely from a microcontroller.
What I learned
- How lightning detectors tell lightning apart from man-made noise
- Soldering and microcontroller basics
What's next
- Testing device on actual storms
- Storm direction with a second antenna
- Solar power and a weatherproof enclosure
- A network of stations across a beach or campus
Built With
- c++
- esp32
- radar
Log in or sign up for Devpost to join the conversation.