Initializing the Flight Controller
Initializing the Flight Controller#
What you will need
A base station computer
USB to micro USB cable
What you will get
An up-to-date, initialized Flight Controller
The Flight Controller (FC) implements several low-level behaviors, e.g., stabilizing the Duckiedrone around roll, pitch, and yaw through three different PID controllers. Correctly configuring the Flight Controller is critical for flying safely.
Installing Cleanflight Configurator (CFC)#
Cleanflight Configurator is an app that allows the base station to connect directly to the Flight Controller and access its configuration interface.
Cleanflight Configurator used to be a Chrome App, however Chrome Apps’ support has been dropped from Google so you will use the native app for your OS.
Download the correct version of Cleanflight Configurator v2.4.0 for your OS from this link.
Install Cleanflight Configurator on your system
Start Cleanflight Configurator on your base station. You should see the below interface.
Flashing the correct firmware#
Updating the Flight Controller firmware (Flashing the Flight Controller)#
Flight Controllers might have different versions of firmware (i.e., the software that runs on the Flight Controller microcontroller) out of the factory. Normally, this only needs to be done once initially. Follow this procedure to update your firmware.
During flashing, do not press the
“Connect” button in Cleanflight Configurator.
Our current target firmware is:
BTFL v3.3.3 (Download the
.hexfile below to your base station) Download BTFL v3.3.3 here
Prepare for flashing the Flight Controller firmware#
Regardless of the firmware version, if it is the first time setting up the Flight Controller, we recommend performing the below flashing procedure once anyways in order to start from a clean state.
Perform the following 2 steps with the Flight Controller disconnected.
In the default Welcome page of Cleanflight Configurator, in the left sidebar, please click on the
Configure the options in the tab as below:
Different Flight Controller versions#
There are currently 2 types of Flight Controller hardware. Use the steps corresponding to your hardware. Videos for both hardware versions are provided later in the document.
If you have the
OSD version of the Flight Controller you need to solder the micro USB adapter before being able to connect to the base station.
Choose in the following tabs which Flight Controller version you have
Identify your flight controller in this chapter.
You will need to solder the pins to the microUSB board and connect it to the Flight Controller.
what you’ll need
Flight Controller microUSB board
90° header pins
6 pins cable connector (in the Flight Controller bag)
what you’ll get
OSDFlight Controller connected to the base station
Solder the 90° pins to the microUSB board as shown
Connect the 6 pins cable that came with the Flight Controller to the microUSB board according to the following table (there’s one unused
GNDpin on the board).
USB board pin
Connect the white connector of the 6 pins cable to the Flight Controller port shown here.
The microUSB port is already soldered to your board, you can go on with the tutorial.
Flashing the Flight Controller#
The videos to flash the ACRO version and the OSD version of Flight Controllers are below in this section, in their respective tab.
A summary is provided here.
Most operations are the same with both versions, and any version-wise operations are written in the respective tab.
Normally, when connected to the base station, the Flight Controller connects in
This can be identified by:
Having a red blinking LED on the Flight Controller board
If this is the case during this section, unplug from base station and try to reactivate
bootloader mode as detailed below.
To flash the firmware, we need the Flight Controller to be in
Start by having the Flight Controller disconnected
"BO"pins on the board
Use some conductive metal tool to short the
"BO"while connecting the USB cable
Once connected, you can take the pin-shorting material/tool away
there is no red blinking LED. There should be no LED on now on the Flight Controller (there is a red LED on the USB board).
The Flight Controller is now in
"BOOT"button on the Flight Controller
“BOOT”button while connecting the Flight Controller to base station
Once connected, one could release the boot button
Check there is a solid blue LED, not a red blinking LED.
The Flight Controller is now in
Now that the Flight Controller is in
bootloader mode you can flash the correct firmware:
In the Cleanflight Configurator Firmware Flasher tab, click the
Load Firmware [Local]button (bottom right), and select the
.hexfile downloaded at the beginning of this section.
The progress bar should look like
“Loaded Local Firmware: (… bytes)”
Click the Flash Firmware button (bottom right) and check the progress bar.
The progress bar shows:
In case the progress bar turns red, see the Troubleshooting section below
If successful, without needing to reconnect the cable, the Flight Controller should go back to the
Verify the red blinking LED is back on
“Connect”and verify the firmware version is correct as detailed below
To see the whole process for your version of the Flight Controller choose the correct tab below:
Connecting to the Flight Controller#
Unplug the battery from your drone
Double-check the battery is unplugged
Connect the micro USB cable from your Flight Controller to your base station
"Connect"button in the top right corner (right now it will be green as the Flight Controller is not connected yet)
Select the correct connection port
Details might vary depending on available connections on your base station.
The correct port should start with:
Leave the baud rate (number) at the default value of
“Connect”button and a
“Setup”page should greet you with a rendering of your drone (see figure below).
Please check below that you have the correct versions of both:
Checking the firmware version#
On the top left of the Cleanflight Configurator interface, one could check for the Firmware version. For example, in the figure below, the firmware version of the Flight Controller is
Restoring the correct settings#
We will restore the correct settings for the Flight Controller that reflect the setup we have on Duckiedrones (i.e. Flight Controller upside down, ESCs communication protocol, etc.)
The settings for the Flight Controller can be saved and restored through the CLI interface of Cleanflight, which is akin to a shell used to interact with the firmware.
We have created a file with the required setup for you, so you will only need to restore it without having to tweak parameters through the Cleanflight Configurator.
To do this:
Open it in the notepad app of your base station
Copy all content of the file from the notepad by simply clicking on the text and using CTRL + A or CMD + A
Go in the
CLItab of Cleanflight Configurator
Paste all the text you previously copied using CTRL + V or CMD + V in the text field at the bottom (the one with the text
Write your command here. Press Tab for AutoComplete).
Enteron your keyboard to execute the commands and wait for the shell to finish (it should take about 30 seconds)
Save the configuration by executing the command
savein the CLI.
The Flight Controller will now reboot and reconnect.
setup tab check that the drone now results facing up when the side of the Flight Controller with the chips faces downward.
OSD version of the Flight Controller does not enter
It is tricky to jump the exposed Boot pins. Try applying a bit of force when pressing on the pins. If possible, also try verifying they have actually been jumped with a multi-meter.
The progress bar turns red and shows
"No response from the bootloader, programming:FAILED"
It might happen when, on the Firmware Flasher tab, the Flash Firmware button is clicked. This is likely due to the Flight Controller not being in Bootloader mode. Please double check the indicators of that mode in the section above.
"Flashing..." started, but progress bar turns red with a
It might happen during “Flashing…” or “Verifying…”. Click the
Flash Firmware button and try again
On Linux, Cleanflight Configurator doesn’t connect to the Flight Controller and an error
Failed to open serial port appears in the log
This is a permission issue to access the serial port of the Flight Controller.
First try to run
sudo usermod -a -G dialout <USERNAME> , replacing
If this doesn’t work, the quickest solution is to run
sudo chmod 0777 /dev/tty* while Cleanflight Configurator is open, where `/dev/tty* is the port you’re using to connect to the Flight Controller.
This second procedure has to be done each time the Flight Controller is reconnected to the base station.
I’m using Ubuntu 22.04 and Cleanflight Configurator freezes when flashing the firmware.
Proceed with the following workaround:
Open Cleanflight Configurator.
Go in the
Flash on connectoption.
Load the firmware with
Load Firmware [Local](the screen will freeze, this is expected).
Connect the flight controller. The flashing will start at this point.