The fix was easy enough to make. If anyone else is interested in how to do so go into Servo.h and change line 92 as follows:
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo
#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo
#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached
//#define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds
#define REFRESH_INTERVAL 14000 // minumim time to refresh servos in microseconds
#define SERVOS_PER_TIMER 12 // the maximum number of servos controlled by one timer
If anyone can give me clarification as to why 20ms was chosen instead of 14ms I would greatly appreciate it. Standard RC servos and ESCs use 14ms. I stumbled upon this dealing with an ESC that was working incorrectly with without the 14ms refresh rate. Thanks in advance.
mikesbaker:
The fix was easy enough to make. If anyone else is interested in how to do so go into Servo.h and change line 92 as follows:
#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo
#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo
#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached
//#define REFRESH_INTERVAL 20000 // minumim time to refresh servos in microseconds
#define REFRESH_INTERVAL 14000 // minumim time to refresh servos in microseconds
#define SERVOS_PER_TIMER 12 // the maximum number of servos controlled by one timer
If anyone can give me clarification as to why 20ms was chosen instead of 14ms I would greatly appreciate it. Standard RC servos and ESCs use 14ms. I stumbled upon this dealing with an ESC that was working incorrectly with the 14ms refresh rate. Thanks in advance.
Well I would challenge you statement that 14ms is some kind of hard 'standard'. PPM Frame rate for R/C servos are pretty loose and servos are expected to work over a range of possible range refresh rates, 25ms was a often sited rate when I first started using servos in the 70s. Just as there is no real 'standard' of how many degrees of travel a specific servo will move from 1ms to 2ms or how much over and under travel above and below the nominal 1 to 2 msec pulse width a servo can track.
Lefty
Interesting. Luckily this library is easily modified to suit our needs! Thanks for the response.
I noticed that my spectrum receiver puts out 61 pulses per second whereas my older futabas send only 50 per second.
I have never had a problem mixing and matching parts though.
Duane B
rcarduino.blogspot.com