Betaflight 4.2 Full Setup and Configuration

Posted by UpInTheSky on March 25, 2021 · 25 mins read

Keeping devices firmware updated is always important, especially when awesome new features are out. This is the case of Betaflight quadcopter firmware, which has introduced incredible improvements in 4.2 version allowing to better control drone movements and trace smoother trajectories due to improved noise handling through the use of advanced control algorithms.

Moreover Betaflight Configurator interface has gone through some changes since the last configuration article on this blog, so it is a nice opportunity to take a look at the updated version.
This is why in this article we are going to take a look at Betaflight 4.2, in particular version 4.2.8 (which at the time of this writing is the latest available), and how to setup and configure it.

Betaflight Configurator

As seen in some previous articles, Betaflight Configurator is a really popular application that allows to configure aircrafts loaded with Betaflight firmware via GUI.

Latest application version is available for download at this link for free. If you are using Windows, choose betaflight-configurator-installer_10.7.0_win32.exe, where 10.7.0 indicates the current Betaflight Configurator version: downloading this specific version (or above) is important in order to flash Betaflight firmware version 4.2 or above.

Once the application is correctly installed, it is possible to launch it. Then, it is just a matter of connecting the quadcopter to the PC using a micro USB (Flight Controller) to USB (PC) cable and clicking on “Connect” to establish the connection.

If you do not know how to install drivers to properly connect your drone to the PC in order to use DFU (Driver Firmware Update) mode, you can take a look at the “Drivers installation” section of this article.

Here is the Welcome screen of Betaflight:

Betaflight Firmware Configurator

Before proceeding, it is a good idea to click on Settings icon on the top right and enable permanently Expert Mode: in this way we can see all possible menus and options available in Betaflight Configurator, otherwise some of them are hidden. Another good move is to enable dark theme, since it reduces eyes strain.

In the bottom right corner of the window it is possible to verify Betaflight Configurator current version.

Betaflight Firmware Flashing

Before starting this process, remember to always backup your configuration. Betaflight 4.x PIDs configuration is completely reworked with respect to version 3.x, so it is not recommended to reuse old set up for PIDS parameters; however, having a backup is useful in case the quad is going to have issues with new version and we want to go back to the previous one. Moreover, LED strip or OSD configurations can be reapplied, so remember to launch a “diff” command in CLI tab and copy the output to a .txt file for eventual later use.

In order to install Betaflight latest firmware we need to know which flight controller board is mounted on our quad. If you do not know, you can simply navigate to the CLI tab, which is the Command Line Interface on the Betaflight Configurator and launch the “version” command (“Current firmware version check” section of this article).

In this article, the quad we are working on is the Eachine Wizard X220S (of course same following steps can be applied to every quad, just be careful selecting the correct hardware), which is equipped with OMNIBUSF4SD control board (F405), so we are going to select this board from the drop down menu combined with latest firmware version available:

Betaflight Firmware Flasher 1

Then we can click on the “Load Firmware [Online]” button to load the firmware. Once operation is completed, Betaflight firmware is ready to be flashed on the board, so we can click on “Flash Firmware”. The quad will go automatically on DFU mode and flashing procedure starts.

Betaflight Firmware Flasher 2

If the procedure ends correctly we can “Exit DFU Mode” and start navigating through Betaflight Configurator tabs.

Betaflight 4.2.8 installed

Once Betaflight firmware is installed, when connecting the drone with the new firmware for the first time we could get the following message:

Betaflight Apply Custom Defaults

Just click on “Apply Custom Defaults” to start with the suggested default configuration for the board.

Moreover some warnings could pop up:

Betaflight Warning

The most common is the one presented in the previous image, which tells us to calibrate the accelerometer.

Betaflight Setup Tab

Accelerometer, like magnetometer, can be calibrated in the Setup tab by just clicking on the related button:

Betaflight Configurator Setup Tab

In Setup tab we can also reset settings to default, backup/restore configuration (even if CLI settings are not included, for that we must use “diff” command) and reboot the board into bootloader / DFU mode.
Moreover drone current attitude (roll, pitch and yaw) is shown in real time through a 3D image.

In all the tabs we are going to review, changes are applied only after Save button at the end of the page is clicked.

If you do not plan to use Angle mode (stable / auto level) it is a good idea to disable accelerometer since this saves a good amount of resources reducing CPU Load, which should stay as low as possible. CPU Load should not go over 11-12% when the quad is sitting at the bench considering that during flight this value increases dramatically.

Betaflight Ports Tab

In Ports tab we set ports to be used by the board. In this case we have enabled USB port and UART6 serial port for receiver connection:

Betaflight Configurator Ports Tab

On OMNIBUSF4SD board UART6 is configured for SBUS, which is the protocol used by FrSky transmission systems: this is the configuration we have to use since on this X220S there is an XM+ receiver installed communicating with FrSky Taranis X9D Plus SE 2019 transmitter.

Betaflight Configuration Tab

In Configuration tab, in Mixer section it is possible to set quad type and reverse motor rotation direction. System configuration allows to set Gyro update frequency and PID loop frequency. Generally this is related to ESC/motor protocol chosen in ESC/Motor features section: if we set DSHOT600 we should go for 8KHz update frequency, while DSHOT300 is more suitable for 4KHz. Higher values are preferred, but this is a good choice only if CPU Load does not go over 11-12%. This is why at every configuration change comporting an increase in computational workload on the CPU, we have always to keep an eye on the bottom of the page where CPU Load value is reported: in this case it is at 9%.

Betaflight Configurator Configuration Tab 1

Remember also to disable MOTOR_STOP because we want motors to spin when armed; even if this is a security option, we are going to address this issue by setting up a prearm switch in Modes tab, so motors do not start spinning if we inadvertently flip the arm switch.

Bidirectional DSHOT is not enabled by default, but it is a very nice feature. Basically it enables the capability to receive telemetry from the ESCs, so the flight controller can use the information received to better control the PID loop. This is why enabling bidirectional DSHOT allows RPM filtering settings (configuration is made on PID Tuning tab -> Filter Settings -> Gyro RPM Filter). Be careful to set the correct number of motor poles, i.e. the number of magnets on the motor bell (generally motors on 5 inch quads have 14 magnets). Bidirectional DSHOT can be enabled only if ESCs have been flashed with supported firmware and this can be done both for BLHELI_32 and BLHELI_S: for BLHELI_32 this can be done by updating the firmware through BLHeli Suite, while for BLHELI_S (which is the case of the Eachine Wizard X220S) we need to download JazzMaverick firmware (free) and flash it on the ESCs using BLHeli Configurator. We just need to download version 16.73 for our ESCs, because versions after 16.73 are declared incompatible with RPM filtering from Betaflight developers. In the case of the Eachine Wizard X220S correct firmware is A_H_30_REV16_73.HEX. To download the firmware just select the correct firmware from the list by left clicking it and then, on the page that opens, right click on the “Raw” button on the right selecting “Save link as” to save the file on your computer. Once done, you should find the .HEX file in the path you specified during the save.
Then it is just a matter of flashing the firmware on the ESCs using BLHeli Configurator by selecting the downloaded .HEX file with “Select File Manually” option.
Remember to always keep an eye on CPU Load when enabling this feature since it is computationally intensive.

Motor Idle Throttle Value indicates the percentage of throttle in idle: 6%-8% is generally a good compromise also in order to avoid death rolls and have more floating time when cutting off throttle.

Set 180° in Arming section so as to enable arming of the quad even if the aircraft is upside down (useful if quad crashed and it is stuck somewhere with a certain angle).

The other two important parameters we need to set are in Receiver section to complement what we have already set in Ports tab, i.e. our receiver configuration: since, as stated before, we are using FrSky XM+ receiver, we have to choose Serial-based receiver (SPEAKSAT, SBUS, SUMD) from the first drop down menu (Receiver Mode) and SBUS from the second one (Serial Receiver Provider).

Betaflight Configurator Configuration Tab 2

In Other Features just remember to enable AIRMODE, OSD and DYNAMIC_FILTER. Airmode is a must since we need and want control of the quad at zero throttle. In this case, also LED_STRIP is enabled since Eachine Wizard X220S has a led strip on the back indicating aircraft movements.

Betaflight Failsafe Tab

In Failsafe tab we set failsafe stages: Stage 1 is generally entered when TX loses connection with receiver. At that moment, channel fallback settings are applied to all channels. From that moment there is a time, called guard time, until Stage 2 is entered: guard time is configured in Stage 2 - Settings section where a value of 1 means 0.1 sec, so a value of 10 means if Stage 1 is triggered then there is a guard time of 1 second to recover connection between transmitter and receiver (and the quad is armed) before Stage 2 is entered.

In Stage 2 - Failsafe Procedure we can configure the action to take when Stage 2 is entered; there are three options:

  • Drop: quad turns off motors and drops down
  • Land: quad attempts an emergency landing
  • GPS Rescue: basically a “return to home point” like feature, available only if drone is equipped with a GPS module

Betaflight Configurator Failsafe Tab

Choosing one instead of the other is a matter of preference, however “Land” option is not recommended. “Drop” option is preferable for short range freestyle flights, while “GPS Rescue” is a must for long range builds.

On Channel Fallback Settings it is possible to set the value the channel will get when a failsafe happens: here it is a good idea to change the settings for the RSSI channel (AUX12) so RSSI value goes to zero when connection to the receiver is lost (otherwise by default it will “Hold” on that value). Since the value of 1000 corresponds to the minimum, i.e. zero, we are going to change “Hold” to “Set” and type this value.

Betaflight PID Tuning Tab

PID Tuning tab contains three sub tabs:

  • PID Profile Settings
  • Rateprofile Settings
  • Filter Settings

PID Profile Settings

PID Profile Settings allows to configure PID (proportional, integral, derivative) values and Feedforward for each one of the rotational axes (x, y, z) by means for roll, pitch and yaw. This can be done by changing singular values in the table or using the four sliders:

  • Master Multiplier: increases all PIDs in a balanced way (having a 5 inch quad as reference, for bigger quads -> slider to the right, for smaller quads -> slider to the left)
  • PD Balance: slider to the right progressively increases P (in case we need more responsiveness)
  • P and D Gain: this is the most important slider, from this one we get the compromise between responsiveness and oscillations/propwash occurrence; the good thing is that P and D values automatically balance while moving the slider
  • Stick Response Gain: this slider modifies feedforward values; basically feedforward reduces PID controller action latency, i.e. how fast the quad responds to our commands. How to set this parameter depends from the flight style: slider to the right means a more nervous behavior for aggressive maneuvers; sliders to the left for a smooth/cinematic flight style.

Sliders are particularly useful for users new to tuning and largely simplify the process. While moving sliders to left or right, variations on PIDs can be seen in the table above. The fundamental step is to change sliders with small steps, flying after every change to test the difference in quad response. If Expert Mode is not enabled, sliders movement is reduced.

Betaflight Configurator PID Tuning Profile Settings Tab

In PID Controller Settings section it is possible to set Feedforward transition, which represents how feedforward control acts and can vary from a minimum of 0 to a maximum of 1: higher values determine a more relaxed action (a value of zero gives more reactivity to input controls).

Dmin sets a minimum value for D parameter, so it will vary from a minimum to a maximum value depending on how we move the sticks, for example how fast we move them: this means that D parameter is dynamic. Personally I do no use this functionality, so I keep it disabled.

When changing values in PID Tuning tabs it is important to always check motors temperature: if they are getting too hot, by means it is uncomfortable to hold them with hands, that is an indicator that they are not able to handle that configuration and we should go back to the previous one.
Otherwise, we can check motor temperature in a more professional way using a digital infrared thermometer.

Before starting to play around with these parameters, testing a first flight with defaults is recommended. Betaflight developers have done a great job with Betaflight 4.2 version and you will be amazed to find that even with default values the quad flies great.

Betaflight 4.2 Tuning Notes

Before proceeding to the next tab, it is worth to take a look at the following page that reports tuning configurations for different fly styles directly made by Betaflight developers: Betaflight 4.2 Tuning Notes.

The following one, as stated, is made for HD (smoothed FF for HD cameras, strong low turn rate smoothness, low iterm relax to minimize bounce back):

set iterm_relax_cutoff = 10
set rc_smoothing_auto_smoothness = 20
set ff_interpolate_sp = AVERAGED_3
set ff_smooth_factor = 40
set ff_spike_limit = 55
set ff_boost = 0
set feedforward_transition = 40
set yaw_lowpass_hz = 70
set throttle_boost = 5
set throttle_boost_cutoff = 10
set dyn_lpf_dterm_curve_expo = 7
set gyro_rpm_notch_q = 800

To use a certain configuration, it is just a matter of going in the CLI tab, copying and pasting the code snippet and pressing Enter. Then we have to save the parameters by simply writing the “save” command and pressing Enter again.

However, in case we do not like the feeling with a particular setup, we can always go back to the default configuration by copying and pasting the default parameters setup in the CLI and then saving the changes.

Return to defaults:

set iterm_relax_cutoff = 15
set rc_smoothing_auto_smoothness = 10
set ff_interpolate_sp = AVERAGED_2
set ff_smooth_factor = 37	
set ff_spike_limit = 60
set ff_boost = 15
set feedforward_transition = 0
set yaw_lowpass_hz = 0
set throttle_boost = 5
set throttle_boost_cutoff = 15
set dyn_lpf_dterm_curve_expo = 5
set gyro_rpm_notch_q = 500
set iterm_windup = 100

Rateprofile Settings

In Rateprofile Settings tab we can set rates and expos, i.e. the relation between stick movements and rotational velocity of the quad along its axes.

The graph is really useful since it show how roll/pitch/yaw profile curves modify after changing RC Rates, Rates and RC Expo values.

Betaflight Configurator PID Tuning Rateprofile Settings Tab

The configuration above gives a good rotational speed smoothing stick sensitivity for central movements.

Filter Settings

In Filter Settings tab, sliders come back. Be really careful when playing with them and always keep attention when you turn on motors after changes. If after turning on everything looks ok, it is a good practice to fly for 30 seconds and check motors temperature.

Gyro RPM Filter is displayed if we have enabled Bidirectional DSHOT in Configuration tab and this is a must have, especially if our build and motors have some flights on the back since it does a great job handling noise.

Having Dynamic Notch Filter at zero is another must have.

Betaflight Configurator PID Tuning Filter Settings Tab

Betaflight Receiver Tab

In Receiver tab, if we have correctly setup the receiver in Ports and Configuration tabs, we should see channel values changing when moving the sticks on the transmitter. So it is just a matter of setting the Channel Map to map correctly sticks movements to channels based on transmitter sticks mode (Mode 2 in this example): for this FrSky Taranis X9D Plus SE 2019 it is TAER1234 and RSSI Channel is mapped to AUX 12 for XM+ receiver.

Betaflight Configurator Receiver Tab

Take a look at how to setup and configure switches for the FrSky Taranis X9D SE 2019 on Betaflight article if needed. This is also useful for next tab.

Betaflight Modes Tab

In Modes tab it is possible to map transmitter switches to Betaflight flight modes or features.

Here there are the most useful: ARM, ANGLE, HORIZON, BEEPER, FLIP OVER AFTER CRASH, PREARM.

Betaflight Configurator Modes Tab

Betaflight Motors Tab

Motors tab is useful to check motor errors percentage, which is the value in red after “E:”. You have to connect battery to the quad in order to make this test. It should always stay under 1% while moving the sliders up and down.

Always make sure propellers are removed when testing and never run motors for more than few seconds or you can burn them since propellers are not there to cool them down.

Betaflight Configurator Motors Tab

Betaflight OSD Tab

OSD stands for On Screen Display: here we can set all the informations we want to visualize on the FPV Goggles.
The most useful are for sure battery voltage, RSSI and flight time.

Betaflight Configurator OSD Tab

Betaflight LED Strip Tab

Since Eachine Wizard X220S has led strips on the back, we need to reconfigure their values. Thankfully we have saved the previous configuration through “diff” command, so we can just use CLI to bring it back:

# led
led 0 0,11::AI:8
led 1 0,12::AI:8
led 2 0,13::AI:2
led 3 0,14::AI:2
led 4 0,15::AI:2
led 5 15,11::AI:8
led 6 15,12::AI:8
led 7 15,13::AI:2
led 8 15,14::AI:2
led 9 15,15::AI:2

# color

# mode_color
mode_color 6 0 2
mode_color 7 0 0

On LED Strip tab we can verify the success of the operation:

Betaflight Configurator LED Strip Tab

Betaflight Blackbox Tab

Betaflight Blackbox is a must have, since it can help us evaluating how good are the parameters we have set in PID Tuning tabs.

Betaflight Configurator Blackbox Tab

In fact, having Blackbox enabled allows the quad to write flight logs on SD card, so we can check them post flight to verify if there is something wrong with the quad: we can do this by feeling it, but this is definitely the best way to finely tune the quad.

If you are interested, check this simple example of how Betaflight Blackbox is useful to analyze quad problems.

Betaflight CLI Tab

Like stated before, in CLI we can insert commands and set parameter values.

Betaflight CLI Tab

After setting values it is important to use “save” command to commit changes.

Conclusions

In this article we have seen Betaflight 4.2 firmware features, in particular 4.2.8 version, and how to setup and configure them using Betaflight Configurator 10.7 on the Eachine Wizard X220S equipped with OMNIBUSF4SD board and FrSky XM+ receiver. This firmware is a real game changer with improved algorithms and parameters control allowing smoother flying and better handling of propwash effects.