Post · 2 min read· pp. 236–238

Blackbox

The Blackbox records flight data many times a second: stick inputs, setpoints, gyro, PID terms, mixer and servo outputs, motors, RPM, battery, governor and more. Logs are the most useful tool there is for tuning and for finding out what went wrong.

The Blackbox tab page covers the settings in the Configurator. This page is the background.

Where logs go

blackbox_device
SPIFLASHThe flight controller's flash chip -- 16 MB to 256 MB on Rotorflight boards.
SDCARDAn SD card on the flight controller.
SERIALAn external logger on a UART -- see OpenLager.
NONENo logging.

Getting logs off

  • Mass storage mode (the Blackbox or Setup tab, or msc in the CLI) makes the flight controller a USB drive; copy the logs off as files. The fastest and most reliable way.
  • Save to file in the Configurator downloads over MSP -- slow, and can corrupt large logs.
  • With an external logger, take out its SD card.

Open the logs in the Blackbox Explorer (or the desktop version).

Logging rate and space

blackbox_rate_denom divides the PID loop rate: at a 2 kHz PID loop, 1 logs at 2 kHz, 2 at 1 kHz, 4 at 500 Hz.

ForUse
Filter tuning, vibrationThe highest rate the device can manage -- 1-2 kHz.
PID and governor tuning500 Hz - 1 kHz.
General flying, long logs250 Hz or less.

Higher rates and more fields fill the flash faster. Every field you don't need (blackbox_log_* = OFF) leaves room for more flights.

Logged data

SettingLogs
blackbox_log_commandStick commands
blackbox_log_setpointRate setpoints
blackbox_log_mixerMixer inputs
blackbox_log_pidP, I, D, F, B and O terms
blackbox_log_attitudeAttitude estimate
blackbox_log_gyro_rawUnfiltered gyro (for filter tuning)
blackbox_log_gyroFiltered gyro
blackbox_log_accAccelerometer
blackbox_log_magCompass
blackbox_log_altAltitude
blackbox_log_gpsGPS
blackbox_log_batteryBattery voltage and current
blackbox_log_rssiRSSI
blackbox_log_motorsMotor outputs
blackbox_log_servosServo outputs
blackbox_log_rpmMotor and rotor RPM
blackbox_log_vbec / blackbox_log_vbusBEC and bus voltages
blackbox_log_tempTemperatures
blackbox_log_escESC telemetry
blackbox_log_becBEC telemetry
blackbox_log_governorGovernor state, target and throttle

When it logs

blackbox_mode
ARMEDWhenever armed (default since 2.3).
SWITCHWhile the BLACKBOX mode switch is on.
NORMALWhile armed and the switch is on.
OFFNever.

blackbox_grace_period keeps logging for a few seconds after disarming. blackbox_rolling_erase (default on) overwrites the oldest logs when the flash is full; blackbox_initial_erase_kb erases enough space before a log starts.

Debug data

debug_mode adds eight extra values to the log for investigating one subsystem -- for example GOVERNOR, RPM_FILTER, RPM_SOURCE, TTA, AIRBORNE, DYN_NOTCH, ESC_SENSOR, CRSF_LINK_STATISTICS_UPLINK. debug_axis picks the axis for modes that work per axis. The full list is under debug_mode in CLI Settings.

The log format is described in the Technical Reference.