FPV Quadrotor Operation – DRS120 Flight Controller Configuration

This post follows the DRS120 Kit & Additional Components and DRS120 Hardware & Electronics Assembly posts. This post describes the steps necessary to install Cleanflight Configurator, flash the Betaflight firmware, and configure the flight controller software before operating the quadrotor.

DRS120 Flight Controller Configuration

After assembling the DRS120 FPV quadrotor, the next step is to install the autopilot software and calibrate the Remote Control. We will use the Cleanflight flight software to program the flight controller board.

Cleanflight is an community project that develops flight controller firmware and related tools. Cleanflight can be used on both multirotor and fixed-wing aircraft. The flight controller software is open source and is also a 32 bit version of the original 8 bit MultiWii software. Therefore, this software can fully leverage the 32 bit ST micro processor on the Micro Scisky flight controller board. Cleanflight consists of two primary pieces of software. The firmware is the code that runs on the flight controller board. Cleanflight also has a GUI configuration tool for updating the flight controller settings that runs on Windows, Linux, and OSX.

The first step is to install the the Cleanflight Configurator. It runs as an app within Google Chrome so you will need to install Google Chrome if you don’t already have it. Once Google Chrome is installed, install the Cleanflight Configurator application. Open up Google Chrome and access your application page at the following link and click on the Cleanflight icon.

Google Chrome Cleanflight Application

This should start Cleanflight in a separate window. This page provides links to several drivers which may need to be installed to get your computer to communicate properly with the flight controller board over a USB connection. Download and install the drivers as required.

Cleanflight Home Screen

The next step is to connect the flight controller board with a micro USB cable for testing and configuration before connecting a battery. The USB connection is enough to power the flight controller board for configuration purposes. After connecting to the flight controller board, navigate to the “Setup” tab and create a backup of the stock configuration of the flight controller board. The backup will be needed after we flash the flight controller software to make sure the RC receiver will bind. Once the backup is saved, disconnect the flight controller board using the large red button.

Cleanflight Setup Create Backup

For this project, we will be installing the Betaflight firmware since it offers improved performance compared to the Cleanflight flight controller firmware. Download betaflight_2.6.1_NAZE.hex and then load it locally using the Firmware Flasher tab on the Cleanflight Configurator

  1. Click on the “Firmware Flasher” tab.
  2. Click on the “Load Firmware [Local]” button, and select the betaflight_2.6.1_NAZE.hex file.
  3. Click on the “Flash Firmware” button.
  4. The progress bar will become green and read “Programming: SUCCESSFUL”

Cleanflight Formware Flash

Connect to the flight controller board again and restore the backup configuration file made previously to ensure that the radio receiver is able to bind to the Remote Controller.

After installing Betaflight, the next step is to setup the flight controller for brushless motor operations. This is done using the CLI tab before attaching the battery.

  1. Type “set motor_pwm_rate = 32000” into the box at the bottom of the CLI tab and hit enter. You should see the text output above confirm your entry.
  2. Type “save” and hit enter. The option will be saved and the board will reboot.
Cleanflight CLI PWM Command
Next we will get the Remote Controller setup. This section assumes you are using a Spektrum DX5e or higher Remote Control. First, edit the Ports tab and ensure UART2 is set to Serial RX.
Cleanflight Configurator Ports Tab
  1. Enable “Serial RX” on UART2
  2. Press “Save and Reboot”

Then, set the “Receiver Mode” and “Serial Receiver Provider” settings.

Cleanflight Configuration Tab

  1. Select “RX_SERIAL” from the “Receiver Mode” list
  2. Select “SPEKTRUM1024” from the “Serial Reveiver Provider” list
  3. Click “Save and Reboot”
Finally, navigate to the Receiver tab. This tab lets us visualize the values coming in from the RC on all the different channels.
Cleanflight Configurator Receiver Tab
  1. Select “TAER1234” from the Channel Map list
  2. Press “Save”
You will now need to bind your controller to the flight controller board. When the flight controller board is first turned on, the red LED slowly flashes which means it is looking for a bound radio. After 10 seconds, the flight controller enters bind mode as evident by the red LED flashing faster. Place your Remote Controller in bind mode according to your radio’s instructions. When your Remote Controller successfully binds, the red LED on the flight controller board with be a solid red.
Now when you move the sticks on the Remote Controller, the values should change on Cleanflight Configurator. You will need one AUX switch enabled to use for arming the quadrotor. The quadrotor motors won’t spin if the quadrotor isn’t armed. Find a 2 or 3 position switch you would like to use for arming the quadrotor and ensure you can see the values change as the switch position changes. Make note of the AUX channel tied to the switch for the next section. Also make note of your throttle minimum value and ensure the throttle, roll, pitch, and yaw values are between 1000 and 2000 and move in the correct directions.
In the Modes tab, we will assign modes to corresponding switch values. For this simple introduction, we will be setting the “Arm” mode as previously discussed and the “Angle” mode. “Angle” mode means the quadrotor will self-stabilize and the angles of the quadrotor are limited to prevent spins and flips. When the roll and pitch values are neutral, the flight controller will use the accelerometer and gyroscope to keep the quad level. This depends on the accuracy of your calibrations as well as the trim settings on your Remote Control.
Cleanflight Configurator Modes Tab
  1. Click the “Add Range” button in the ARM section
  2. Set the AUX channel picked for arming
  3. Move the sliders to set the range of the channel that you want to specify as “Armed”. In the image above,the green bar represents the values that will arm my quadrotor. The current value of the AUX 1 channel is indicated by a green tick mark. Since the green tick mark is between the slides, the quadrotor is armed
  4. Click “Add Range” in the ANGLE section
  5. Set a different AUX channel for this mode (if you have one available)
  6. Move the sliders to select the entire range. This means that the copter will always be in Angle mode
  7. Click “Save”

In order to have the most stable quadrotor performance, we need to calibrate the accelerometer. This can be done using the Setup tab.

Cleanflight Setup Create Backup

  1. Place the quadrotor on a flat surface
  2. Press “Calibrate Accelerometer”
  3. Wait until the “Pitch” and “Roll” values stabilize around 0.
The Configuration tab is next. Here we will set the motor_stop min_command, min_throttle, and min_check.
  • motor_stop – If disabled, the motors spin at the min_throttle value when armed. Some find this useful for determining if the quadrotor is armed or not. It is recommended to look at the lights on the flight controller board to determine the arm state and enable motor_stop instead
  • min_command – the value sent when disarmed or when armed and motor stop is on. This value should be less than the minimum value that makes the motors spin.
  • min_throttle – value sent to the motors when motor_stop is off and the quadrotor is armed. This value should be slightly more than the minimum value that makes the motors spin.
Cleanflight Configurator Cofiguration Tab
  • Enable “MOTOR_STOP”
  • Set “Minimum Throttle” to 1000
  • Set “Maximum Throttle” to 2000
  • “Save and Reboot”

Lastly, we will use the CLI to set the min_check value. When the quadrotor is armed, motor_stop is disabled, and the throttle value is below the min_check value, the min_throttle value will be sent to the motors. When the quadrotor is armed, motor_stop is enabled, and the throttle value is below the min_check value, the min_command value will be sent to the motors. The min_check value must be set above the lowest throttle value your Remote Controller can transmit reliably. The quadrotor won’t arm if the throttle value is above min_check. My minimum throttle value is 1150 so I set my min_check value to 1175. From the CLI tab enter the following commands.

  1. set min+check= 1175″
  2. save
Now, we will test the motors. In order to power the motors, a battery needs to be plugged in. Once the quadrotor is battery powered and connected to Cleanflight Configurator, navigate to the Motors tab.
  1. Remove the propellers from the motor shafts
  2. Enable the switch labelled “… Enable motor Control”
  3. Manipulate the “Master” throttle to apply power to the motors. They should all being spinning and the speed should increase as the throttle is increased.
  4. Ensure the motors are all spinning in the direction as shown on the reference figure
  5. If there are any errors with the motor, try manipulating power to the individual motor
  6. If a motor is still not moving, verify the electrical connections or replace the motor
Cleanflight Motor Testing
Finally, we will set the PID values for the flight controller. I recommend the default LuxFloat PID values
Cleanflight Configurator PID Tab
  1. Select “LuxFloat” from the PID Controller drop down menu
  2. Click “Save”
That covers the initial configuration required to operate the quadrotor. You should be able to attach a battery, arm the quadrotor, and take off. It may help to hold the quadrotor in your hand initially while manipulating the Remote Control to ensure all of the sticks are mapped appropriately.
See the following posts for more information about assembling, programming, and operating the FPV quadrotor.

Leave a Reply

Your email address will not be published.