from pathlib import Path html = r''' CAAD-Gate | Adaptive Edge Intelligence
Adaptive Edge Intelligence

CAAD-Gate

Adaptive Edge Intelligence for Low-Power IoT Devices

CAAD-Gate is a reusable adaptive data-gating framework for ESP32-class IoT devices. It learns normal sensor behaviour and forwards only meaningful, abnormal, or contextually important data to machine learning, alerts, logging, or communication.

CAAD-Gate helps IoT devices know when not to process.

65.33% Estimated processing reduction
ESP32 Designed for low-power devices
3 Modules Sound, motion and environment
ESP32 edge-processing prototype connected to sound, environment, motion, display, and communication modules
The problem

Small IoT devices cannot process everything.

IoT devices continuously receive sensor data, but most data is normal. Running machine learning, communication, alerts, or logging for every data window wastes resources.

01

Continuous Data

Sensors produce data all the time, even when nothing important is happening.

02

Mostly Normal

Only a small part of the sensor stream may contain a useful or abnormal event.

03

Fixed Thresholds

One fixed threshold cannot fit every user, room, machine, or environment.

04

Expensive Processing

Unnecessary ML and communication can waste CPU, memory, battery, and bandwidth.

The solution

An adaptive decision layer before heavy processing.

CAAD-Gate learns normal sensor behaviour, measures change, adjusts its threshold using context, and decides whether each sensor window should be forwarded or rejected.

“CAAD-Gate does not replace ML. It protects ML from unnecessary data.”
1

Sensor Windowing

Continuous sensor data is divided into small windows.

2

Lightweight Features

Level, variation, rate of change, peak, and duration are extracted.

3

Normal Behaviour Learning

The device learns a baseline for the current sensor and environment.

4

Adaptive Threshold

The decision boundary changes according to learned normal behaviour.

5

Context-Aware Adjustment

Battery, urgency, user mode, and environment can change sensitivity.

6

Gate Decision

Normal data is rejected. Useful or abnormal data is forwarded.

Sound Sensor Module
Environment Sensor Module
Motion Sensor Module
CAAD-Gate Core Engine
Normal Model · Feature Scoring · Adaptive Threshold · Context Layer · Statistics
Gate CLOSED
Reject normal data
Gate OPEN
Forward useful data
Applications

One reusable core for different IoT products.

The sensor adapter can change while the CAAD-Gate core remains the same.

S

Sound Awareness Node

Detects meaningful sound windows before classification. Suitable for alarms, knocks, assistive hearing, and smart-home sound monitoring.

Sound Module
M

Eldercare Motion Node

Learns normal movement and forwards possible fall, abnormal motion, or long inactivity windows for further analysis.

Motion Module
E

Machine & Environment Monitor

Opens the gate during sudden change, abnormal drift, or unusual operating conditions in industrial or environmental systems.

Environment Module
Experimental validation

Measured processing reduction with an honest trade-off.

The first validation used the ESC-50 environmental sound dataset. The adaptive gate reduced unnecessary frame-level processing while keeping recognition results close to the fixed-threshold baseline.

2,000 Total WAV files
1,600 Training recordings
400 Testing recordings
65.33% Estimated frame-level processing reduction
Method Coverage Processing Reduction MFBE Top-1 MFBE Top-5
Fixed baseline 93.50% — 25.94% 46.29%
Adaptive CAAD-Gate 78.50% 65.33% 24.50% 46.04%

Interpretation: lower coverage shows a tunable trade-off. A product may use a high-sensitivity mode for better event coverage or a low-power mode for stronger processing reduction.

Live demo

ESP32 sound-event demonstration.

The demo learns background sound, calculates an adaptive threshold, and opens the gate only when a meaningful sound event occurs.

CAAD-Gate Sound Demo LIVE
Learning background noise
Energy0.16
Noise Floor0.14
Threshold0.42
Gate StatusCALIBRATING
Processing Saved0.00%
ReasonLearning background
1. Learn Background The device measures the normal sound level.
2. Gate Closed Normal background sound is rejected to save processing.
3. Event Detected A clap, knock, alarm, or other meaningful event occurs.
4. Gate Open The event is forwarded to ML, alerting, logging, or communication.
5. Return to Normal The gate closes again and the saved-processing percentage increases.
Downloads

Developer-ready framework files.

Explore the complete V1 framework, reusable core, LilyGO demonstration sketch, and technical documentation package.

V1.0

CAAD-Gate Full Framework

Core engine, sensor modules, examples, and documentation.

Download ZIP
V1.0

CAAD-Gate Core

Reusable sensor-independent adaptive decision engine.

Download Core
Demo

LilyGO Sound Sketch

ESP32/LilyGO sound-gate display demonstration.

Download Sketch
V1.0

Documentation Package

Theory, module reference, architecture, and experiment summary.

Documentation

Simple integration for embedded developers.

Each sensor module extracts lightweight features. The core engine uses those features to decide whether the gate should open or close.

Basic usage example
CAADFeatures features = sensorModule.extractFeatures(sensorData);
CAADDecision decision = gate.update(features);

if (decision.gateOpen) {
    // Run ML, alert, communication, or logging
} else {
    // Save processing
}

Required Hardware

ESP32 or ESP32-S3, optional LilyGO display, sensor hardware, USB cable, and a laptop.

Required Libraries

Arduino ESP32 board package, TFT_eSPI for the display demo, and sensor-specific libraries.

Installation

Extract the framework, copy it into Arduino/libraries, restart the IDE, open an example, and upload.

No. It is a lightweight adaptive decision layer that runs before ML or alert processing.

No. Sound is the first validation domain. The framework is designed for sound, motion, temperature, air quality, and other sensors.

No. It decides whether data should be sent to machine learning, reducing unnecessary processing.

No guaranteed claim is made. It reduces estimated downstream processing load. Direct battery measurement depends on the final hardware.

For NBQSA judges

A practical embedded technology platform with evidence.

CAAD-Gate includes a working ESP32-based sound-gate demo, reusable framework files, sensor modules, documentation, experimental validation, and product applications across sound, eldercare motion, and machine or environment monitoring.

About & roadmap

Built for adaptive, efficient, ML-ready IoT products.

CAAD-Gate was developed by H.M. Thisara N. Herath as part of a broader research and product-development direction focused on adaptive edge intelligence for resource-constrained embedded devices.

H.M. Thisara N. Herath
V1 — Current

Reusable Core

Core engine, sound, environment and motion modules, ESP32 examples, and initial validation.

V2 — Next

Smarter Modes

Improved display, battery-aware modes, confidence scoring, class-specific thresholds, and event history.

V3 — Future

Connected Platform

Cloud dashboard, OTA updates, Arduino library release, multi-device aggregation, and edge-ML integration.

Contact

Collaboration, testing, and product integration.

Use this form for research discussion, developer testing, or possible product integration.

Project CAAD-Gate — Adaptive Edge Intelligence
Developer H.M. Thisara N. Herath
Focus ESP32, low-power IoT, adaptive data gating, and edge intelligence