Lightning/Storm Sensor Suite

A portable, self-contained storm detection and analysis device combining lightning sensing, atmospheric monitoring, and real-time visualisation.

Unlike a basic AS3935 lightning detector, the linked firmware treats strikes as candidates and scores them against recent storm context, environmental trends, disturbers/noise, and thunder correlation.

Description

This is an all round weather/storm sensor device, with both indoor (home) and outdoor (roaming) modes, incorporating a 2.41" Waveshare ESP32-S3 and a touchscreen UI with 8 pages of info and config for tracking storm intensity, storm distance, atmospheric conditions and thunder.

This uses BME280 sensor data and AS3935 disturber signals and other signals to derive a confidence score (this eliminates false alarms due to electrical noise but may need tuning for your own circumstances) during storm detection, along with live viewing on screen or querying via API over WiFi when in home mode and Bluetooth alerts when roaming.

The Git Repo ( https://github.com/bicalcarata/storm-sensor-firmware ) has full readme and guide to the firmware itself, including how the confidence scoring works, environmental modifiers and thunder detection frequencies and validation.

Hardware Components

System Architecture

Diagram is here: https://resize.thingiverse.com/?url=https://cdn.thingiverse.com/assets/7d/5a/60/f1/07/System_Architecture_Schematic.jpg&w=1024&h=1024&fit=contain&cbg=white&n=-1

Quick Start Guide

  1. Clone git repo above.
  2. Open in Arduino IDE / PlatformIO
  3. Install libs
  4. Flash to Waveshare ESP32-S3 Touch AMOLED
  5. Wire sensors
  6. Power via LiPo

Features

Storm intensity and range detection with built in learning confidence score system to cut down false alerts when AS3935 triggers, this is based upon other BME280 data (temp drops, pressure changes etc. ) as well as AS3935 disturber signal history and thunder audio detection/confirmation and can prompt user for validation in certain circumstances (i.e. indeterminate confidence score) - see the readme in the git repo for details/tuning.

Addressable pixel LEDs show storm intensity on one LED and distance on the other, this is based upon 6 colour codes from blue (clear/no lightning detected) through green, yellow, orange, red and deep red (storm overhead/> 4 lightning strikes per minute) based upon the UK met office definition of intense electrical storm. This can be adjusted in the firmware.

Home and roaming mode.

HTTP APIs for each sensor when in home mode, the device's DHCP assigned IP address is displayed on the network screen.

  • /
    JSON list of available endpoints.
  • /api/status
    Mode, AS3935 profile, Wi-Fi status, SSID, IP, battery, uptime, GPS activity, web server state.
  • /api/lightning
    Rate, latest distance, trend band, session strike count, latest strike age, AS3935 profile.
  • /api/environment
    Temperature, humidity, pressure, GPS date, GPS time.
  • /api/gps
    Active/fix flags, satellites, coordinates, altitude, speed, date, and time.

Captive WiFi Portal for WiFi setup when no SSID is configured.

Bluetooth pairing and strike alerts when in roaming mode.

GPS integration and time sync.

Battery monitoring via LIPO voltage, circa 8 hours battery life on WiFi during soak testing, more on Bluetooth

3d printed parts

Lid

This houses the Waveshare screen and Pixel LEDs , mounted to the lid itself with double sided extra strong pads, make sure there is clearance and you mount things in an orientation to allow the lid to be fitted to the case with room for wiring and to allow the usbc port on the waveshare to be accessed, a slot is cut into the case front panel for usbc access for both charging the lipo and flashing the waveshare device.

Case + Internal spacers

Houses wago 221 connector blocks for rails and serial data as well as the lipo battery, USBC data/charge adaptor, BME280, AS3935, microphone board, GPS board and power momentary switch switch, the antenna for the gps should be mounted on the walls of the case just half a millimetre from being flush with the top of the wall, leaving enough room for the lid to close, in the bottom right corner, with the gps board immediately below it.

The AS3935 CJMCU board is T shaped, the tip of the thinner section houses the coil, this should be place in the bump in the front right (top right if looking top down) of the case (you will need to pull out the supports in the bump if you print with supports on, i used a 0.25 support zgap to help here) there are 4 slots in the bump to help expose the coil.

The MIC and BME280 should be placed top left of the case when looking from the top, opposite side of the AS3935. Here there are another 4 slots cut out of the case to help with environment monitoring and sound (thunder) detection.

See here for a rough guide on component fitting:
https://resize.thingiverse.com/?url=https://cdn.thingiverse.com/assets/2d/0c/0f/8a/5d/Screenshot_2026-05-01-18-17-32-24_3aea4af51f236e4932235fdada7d1643.jpg&w=1024&h=1024&fit=contain&cbg=white&n=-1

There are a couple of other slots cut in the case for usbc or power switches if required.

Diffusers

I printed these in clear PVB then IPA smoothed for a while and placed them into the holes in the lid above the pixels.

Important Notes

The AS3935 board needs specific configuration to set it in i2c mode and set the address, it defaults to spi, this is how it's wired, note the number of gnd and 3.3 connections.

AS3935 Pinouts

VCC -> 3.3V

GND -> GND

SCL -> SCL

MOSI -> SDA

IRQ -> GPIO39

CS -> GND

MISO -> GND

SI -> 3.3V

A0 -> GND

A1 -> 3.3V