Betaflight Firmware Setup

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.

Cleanflight-1-9-blackbox-noisy Cleanflight-1-9-blackbox-noisy-gyro

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

Betaflight-blackbox-clean-pid-gyro Betaflight-blackbox-gyro

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

  1. 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)
  2. Click on the Firmware you want (for example “betaflight_NAZE.hex” is for Naze32 )
  3. Click the button labelled “Raw”.
  4. 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)
  5. Plug in your Naze32 and open Cleanflight Configurator (if you have autoconnect selected then click disconnect)
  6. 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)
  7. 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.

73 thoughts on “Betaflight Firmware Setup

  1. John

    Hi Oscar
    I just flashed 3.1.7 to Naze32 Rev6 and now I can’t connect to BLHeli config. When I try to calibrate ESCs, upon pulling down the motor slider (after connecting battery) the orange motor bars stay at 100% and the ESCs beep twice. Then they spool up on zero throttle. Looks like they’re busted?

    Reply
    1. Oscar Post author

      try a older version of Betaflight?
      BF and CF are giving up support to F1 flight controllers, so it’s normal you are picking up bugs.
      Time to get a F3/F4 FC.

      Reply
      1. Andy

        Hi,
        I also want to use a Naze32 R6b, can you tell me what is the latest CF/BF Version that is working fine with this “old” FC? Or which settings have to be changed to save cpu load and get the Naze32 working.
        Thanks :-)
        *great articles on your site!

      2. Oscar Post author

        CF and BF are still supporting Naze32. Just get the most recent stabe release.
        To save CPU load, turn off features that you don’t use, and disable accelerometer if you don’t use self level.

  2. yuri

    Graph smoothness is highly dependent on sampling rate and graphing algorithm (which in most cases is spline based and have significant smoothing effect). There are also no x and y scales, so it is hard to verify if the different is real.

    Reply
  3. Masta_fpv

    Oscar, I’m running a rev 5 naze with rotorgeeks rg20. After flashing 14.6 to the esc my quad will not arm or respond. Rc inuts are present in betaflight and oneshot125 will not enable even in cli. Any advice would be awe some

    Reply
  4. Chris

    Hi Oscar,

    The time scale is missing from your graphs. its at 100%? So a screen full represents about a second? you were getting ~100hz oscillations before roughly?

    I seem to see 20hz on my quad.

    Reply
    1. Oscar Post author

      both graph should be same time scale.. 20Hz indicate vibrations from motor and props… which means you want to balance those first… and check for loose bolts in the frame… and make sure frame arms are stiff enough.

      Reply
    2. Joe Stubbs

      Hi Oscar
      I have a Naze32 Rev5 + Betaflight + ppm Rx + DX9 Tx … For 3 days now been trying to config all of them too operate on a Fixed Wing Aircraft, using the Passthru Mode to prevent FC interaction.

      I’ve been stumble-bumming around trying to config the PWM outputs at the servo pins using the Servo Tab Matrix ( is that the terminology !? ) – methinks the servo outputs sequence to be – chan 1 to 6 – Ail Elv; Thr; Rud; Gea;r Aux 1; and I monitor these outputs via the Servo Tab graphics.

      The other strange thing is the DX9 mapping is TAER123 but the BetaFlight Receiver Tab Mapping is required to be AETR123 for the receiver input gaphics to sync

      I just cannot get the correct servo outputs to agree with stick input….please help…Joe

      Reply
      1. Oscar Post author

        I believe you can either change RX mapping in cleanflight, or on your TX..
        in Cleanflight, under Receiver tab, you should be able to change to TAER123 from the drop down menu?

        I haven’t used the DX9 TX, but i know on the Taranis you can change input channels order as well in the settings… maybe give that a google as well..

      2. Steve_C

        look here: https://github.com/cleanflight/cleanflight/blob/master/docs/Mixer.md
        that’s how i made it work. took days of programming and reprogramming to get it
        this may get you close:
        # mixer
        mixer CUSTOMAIRPLANE
        mmix reset
        mmix 0 1.000 0.000 0.000 0.000
        smix reset
        smix 0 6 5 100 0 0 100 0
        smix 1 6 1 100 0 0 100 0
        smix 2 3 0 100 0 0 100 0
        smix 3 4 0 100 0 0 100 0
        smix 4 3 4 100 0 0 100 0
        smix 5 4 4 100 0 0 100 0
        smix 6 2 10 100 0 0 100 0
        smix 7 5 11 100 0 0 100 0
        (that’s a CLI dump off my big plane, I’m programming the small one today and tomorrow)
        Here’s an example:
        mmix 0 1.000 0.000 0.000 0.000 ( this sets pin 0 to motor, 1.000 is thrust authority and the next 3 zeros are roll pitch and yaw authority.

        smix 0 6 5 100 0 0 100 0 ( this sets smix rule 0 for servo 6 ( with source 5 which is RC PITCH , off the website at the top,) rate 100 min 0 and max 100 box is 0
        # Rule Servo Source Rate Speed Min Max Box
        smix 1 6 1 100 0 0 100 0
        this is rule 1, servo 6 input rule 1 (Stabilised PITCH) then rate 100, 0 min 100 max and box 0

        So on my plane this makes the elevator servo work both with RC input (source 5) and stabilized, FC controlled, Rule 1.

        if the servo goes the wrong way use smix reverse
        this is the example off the above web page:
        smix reverse 5 2 r
        i.e. when mixing rudder servo slot (5) using Stabilised YAW input source (2) reverse the direction (r)
        so if you reverse the stabilized yaw, you also would have to reverse the RC Yaw as well
        which would be smix reverse 5 6 r

        use the above web page and you will get there. it took me weeks to get my big plane up in the air. not a lot of people flying Quad Chips on planes, but it works and is fun when it does.
        just make sure you test your RTH and stabilized modes with plenty of elevation. the first time I flipped on the Horizon mode the plane was almost uncontrollable. That was a white knuckle landing. had my goggles on and kept hitting the wrong switch to try to turn it off…
        best of luck to you, Steve

  5. Robert

    Hi Oscar,

    I recently built a quad with the motolab fc and littlebees which were ordered across the pond in Australia. The build resulted in 3 motors spinning. I have the signal wire (white) connected to the board and I removed the ground. I have the latest clean flight and the latest beta flight installed. Presuming the esc have at least 14.0 installed. I moved arms around with motors and esc attached to make sure the board was working on that leg and it was. So I’m thinking I likely have a bad esc. I had a spare kiss esc and motor that I connected but it wouldn’t spin either. Is this due to the fc firmware or something software related. Also, should I be able to program the esc’s though the fc because I tried and I can get connected, but I get an error 31 and it doesn’t recognize any of the esc’s. I’ve read somewhere that I need a serial cable connected to UART 1, but I don’t have a serial cable. Furthermore, I removed the black ground wire and cut the white signal to solder to the fc thinking I should be able to perform upgrades through the fc, but I can’t. Any wisdom you can part with would be gladly apprciated! Thanks for your time.

    Reply
    1. Oscar Post author

      Hi Robert, I assume when you move arms, you did change the motor pin as well?
      if by changing motor pins, and same ESC/motor still doesn’t work, try swapping the motor…. just to rule out motor or ESC.
      but it’s more likely to be the ESC I think…

      by the way, I recommend joining this forum, it’s very useful and there are lots of helpful people there. I am a daily user too :) http://intoFPV.com

      Reply
  6. Johnny-Robot

    Hi Oscar,

    Are there any known issues with flashing on the CC3D? I’m having a heck of a time trying to figure out why one of my motors goes crazy as soon as I arm.

    youtube.com/watch?v=TtmhrIwMB-k

    Reply
  7. Dominik

    Hi,
    I Might flashed the wrong hex file to my Vortex 250. used naze.hex for the Fusion v2 Board. Is there a Chance to rescue the fc? Can not Flash again. Bootloader has no answer.
    Thank you,
    Dominik

    Reply
    1. CityZen

      Hi Dominik,
      You probably need to short the bootloader pins on the board. I’m guessing they’re the ones labeled “BL”.
      They need to be jumpered while you apply power. You should be able to flash at that point.

      Reply
  8. drew smith

    Hello Oscar, You mind posting up a cli dump of a average 250 size quad of yours? Im just wondering what cli commands you use with betaflight. The thread on RCG is SO massive its hard to pick through it and find the relevant info. Thanks

    Reply
  9. Mark Rankin

    Hi Oscar can you PLEASE HELP Hi im having a problem with boris hex on cleanflight when i flash the naze32 i cant calibrate the esc or start the motors even with the master tab.
    But when I roll back to cleanflight stable version everything works fine. I have been working on this for 5 weeks now.
    PS Im new to naze and cleanflight but ive learnt loads like how to map and rxrange in cli. I was using cc3d before

    Reply
    1. willem

      hi mark rankin
      your escs doesnt support the 1000 looptime
      like the emax speedcontrollers will not work with this firmware

      Reply
      1. flying baboon

        Do you know if the luminere 20a mini with simonk is supported? When I push the throttler it goes wild. I’ve been flying fine with cleanflight.

  10. Andrew

    Hi Oscar,
    I have just flashed my QAV210 clone (naxe32) with the latest version of Boris B, when i arm the quad i only get motors 3 and 4 arming? any ideas why?
    I have set up identical programming on a 180 and it works fine.
    I have tried rolling back to Naze fw. and it all works correctly.. weird.

    Reply
  11. orlando

    Hi oscar
    i am running a cc3d on my zmr ,looking to flash from open pilot to beta fligh can you tell me the requirements and step to do so ? Thanks

    Reply
  12. huseyin yildiz

    Hi Oscar

    i have flashed flip32 10dof, betaflight 2.1.3 latest,

    before i can figure out gps settings and can be enable it,

    but now ican not to be able to activate gps , gps mope or, gps type, clı commands doesnt work.

    Reply
  13. nik

    Hi Oscar
    Just flashed Boris B.’s Betaflight to my ZMR. I was able to configurate everything as I wanted it, restored settings from a backup. The board seems to work, but the moment I arm it when everything is plugged in, it kind of freezes. The buzzer sound freezes aswell and just stays constantly on. It just feels like it feels when a computer freezes.
    I am afraid it must be some old setup coming with the restored settings, such as looptime essentially.
    If so, how do I reset that setting? Or is a complete reset/restart of all settings required? (I guess it is recommended though).

    I hope you can help me. I already reconfigured everything without restoring a backup, but still, it freezes. Betaflight says “Packet Error: 2” down left, is that a hint?

    nik

    Setup:
    frame: ZMR250, carbon composite
    pdb: Overcraft PDB
    Flight controller: Seriously Pro Racing F3
    Receiver: FrSky D4R-II
    ESCs: KISS 18A v1.1
    Motors: DYS 1806 2300 KV
    Props: Gemfan 5×4 Carbon Nylon
    Battery: nanotech 3S 1500mAh 35-70C
    Cleanflight version: Boris B.’s Betaflight 2.1.2a

    Reply
      1. nik

        Hi Oscar
        Thanks for your replay and sorry for my very late answer:
        I tried to find the mistake and started deactivating features and then I was pretty sure the problem was my frsky telemetry. It did not freeze when not using telemetry. Then I reflashed CF1.10.0, worked fine, even with Telemetry. Flashed Betaflight again, everything working, tried oud telemetry and it worked suddenly. There were definetly NO hardware changes, and definetly NO software changes. I compared both CLI dumps and there were no differences. So I cannot explain this issue at all. I used full chip erase all the time. At least it works now and I love Betaflight! It is really feeling better when flying fpv. I think I will stick to it. Thank you Oscar!
        Best greetings from Brunswick,

        nik

  14. Scott Lauer

    “Hi Oscar” I wanted to make sure that I can flash boris B with open pilot I currently have cleanflight on my cc3d now Thanks for all of your hard work!!! Scott

    Reply
  15. Stephen

    Hi Oscar

    Just upgraded my naze32 to Betaflight – perfect , what can I say , even with the default PID
    its much more locked in then ever before. Keep the updated rolling , its greatly appreciated ;-))

    Reply
  16. headskull

    The Dropbox-link to betaflight .hex-files does not work. Hex from github does not work with cleanflight – says “HEX file appears to be corrupted”. Any alternative link for download?

    Reply
    1. headskull

      Hi Oscar! Found an answer to my previous question. I’m a n00b and didn’t know I had to click the HEX-file in github and then right click on “RAW” to be able to download te file in correct format. I now have betaflight installed on my Naze32 :D
      Many thanks for your awsome blog! Keep up the good work! Cheers

      Reply
  17. Kevin Yang

    Thank you for the awesome posting.
    Is it okay in betaflight with disable ACC? or just use Acc hardware?
    I don’t use ACC anymore one month ago after mention of some your tweak(dead band, disable hardware ACC, etc)
    Which is better you think?
    Thank you very much.

    Reply
    1. Oscar Post author

      yes it’s okay to disable ACC (i have it disabled on mine)
      It doesn’t make any difference now with Betaflight, so it’s entirely up to you. :)

      Reply
  18. Ari

    Hi Oscar

    Thanks for the post. With regards to BLHeli 14.1, will BLHeli 14.0 be sufficient? I haven’t got an ESC programmer yet and I believe my ZTW 18A esc’s came with BLHeli 14.0. Is it safe to use with beta flight or should I rather wait until I can update them?

    Thanks

    Reply
    1. Oscar Post author

      Hi Ari,
      14.0 should be fine.
      Do you know you can now flash ESC via the flight controller? no programmer needed anymore! i might make a post how to do this just in case it’s not well known yet.

      Reply
      1. Ari

        Thanks Oscar! And while I’m on the subject of thanks, thank you for all the articles which you put into layman terms. Really helpful for newcomers to the hobby such as me.

        That article would be great thanks! I didn’t know that was possible.

        Many thanks

      2. Johnny

        I still wait for my arduino to flash my ZTW 20a simonk to BLheli… Bunt can’t wait.. can I use betaflight with simonk?

        Best Johnny

      3. Oscar Post author

        I haven’t tried it myself, nor seen anyone who tried… It does suggest to use the latest BLHeli firmware though from what I have been told.

      4. John Seldon

        Hi Oscar. Did you ever make this article? It would be useful to know how to flash ESCs via the FC. Thanks.

        Great site BTW. You’ve helped me loads with my builds.

    2. marwan

      hi Ari,
      no problem you can download betafligth and it will work awesome but you have to remove oneshot cause else the motors wont arm, ive got the 13.1 blheli and its awsommmmmee !

      Reply
  19. lee

    “Hi Oscar”

    Since trying beta found my p setting are at 3.1 pitch 2.4 role.Tbh i feel its not enough but wont let me go higher or i get the shakes.flys great but now awsome.Also found it needs loads of d term to rid the bounce.Im running 75c 4cell,littlebees esc 1900kv emax motors hq 6×4.5 props.cheers lee

    Reply
  20. Sam Pankratz

    Oscar, I think you should also include that there is a dropbox link that allows you to directly download al the .hex files. I had to do this after not being able to successfully download the .hex using your instructions. Im not saying you are wrong or incorrect, as others have had success this way, but I did not. I suspect this might help others like me who know little about computer magic be able to use Betaflight. dl.dropboxusercontent.com/u/31537757/cleanflight/betaflight/betaflight.zip

    Reply
  21. Michael

    Hi Oscar! Great review, love your work. I wanted to know if beta flight works with the new naza32 rev6 board? I’m about to make the swith from multiwii to naza32 on one of my racing quads and I’m looking for a marked improvement.

    Reply
    1. Blaise

      Sadly it doesn’t. They are looking at end of the month or so before it’s supported, as it has to be done by the Cleanflight team and then merged into the Betaflight code. Boris doesn’t have a Naze32 (actually doesn’t use them anymore, uses F3 based boards)

      Reply
    2. Oscar Post author

      I think betaflight works on the Rev6, but Gyro sync isn’t, the last time i checked, someone mentioned looptime cannot go below 1100?
      As for Cleanflight, it’s still in beta, 1.11 i think..

      Reply
  22. Rubi

    Hi Oscar,
    Just to note, CC3D can be flashed via OpenPilot GCS firmware page,
    it’s easy and gives new life to my old board with this amazing version.
    Thanks!

    Reply
    1. Oscar Post author

      Thanks Rubi, I heard CC3D actually performs very well with betaflight (better than Naze) due to the built-in SBUS inverter, and SPI protocol Gyro :)

      Reply
      1. ThomasS

        Hi Oscar

        This is true, CC3D is the better hardware and also open source, I am an EE and design of CC3D is elegant and skillful, Naze is only factor of price and many revisions to stop clones and make more money. Of course some poor clones of CC3D as it is open, this is problem but good clones that are like original version, best acro board.

        CC3D flies better with Cleanflight also, always has and honest people know this for long time. So much hype for Naze makes issue cloudy this is sad as people by wrong hardware for more money. Betaflight shows this more as it takes advantage of better CC3D more than Cleanflight can.

        Betaflight shows what many skilled people said for long time, Cleanflight is not so great and has many issues with control routines and timings but when bringing up such issues I got shouted down despite being turthful, now everyone can see what programmers knew for long time, Cleanflight has some big issues.

        Betaflight is nice step in good direction but only temporary solution still architecture is poor from cleanflight which took from baseflight, very old fashioned development and maybe never fixed as large rewrite required.

    2. Eligiusz

      Hi Rubi,

      Could you please tell me step by step how to flash CC3D with Betaflight?
      I was doing this with Cleanflight via OpenPilot GCS many times but with Betalight it doesn’t work :(
      I am dowloading betaflight_CC3D.bin from
      github.com/borisbstyle/cleanflight/tree/5c0bcd4d28f29b48744212661775ef25dbcfd594/obj
      and usind option Rescue in OpenPilot but this way don’t work…

      Thank you in advance.

      Reply
      1. Manuel

        Hi Eligiusz : I installed betaflight on my cc3d with OpenPilot GCS also (without the FTDI+shorting pins thing mentionned). It didn’t work until I reaffected the ports correctly (UART and this kind of stuff) : it should match how you intend to use the ports of your CC3D.

      2. ken

        Eligiusz after flash betaflight, disconnect usb. plug in a 5v power source for Cc3d. load cleanflight app. then connect the USB
        ps everytime u rebooting the CC3D FC do the same thing.1st. 5V power source, 2nd USB, Then connect cleanflight App. works on Mac and PC.
        if you want to fix it issue forever. load cleanflight bootloader on CC3D.

  23. FyreSG

    Hi Oscar, I’m not sure about the part on PWM but I have a PWM receiver and a set of normal (non-Oneshot) ESCS; will my setup work with Betaflight? :)

    Reply
    1. Oscar Post author

      Hi Chad
      If you want to erase all the settings on the board you should check the Full Chip Erase button. I think it’s a good idea to check it since Betaflight is a different firmware.

      Reply
  24. Alfonso

    Hi Oscar,

    You are a God sent! Last July 2014, I traded a brand new 50cc Yak 54 airplane rtf, a .40 size extra rtf , and a brand new .40 size electric Cessna rtf for 1 mint condition Dji Phantom 2. Then I acquired quadcopters with Kk2 fc. When I stumbled into your blog about naze32 calibration because I kept breaking props on a mini tricopter build. I ended up retiring 6 KK2 boards and got hooked tothe naze32s. You are a “Quadcopter Newbies Guro”. Keep up the good work Sir. It is very well appreciated from a guy like me.

    Reply
  25. phill

    Hi Oscar,
    Just wanted to say how much your work is appreciated, if i have a question that I cannot solve you usually have the answer and in nice simple terms to understand, I can tackle most stuff but the programming/flashing, understanding Hex files etc etc is not my strong point but with your help its becoming much easier
    Thanks again and happy flying, i’m now gonna flash Boris’s new betaflight on my naze and hopefully reap the benifits :)

    Reply
  26. Matt McNiece

    Hi Oscar,
    Love your work. I just updated to Betaflight and had a few challenges along the way>happy to say I got there in the end and documented them here – fangin.com/blog/2015/10/05/betaflight-update-to-afroflight-naze32/

    Reply
  27. Thoemse

    It stopped raining. :) I cannot compare to cleanflight because i switched from a kk 2.1.5 straight to an afro naze32 with this firmware but boy is this good. I changed no PIDs at all just yet and i flies so nice and responsive. I did not know my quad (250 4S 2206 1950kv) could do such sharp yet smooth turns. It’s a whole new flying experience!

    Reply

Leave a Reply

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

Are you Robot? *

I only check blog comments once or twice a week, if you want a quick reply you can post your question on this forum IntoFPV.com... You might get a faster response from me there (multirotor related only).