If you haven’t checked out Boris’s Betaflight, then you are missing out! It’s a modified version of current Cleanflight firmware, with many excellent performance improvements.
After trying this firmware, people’s first reactions were mostly “wow, this is amazing”, or “my quad has never flown this well before!”. And indeed, I can confirm even with just default settings, my mini quad already runs really well and locked in. With some PID tuning it’s just awesome, almost feels like flying in a simulator. Also my stick control feels more intuitive and direct than before.
A BIG THUMB UP to Boris and all the contributors of Betaflight!
At the beginning, things changed so rapidly with this firmware, there was a new release every few hours (literally!). But finally, things are now settling down and it is a good time to start using it without worrying about frequent new updates.
In this post I will briefly describe how to flash the firmware on your flight controller such as Naze32.
Note that Betaflight is not Cleanflight 1.10 (the new release), although CF 1.10 did include some of the improvement from Betaflight. Betaflight, as the name suggests, it is kind of an experimental firmware. But eventually and hopefully, I think with enough testing Betaflight will get merged into future cleanflight official release.
Here is a Cleanflight 1.9 PID and Gyro Blackbox log graph of my Ghost 220 quad.
And this is Betaflight PID and Gyro BB log graph (of today’s release), on the same quad. There is still just a little bit of micro vibration, probably due to my poor quadcopter building skills. ;-p
Look at how clean those gyro traces are! it’s like day and night! Also the motor outputs are so much smoother, before it was like pacman!
Here is a guide on how to tune PID using blackbox logs.
Flash Betaflight Firmware
- Go here to download the betaflight firmware hex file for your flight controller (if you have trouble downloading that, use this dropbox link: https://dl.dropboxusercontent.com/u/31537757/cleanflight/betaflight/betaflight.zip)
- Click on the Firmware you want (for example “betaflight_NAZE.hex” is for Naze32 )
- Click the button labelled “Raw”.
- Rigth click on anywhere on the webpage, and choose “Save as…” to a location on your computer. (if file name is “betaflight_NAZE.hex.txt”, just remove “.txt” before click save)
- Plug in your Naze32 and open Cleanflight Configurator (if you have autoconnect selected then click disconnect)
- Click “Load Firmware Local” and locate the HEX file you saved. (You may have to change the “file type” setting to “all files” in order to find the hex file)
- Click “Flash” (you might fail the first time, just press flash again)
For CC3D users, I don’t personally use it so I am not sure how to flash it. But I heard you need to use an FTDI adapter connected to UART1 with the bootloader pins shorted, then flash directly via cleanflight configurator. Also search in youtube for how to do it.
How to Tune Betaflight
I have only been following Betaflight the last 2 weeks. From reading the previous posts in RC Groups thread, I understand Boris has made betaflight so much easier to use by removing many parameters. He even removed looptime, which is now synced to the Gyro (to be exact, looptime is now set at 1000, because gyro samples at 1kHz)
All that’s left now is dterm_cut_hz. Basically before betaflight (even on today’s Cleanflight release), a lot of noise and vibration is caused by D term. “dterm_cut_hz” is a software filter that help reduce that vibration. It allows you to have higher D without having vibrations or jello in your video.
To tune PID, you really should use blackbox. Tuning of P and I are the same as before (PID tuning guide). For D, if you have some bounces on roll or pitch, turn up D. If the right D gives too much D noise into gyro and motors, only then you should turn down dterm_cut_hz (where you don’t really want to reduce D).
The drawback of low dterm_cut_hz is delay. The lower you go, the more delay you will get, and you quad will feel more sluggish.
Lastly, Betaflight currently only works on PID controller 1 (Rewrite) and PIDC2 (Luxfloat).
For more information, check out Boris’s Betaflight thread on RCGroups.
Disable PWM Input in BLHeli for Oneshot
Update (04/10/2015) – Please note that if you want to use oneshot125 with BLheli ESC in Betaflight, you are should flash the latest BLHeli Firmware (14.1), and leave “PWM Input” disabled (it is disabled by default).
The reason being Betaflight runs at such fast looptime (1000), BLHeli sometimes mis-interpret the oneshot signal as normal PWM signal. The option to disable PWM signal is only available since BLHeli 14.0.