What is Oneshot ESC Protocol – Active Braking

Oneshot125 is a new ESC protocol to replace standard PWM signal. In this post we will explain what Oneshot is, and the new BLheli feature – Active Braking (damping light) that improves throttle responsiveness.

Content Index:

What is ESC Protocol

An ESC protocol is used to communicate between FC (flight controller) and ESC (electronics speed controller), to control motor rotation speed. Originally this is based on servo position protocols, which is a PWM signal between the values of 1000ms and 2000ms (0% to 100% throttle). But PWM is a relatively slow protocol, and susceptible to jitter, and that’s why Oneshot125 is introduced.

For an overview of ESC protocols, check out this article.

What is Oneshot?

Oneshot125 is a faster ESC protocol created primarily for mini quad. When it was first created, the firmware developers decided to synced ESC signal to PID loop, making less susceptible to jitter. Also it uses shorter signal width, FC can talk to the ESC/motor much quicker, and therefore in theory your multirotor should perform better.

In order to run Oneshot125, you must have the feature enabled on your Flight controller, and install the latest BLHeli firmware on your ESC (which will detect the protocol automatically). In this post we will discuss why Oneshot is better than standard PWM, and how to enabled Oneshot125 on the ESCs. We will also discuss the benefits of Active Braking (Damping light).

Here is a tutorial how I flashed BLHeli firmware on my Blue Series ESCs, and have oneshot enabled. I also compared the performance against SimonK.

With OneShot, motor_pwm_rate is disabled in Cleanflight, so it doesn’t matter where you set it.

How does Oneshot improve your quadcopter performance?

Traditionally

Flight controller has a main control loop that calculates motor outputs according to the data from sensors. The motor output loop then pick up this value from the main loop and sends it to the ESC constantly. But the time it takes to complete a FC main control loop is not always the same.

The motor output PWM signal sends whatever value is available, if there is no new value it will just use the old one. If we are lucky, the ESC might pick up a new value from the FC it just produced. But sometimes a new value is not being picked up yet, maybe because the ESC is still writing the old one to the motor, then we consider this value we are writing an “OLD” value.

It’s not causing any major problem in reality with this approach as we have seen, because we are talking about only a few milliseconds difference here. But some people has come up with a “fix” for this.

oneshot ESC PWM explain Diagram from multiwii forum, link at bottom

Oneshot – The New Way

So the solution is to synchronize the main FC control loop with the motor output signal.

Firstly, Oneshot125 sets the motor output timer speed 8 times faster. The motor output signal is now much shorter (125us-250us) than the original PWM (1ms-2ms), this means it takes less time to send data to the ESC. The problem before as mentioned, was sometimes the value wouldn’t change on the ESC until half way through a control loop.

Secondly, it only sends “one shot” of the signal every flight controller loop, and it does this as soon as the Flight Controller has a new value for the ESC. (I am guessing maybe this why it’s called “oneshot” :) )

The ESC is now writing a new value to the motor, even before the FC is starting the next control loop, so we have faster FC and ESC Response. Pilots that have tested it reported P value can only be increased a little (not major improvement on PID gains), but the biggest change was to throttle response, faster change of motor speed and so on.

Check out this post for some simple explanation of Quadcopter PID.

How  to Enable Oneshot on ESC

To have Oneshot enabled, you must ensure that your ESC are compatible with Oneshot125, and it’s updated to the new BLHeli firmware. FC also needs to be updated to the latest FC firmware that can support Oneshot.

Supported ESC and Firmware

ESCs that have BLHeli rev13.0 or newer version flashed supports Oneshot, and it will automatically detect Oneshot without additional configuration. I believe the latest SimonK now also supports Oneshot.

Supported Flight Controller boards / Firmware

All FC with that are compatible with the latest Cleanflight, Betaflight, Raceflight and KISS supports Oneshot now.

Enabling Oneshot in Cleanflight and Configuration

  • To configure Oneshot, you must turn off any power to your ESCs.
  • Configure your ESC for Oneshot mode (e.g. by soldering JP1 in the case of the KISS ESC).
  • Connect a USB cable to your board, and connect using the Chrome GUI app.
  • Go to the CLI tab, and type the following:
    feature ONESHOT125
    save
  • Then you can safely power up your ESCs again.

Calibration Oneshot ESC

The process for calibrating oneshot ESCs is the same as any other ESC.

    1. Ensure your ESCs are disconnected from Lipo Battery
    2. Ensure propellers are taken off
    3. Connect the board to PC and go to Cleanflight configurator, the motor test tab.
    4. Check “TEST MOTOR”, and Set the all motor speed to maximum using the master slider.
    5. Now Connect LiPo battery to your ESCs. They will beep to indicate calibration mode.
  1. Drag the slider down quickly, so the motor speed is now zero. The ESCs will beep again to indicate the successful calibration.
  2. Disconnect and reconnect battery to your quadcopter, and verify that moving the motor slider makes your motors spin up normally at the same time.

Active Braking – Aka Damping Light in BLHeli

Active Braking is a feature in BLHeli firmware, many people enable this along with Oneshot125 to get more responsive result.

With damping light (Active braking) enabled, the ESC will actively reduce the motor speed faster as you lower your throttle. Without it the prop will only be slowed down passively by the air resistance. The result is more responsive throttle control and more agile performance, when this is disabled, the quad feels more “floaty”.

The negative effect of active braking is voltage spikes created during braking, which could be bad enough to give you bad video feed, or even  fry the electronics in a mini quad. One easy fix is to install low ESR capacitors in the power or ESC.

More Info

Original Post of Oneshot125. Cleanflight Doc on Oneshot.

Hydra showing the difference between normal PWM and Oneshot on a Oscilloscope.

More advance ESC protocols

There are now even more advanced ESC protocols on the market.

35 thoughts on “What is Oneshot ESC Protocol – Active Braking

  1. JL

    Hi,
    I would like to add a few words about the OneShot125 operation.

    Before de the OneShot125, the PPM signal was (is still) generated by a module specialized for PWM signal (PWM generator). This module is inside the processor chip. So when the main loop has finished to calculate the new value for a motor ESC, it is written to this PWM generator : this is instantly (as fast as the FC can do it).

    So there’s not a problem of synchronization as mentionned in the video. Fortunatly it works fine as it did so far.

    The only main difference (and this is why it is really new and better) is the period signal : in PPM/PWM the signal length is still the same whatever is the speed order (only period high state changes). New value, coming from FC and written to PWM generator, will be really produced by the PWM generator only when the previous one is complete. So it takes time… During that time, OneShot125 would have produced more new values the motor would have executed.

    PWM is a long constant period signal while OneShot125 is a pulse.
    PWM period is about 2 000 µs (and more) while OneShot125 is only 250µs for the largest pulse and only 125µs for the shortest pulse.
    So, OneShot125 makes our ESC 10 times more responsive than PPM/PWM.

    Compared to OneShot125 delay, the time the main loop takes to generate a new value is now bigger. So visually each new value from FC updates instantly the ESC.

    I hope it helps a bit.

    Reply
  2. Jason

    Had anyone had any experience with the Rise Vusion 250? I read that ESCs have Oneshot programming. Any ideas on what FC comes with the quad?

    Reply
  3. Lawrence

    HI Oscar, love your blog and the IntoFPV.com website.

    I see on the surveilzone website for the popular HS1177 they have a disclaimer stating “getting damaged cameras due to the voltage spikes that can happen when the active braking kicks in, sometime up to 35 volts” and suggest a 9V BEC or voltage regulator. Have you experienced this? Do you know if it is with specific ESC’s?
    i’m new to the hobby and your sites have helped tremendously. I am using that camera with active braking and think i may need to add a regulator…I’m using the AfroESC 12A.
    Thanks!

    Reply
    1. Oscar Post author

      voltage spikes caused by ESC is fairly common these days due to active braking: http://intofpv.com/t-littlebee-20a-esc-burns-vtx

      I always use a good PDB with LC filter built-in to provide 12V for my FPV gear so I haven’t never had any problems with this.

      But I don’t think Afro ESC would produce too much voltage spikes, I think they have built-in capacitors on them to prevent this?

      Reply
      1. arnel apurada

        hi Oscar, im using blue series 12a esc and it says support oneshot , but when i enable oneshot in Cleanflight the motor won’t arm

  4. Greg Huddleston

    Hi Oscar,

    I have tried my RG-20 ESC’s with OneShot and active braking enabled (light dampened), and want to try them with active braking disabled.

    How do I turn off just active braking? Can this be done in the CleanFlight configurator without refreshing the ESC’s in BlHeli?

    Reply
    1. Oscar Post author

      you need to connect to BLHeliSuite and under “PWM frequency”, you should see Damped light, next to it is a house icon, that’s the default button… press the house icon and it should turn off active breaking…
      lastly, i would really appreciate it if you could post your questions on the forum in the future: http://intoFPV.com … I don’t want to miss your comment, because I only check my blog comments once a week, but I use the forum daily!

      Reply
  5. Chris

    Hi Oscar
    I somehow managed to enter into the settings system for the Emax BLHeli ESC’s.
    I wasn’t sure how to get out of it and ended up pulling the plug just to stop the consistent beeping. I ended up with No. 3 motor spinning the wrong way. Not sure how, I followed instructions to reset them but had trouble. I ended up trying to go through the settings on each ESC individually. Still had trouble motors kept spinning up randomly a full throttle meaning I couldn’t hear the beeps ended up having to pull the battery on a few occasions to stop motors.
    Went through it all again and went fine until motor 4. Half way through setting both #4 and #1 spun at full throttle but only #4 was plugged in.
    I switched it all off had a coffee and re flashed the firmware in the configurator.
    Now when I plug it all in. Motors won’t arm unless I send a throttle signal with the controller, then they will arm but not all at the same time and go to full spin at zero throttle, they stop at centre throttle and spin in reverse at full throttle.
    My question is Which component is likely to be fried. Naze32 (this is my second one in three weeks). Or the ESC’s.
    It flew ok until the ESC setting freak accident.
    Hope you can help
    Thanks
    Chris

    Reply
    1. Oscar Post author

      sounds like you have activated the “3D Flying” in “Motor Direction” (where you should have Normal / Reverse / 3D ), go back to BLheli and change motor direction back to Normal.

      Reply
      1. Chris

        Hi Oscar
        Thanks for the reply
        This all happened in cleanflight using the motor control utility.
        I have been reading up on BLHelisuite but am very confused with it all at he moment.
        I know that my Emax 20A ESC’s use a Silab chip.
        So would I need the BLHeli-Hobbywing-Skywalker Usb adapter>?
        Am I just flashing firmware or bootloader too?
        It says that a resister and diode need to be removed which may affect performance.
        Do they need to be replaced after flashing?
        Am I better off buying new ones and not playing about with them?
        Thanks for all the shared info.
        Chris

      2. Oscar Post author

        Hi Chris you should be able to connect the ESC to BLHeliSuite software using “one wire interface”, which only requires connection from the signal and ground wire on the ESC.
        I am not sure if EMAX has some official tool you can buy to to this on their ESCs, maybe check with the seller?
        I usually use an Arduino UNO board to do this and this should work for any ESCs.. I have a simple guide how to do this on my blog.

      3. Chris

        Hi Oscar
        I have tried using BLHelisuite. I flashed my Arduino Nano with the one wire bridge firmware.
        I have selected the correct ESC from setup Hex files but I can’t connect to my ESC. I have tried every combination of connecting sequence I can think of. I have watched a couple of video’s of people flashing their ESC and they beep when they connect the battery.
        When I connect my battery, the ESC makes no sounds, NO BEEPS nothing.
        Is there something I am missing.

    2. Fernando

      Hi Chris !! Did you fixed the problem with your motor #3. Have same problem. I just set up my mini quad 250 but for any reason the motor 3 accelerating with constant throttle, I using naze32 cleanflight tmotor 2206 2300kv BLHeli 20amp, I did try baseflight ,replace ESC, switch motors, try a diferent naze32. Flashed with diferent firmware 1.8, 1.9 and 10. and the problem continues. any help I appreciate . Thank you!!

      Reply
  6. Ruben Verkleij

    Hi Oscar,

    i have bought some dys sn 20 esc s its my first time with blheli previously i used simon k quick question i flashed them with blheli14 damped light enabled and also oneshot is enabled,demag low, motor t medium. is it normal that when i m in the air and cut throttle and then back to full that it cant keep up i think because damped light brakes the motors and it crashes then. when im at low rpm and then back to full no problem. its only when i cut throttle fully, thank you oscar :)

    Reply
  7. Niko

    Based on this article i decided to buy a USB programming tool for SimonK and i flashed it with BLHeli 13.2.
    I love the new feel. It feels a lot more sensitive and responsive in a good way.

    Keep creating those great articles! You are inspiring people.

    Reply
  8. mike

    where can i find a reference on what receiver bus types are supported in order to get oneshot125 to work on an acro naze32 board running baseflight(strongly considering moving to cleanflight)? i’m wanting to move from my spektrum ar610x receiver to a spektrum spm9546 satellite which uses a serial connection or trying out an orange r620x which comes in sbus and ppm flavors. i’d really like to use the spektrum satellite though to trim weight.

    Reply
    1. Oscar Post author

      Sorry i don’t know the answer, but I think you should get help leaving a question on either Baseflight or cleanflight support page :)

      Reply
  9. MrBlonde

    Hey!
    Thx for this article! Was very helpful for me!
    As far as I know the benefits of BLHeli FW the OneShot feature, is that right? Many videos are demonstrating the difference to SimonK, which obvisouly is impressive. But now SimonK also supports OneShot125, right? Are there still any benefits flashing from SimonK with OneShot to BLHeli? I will receive my Afro ESCs the next days which got Oneshot125 already enabled but using SimonK (hobbyking.com/hobbyking/store/__55241__Afro_ESC_12Amp_Ultra_Lite_Multi_rotor_Motor_Speed_Controller_SimonK_Firmware_Version_3.html) and I’m considering buying an programming tool for the ESCs.

    Reply
    1. Oscar Post author

      Yes oneshot is now supported in both firmware. I really don’t think there is a big performance difference between the two to be honest. But BLHeli is WAY WAY WAY easier to use, due to the user friendly interface.

      Reply
  10. Krzysiek

    Hi,
    I think that it will be always delay (more then presented on the picture), because hardware pwm timers use shadows registers, and you are not able to synchronize code execution with pwm generation. So max delay could be (in worst case) like one cycle of oneshot “clock”.
    Regards
    Krzysiek

    Reply
  11. Jan

    Hi Oscar, at first thank you for this great blog, it helped me in many ways.
    I have CC3D/Cleanflight1.8.1 with parallel PWM input, oneshot enabled and BlueSeries 12A flashed with blheli13 and everything seems to work fine. Do you have any more information why parallel PWM input together with CC3D and oneshot shouldn’t work or how it could misbehave? Or if is has been already fixed in Cleanflight?

    Thank you.

    Reply
    1. Oscar Post author

      I believe it was something to do with the “Timers” if I have not remember it wrong, which is hardware related that can not be fixed, no matter how you do it in software. Naze32 doesn’t have this problem though.

      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).