Go Down

Topic: Frequency Question (Read 6611 times) previous topic - next topic

DuaneB

Hi,
  A really good way to learn is to look at the .cpp and .h files of the existing servo library.

  In particular have a look through the interrupt service routine it does exactly what you want on any pin you choose using only one 16 bit timer. It refreshes at 50hz, you might want something faster, but as a first step I strongly recommend you get familiar with the servo library.

For a quick introduction to what it does and how it does it see here -

http://rcarduino.blogspot.com/2012/01/can-i-control-more-than-x-servos-with.html

Then read through the handle_interrupts function in the .cpp file

or have a look at the code here which is a lot cleaner as it doesn't include all of the extra work to run on multiple Arduino platforms -

http://rcarduino.blogspot.com/2012/08/arduino-serial-servos.html

It also uses the same principle as the standard servo library.

Lastly, unless I am missing something you are looking to drive ESCs which require a servo style signal not a PWM signal, the code suggested in another response is not suitable for your application if I have understood it correctly.

Duane B
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

dhenry

Code: [Select]
[quote]which require a servo style signal not a PWM signal

A servo style signal IS PWM.




retrolefty

#32
Oct 01, 2012, 12:38 am Last Edit: Oct 01, 2012, 12:45 am by retrolefty Reason: 1

Code: [Select]
[quote]which require a servo style signal not a PWM signal

A servo style signal IS PWM.






Yes, but a servo control signal is a specifically defined subset of a typical true PWM signal, where the duty cycle (1-2msec) and frame rate (20-25msec) is 'standarized' amoung devices designed to receive 'servo commands'. So a servo signal has a variable duty cycle of 5% to 10%. This was to allow for several (up to 8 typically) channels of servo pulse width information to be encoded into a serial data stream, the so called PPM encoding stream used with radio control servo applications. Where as a true general purpose PWM signal usually allows for a complete 0-100% duty cycle at whatever switching frequency works best for a specific application.


dhenry

Quote
Yes, but a servo control signal is a specifically defined subset of a typical true PWM signal,


So  you confirmed what we have been saying: the servo signal is necessarily PWM and a PWM signal isn't necessarily a servo signal.

Quote
frame rate (20-25msec) is 'standarized' amoung devices designed to receive 'servo commands'.


I think you have plenty counter examples of that in this thread.

retrolefty

#34
Oct 01, 2012, 01:17 am Last Edit: Oct 01, 2012, 01:24 am by retrolefty Reason: 1

Quote
Yes, but a servo control signal is a specifically defined subset of a typical true PWM signal,


So  you confirmed what we have been saying: the servo signal is necessarily PWM and a PWM signal isn't necessarily a servo signal.

Agreement is good.  ;)

Quote
frame rate (20-25msec) is 'standarized' amoung devices designed to receive 'servo commands'.


I think you have plenty counter examples of that in this thread.

I'm not so sure of that. I've read several opinions and statements here, but I've yet to see a link to a datasheet for a ESC that was designed to handle both standard servo signals and some propritary non standard PWM switching and duty cycle control signal. Not saying one doesn't exist, but it would certainly not be a typical common ESC. I would like to read more details on real products offered, as there are likely to be applications where such higher performance control would be useful or required.



dhenry

Quote
I'm not so sure of that.


Erni and Duane pointed out a few examples earlier.

But servos we use are essentially PPM devices.

DuaneB

This link should help, its about rc channel signals which are exactly what a servo expects and the standard Arduino servo library generates.

http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

Duane B

rcarduino.blogspot.com
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

Erni

#37
Oct 01, 2012, 01:03 pm Last Edit: Oct 01, 2012, 01:42 pm by Erni Reason: 1
Quote
I'm not so sure of that.


High resfreshrate ESC, FL6A FAST PWM ESC
Up to 600Hz PPM input
http://www.flytron.com/multicopter-parts/178-fl.html

Servo 560Hz
http://www.amainhobbies.com/product_info.php/cPath/61_100_2163_2165/products_id/207985/n/MKS-DS-8910A-Titanium-Gear-Digital-High-Speed-Mini-Tail-Servo

Servo Frequency and Center Pulse Width Information
http://www.ronlund.com/rcheli/HELP_SERVO_PULSE.html

Using standard ESC's with high refresh rates

http://wiki.openpilot.org/display/Doc/TurboPWM+ESC%27s#TurboPWMESC%27s-Recommended%26nbsp%3BESCsettings

retrolefty

#38
Oct 01, 2012, 03:39 pm Last Edit: Oct 01, 2012, 03:41 pm by retrolefty Reason: 1

Quote
I'm not so sure of that.


High resfreshrate ESC, FL6A FAST PWM ESC
Up to 600Hz PPM input
http://www.flytron.com/multicopter-parts/178-fl.html

Servo 560Hz
http://www.amainhobbies.com/product_info.php/cPath/61_100_2163_2165/products_id/207985/n/MKS-DS-8910A-Titanium-Gear-Digital-High-Speed-Mini-Tail-Servo

Servo Frequency and Center Pulse Width Information
http://www.ronlund.com/rcheli/HELP_SERVO_PULSE.html

Using standard ESC's with high refresh rates

http://wiki.openpilot.org/display/Doc/TurboPWM+ESC%27s#TurboPWMESC%27s-Recommended%26nbsp%3BESCsettings


That is interesting, and I can see that lots of users and vendors have done lots of work in trying to identify componets that work well above standard servo framing rates, but I don't see a datasheet from an original manufacture stating it's designed to work at other then 'standard' servo update/pulse width control. I see one venndor/supplier that stated they perform a firmware changed/updated, others just tested at non-standard rates. That's not to say these are not viable to use, but seems to rely on this vary caution:

Quote
How do I know if my ESCs are compatible?
The only way to test it is to apply different input PWM frequency signals, make them change from low to high, and vice-versa. Check the motor response (notice how fast it achieves the desired RPMs after the input data changes, using tachometers). You should also check if it responds reliably, does not lose the sync, etc.


That implies that the original manufactures of the ESC don't rate them for other then standard 'servo timing', and that some users and vendors have taken on a task to seek out units that can be made to work at other then standard conditions. So once again is there any datasheets from an original manufacture, rather then a vendor/seller/user, that documents it's design PWM input rates and pulse width outside the standard servo timing rates?

Lefty

dhenry

Quote
I don't see a datasheet from an original manufacture stating it's designed to work at other then 'standard' servo update/pulse width control.


Many of the servos are analog: it takes the pwm pulse train through a low-pass filter to derive at a voltage signal (to be compared with a position sensor's output). Because of such, a higher pwm frequency will always work - but a lower frequency may not.

retrolefty


Quote
I don't see a datasheet from an original manufacture stating it's designed to work at other then 'standard' servo update/pulse width control.


Many of the servos are analog: it takes the pwm pulse train through a low-pass filter to derive at a voltage signal (to be compared with a position sensor's output). Because of such, a higher pwm frequency will always work - but a lower frequency may not.



I take such statements as not understanding the question. The site said one must first test a servo for higher framing rates, why would they state such if higher pwm frequecies 'always work'?

Lefty

Erni

#41
Oct 03, 2012, 12:46 pm Last Edit: Oct 03, 2012, 12:47 pm by Erni Reason: 1
Quote
I don't see a datasheet from an original manufacture stating it's designed to work at other then 'standard' servo update/pulse width control.


I was suprised when I started looking for datasheets for ESC's that I couldn't find any specification of  the update/pulse width.  The only thing I could find was Castle Creation (one of the top brands of ESC's) has announced an upgrade to their firmware that should make their ESC suitable for multirotors.

So I could ask the same question to retrolefty:

How do you know that the standard servo update/pulse is within the specifikations when there is none. ? :) <- smiley

I think (I presume) that this standard servo specification goes back to the good old happy days of ppm TX/RX.

AFter we have got all the pcm/spcm/spread spectrum technic it seems like vendors are more relaxed about the specifications.

for example if you look at the Spektrum DX8:

http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPMAR7610

it states: High-speed 11ms frame rate.

And although there has been numerous complaints with this system, if have not heard of any having trouble with their standard ESC.

retrolefty

#42
Oct 03, 2012, 06:09 pm Last Edit: Oct 03, 2012, 06:11 pm by retrolefty Reason: 1

Quote
I don't see a datasheet from an original manufacture stating it's designed to work at other then 'standard' servo update/pulse width control.


I was suprised when I started looking for datasheets for ESC's that I couldn't find any specification of  the update/pulse width.  The only thing I could find was Castle Creation (one of the top brands of ESC's) has announced an upgrade to their firmware that should make their ESC suitable for multirotors.

So I could ask the same question to retrolefty:

How do you know that the standard servo update/pulse is within the specifikations when there is none. ? :) <- smiley

Because a ESC sold with a standard servo control connector strongly implies that it is suitable for the 'standard' variable pulse width and frame rate specifications that the R/C hobby has been using for many decades now, unless they stated otherwise in their datasheet. As such I would not assume any operation far from that 'standard' timings unless also documented in their datasheet.

I think (I presume) that this standard servo specification goes back to the good old happy days of ppm TX/RX.

Of course, that's my point. This thread is about using R/C type ESCs at frame rates well above that 'R/C standard' which seems to be possible via hand testing of some units from some manufactures. I question was really about OEMs documenting/verifying operation at other faster framing rates.

AFter we have got all the pcm/spcm/spread spectrum technic it seems like vendors are more relaxed about the specifications.

for example if you look at the Spektrum DX8:

http://www.spektrumrc.com/Products/Default.aspx?ProdID=SPMAR7610

it states: High-speed 11ms frame rate.

That's a start, that would mean they are rating their device able to support up to twice the framing rate, maybe other OEMs will also start documenting such specifications.

And although there has been numerous complaints with this system, if have not heard of any having trouble with their standard ESC.


dhenry

Quote
maybe other OEMs will also start documenting such specifications.


Or maybe this is one of those cases that you are presumed to have known that. Turning on a computer is vital to you programming your arduino yet you see no mentioning of turning on your computer in any arduino book.


Erni

Quote
That's a start, that would mean they are rating their device able to support up to twice the framing rate, maybe other OEMs will also start documenting such specifications.


No that is the output framerate from the receiver. My point is that you connect this to a standard ESC !

Go Up