Harness Real-Time Data Management & AI Enablement at the Edge
Overview
Data management for MCUs is the practice of collecting, storing, processing, securing, and distributing data directly on microcontrollers. Instead of simply forwarding raw sensor readings, modern devices like the STM32H7 can act as intelligent data nodes, sampling inputs, storing them in ITTIA DB Lite, and running real-time queries or transformations. With time-series storage, compression, and efficient querying, they handle large volumes of data with deterministic performance and low memory use. ITTIA DB Lite further enables AI workloads like anomaly detection and predictive maintenance to run locally, reducing latency, saving bandwidth by sending only insights, and ensuring resilience when connectivity is limited. In short, data management with ITTIA DB Lite turns MCUs into intelligent edge devices capable of real-time analytics, local decision-making, and AI-driven applications across industrial, automotive, medical, and energy systems.
Case study
This case study illustrates how the STM32H7 series MCUs combined with ITTIA DB Lite provides a robust solution for industrial automation. The STM32H7’s powerful Cortex-M7 core running up to 550 MHz, large memory (up to 2 MB Flash, 1 MB SRAM), and advanced peripherals make it a strong platform for data-centric embedded applications. With ITTIA DB Lite, the device gains real-time data collection, structured storage, queries, and AI integration directly on the MCU, minimizing reliance on external processors or cloud infrastructure.
Use Case: Smart Energy Monitoring in Industrial Equipment
Challenge
- An equipment manufacturer needs to:
- Continuously capture voltage, current, and temperature data from sensors.
- Store weeks of time-series history locally for on-site analytics.
- Detect anomalies using AI to predict power quality issues.
- Share only summarized events with a supervisory controller to save bandwidth.
System Architecture
- MCU: STM32H753 (Cortex-M7 @ 480 MHz)
- Sensors: Voltage/current (ADC), temperature (I²C)
- Comms: Ethernet + RS485
- Software Stack:
- OS: FreeRTOS/ Eclipse ThreadX RTOS /Zephyr
- Database: ITTIA DB Lite
- AI Model: NanoEdge AI Studio, LiteRT (TensorFlow Lite Micro) anomaly detection model
- Visualization: ITTIA Analitica
- Data distribution to MPUs: ITTIA Data Connect
Implementation
Schema Design
CREATE STREAM energy_metrics ( sample_time TIMESTAMP PRIMARY KEY, voltage_V FLOAT NOT NULL, current_amp FLOAT NOT NULL, temperature_C FLOAT NOT NULL ); CREATE TABLE energy_metrics_1Hz ( start_time TIMESTAMP PRIMARY KEY, end_time TIMESTAMP NOT NULL, avg_voltage_V FLOAT NOT NULL, avg_current_amp FLOAT NOT NULL, avg_temperature_C FLOAT NOT NULL ); CREATE TABLE anomaly_events ( event_time TIMESTAMP PRIMARY KEY, score FLOAT NOT NULL, event_type VARCHAR(32) NOT NULL, start_time TIMESTAMP NOT NULL, avg_voltage_V FLOAT NOT NULL, avg_current_amp FLOAT NOT NULL, avg_temperature_C FLOAT NOT NULL );Data Logging (C API Example)
#include "energy_monitoring_database.h" // generated from schema
int main() {
db_init_ex(DB_API_VER, NULL);
open_energy_monitoring_database("energy_monitoring", NULL);
// ...
}
void log_energy(uint64_t ts_ms, float v, float c, float t) {
db_t db;
db_connect(&db, "energy_monitoring", "ingestion", NULL, NULL);
const energy_metrics_row_t row = {
.sample_time = ts_ms * 1000, // to microseconds
.voltage_V = v,
.current_amp = c,
.temperature_C = t
};
put_energy_metrics(db, row);
db_disconnect(db);
}- Sampling at 1 kHz with downsampling for storage.
Data compression enabled: saves ~35–40% flash.
On-Device AI
- Every second, the last 500 samples are retrieved via an ITTIA DB Lite streaming query.
- Pre-processed and fed into an anomaly detection AI model.
- Results logged into the anomaly event table when thresholds are exceeded.
Data Distribution
- Only anomalies (timestamp, type, score) are sent via Ethernet to an i.MX9 MPU.
- The MPU runs ITTIA DB full edition + ITTIA Analitica for fleet-wide visualization.
- Benefit: reduces bandwidth by >90% compared to raw streaming.
Results
Metric | Value |
| ITTIA DB Lite footprint | ~160 KB RAM + 220 KB Flash |
| Insert latency (1 row @ 1kHz) | ~40 µs |
| Query last 1,000 samples | < 5 ms |
| Compression ratio | ~1.6:1 (varies by dataset) |
| Anomaly detection latency | ~3 ms per inference (Cortex-M7) |
| Power consumption impact | < 10% overhead vs baseline logging |
Benefits
- High performance: STM32H7 enables real-time database operations at kHz rates.
- Efficiency: ITTIA DB Lite compression reduces storage demand.
- Edge intelligence: Local AI inference detects anomalies without cloud reliance.
- Bandwidth savings: Only events, not raw sensor streams, are transmitted.
- Security: TrustZone-M (H7) ensures secure database storage and query execution.
Conclusion
By combining the computational power of STM32H7 with the deterministic embedded database engine of ITTIA DB Lite, developers can build data-driven embedded systems that collect, analyze, store and act on information in real time. This architecture is ideal for industrial automation, automotive ECUs, healthcare devices, smart energy systems and other related markets where low latency, reliability, and security are critical.