Software Architecture and Binary IMU Data Framing Protocol for a Multi-Node ESP32 System

Abstract:

In multi-node measurement systems, direct storage of samples in CSV files is insufficient for organizing data acquisition from multiple sources, buffering, wireless transmission, and stream demultiplexing. This paper presents the design and functional verification of the software layer of an inertial data acquisition system based on ESP32 microcontrollers and LSM9DS1 MEMS sensors. The prototype uses a hierarchical architecture: slave nodes perform local IMU readout and buffering, a master node polls them through ESPNOW, aggregates binary frames, and forwards the stream to a computer through Bluetooth Serial/SPP, while the computer decodes the stream in Python and stores the data in CSV files. The central element of the proposed solution is a binary poll-response protocol based on POLL_REQUEST, DATA_FRAME, and STATUS_FRAME messages. A data frame consists of a 16-byte header, a 216-byte IMU data payload, and a CRC-16 checksum. Functional verification confirmed correct node polling, frame-type recognition, CRC checking, 16-bit value decoding, source demultiplexing, CSV storage, and the use of decoded data for illustrative Pitch and Roll estimation.