CleanFlight Blackbox

by Oscar

What is Blackbox in Cleanflight

CleanFlight can now log your flight data with BlackBox feature. This is a great tool for diagnosing problems of flight controller, motors, power system, or radio transmitter/receiver. It’s also great for tuning PID and other flight performance settings.

Some of the links on this page are affiliate links. I receive a commission (at no extra cost to you) if you make a purchase after clicking on one of these affiliate links. This helps support the free content for the community on this website. Please read our Affiliate Link Policy for more information.

Your captured flight data logs can be converted to CSV for analysis using the included software. You can even rendered them out as PNG frames, which you can overlay onto your flight video with your favourite video editing software. There are quite a few people used data recorded with BlackBox to overlay on their FPV video, and the result looks great.

cleanflight-blackbox-feature-data-overlay-fpv

How to use Blackbox

The flight data is transmitted via serial port and it’s recorded on . The current recommended hardware for logging data is the OpenLog serial data logger and a microSDHC card. The OpenLog logger needs to be flashed with Blackbox firmware first.

You can find documentation for setting up the BlackBox on the CleanFlight github docs page here. You can find the github for BlackBox here and the developers (thenickdude) youtube here.

This document outlines in detail how to use Blackbox and the hardware required to start logging your flight data.

This is my detail blackbox setup guide on Naze32.

Convert and Render Flight data from Blackbox

There are various tools you can use to convert and render flight logs into format you want. It’s very well documented, giving you all the instructions you need in the official page.

Cleanflight Blackbox Explorer

This is a really handy tool. Blackbox Explorer allows you to open logs recorded by Cleanflight’s Blackbox feature in your web browser. If you have a flight video you can also play the video in the background and have your data overlayed .It saves you time rendering the video.

Leave a Comment

By using this form, you agree with the storage and handling of your data by this website. Note that all comments are held for moderation before appearing.

17 comments

Javier 8th December 2015 - 10:34 pm

Hi Oscar!!

Excellent article

I just add one more thing to it:

Enable Blackbox recording by typing this at the CLI

set blackbox_device=SPIFLASH
save

Reply
Oscar 9th December 2015 - 9:58 am

thanks, yea they have changed it to words, used to be numbers e.g. 0 and 1.

Reply
Joakim 3rd December 2015 - 2:10 pm

Hi Oscar. github.com/cleanflight/blackbox-tools
I dont know what background you have. But when u tell people that all info you will need is there i guess you are refering to programers. There is abolutely nothing there to tell you how to use those files and how to make png files with the render tool. I have been looking on answers on internet for a ful week now. installing XCODE, MACPORT, something called libcairo, updated Java, entered lots of terminal commands and so on. i still dont have the first clue what to do and what im doing.
I was thinking it wouldnt be so complicated.
I cant find a tutorial online either. So if anyone out there would put one together it would be more then awesome.

Reply
Oscar 7th December 2015 - 10:23 am

Hi Joakim
it is a bit difficult to use.
It’s a bit like windows command line, you need to type in the command with different parameters depends on what you need.
I will see if i can find some time and do a short tutorial on that.
cheers
Oscar

Reply
atco 7th August 2015 - 7:09 am

想问下blackbox的日志文件应该怎么分析?

Reply
Oscar 10th August 2015 - 12:52 pm

我刚买了个记录blackbox data 的板子,这两周会写下tutorial

Reply
tournesol 4th August 2015 - 5:32 pm

all the links seem to be missing from this section:

“You can find documentation for setting up the BlackBox on the CleanFlight github docs page here. You can find the github for BlackBox here and the developers (thenickdude) youtube here.”

Reply
wwwsam 23rd July 2015 - 4:18 pm

Hi Oscar
I made a DIY version of the datalogger from parts I had around (~ <$10 USD):
-Arduino Nano development board (Same atmel processor as this expensive datalogger) ~$8 USD
-microsd arduino adapter ~$2 USD

I wired it up and flashed the blackbox firmware and found that everything works… except the logs are empty.
ie. It creates the config file and a bunch of empty log files on the microsd. It seems it cannot communicate with my nano..
As I do not have a spare nano I cannot test if it is just a problem with the board =/

Anyone have similar parts and care to try?

Also as side note, my FC is Flip32+. and the TX can be read perfectly through a usb to uart adapter

Sam.

Reply
V_kingo 14th August 2015 - 6:45 pm

Hi!

Open Arduino Serial monitor set 115200 baud and carriage return and the COM port where your Nano is, type some characters, press entet sometimes, switch off, remove micro SD and check if your wrinting was done.

Reply
Psyc0Flyer 22nd July 2015 - 7:47 pm

RTFQ has the CHEAPEST blackbox by far! I think anyways. Hope this helps save a few $$.. I am still trying to set mine up.. :)
http://www.readytoflyquads.com/rtf-blackbox-flight-data-recorder-cleanflight-openlog

Reply
CaTiO 21st July 2015 - 6:36 pm

Cheapest I can found: ebay.de/itm/RTF-BLACKBOX-FLIGHT-DATA-RECORDER-CLEANFLIGHT-OPENLOG-/351398601447?pt=LH_DefaultDomain_0

Reply
Oscar 22nd July 2015 - 11:36 am

interesting.. might get one to test out :)

Reply
fongworld 9th July 2015 - 8:07 pm

“blackbox_render LOG00001.TXT”
“This will create PNG files at 30 fps into a new directory called LOG00001.01 next to the log file ”
—————————————————
What software do I need to do it?
I already have a “TXT” file, download the “blackbox_render tool”, but I still do not know how to decode a “PNG” file.
Thank you, I was a beginner

Reply
Turbini 3rd February 2015 - 11:54 am

Great info, thanks!! I’ll give this a try, I’m curious about what the pids are doing.

Reply
Neil 27th January 2015 - 3:33 pm

goofy question but is there a Chinese clone of the openlog? I have no objection in supporting sparkfun (have spent plenty there in the past) but for something that I am just wanting to do for ‘fun’ I cant see spending 30 bucks for an sd card logger… really really cool feature though!

Reply
Oscar 27th January 2015 - 4:44 pm

you are absolutely right, $30 is a bit too much for what it does. I haven’t looked deep enough into this feature yet to answer your question. I will post updates in social media if I find any cheap alternative to this expensive sparkfun logger. (google plus / facebook page)

Reply
Neil 27th January 2015 - 7:03 pm

Thank you very much. I would love a diy approach. I found that build github.com/sparkfun/OpenLog
I searched around to see if someone had a public pcb anywhere.. I would love to diy it.. I found another arduinopro mini data log build here it is a bit bulkier than I want to go on my 250 though.. edwardmallon.wordpress.com/2014/07/01/a-10-diy-data-logger-is-born/
so there has to be a way. Keep me posted if you find anything. Thanks again for the great updates to the site!

Reply