Anti-turtle and beeps! Some new dshot commands for blheli_s escs

with 86 Comments

Tired of crashing out early in a race and stuck upside down?  Too lazy to walk to your quad to flip it over?  I got a solution for you…

 

Dshot Commands

The best way to do the anti-turtle was to use Dshot commands (more info on dshot here: https://blck.mn/2016/11/dshot-the-new-kid-on-the-block/) with no loss of throttle resolution (info in background).  Basically it is a digital protocol that left some spots to do commands. Unfortunately only Kiss ESCs have implemented some of the commands (I don’t have any kiss ESCs so I can verify this).  So I set out to modify blheli_s code to accept Dshot commands.  Currently there is support for reversing the motor direction and making the ESC beep at various tones.

Github repo with updated hex files here:

https://github.com/brycedjohnson/blheli-multishot/tree/dshotcommands

 

Reverse motor direction

Recently my pull request (https://github.com/betaflight/betaflight/pull/3267) got accepted in to the master branch of betaflight.  I’ve been quite happy with how it works have done lots of testing flipping back over in the field.  To enable this the modeswitch “Disable 3d switch” is currently being used.

 

Update: On the betaflight 3.2 RC it is now called “dshot reverse motors”

 

When this is enable it sends the dshot command to all the motors to tell them to all reverse directions.  This has to be done in the unarmed state.  Usually to flip over, I’ll flip the “disable 3d switch ” and wobble in the direction that I think will get me upright, flip over, disarm, unflip the switch, rearm and fly away.  With this switch flipped you could even take off upside down and fly around.

 

Beeper

The other useful thing I added is to be able tell the ESCs to beep the motor (like on start up) when the beeper switch is flipped.  Say goodbye to using an actual beeper to find your quad.  All you have to do is add a beeper range on a switch and flip it when you want to find the quad.  I find it helpful to increase the beep strength in blheli configurator to hear it even when it is far away.

 

 

 

 

 

Background

My first attempt at fixing this was to set the quad involved setting the ESCs and FC in 3d mode and adding an additional switch that would reverse the motors on demand.  There are various way you can do this, with the mixer on the transmitter or I had test coded up in betaflight to have a seperate mode switch to reverse.  This was great because you could fly 3d without center throttle and can switch 3d mode in the air.  I used the right momentary switch on my taranis.  There are 2 problems I ran into with this.  The 3d mode on the dev build or betaflight 3.2 seemed extra swimmy even when you were just using the positive range.  This may be a betaflight bug… 2nd problem is that you lose 1/2 your FC to esc resolution… which arguably may not really matter for most people (2048 to 1024 steps in dshot), but people hate to hear they are getting 1/2 of something.  

Example below:

86 Responses

  1. _flp
    | Reply

    First!

    Seriously cool – thanks for the ingenuity!

  2. Timothy Trowbridge
    | Reply

    What I personally love about a buzzer is the sounds it makes when it has initialized. I’m just soo used to those beeps, I’m very confused when they are not there 😀

    I guess those init beeps could also be made with dshot commands?

  3. FPVOtter
    | Reply

    Hey Bryce,

    thanks alot for integrating it to BLHeli_S code, and glad it get integrated into the new BetaFlight, congratulations on that!

    2 new very good functions!

    Cheers,
    FPVOtter

  4. […] Source : Red Pine Labs […]

  5. Shane Wymore
    | Reply

    Nice work man!!!

  6. Simon Bradley
    | Reply

    Hi,

    Do I need to run 3.2 for this to work?

    • Bryce Johnson
      | Reply

      Yeah you’ll need use one the recent builds on the master branch (future 3.2)

      • Simon Bradley
        | Reply

        Ok thanks.

        How has 3.2 been for you? It randomly dropping out if the sky? Or seem ok?

        • Bryce Johnson
          | Reply

          Been flying solid for me!

  7. Flatric
    | Reply

    I’m a little confused, for the anti turtle mode betaflight 3.2 is enough or do I need your custom blheli version/just update my blheli version?
    Thanks for any help!

    • Bryce Johnson
      | Reply

      You’ll need a recent betaflight 3.2 build and blheli_s version version 16.66 or 16.67 that I released. It is now available from the chrome blheli configurator.

      • Flatric
        | Reply

        Ok thank you!
        Will they implement your changes in the official blheli_s versions or is there no chance for that? Doesn’t matter actually, will try it out anyway, just interested.

        • Bryce Johnson
          | Reply

          I should do a pull request so at least that have that option… just gotta find some time.

        • Bryce Johnson
          | Reply

          I got a pull request into the offical repo. Sounds like it will get put in.

          • kwad
            |

            you need to be using the dshot protocol if youre esc’s can.

  8. Mike
    | Reply

    Really cool! My ESC is S_H_50, I can’t seem to find it in your repo. Will you be adding that to your repo?

    • Bryce Johnson
      | Reply

      I saw it is a newer layout then what is currently on the fork of the blheli_s that I used. Should be able to add it in, but might take a few days when I have time.

      • Mike
        | Reply

        That would be amazing! I just put together a brushless tiny whoop, and these features sounds great on a tiny whoop.

      • Tomas Icenogle
        | Reply

        I too am wondering about dshot commands for S-H-50. I don’t yet see it.

    • Bryce Johnson
      | Reply

      I recently did a pull request based on the orginal blheli repo. That should have all the new configurations when it gets accepted.

  9. AJ
    | Reply

    Great work on this! will it be possible to achieve this with blheli_32 escs? I am aware they are no longer open source so i guess its down to their devs?

    best
    Al.

    • Bryce Johnson
      | Reply

      I heard it is in progress on blheli_32 escs.

  10. Brad
    | Reply

    Bryce, any chance you can show us what you had to do to get your Taranis setup? That’s where I’m lost, thanks.

    • Bryce Johnson
      | Reply

      Really simple taranis setup:
      SC -> Aux1 (for arming)
      SD -> Aux2 (switch to reverse motors)
      SG -> Aux3 (blackbox)
      SH -> Aux4 (beeper)

      • Brad
        | Reply

        I’ve got something setup wrong then because as soon as I arm the motors go to top throttle. You don’t changing the weighting or offset in the mix of the Taranis at all? Thanks for the fast response!

      • Brad
        | Reply

        Update: I can go to the motors section and and above/below 1500 it has the right directions. But when I go on the TX I have no motors spinning at 0 throttle but when I got it to the center point the motors immediately spin up to max throttle? Any ideas?

        • Bryce Johnson
          | Reply

          With the dshot method to you do not setup 3d mode on the ESCs or in betaflight. There shouldn’t be anything around 1500.

          Flash escs with 16.66 or 16.67
          Set mode “reverse motors” to a switch

          That should be all you need to do.

  11. Geoff
    | Reply

    I’m guessing blheli_32 esc’s are not an option for this?

    • Bryce Johnson
      | Reply

      Not with this code, but I heard both of these are in progress to get implemented on blheli_32

  12. Mactac
    | Reply

    OK, so 2 MAJOR problems:

    I tried flashing with both the .66 and .67 and get the same result. It seems to work, however When I plug the battery in, it does it’s boot up sequence and never stops beeping. Second, when I use blhelisuite to calibrate the ESCs, one of the motors spin up to full speed and wont stop unless I unplug.

    • Bryce Johnson
      | Reply

      Only works with dshot, calibrating doesn’t do anything on dshot.

      It sends out the beep command when the beeper mode is enabled. Check to see if you have the beeper mode enabled. You might have it setup in a range that triggers the beep when the transmitter is off.

      • Mactac
        | Reply

        Right, but making the mistake of calibrating still could kill a motor.

        I’m not talking about the beeper being on, I’m talking about just turning the quad on without even being connected to the radio. It continually beeps.

        thanks!

        • Bryce Johnson
          | Reply

          I’m not very familiar with blhelisuite so I don’t know what it tries to do when it calibrates.

          What does your mode tab say on betaflight configurator? Is beeper highlighted with the transmitter off? Try and remove that mode or change the range.

          • Mactac
            |

            The beeper mode works properly. It goes on when the switch is thrown & off when not. The problem is when the radio is not connected only when I first boot up (if I turn off the radio it doesn’t start happening).

            Also, it’s not a regular beep, it’s a “beep beep beeeeep….. beep beep beeeeeep…..” thing..

        • Bryce Johnson
          | Reply

          You are talking about the ESC beeping correct?

          The only way betaflight sends the beep command to the ESC is if the beeper mode is triggered. Depending on what failsafe settings you have it might put it into the beeper range. To test, try and disable the beeper mode and see if it goes away.

          • Mactac
            |

            OK, so you’re right – the issue was that since the radio wasn’t connected, the default was to beep (I used a center position on the switch so in absence of a signal, the beep would default to on).

            BUT, I smoked 4 motors to find this out, and I contend that there is a serious flaw that needs to be dealt with:

            I *think* what happened is this: I needed to test my motors, so I went into BF to spin up my motors. because the radio wasn’t connnected, it started to beep – while the motors were spinning! Since beeping is a very fast back & forth on the motors, it didn’t play too well with spun up motors. The magic smoke escaped.

            I think that at minimum, there needs to be a safeguard so there is no way for them to beep when they are spinning.

        • Bryce Johnson
          | Reply

          Mactac,
          The motors will only beep or do any dshot command when it’s not in a running state. If the motors are running it can’t get to the logic to beep the motors.
          Bryce

          • Mactac
            |

            Even when the motors are running from betaflight and not due to arming? My motors were definitely trying to beep, or do something weird due to beeping being set to on. It didn’t do it after I turned beeping off.
            Seems like quite the coincidence that 4 motors got smoked with the beep function on. Everything working fine after I turned it off.

  13. Kelvin Kennedy
    | Reply

    Did this not make it into 3.2 RC2

    • Bryce Johnson
      | Reply

      Yes it is in there. The anti-turtle mode is now named dshot reverse motors.

  14. joseph
    | Reply

    does this only work on betaflight f3 board? I can’t seem to get beeper to work on spf3 board despite setting up the same way as my bf board

    • Bryce Johnson
      | Reply

      Yes it should work just fine. I am using a spracingf3 on one quad and it works well.

    • klow
      | Reply

      It is a known issue with the buzzer pads on the cloned spf3 not working right or constantly buzzing or not working at all. do a quick google, i have yet to get the buzzer working for me on my spf3 clone

  15. aviv
    | Reply

    Hey, this seems awsome !!
    question –
    i have a beeper connected already to my board, and when i activate the beeper mode and switch it on on my controller the esc’s beeper dosent work. is it beacuse i already have a beeper connected ? if ill desolder the beeper will the esc beeper will work ?

    Thanks !

    • Bryce Johnson
      | Reply

      Both should work. Currently the ESC motor beeper is only used then the beeper mode is toggled, not for any other beeps. If it doesn’t work make sure you are using the 16.67 esc code.

  16. attomic
    | Reply

    This works amazing. Is the resolution loss still there in the latest builds? If so do you see it being resolved?

    • Bryce Johnson
      | Reply

      No loss of resolution using the dshot commands.

  17. Mactac
    | Reply

    I see in your article above, you say that you at first tried to use 3d mode. I assume that this doesn’t use 3d mode anymore, is that correct?

    Also, I tried using your reverse motors while in the air, and it didn’t seem to work. I put it into reverse motors mode while upside down, gave it throttle (so I would go up), but the props didn’t go in reverse & I hit the ground so hard it broke my frame.

    Could you confirm that this method will not reverse the motors while you are flying (like 3d mode)? Or did I do something wrong?

    thanks!

    • Bryce Johnson
      | Reply

      No this method doesn’t use 3D mode. As background that was the first way I attempted to do this, but disregarded it for a reasons above. I would like to re-implement 3d mode on a switch that works in the air (using 3d mode in the escs) in the future, but haven’t had time to do that.

      This is all new code both on the ESCs and betaflight, so I have been suggesting to people to make sure it works as expected with props off. As well as props on but not yet flying.

  18. Pires
    | Reply

    Hi, Many thanks for your work
    Shame I cant make it work.
    Flashed the ESC.with 16.66 or 16.67 also Running Betaflight 3.2.1 or 3.2.2
    Set beeper to tx switch but dont get any response from quad
    Also dont get any dshot reverse motors or any other option in the mods tab.
    What am I doing wrong?
    Appreciated, Thanks

    • Bryce Johnson
      | Reply

      There isn’t really a betaflight 3.2.1 or 3.2.2 firmware yet. There is a chrome configurator version that looks like that. The current newest betaflight version is 3.2RC3. In the chrome configurator go to the CLI and type diff and read what version is currently flashed.

      Bryce

  19. Pires
    | Reply

    Hi Bryce. Sorry I was confusing the Betaflight configurator version with the FC Betaflight firmware version.
    I should had looked into that. And yes my version was not the 3.2. Upgraded FC firmware and now all working as described. Now I understand the concept. Many thanks for your quick feedback and for this great work. Cheers.
    .

  20. Przemek
    | Reply

    This is awesome crazy 🙂

  21. Matt
    | Reply

    Do You have to be running dshot for this to work?

    I see 16.63 says dshot commands and 16.67rc says blheli multishot.

    I’ve has some desync issues running dshot 600 on 16.67rc (should I be on 16.63 as it’s says dshot or does it not matter?)

    Betaflight 3.2 btw.

    • Bryce Johnson
      | Reply

      Yes you have to run dshot. 16.63 is based off the mainline blheli, but I’ve heard there are a few issues that cropped up during the merge.

      The 16.67rc is the one to use right now. It has multishot in the name because it was one of the first forks to use multishot and the name wasn’t changed.

  22. Mark
    | Reply

    I tried this with 16.63 and found that only some motors seem to sometime change direction. How is dshot reverse motors mode meant to work? When it is toggled, does it keep sending the dshot reverse command while it is unarmed? Or when arm is activated, does it check to see if dshot reverse motor mode is active and send the appropriate command before arming? Maybe there needs an option to set how many times the cmd is sent to ensure the escs are updated?

    ps: esc motor beep seems to work fine though.

    • Bryce Johnson
      | Reply

      Yeah I’ve heard some reports on that. On my pull request to the main branch everything appeared to work. But the code was refactored by the main blheli guy when merging so there appears to be some issue. I haven’t had a chance to look at it yet.

      • Mark
        | Reply

        In case it helps, motors 1 & 4 seemed to be the least defunctional (both have eep_pgm_direction=2) whereas I don’t think I ever saw motor 3 have a reverse of direction.

        • Bryce Johnson
          | Reply

          Thanks for the info!. If you wanted to get it working now the blheli chrome app has version 16.67 which is based on a slightly different blheli branch, but that I was done a ton of testing on and works quite well.

      • Shufty
        | Reply

        I’ve got this same issue with two quads, both running F3 Kakutes (betaflight_3.2.0_SPRACINGF3-52-981df1d54) and 30A Aikons running 16.63 (dshot commands). Both seem to randomly decide which motors they want to reverse (usually only one or two but never all).

        • Bryce Johnson
          | Reply

          I mentioned this on another comment just now as well. But I’ll reply to too because it may notify you?

          Thanks for the info! If you wanted to get it working now the chrome app had version 16.67 which is based on a slightly different blheli branch, but that I was done a ton of testing on and works quite well.

          • Shufty
            |

            The 16.67 version appears to be non-dshot commands, just the regular ms version, will that still work?

          • Shufty
            |

            Nevermind, apparently it is the dshot version even though it says it isnt >_< Seems to work fine now! Thanks mate!

  23. kyle
    | Reply

    hi guys love this feature does anyone know if these features can be used on 32 bit esc’s

    • Bryce Johnson
      | Reply

      I have heard they are getting beta-ed, I don’t have any blheli32 so I can’t help with that.

  24. Frank
    | Reply

    Hi, there. I’m running DYSxs30a esc’s, which I flashed with blheli configurator to the latest 16.67 version, but turtle mode won’t work for me. I’m on RC4 for Betaflight 3.2 and I’ve confirmed in the betaflight configurator that my switch has a range set for it that moves as expected in the configurator and that the quad is disarmed when I set turtle mode. However, when I hit the switch, the esc’s don’t beep and the motors don’t move. Any ideas?

    • Bryce Johnson
      | Reply

      Hi Frank,
      Are you arming after setting the reverse motors mode? Beeper and reverse motor not active at same time? Post a link to your CLI diff, it sounds like something isn’t configured right.

      Bryce

      • Frank
        | Reply

        Hey, Bryce, I’m wickedneuron from the rcgroups betaflight thread. I’ll see if the newest BF build fixes the issue for me. If not, I’ll post a diff from the CLI. THANK YOU!

  25. Guy
    | Reply

    love your work looking forward to trying it out

  26. mike
    | Reply

    hi,
    i flashed blheli 16.67 / BF3.2 RC3. there a way to disable the esc beeper emulation in betaflight or do i have to downgrade to another blheli version? i want betaflight to use the buzzer thwt i soldered to the fc only, when i flip the switch on my taranis. currently the buzzer as well as the motors are beeping.

    sidenote: for some reason motor 1&2 get very hot after only 2-3 beeps (white smoke appears) although i have beacon-strenght/ beep-strenght at 32.

    • Bryce Johnson
      | Reply

      I haven’t used it and I’m not sure if it is on RC3 or not. There is a cli command for beeper_dshot. set beeper_dshot = off should do it.

  27. Jariel Martinez
    | Reply

    Hi, i did all the steps, set to dshot 600, flashed escs with new firmware, and put small angel to 180…..when i put quad upside down and arm in turtle mode it does not arm, but when i arm without turtle mode it arms. Why?

    • Bryce Johnson
      | Reply

      With the turtle mode in RC5 it doesn’t spin props unless you move the pitch or roll sticks. If you have a OSD it will say why it won’t arm.

      You don’t have to have it upside down to test it.

  28. Lee waples
    | Reply

    Hi Bryce, I can’t seem to find a link to the 16.67rc firmware on github. Could you point me in the right direction?

    • Bryce Johnson
      | Reply

      It is in this location here: https://github.com/brycedjohnson/blheli-multishot/tree/dshotcommands/BLHeli_S%20SiLabs/Hex%20Files

      I accidentally didn’t update the minor version, but this is actually the 16.67rc build.

      • Lee waples
        | Reply

        Thanks Bryce, I did find 16.66. So to confirm 16.66 is 16.67rc?

        • Bryce Johnson
          | Reply

          Yes

          • Lee Waples
            |

            Hi Bryce,
            Thanks for your help. When I open the Q-H16.66.hex in Blheli suite all I get is a “hex file read error”
            Any ideas?

            Thanks

        • Bryce Johnson
          | Reply

          When you download them from github, you have to select the raw button.

  29. […] Plus d’infos : https://redpinelabs.com/dshot_commands/ […]

  30. Dave Pierce
    | Reply

    Hi Bryce,
    The information here has been a wonderful resource, thanks.
    I have 3.2.1 Oct. 15, 2017 Installed on my F4. I have also successfully updated my ESCs 16.67 and all normal functions are as they should be. I’m set up for D-Shot 600 and my quad is flying fantastically. Unfortunately, the beeper function is not working as expected. I have assigned the beeper function to an auxiliary channel and when activated, I see the FC LED flashing just as it did when using a piezo buzzer … but the ESC’s are not responding at all. This is happening on two of my quads and I’m really beginning to question myself.
    Any guess on what I’m doing wrong? Please be gentle with me, I’m very sensitive 😉
    Thanks so much for your help,

    • jcarreras
      | Reply

      This worked for me after flashing 16.67rc (Betaflight 3.2.1):

      “in CLI set beeper_dshot_beacon_tone,
      0 = no buzzer
      1-5 = tones at different frequency
      (1 is lower pitch tone, 4 is highest pitch)
      (5 is same as 4 in BLheli_S, but low deep tone in BLheli32)”

  31. RotorChris
    | Reply

    I’ve now tried everything- can’t get beeper to work on the official BF3.2 🙁
    Turtle mode is working great though.

    I have the latest BF3.2.3 (tried on BF3.2.1 first) and blheli 16.67rc…
    I have RX.SET on, beeper mode on aux switch and beacon tones = 4 in the cli (and typed save as well).

    From a lot of googling, 16.63 might work but I can’t find files for it anymore to test.
    Any advice or a link to 16.63?

  32. Karl
    | Reply

    Hi, I just tried putting turtle mode on latest blhelis amd betaflight 3.3. But when turtle modw is active 2 side motors spin up with no input from sticks…
    Anybody have any ideas?
    They will stop spinning when opposite 2 motors are spun with the sticks but as soon as they stop the other 2 will start on their own again.
    Any help greatly appreciated!

    • Bryce Johnson
      | Reply

      Likely your sticks aren’t centered at 1500 when they aren’t in the middle. If they are spinning they must be more then 20 off. In the configurator reciever tab you should be able to see how far of it is and did it with trim or recalibrate the Tx.

      • Karl
        | Reply

        Legend, this is why your on the big bucks!
        Thanks heaps!

Leave a Reply