How aswina1636/earthquake-detection-system works
This repository packages an Edge Impulse on-device inference library for an ESP32 earthquake-and-fire alert system. The documented user workflow samples accelerometer and temperature data, extracts features, classifies hazards, smooths seismic detections over time, and activates alerts and safety outputs. The tree primarily contains the generated model and inference runtime, not the application sketch described in the README, so application-side control and hardware behavior are shown as documented but unlocated. Runtime relationships are limited to those supported by excerpts, the source index, or README statements.
Main entry points: ei_run_classifier.h Classifier API · tflite_learn_793663_3_compiled.cpp Compiled model · ei_run_dsp.h DSP extraction · engines.h Inference engines
Components 22
Sensing inputs
- MPU6500 + DHT11
Inference pipeline
- Magnitude feature
- Temporal voting
- Classifier API
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/classifier/ei_run_classifier.h - DSP extraction
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/classifier/ei_run_dsp.h - DSP math
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/dsp/numpy.hpp - Inference engines
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/classifier/inferencing_engines/engines.h - Model metadata
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/model-parameters/model_metadata.h - Result postprocessing
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/classifier/postprocessing/ei_postprocessing_common.h
Embedded runtime
- Compiled model
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/tflite-model/tflite_learn_793663_3_compiled.cpp - TensorFlow Lite Micro
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/tensorflow/lite/core/c/common.h - Micro context
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/tensorflow/lite/micro/micro_context.h - Tensor interfaces
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/tensorflow/lite/c/common.h - CMSIS DSP types
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/CMSIS/DSP/Include/arm_math_types.h - CMSIS NN kernels
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/CMSIS/NN/Include/arm_nnfunctions.h
Hazard response
- Hazard thresholds
- Recovery classifier
- OLED status
- Relay + buzzer + LED
- CircuitDigest SMS
Other components
- System operator
- WiFi network
Connections 22
- System operator → MPU6500 + DHT11: monitors
- MPU6500 + DHT11 → Magnitude feature: provides readings
- Magnitude feature → Temporal voting: feeds samples
- Temporal voting → Hazard thresholds: confirms hazard
- MPU6500 + DHT11 → Classifier API: supplies inference data
- Classifier API → DSP extraction: extracts features
- DSP extraction → DSP math: uses math
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/classifier/ei_run_dsp.h - Classifier API → Inference engines: dispatches engines
- Inference engines → Compiled model: runs model
- Compiled model → TensorFlow Lite Micro: invokes operators
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/tflite-model/tflite_learn_793663_3_compiled.cpp - Compiled model → Model metadata: uses configuration
- Classifier API → Result postprocessing: formats results
- Micro context → Tensor interfaces: uses tensor API
ml to C++ library/Earthquake_Detection_Pro_2_inferencing/src/edge-impulse-sdk/tensorflow/lite/micro/micro_context.h - Compiled model → CMSIS NN kernels: uses NN kernels
- Classifier API → CMSIS DSP types: uses DSP types
- Hazard thresholds → Recovery classifier: tracks stable readings
- Hazard thresholds → Relay + buzzer + LED: triggers cutoff
- Recovery classifier → Relay + buzzer + LED: updates outputs
- Recovery classifier → CircuitDigest SMS: sends alerts
- Hazard thresholds → OLED status: updates status
- Recovery classifier → OLED status: shows recovery
- WiFi network → CircuitDigest SMS: enables delivery