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.
chrome://apps/
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.
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.
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
- Click on the “Firmware Flasher” tab.
- Click on the “Load Firmware [Local]” button, and select the betaflight_2.6.1_NAZE.hex file.
- Click on the “Flash Firmware” button.
- The progress bar will become green and read “Programming: SUCCESSFUL”
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.
- 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.
- Type “save” and hit enter. The option will be saved and the board will reboot.
- Enable “Serial RX” on UART2
- Press “Save and Reboot”
Then, set the “Receiver Mode” and “Serial Receiver Provider” settings.
- Select “RX_SERIAL” from the “Receiver Mode” list
- Select “SPEKTRUM1024” from the “Serial Reveiver Provider” list
- Click “Save and Reboot”
- Select “TAER1234” from the Channel Map list
- Press “Save”
- Click the “Add Range” button in the ARM section
- Set the AUX channel picked for arming
- 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
- Click “Add Range” in the ANGLE section
- Set a different AUX channel for this mode (if you have one available)
- Move the sliders to select the entire range. This means that the copter will always be in Angle mode
- 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.
- Place the quadrotor on a flat surface
- Press “Calibrate Accelerometer”
- Wait until the “Pitch” and “Roll” values stabilize around 0.
- 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.
- 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.
- set min+check= 1175″
- save
- Remove the propellers from the motor shafts
- Enable the switch labelled “… Enable motor Control”
- 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.
- Ensure the motors are all spinning in the direction as shown on the reference figure
- If there are any errors with the motor, try manipulating power to the individual motor
- If a motor is still not moving, verify the electrical connections or replace the motor
- Select “LuxFloat” from the PID Controller drop down menu
- Click “Save”