Saturday, January 31, 2015

OneShot125: Quantitative Testing

Note: this original spoke of the sensor rate being 666. However, this was a mistake and the sensor rates were 500 Hz and 1000 Hz.

There has been a lot of talk about OneShot125 mode for ESCs and how much better you can tune your quadcopter with it. Briefly, this is a mode that uses a pulse width of 125-250 µs instead of the typical 1000-2000 µs. This shorter pulse width allows a higher update rate (up to 2khz). In addition, the recommendation is to update the output as soon as you calculate a new value. This improves the latency of sensor to ESCs in two ways: the synchronous update reduces the latency due to two independent loops and the shorter pulse duration saves another 1.5ms waiting for the falling edge of the pulse. With an update rate of 400 Hz on the PWM outputs that latency has a worse case of 2.5 ms so ultimately you are talking about 4ms latency reduction.

It sounds somewhat unlikely that such a small time delay would make a difference, but at the same time the ESC latency is the ultimate performance bottle neck for quadcopters. With ESC response times getting into the 10-20s of ms, this communication latency can become an appreciable component.

Back in December ernieieft wrote Tau Labs support for it and with autotuning got higher PIDs and felt like it was quite locked in.  Here you can see the outputs from the four channels as well as the interrupt from the MPU9250 on Sparky2. This shows that each time there is a sensor update, shortly after it there is a pulse on the output channels (synchronous updates).

Zooming in, we can see what the latency is from the MPU9250 indicating a sample is ready to actually completing the pulse, and it is about 300 µs. Much better than the worst case 4 ms described above. This is with a short output pulse so in reality the time could go as high as 450 µs.

However, I wanted to quantitatively compare how much specifically OneShot125 mode really makes a difference. Luckily, we have our autotuning algorithm which actually allows monitoring the time constant of the delay from a change in the output to a change in the gyros.

Normal PWM mode

So first I ran autotuning with Seeing Spark and Sparky2 using KISS ESCs in traditional mode. This is with the sensor running at the default rate for Sparky2 (500 Hz).

After three repeats, this is what I got:


Then I cracked SeeingSpark open and soldered the JP1 bridge to enable OneShot mode.

Note: per request I have put the files to make this power distro board on OSHPark. I'll try and make a BOM and assembly guidelines and upload that soon.

Here you can see the outputs running at 500 Hz synchronously to the sensor.

Then popped in a fresh battery, and did a few more sessions of autotuning.

OneShot125 - 1000 Hz sensor rate

I also wanted to see if increasing the sensor rate to further reduce the latency would cause more improvement, so I set it to 1 Khz.

 and ran another three rounds of autotuning.


So of course the punchline. Is there a significant difference between traditional PWM and OneShot mode as measured by the time constant of the response? Yes. Anova shows p < 0.01 for an effect of output type:

Anova results

And the multiple comparison shows that both OneShot tests were significantly different than traditional mode.


Using OneShot mode on this quad results in about a 20% reduction in ESC latency. Even before OneShot, these KISS ESCs were pretty damn fast so it already flew really well. I'm not sure I'll be able to tell the difference in rate mode, but I do believe a better acro pilot than me could. I also didn't run these parameters through the system models to start seeing what the difference in effective control bandwidth will be for the outer loops (e.g. attitude).

It also remains to be seen if there are similar benefits with BLHeli and I believe SimonK has support coming soon for OneShot. I'll probably repeat these tests once I have the right hardware.


  1. Vey nice writeup! Now we should do a blind test to see wether a pilot can tell the difference between the modes ;).

    PS: There is a typo, you wrote 1000-2000ms instead of 1000-2000us.

  2. Great stuff. Feedforward leaving, OneShot entering the scene...

  3. Did you have a chance to test out the bearhugs yet? Would love to see the results

    1. Not yet. Having some weird results with them so far :(

  4. Online Assignment Expert is a milestone-setting assignment help providing company classifying under academics writing of different types. Our trait to make sure that we offer best Online assignment help without any mistakes. The same has one hearts and minds of over a million students around the globe. Our nursing assignment help experts say that this is what you aim for in your studies. We are no different. We have ensured this motto is followed by each of our accounting assignment writing experts, who are also research scholars. Our experts are certified and experienced professionals in the assignment help Australia discipline.

  5. Thanks for all the tips mentioned in this article! it’s always good to read things you have heard before and are implementing, but from a different perspective, always pick up some extra bits of information. Visit@

  6. You’re a very skilled blogger. I have joined your feed and look forward to seeking more of your fantastic post. Also, I have shared your web site in my social networks!

  7. Thank you so much for spending time to write this blog article, i must say you are a excellent and talented blogger, I Found This Article To Be Very Informative and Helpful, please keep sharing such amazing blogs I am a Accountant from United States of America, Washington Dc, and I Love to read and Write Blog.
    Some Of My Web Blogs Awesome Blog Post Please Feel Free to Check Out My Blog you will find the process of Norton software installation with step by step instructions and much more.

    Keep Sharing will come back to read more,

    Click to Process download and install enter product key activate install help renewals product key

  8. Much obliged for the post and effort! You should keep sharing even more such information.
    Aol Mail Login

  9. Best method to create your primevideo mytv account through the activation process by You need to follow the instructions to activate loin mytv. If you are viewing Amazon Prime Video on your device go enter code.

  10. Wishing you the most awesome aspect karma for all your publishing content to a blog efforts.This is my first chance to talk this site. I discovered some fascinating things and I will apply to the improvement of my blog.
    youtube video downloader
    download youtube video
    youtube video download

  11. LG's brand new bargain with Tubi to get ad-supported articles on its own smart apparatus arrives just months following the firm revived its business Cope with Xumo -- a Tubi competition recently obtained by Comcast -- to Keep on serving as the motor to get LG Channels, the ad-supported Video-streaming agency on LG clever TVs | enter code |

  12. instagram
    instagram login
    instagram video download
    instagram download
    instagram reels download
    instagram reels video download
    instagram story saver
    instagram bio for girls
    instagram app
    instagram account delete
    instagram apk
    instagram account
    instagram account hacked
    instagram account delete permanently
    instagram auto liker
    instagram bio
    instagram bio for boys
    instagram bio in punjabi
    instagram bio in punjabi for girl
    instagram bio for boys attitude
    instagram background
    instagram blue tick copy
    instagram captions
    instagram captions for boys
    instagram captions for girls
    instagram captions in punjabi
    instagram create new account
    instagram customer care
    instagram change password
    instagram customer service number
    instagram dp
    instagram download video
    instagram delete account
    instagram download for pc
    instagram download apk
    instagram dp for girls
    instagram delete my account permanently
    instagram email
    instagram emoji
    instagram email id
    instagram engagement checker
    instagram extension for chrome
    instagram engagement calculator
    instagram email address
    instagram earn money
    instagram followers
    instagram followers free
    instagram fonts
    instagram followers increase
    instagram forgot password
    instagram followers hack
    instagram fake followers
    instagram font style