Flashing BetaFlight and Using BLHeli Passthrough

Beta flight, What is it?

Most people involved in this hobby of ours have heard of BetaFlight, but for those that haven’t BetaFlight is an experimental fork of CleanFlight which is optimised for acrobatics and racing.  Betaflight is rapidly changing and advancing, as a result, by flashing it to your flight controller you get a cutting edge experience and access to new and developing features.  Because it is experimental there are occasionally bugs, these are usually fixed very quickly.

BetaFlight is an experimental fork of CleanFlight

Why Betaflight is awesome

Quick summary of main flight performing features in betaflight:
– Gyro sync (always the most fresh gyro data before the loop starts with minimum delay)
– Overclocked i2c bus to speed up communication with gyro
– Gyro FIR filter preconfigured forthe cleanest gyro traces to the pid controller
– Optimized D calculations and filtering for more derivative precision
– Optimized defaults with main focus on PID1 and PID2 (reduced amount of pid controllers for better overview)
– On F1 targets no need to disable acc anymore to get same performance. Gyro readings get priority when in acro mode.
– Optimized scheduling in tasks to minimize jitter to motors
– Fast PWM support in combination with Oneshot125 (This is usefull when you want fixed refresh rate for ESC’s up to 4khz)
– Easy to no tuning. Stock settings for PID1 and PID2 should be very well flyable on most machines. The optimised filters do good job on feeding the cleanest gyro traces to the pid controller loop, which gives better flight experience and easier tuning.
– Cooler motors and ESC’s. Better for equipment due to clean filters.
– Quaternion logic for Level modes. More precision, less drift and faster performance!
– Beeper selectable for different events


More reasons why Betaflight is awesome

Aside from improvements to the control system, two recent features have made BetaFlight very popular:

Air Mode – This makes it considerably easier to do acrobatic manouvers.  Conventionally below mid throttle the effect of stick movements is gradually listened until at zero throttle they have no effect (and frequently the props are stopped anyway).  This is great for landing and slow accurate proximity flying as it prevents stick movement at low throttle causing the quad to move aggressively, however, for acrobatics such as flips and rolls, it is exactly the reverse of what is required, for these, the pilot chops the throttle when inverted so the quad is not driving its self into the ground at full throttle, however he wants the quad to manoeuvre aggressively to complete its flip or roll.  Air mode addresses this with full impact of stick movement being applied even at zero throttle (the quad should have its props spinning even at zero throttle – something not all pilots currently do and takes a little getting used to).  The net result is the quad can flip and roll quickly with the minimum loss of altitude.

ESC Pass through Flashing – BetaFlight and recent releases of CleanFight allow the pass through flashing of ESCS using the USB connection to the Flight controller, removing the requirement to use flashing tools and disassemble the quad to update the ESC firmware.


**WARNING** Betaflight is exactly as the name suggests, BETA software.  This means that it is experimental.  We do not recommend that beginners to the hobby flash Betaflight.  We recommend that newcomers stick with Baseflight or cleanflight.

BETA FLIGHT IS FOR EXPERTS ONLY


How to flash the flight controller with BetaFlight (A Step by Step guide)

This is a step by step guide to flashing your flight controller with BetaFlight including the new Air mode, followed by pass through flashing of BLHeli ESCs.

Details of BetaFlight can be found at the link below, note that this is a very busy thread:

http://www.rcgroups.com/forums/showthread.php?t=2464844

In this blog entry we will go through a step by step flash of BetaFlight followed by a BLHeli Firmware Flash.  The examples used are based on a Sparrow Racing 270mm frame with a Naze32 rev6a acro flight controller, an OSDoge, a FrSky X4Rsb and FVT Littlebee 20a ESCs, other components are irrelevant to the steps shown.

Although the configuration used has Arm and Air Mode on separate switch settings it is possible to activate air mode before take-off as Air mode will not take effect even though enabled until a short delay after the quad receives input on both the throttle and Pitch/roll.

In the interest of safety Props should be removed from the quad during the entire process.

In order to flash your flight controller with BetaFlight you will need the CleanFlight configurator application from the Google Chrome store.

Next the .hex file for your flight controller needs to be downloaded from here:

https://github.com/borisbstyle/betaflight/releases/

Save Betaflight Hex

Save Betaflight Hex

Scroll down to the DOWNLOADS section, right click on the .hex entry for your flight controller and select “Save Target as …”

Select a suitable location to save BetaFlight and click “save”

Once the download completes, plug the PC into the flight controller and start CleanFlight Configurator.  Go to the Firmware Flasher Tab and select “Load Firmware (local)” on the bottom right of the page.  Navigate to the location the BetaFlight .hex file was downloaded/saved and select the file, when the firmware is loaded into the configurator the green “Flash Firmware” button on the bottom right will be enabled:

image003

Select “Flash Firmware”, the task bar will show the progress of the install.

 

image005

Once completed, click “Connect”.  Depending on what was flashed on the Flight Controller the previous settings may be retained or lost, the section below shows the settings used for the Sparrow 270 with the hardware above, they should be adjusted as appropriate:


Basic Betaflight Settings


 

Ports Tab:image007

UART1 is used to talk to the OSDoge, it should be set to MSP.  UART2 is used to talk sbus to the X4Rsb receiver, it is set as a serial RX.  Click save


 

Configuration Tab:


image009

Motor Stop should be disabled (having it enabled removes much of the benefit of Air mode).  Minimum Throttle should be set to the lowest point where the motors idle with the props on:


Board Alignment

image011

The board alignment should be set (in this example the board is facing backwards).  The receiver settings should be set appropriate to the receiver being used (in this case sbus from the X4Rsb)


Voltage Adjustment


image013

If the voltage sensor on the Flight controller is being used the voltage scale should be adjusted until the voltage shown on the setup tab is correct (compared to a meter on the battery) (remember to hit “Save and Reboot” if moving from the config tab to the setup tab (otherwise the change you just made to the voltage scale will be lost)


Set Failsafe


image015

Failsafe should be enabled with an appropriate value for failsafe throttle


Additional features:
image017

Any additional features (in this case LEDs) should be set.  Click “Save and reboot”


Receiver tab

image019

Select the channel map appropriate to the radio being used and if RSSI is being passed in a channel, select the correct channel.  Click Save.


 

Modes Tab


image021

On the modes tab set up the channels as required (it is important if Air mode is going to be used that Arming is on a switch, not by stick).

In the example picture a three position switch (AUX 2) is used for Disarm/Arm/Air mode, a second three position switch (AUX 1) is used for flight mode (Angle/Horizon/Rate) and a third (AUX 3 – not shown) has Beeper and Gtune on it.

Click Save


 

Motors Tab

If the FC is flashed for the first time or throttle settings have changed (eg min throttle on the config tab) the ESCs should be recalibrated


 

CLI Tab

A custom mix to match the physical dimensions of the Sparrow is added as follows:

mixer CUSTOM
mmix reset
mmix 0 1.000 -1.000 0.805 -1.000
mmix 1 1.000 -1.000 -0.805 1.000
mmix 2 1.000 1.000 0.805 1.000
mmix 3 1.000 1.000 -0.805 -1.000

Type save to save the mix


 

Flashing BL Heli Firmware

Betaflight supports pass-through of BL Heli firmware by simply plugging in to the flight controller with a USB lead.

BLHeli suite can be found here:

https://www.mediafire.com/folder/dx6kfaasyo24l/BLHeliSuite

Download the latest zip and extract the contents to an appropriate folder.

Without any other software connected to the flight controller, plug the USB in and then start the BLHeliSuite application.  On the “select ATMEL / SILABS Interface” menu select the appropriate interface (shown is for FVT Littlebees):


image023

Select the correct COM port and click “Connect”:


image027

Connect the battery to the quad and the esc section at the bottom will populate with numbers 1 through 4, “click the check” button and a window confirming the current state of the ESCs will appear:


image029

(Notice the multi version of the ESC firmware is used on multicopters)

Click on “OK” on the dialogue box then click “Flash BLHeli”. The software will then flash each of the ESCS in turn (one after the other).  For each ESCthe same series of dialogue boxes will appear requiring confirmations.

Once the ESCS have been flashed BLHeli suite can be disconnected.  At this point it is generally not necessary but good practice to recalibrate the ESCs (it is only necessary if some of the parameters have changed)


About the Author

[author] [author_image timthumb=’on’][/author_image] [author_info]Adam is a Technical Architect IRL and Quad builder and Pilot in his spare time.[/author_info] [/author]


 

[et_bloom_inline optin_id=optin_4]

 

 

7 replies on “Flashing BetaFlight and Using BLHeli Passthrough

  • Steve

    Great write up, I found out the hard way about having Motor Stop enabled when using Airmode, I had Motor Stop on and Airmode assigned to a radio swithc, but when I flicked the air mode switch in flight and backed the throttle right back the motors stopped and resulted in a sudden and painful impact with the ground.

    Having learned a valuable lesson I went back and disabled Motor stop and now when I enter airmode and back the throttle right off the motors continue to spin at idle and all is well in the world.

    So, to sum up.

    If using Airmode.

    Motor stop on = BAD
    Motor stop OFF = Good, excellent, you beauty.

    (I prefer having Airmode assigned to a radio switch, and flick Airmode on when airborne, and turn Airmode off when about to land…just my personal preference.)

    Reply
  • Julien

    Hi,
    I’ve solved a pb with my setup, naze rev5 Betaflight 216, CF 1.11, little bee 20A blheli 14.3, µminiosd (MWosd 1.5), PPM rx. Unable to change CF page still “waiting” when lipo and usb is plugged. When I unplugged lipo battery, it works again. I also can’t “reach” the esc with the passthrough feature.
    Here’s a part of the solution :
    Just found why passthrough doesn’t work with µminimosd plugged in. It’s an UART conflict ! So, there’s basically two ways to fix that : reasign µminimosd to UART 2 on pins 3 & 4, OR unplug µminimosd during esc programming. Note that µminimosd will conflict also with USB, when COM is open in CF, the reason why CF is still “waiting”.

    Reply
    • adam.featherstone68

      Hi Julien,
      Your problem was that the USB connection on the Naze (and other boards such as the SP3) uses UART1. You shouldn’t connect your OSD to UART1 as when you apply the flight battery during ESC calibration UART1 immediately starts talking to the OSD and doesn’t listen to the motor command from configurator. BUT if you are using serial RX your UART2 is connected to that so you may have to use UART 1 and unplug your OSD to calibrate ESCs.
      You will note in the examples I used above I am using an X4Rsb receiver, that means UART 2 is already in use for the rx. Also I am using an OSDoge, this uses jumper pins to connect to UART 1 on the Naze, BUT one of the brilliant features of the OSDoge is it has a toggle switch to isolate the OSD from the Naze for just this problem, you just flip the switch, do your calibration and flip it back, one of a number of reasons the OSDoge is a superb piece of kit

  • Nicholas Dietz

    I am trying to use this pass through betaflight to configure my esc. truthfully i need to turn off dampen light mode because im using 2205/2300 kv emaxx redbottom motors and apparently they cause really bad jitters as seen here, https://www.youtube.com/watch?v=Y8Cs43B4mVQ&feature=youtu.be
    so only way to fix it that i have found is to try to soft mount the fc which is a naze32 rev 6 or turn off dampen light mode. for some reason when i have tried this process of turning off dampen light mode in the past the esc never show up on the software and it states it cannot read them?? i do this step by step. only difference is that im using a Power OSD Pro. however it acts as a pdb as well. so my question is what am i doing wrong. do i really have to unsolder my esc from the pdb install a regular pdb in order to use this pass through method? AGAIN PLEASE HELP I WANNA GET FLYING but cant becasue my quad does whats seen in the video above.

    Reply
    • adam.featherstone68

      Hi Nicholas,
      yes you are bumping against a common problem at the moment.
      The problem is in fact the gyro, the mpu6500 and mpu9250 used in several flight controllers, which has a vulnerability to noise on certain frequencies which cause it to have a fit and send erroneous data to the flight controller

      the vulnerability seems to vary from gyro to gyro, I have seen people with the problem fix it by replacing the flight controller (and thus gyro) with another of exactly the same model and type.

      The best solution is to get rid of the noise, however assuming you cant do that (and emax red bottoms do just seem to generate it) you are correct, that the next best solution is to soft mount the flight controller. simply putting rubber or silicon O-rings under the flight controller has fixed or at least improve it for a lot of people. For some a second set is needed above the board. Myself I have started using these to mount the flight controller (regardless of what gyro the Flight controller has) and have had no problems:
      https://www.amazon.co.uk/gp/product/B00X742QMQ/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

      Using vibration isolation is by far the best solution as it has no adverse effect, you can try changing dither settings in BLHeli which should change the frequency of the noise, hopefully to one which the Flight Controller is less vulnerable to, people have also suggested using the software lowpass filters to get rid of the problem, however this seems unlikely to work as the noise is not present in the signal the flight controller sees, just the erroneous signal.

      Turning off dampening is really not a great idea, it will have an adverse effect on the way the quad flies, I would change my motors personally rather than turn off damping.

      you don’t mention what ESCs you are using, however would recommend upgrading to the latest BLHeli, it has some bug fixes.

      with regards to your connection woes:
      It has nothing to do with your PowerOSD Pro

      There can be a number of cause:
      Check the version of Betaflight you are using, some builds have issues with passthough, for example until recently the latest development build (V3.0) wouldn’t work. 2.9 stable should work fine

      Check you have nothing set up on UART1 other than MSP

      Check you are using the correct interface (the cleanflight bootloader for Atmel or SiLabs, depending on what chip your ESCs use)

      Check you have both signal and ground connected for all ESCs and that there is no solder bridging going on at the point they connect to the flight controller (common if you are not careful at that point)

      when you connect to blheli suite, don’t have the battery plugged in, click check and you should get the error you have, click ok (get rid of the message) THEN plug the battery in and click Check again

      if that doesn’t work you may have a more fundamental ESC problem

  • michel puraye

    bonjour première fois que j utilise betaflihg avec drone kingkong 125 pas eu de problème et après avoir modifier 1 réglage sur ma radio j ai penser a le remettre sur betaflihg les paramètres était bon mais les moteur en mode 2 montait en regime mais ne baissait pas en diminuant les gaz le gros problème je l ai de nouveau brancher et beta ne le reconnait plus plus de réglage possible j ai alors changer le mode de clef usb de usb vcp vers le dernier de la liste depuis beta ne se connecte plus pourriez vous m aider bien a vous
    **TRANSLATED BY ADMIN**
    Hello the first time I used Betaflight with a kingkong 125 drone I had no problem and after changing 1 setting on my radio I think to put it back on betaflight the parameters was good but the mode 2 engine was going up but was not falling in decreasing gasses the big problem I plug it again and beta does not recognize it any more setting I have then change the usb key mode from usb vcp to the last of the list since beta no longer connect could you help me?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *