Maker Pro
Everything ESP

Vehicle Telemetry ECU (OBD-Like) - Advanced Embedded IoT System

May 16, 2026 by GDs - Tech
Share
banner

Design and implement a distributed embedded system for real-time vehicle telemetry, capable of operating in both connected and offline environments, with local buffering and cloud-based visualization.

Context

This project simulates an automotive telemetry ECU for fleet monitoring.

The system continuously collects vehicle data (temperature, RPM, speed, battery), stores it locally during network outages, and synchronizes it with a cloud pipeline when connectivity is available.

It demonstrates:

  • real-time embedded data acquisition
  • distributed system design (multi-MCU architecture)
  • fault-tolerant data handling
  • IoT cloud integration and visualization

System Overview

The architecture is based on a distributed multi-microcontroller system:

  • STM32 → Real-time acquisition & processing
  • ESP32 → Connectivity, storage, and cloud interface
  • Server → Data pipeline & visualization

System Architecture

Global system architecture: STM32 (data acquisition) → ESP32 (gateway) → MQTT → Node-RED → InfluxDB → Grafana

Key Features

  • Real-time sensor acquisition (temperature, speed, RPM, battery simulation)
  • Multi-MCU communication over UART (compact JSON frames)
  • Offline data buffering using circular storage (LittleFS)
  • Automatic data synchronization when network is restored
  • End-to-end IoT data pipeline (MQTT → Node-RED → InfluxDB → Grafana)
  • Real-time dashboard visualization with alert thresholds
  • Embedded watchdog for system reliability (planned)

Embedded Architecture Breakdown

STM32 - Real-Time Acquisition Node

  • reeRTOS-based firmware
  • Acquisition task (100 Hz)
  • Watchdog task
  • Sensor acquisition via ADC / I2C (BME280, inputs simulation)
  • HAL drivers (ADC, GPIO, UART, I2C)
  • Compact JSON serialization of data
  • UART transmission to ESP32

ESP32 - IoT Gateway & Storage Node

  • FreeRTOS-based communication architecture
  • UART reception task
  • MQTT publishing task
  • Storage management task
  • MQTT client (Mosquitto broker)
  • Local storage using LittleFS (circular buffer for offline mode)
  • Automatic reconnect & data sync
  • OTA support (planned)

Cloud & Visualization Layer

  • MQTT Broker: Mosquitto
  • Data Processing: Node-RED
  • Time-Series DB: InfluxDB
  • Visualization: Grafana

Hardware

  • STM32F103RCT6 (STM32Cube framework)
  • ST‑Link V2
  • ESP32 WROOM 32 (Arduino framework)
  • BME280 (I2C)
  • Joystick + Potentiometer + 2 Buttons
  • 18650 battery + holder
  • Breadboard + resistors + LEDs

Software implementation

STM32 Firmware

STM32 Project Structure

ESP32 Firmware

ESP32 Project Structure

Visualization & Dashboard

Grafana Dashboard

Demo

Repositories

STM32 Firmware (access grant on request): Repository

ESP32 Firmware (access grant on request): Repository

Next Steps

  • Improve data compression and optimization
  • OTA update
  • Extend sensor integration (CAN / OBD real interface)
  • Add security (TLS MQTT, authentication)
  • Watchdog for system reboot

Technical Highlights

  • Distributed embedded system (multi-MCU architecture)
  • Real-time firmware (FreeRTOS, 100 Hz acquisition)
  • Fault-tolerant storage (offline buffering + sync)
  • End-to-end IoT pipeline
  • Embedded-to-cloud integration
  • Modular firmware architecture

Related Content

Comments


You May Also Like