STM32WB device use case
ITTIA DB Lite + STM32WB

Empowering Wireless Edge Intelligence Data Management

Overview

ITTIA DB Lite enables STM32WB microcontrollers to go beyond wireless connectivity and become intelligent, data-centric IoT nodes. While STM32WB provides dual-core architecture for BLE/802.15.4 wireless communication and application processing, ITTIA DB Lite adds structured time-series storage, compression, and querying directly on the MCU. This allows developers to log sensor data efficiently, run real-time analytics, and detect anomalies locally, reducing the need to transmit raw data over Bluetooth Mesh or wireless networks. By sending only meaningful insights or event summaries, devices conserve bandwidth and battery life, extending operating time for months on a single coin-cell. With features like transactional integrity, secure storage, and deterministic query performance, STM32WB combined with ITTIA DB Lite is ideal for smart home sensors, industrial IoT nodes, environmental monitoring, and healthcare wearables, where low power, wireless efficiency, and local intelligence are essential.

 

Case Study

The STM32WB series combines an Arm Cortex-M4 core for application processing with a Cortex-M0+ core dedicated to Bluetooth Low Energy (BLE) and IEEE 802.15.4 wireless protocols. It is optimized for IoT, connected sensors, and low-power wireless devices. When paired with ITTIA DB Lite, STM32WB devices gain the ability to collect, store, and query structured data locally, while transmitting only relevant results wirelessly. This enables efficient bandwidth use, long battery life, and on-device intelligence for IoT nodes that must operate reliably at the edge.

 

Use Case: Smart Home Air Quality Monitoring Node

Challenge

A smart home company wants to build an air quality sensor node that can:

  • Continuously collect data from gas, temperature, and humidity sensors.
  • Store multiple days of history for local analysis.
  • Detect anomalies (e.g., sudden CO₂ spikes) in real time.
  • Share only alerts and summaries via Bluetooth Mesh to a home gateway.
  • Run on a coin-cell battery for extended periods.

 

System Architecture

  • MCU: STM32WB55 (Cortex-M4F @ 64 MHz + Cortex-M0+ for BLE)
  • Sensors: CO₂ sensor (I²C), temperature/humidity (I²C), VOC sensor (SPI)
  • Comms: Bluetooth Low Energy Mesh to gateway
  • 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
  1. Schema Design
    CREATE TABLE air_quality (
        sample_time    TIMESTAMP PRIMARY KEY,
        co2_ppm        FLOAT NOT NULL,
        temperature_C  FLOAT NOT NULL,
        humidity_kgpm3 FLOAT NOT NULL,
        voc_index      FLOAT NOT NULL
    );
    
    CREATE TABLE alerts (
        alert_time TIMESTAMP PRIMARY KEY,
        type       VARCHAR(32) NOT NULL,
        severity   VARCHAR(32) NOT NULL
    );

     

  2. Data Logging (C API Example) 
    #include "home_air_monitoring_database.h" // generated from schema
    
    int main() {
       db_init_ex(DB_API_VER, NULL);
       open_home_air_monitoring_database("home_air_monitoring", NULL);
       // ...
    }
    
    void log_air(uint32_t ts_ms, float co2, float temp, float hum, float voc) {
        db_t db;
        db_connect(&db, "home_air_monitoring", "ingestion", NULL, NULL);
        const air_quality_row_t row = {
            .sample_time   = ts_ms * 1000, // to microseconds
            .co2_ppm        = co2,
            .temperature_C  = temp,
            .humidity_kgpm3 = hum,
            .voc_index      = voc
        };
        put_air_quality_data(db, row);
        db_disconnect(db);
    }
    • Sampling every 30 seconds, with batch commits to conserve flash.
    • Compression reduces data footprint by ~40%. 

     

  3. Local Analytics & AI
    • Data stream queries extract averages over the past hour.
    • If CO₂ levels rise above threshold, an alert is logged.
    • TensorFlow Lite Micro model uses last 100 samples to detect anomalies.

     

  4. Wireless Data Sharing
    • Bluetooth Mesh messages send only alerts and summaries to the home gateway.
    • Full data remains on-device, retrievable during maintenance.
    • Bandwidth and energy conserved since raw sensor streams are not transmitted. 

     

Results
Metric

Value

ITTIA DB Lite footprint ~90 KB RAM + 140 KB Flash 
Insert latency (per row) ~25 µs 
Query last 1 hr (120 samples) < 2 ms 
Compression savings ~40% 
Battery life (coin-cell) > 12 months estimated 
Wireless transmission overhead Reduced by ~85% vs raw streaming 

 

Benefits
  1. Low-power efficiency: ITTIA DB Lite + STM32WB batch commits extend battery life.
  2. Local intelligence: Real-time analytics and AI anomaly detection on the MCU.
  3. Efficient wireless use: Only events and summaries sent over BLE Mesh.
  4. Scalability: Design scales from smart home to industrial wireless sensor networks.
  5. Resilience: Device operates autonomously when disconnected from gateway/cloud.

 

Conclusion

The combination of STM32WB’s dual-core wireless MCU architecture and ITTIA DB Lite’s efficient data engine enables developers to create secure, low-power, intelligent wireless sensor nodes. Applications in smart homes, industrial IoT, environmental monitoring, and healthcare wearables benefit from real-time edge analytics, efficient bandwidth usage, and reliable long-term data storage, all within the constraints of a battery-powered MCU.