The flight controller implements a number of critical (FC) implements several low-level behaviors. This document is work in progress - do not follow it literally, yet, e.g., stabilizing the Duckiedrone around roll, pitch, and yaw through three different PID controllers. Correctly configuring the FC is critical for flying safely. Warning
Installing Cleanflight Configurator (CFC)
Cleanflight configurator is an app that allows the base station to connect directly to the FC and access its configuration interface.
Steps:
Install Google Chrome
Install the Cleanflight Configurator for Chrome
Updating the FC firmware
Status | ||||
---|---|---|---|---|
|
(Update to BTFL 3.3.3 - although successful flight tests have been conducted with 2.4.0 and 3.0.1)
Start CFC on your base station. You should see the below interface.
...
Connecting to the Flight Controller (FC)
...
Unplug the battery from your drone
double-check the battery is unpluggedStatus colour Red title IMPORTANT
Disconnect the Raspberry Pi from the FC
Connect the mini USB cable to from your FC and to your base station
Start CFC on your base station
...
In CFC (see last section), on the top right corner
select the correct connection port
Details might vary depending on available connections on your base stationStatus colour Yellow title Note
...
. The correct port should start with:
/dev/tty.
...
usbserial*
/dev/cu.usbserial*
or/dev/ttyUSB*
...
Leave the baud rate (number) at the
value ofStatus colour Green title default 115200
...
Press
...
...
the “Connect” button and a “Setup” page should greet you with a rendering of your drone
...
Configuring the flight controller
CleanFlight allows modification of many parameters. We provide a starting configuration that is sufficient for flying.
Setup page
This page can be used to do a quick test of the onboard IMU. Move your drone around and verify that the rendering of the drone moves. Don’t expect it to be perfect, we still need to calibrate everything. We will come back to this page later.
Ports page
Configuration
Power and battery page
Failsafe page
...
PID tuning
...
Receiver
Modes
...
Adjustments
Servos
GPS (ignore)
Motors
OSD (ignore)
Race Transponder (ignore)
...
Sensors
...
Thethered Logging (ignore)
Blackbox (ignore)
...
(see figure below). Before configuring anything, please read the next section and flash the firmware.
...
Checking the existing firmware version
On the top left of the CFC interface, one could check for the Firmware version. For example, in the figure below, the firmware version of the FC is BTFL 3.3.3
.
...
Status | ||||
---|---|---|---|---|
|
Prepare for flashing the FC firmware
If the CFC is still connected to the FC, please press the “Disconnect” button on the top right.
...
In the default Welcome page of CFC, in the left sidebar, please click on the Firmware Flasher tab
...
Configure the options in the tab as below:
...
Updating the FC firmware (Flashing the FC)
FCs might have different versions of firmware (i.e., the software that runs on the FC’s micro-controller) 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 CFC.Status colour Red title IMPORTANT
Our current target firmware is: BTFL 3.3.3 (Download theStatus colour Blue title FACt .hex
file below to your base station)
View file | ||
---|---|---|
|
Different FC versions
Status | ||||
---|---|---|---|---|
|
Version | Picture and key features to notice for this section |
ACRO |
|
OSD |
|
Flashing the FC
The videos to flash respectively the ACRO version and the OSD version of FCs are below in this section. A summary is provided here. Most operations are the same with both versions, and any version-wise operations are highlighted with
Status | ||||
---|---|---|---|---|
|
Status | ||||
---|---|---|---|---|
|
Normally, when connected to the base station, the FC goes in Normal mode
there is a red blinking LEDStatus colour Green title check unplug from base station
To flash the firmware, we would like the FC to be in Bootloader mode instead
For the ACRO version, hold the “BOOT” button while connecting the FC to base stationStatus colour Purple title 1
Once connected, one could release the boot buttonStatus colour Purple title 1 Status colour Purple title 1
there is no red blinking LED. On the ACRO version, there is a solid blue LEDStatus colour Green title check
For the OSD version, use some conductive metal tool to short the “Boot pins” (as highlighted in the previous section)Status colour Yellow title 2
Once connected, once could take the pin-shorting material/tool awayStatus colour Yellow title 2 Status colour Yellow title 2
there is no red blinking LED. On the OSD version, there is no LED on now.Status colour Green title check
In the CFC Firmware Flasher tab, click the Load Firmware [Local] button (bottom right), and select the
.hex
file downloaded at the beginning of this section.
The progress bar should look like “Loaded Local Firmware: (… bytes)”Status colour Green title check
Click the Flash Firmware button (bottom right) and check the progress bar.
The progress bar shows: “Flashing…” => “Verifying…” => “Programming SUCCESSFUL”Status colour Green title check In case the progress bar turns red, see the Troubleshooting section below
If successful, without needing to reconnect the cable, the FC should go back to the Normal mode.
Verify the red blinking LED is back onStatus colour Green title Check
Click “Connect” and verify the firmware version is correctStatus colour Green title Check
...
Troubleshooting
Expand | ||
---|---|---|
| ||
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. |
Expand | ||
---|---|---|
| ||
It might happen when, on the Firmware Flasher tab, the Flash Firmware button is clicked. This is likely due to the FC not being in Bootloader mode. Please double check the indicators of that mode in the section above. |
Expand | ||
---|---|---|
| ||
It might happen during “Flashing…” or “Verifying…”. Click the Flash Firmware button and try again |
Expand | ||
---|---|---|
| ||
We’re happy to support! Please contact our hardware team via email: hardware@duckietown.com |
...
You now have the updated flight controller firmware! Connect to it in Normal mode and we will configure it next.