increasing frequency of Servo library

Hello,
I'm using the servo library to control brushless dc motors for a quadcopter. my question is can I increase the frequency of the pwm used by the servo library? I found this line in Servo.cpp #define TAU_MSEC 20 which is the period of the pulse in ms.
I want to decrease this time to 1 or 2ms. has anybody tried this before? I just want to make sure.
another question, is there a limitation in using the servo library over using analog write to control motor speeds? I want the response of my motors to be as fast as possible. I heard about fast pwm but I'm not sure how to use it so thats why I'm using the servo library instead for its simpler.

any feedback will be alot appreciated :slight_smile:

I want to decrease this time to 1 or 2ms.

You mean you want to make the frame time the same as the control pulse width?

What frame rate do your ESCs support?

yes I just want to increase the frequency, maybe to 300hz or above. its written on my ESC's manual that the control frequency can be 8khz if thats what you mean

Have you got a link to this device?
8kHz is not standard R/C territory.

This is it:
http://www.emaxmodel.com/views.asp?hw_id=1305

The way I read it, 8kHz is the motor PWM frequency, not the control PWM frequency.

isn't it the same thing? and do you have any idea whether I can use analogwrite instead? analog write has a frequency of 488 hz

ok after some research I think I can understand the difference now between motor pwm and esc refresh rate. I just have no idea whether my ESC will be able to handle higher frequencies. anyway thanks for your help. :slight_smile:

A good starting point is "if it works, don't fix it"

If you find some behaviour of your ESCs that might be improved by a higher servo refresh rate let us know.

...R