RC Data Logging, Interfaces and Embedded Integration: Blackbox, OSD and UART/I2C/SPI
In short: recording flight data (blackbox), watching it live (ground station and OSD) and adding your own modules over UART, I2C or SPI turns RC troubleshooting from guesswork into measurement. Betaflight/INAV blackbox, ArduPilot DataFlash and PX4 ULog files clearly show vibration, voltage sag and the exact moment something failed.
RC is not just flying or driving; behind every flight there is a layer of electronics and software that records, analyses and improves how the system behaves. Watching data in real time and logging it for later review is essential for development, troubleshooting and tuning. This guide covers data logging, ground control interfaces, OSD and microcontroller integration.
In this article 8
Data logging: blackbox and SD loggers
To analyse a flight afterwards, the data has to be recorded. There are two common approaches:
- Flight controller logging: Betaflight, INAV and ArduPilot can record gyro data, GPS, motor outputs, voltage, current and stick positions to on-board flash or a microSD card.
- External loggers: in custom or minimalist systems, an STM32 or ESP32 with an SPI microSD module can record exactly the data you need.
| Software | Log format | Analysis tool |
|---|---|---|
| Betaflight / INAV | Blackbox (.bbl / .bfl) | Blackbox Explorer, PID Toolbox |
| ArduPilot | DataFlash (.bin) and telemetry (.tlog) | Mission Planner, UAV Log Viewer |
| PX4 | ULog (.ulg) | Flight Review, PlotJuggler |
| Custom loggers | Usually CSV | Python, spreadsheets, PlotJuggler |
Logs show vibration, noise, oscillation, voltage sag, GPS glitches and exactly when something went wrong, which is far more reliable than guessing from memory. How logs are used for PID tuning is covered in the PID control tuning guide.
Build your own logger (ESP32 + microSD)
A simple example: ESP32 code that reads battery voltage through a voltage divider and writes it to a CSV file every 100 ms. To calculate the divider resistors, use the voltage divider calculator.
#include <SPI.h>
#include <SD.h>
const int SD_CS = 5; // microSD module CS pin
const int VBAT_PIN = 34; // voltage divider output
const float RATIO = 11.0; // divider ratio (e.g. 100k / 10k)
void setup() {
Serial.begin(115200);
if (!SD.begin(SD_CS)) {
Serial.println("SD card not found");
while (true) { delay(1000); }
}
File f = SD.open("/log.csv", FILE_APPEND);
f.println("time_ms,voltage_v");
f.close();
}
void loop() {
float v = analogReadMilliVolts(VBAT_PIN) / 1000.0 * RATIO;
File f = SD.open("/log.csv", FILE_APPEND);
if (f) {
f.print(millis());
f.print(',');
f.println(v, 2);
f.close();
}
delay(100);
}In a real logger, using a buffer and writing at intervals is more efficient than opening and closing the file for every line.
User interfaces: GCS and telemetry monitoring
Ground control stations (GCS) show live data during a flight. Popular software:
- Mission Planner (ArduPilot)
- QGroundControl (PX4 and ArduPilot)
- OpenHD / mobile apps (Android-based video and telemetry)
They communicate over the MAVLink protocol. From the interface you can plan missions, watch telemetry and track the vehicle on a live map. Many are open source (Qt, C++, Python), so they can be customised. See ground control stations and MAVLink.
OSD: overlaying data on video
In FPV systems, key information such as battery voltage, RSSI/link quality, throttle and GPS is drawn over the video so the pilot sees it in the goggles. This is the job of the OSD (on-screen display).
- Analog OSD: built into most flight controllers (for example with the AT7456E chip) and configured in Betaflight or INAV.
- MinimOSD: an older ATmega328P-based MAVLink OSD for ArduPilot.
- Digital systems: DJI, Walksnail and HDZero draw the OSD digitally via MSP DisplayPort, with sharper fonts and more elements.
OSD elements, positions and fonts are set in the configurator or via the CLI.
Embedded integration: UART, I2C and SPI
In advanced RC builds, custom modules are integrated with a microcontroller, usually an STM32 or ESP32. The most common interfaces:
| Interface | Typical use | Notes |
|---|---|---|
| UART | GPS, telemetry, receivers (CRSF/SBUS), MAVLink, SmartPort | Point-to-point, simple, widely supported |
| I2C | Barometers, magnetometers, small displays | Two wires, several devices on one bus, slower |
| SPI | IMUs, flash memory, SD cards, OSD chips | Fast, more wires, ideal for high data rates |
With these interfaces you can add sensors, loggers, lights or custom telemetry to almost any RC system. For how GPS data is parsed, see the NMEA 0183 guide; for telemetry, see RC telemetry explained. For a hands-on start, see what is ESP32 and angle measurement with the MPU6050.
Conclusion
The hardware and software behind RC systems go far beyond basic control. Data logging, OSD, ground stations and embedded integration turn an RC model into a complete engineering platform. Recording sensor data, sending it via telemetry and visualising it improves analysis, safety and the pilot’s situational awareness.
Frequently asked questions
What should I log first when troubleshooting?
Gyro data, motor outputs and battery voltage. Most oscillation, overheating and receiver reset problems show up clearly in these three.
Does logging slow down the flight controller?
High logging rates use processor time and storage. Most firmware lets you choose the logging rate and fields; use a high rate while tuning and a lower one for normal flying.
Can I build my own telemetry display?
Yes. A microcontroller can read MAVLink or CRSF telemetry over UART and drive a display, LED indicator or, for example, a web dashboard on an ESP32.







