higher frequency of PWM/PPM for ESC

hey guys

I'm currently working on a quadrocopter and have got a problem with the Signal for the ESC. At the moment I'm using the Servo library.

ESC:

After request they told me it can handle up to 430 Hz

The ESCs will handle up to 400hz -430hz refresh rate.

=> Now comes the first question. Are those 430Hz the Frequency of the Signal from the Arduino they can handle or is it something different? Will they work if I generate a Signal with a higher frequency than the one by default (50Hz) or do I have to flash them?

=> Supposed they could. How can I now generate a Signal with a higher frequency in an easy way? Is it somehow possible doing it with not using output compare register and the fast PWM mode? Could I use a analogWrite() with a frequency somewhere about 488Hz?

As suggested in other forum topics I have tried changing the REFRESH_INTERVAL in the library, but this doesn't change the frequency logically. At the moment also analogWrite() doesn't works.

The Signal created by the servo library: (timesteps are 1 ms)

Thank you for any ideas

lukas

highsignal.png

lowsignal.png

Can you tell more. Is the change in motor speed too slow ?
The Arduino with the Servo library generates a servo signal. That signal does not need to be amplified for a servo motor.
You use the HobbyKing ESC to convert the servo signal for a normal motor. Am I right so far ?

The analogWrite() is a pwm output, that is not compatible with the servo signal.

What benefit would a higher frequency have ? The ESC has a microcontroller inside (like a miniature Arduino), that might cause some delay.
Is it possible to use a motor driver for the motor, so the Servo library is not needed ?

This is a simular question: Changing Servo library frequency? - Motors, Mechanics, Power and CNC - Arduino Forum

There's gotta be some confusion here as to the definition of "Refresh rate". The signal you're showing in your pictures certainly isn't 50Hz, or if you're attempting to make those pulses eight times more frequent they're just not going to fit.

The normal servo control signal is a pulse between 1000 and 2000 microsecs wide sent every 20,000 micrsecs or 50 times per second.

If you were to send the signal 430 times per second that would be a repeat every 2325 microsecs which would just barely accommodate pulses 2000 microsecs wide.

But your transmitter could not send pulses for 6 separate channels at 430Hz - there just isn't enough time. Unless, of course some entirely different control protocol is used.

Which makes me wonder if the rceiver gets pulses from the transmitter at 50Hz how can it produce pulses for the ESC at 430Hz except by repeating each pulse 8 or 9 times. And I don't see any value in that.

...R

When driving a quadcopter its important to have as little delay in the PID loops
stabilizing flight as possible, hence the desire to push the ESC control signal to
the limit. These signals would never be sent from a receiver, but from the IMU/
flight control board.

Thanks for your answers

@Peter_n
According to the Signal I read with the oscilloscop, one period of it is about 5 to 6 milliseconds. If I now want to write a new value to the four ESC's, it takes up to 24 milliseconds for a complete Update of the Motor speeds. Which is about 1/0.024sec => 41.6 Hz. This Frequency is to low to get a proper stable flight with the quadrocopter.(It has to be at least 100Hz). So yes the change in the motor speed is to low.

Yes you're right. The Signal is used for an ESC, not for a Servo. The Signal is generated by the servo.h library, written to the ESCs which make a Signal for the brushless motors.

A higher Frequency would have the Benefit, that the Update of all motor speeds is faster. Like this the motors react more promply to any changes in position to equalise them.

I dont think the microcontroller causes the delay or at least have never read about something like that.

@Chagrin
Can we say the Signal has a frequency of 1/0.005sec=200Hz? And what do you mean by they're not going to fit? Can't create a Signal with higher Frequency for my ESC. Do you think it has to have this frequency when not flashed or something?

I wrote 50Hz because of this Post #5 in the thread
http://forum.arduino.cc/index.php/topic,45094.0.html.

@Robin2
I'm not connecting the RC transmitter directly to the ESC. The Signal of the transmitter is read by the Arduino and then compared to the sensor values, which describe the position of the system (copter). This error is updated by the programm with a Frequency of about 300Hz, but can't be written to the motors with this speed because the Signal made by the Servo library has a too low frequency. => like MarkT said.

open Question:

=> But still why doesn't my measured Signal fit the descriptions of a Signal created by the Servo library. And what is exactly meant by this description.

The ESCs will handle up to 400hz -430hz refresh rate.

the Frequency of the Signal or the Processor speed of the ESC?

thanks for any ideas

In your first graph the pulses are about 6500 microseconds apart and in your second graph they are 5100 microseconds apart. 1s / .0065 = 153Hz and 1s / .0051 = 196Hz, or you could say that the servo library is updating all of your servos 153 or 196 times per second. In your reply to Peter you're suggesting that the rate is only 41.6 times per second but that's not what you're showing

You said you changed the REFRESH_INTERVAL; what was it set at when you made the above graphs?

Hi Chagrin

Thanks for your response.
Yes I made a thinking mistake about the Signals. I assumed that one Signal can also be generated when the one written before are generated. (so that it would take 5ms +5ms+ 5ms+ 5ms in total). But actually they're created parallel with interrupts, am I right?

Thanks for hittiing me on this again. I thought I tested it but see now that it makes a difference. With 20000 microseconds the frequency is actually 20000microseconds (picture steps are 20ms). But still the frequency won't go under 5ms, not depending if I chose 2000 microseconds or 1 microsecond.

The standard Servo library generates each channel in turn, so it takes longer for
more active channels.

which means that writting a Signal to all Servos takes 20ms in total => 50Hz Updates ? (If every Signal has a frequency of 5ms)