Continious rotation servo Pulse Width vs RPM

I have always noticed that a hobby servo modified for continuous rotation seemed to have a non-linear response w.r.t. pulse width command vs RPM. In this case a couple of Futaba S148s are being used. I rigged up a vane type hall effect sensor (looks like a typical slot type optical sensor), and made a target that looked like flat propeller, so I got two triggers per revolution. A quick bit of code on the FEZ both ran various PWM settings and measured the resulting RPM.

I first did a run with 0.1ms steps from 1ms to 2ms. This showed a surprisingly linear curve with just a bump as it went through zero. I just did a second set of tests just now going from just above to just below the zero region. Again it is surprisingly linear (graph below). I’ll try with the other servo tomorrow to see how well they correlate. I’ll shoot a quick video of the testing too. I have a couple of Hitech servos I could test too and see how the different brands compare.

The whole point of this exercise was to find an easy formula to relate pulse width command to the servo’s RPM. As close to linear as this is it looks like a simple linear equation with a few offset points at zero. So now I’ll have an idea how fast my little bot is going when I give it a command.

Next step: I wonder how fast an ISR triggered by an input pin edge is handled? While one could use a signal generator to test this how about using a PWM fixed at 50% duty cycle and changing the period? Use a FEZ to test a FEZ :wink:

Nice! How did you create this graph?

Nice Excel would be my guess by the looks of it.

See i look at the picture and think youre someone else foekie

Yes, the graph was done in Excel. Excel makes it very easy to create a scatter plot with smoothed lines. For simpler things it also does a good job of curve fitting (creating an equation to describe the plot). For more complicated things a tool like Matlab would be a better choice.

Thank you! :slight_smile:

I just got done testing the other servo and found it was identical to the first one. I plotted the new data over the old and as you can see in the graph below it was a nearly perfect match. If you want to see a short video of test set up:

[url]RPM Test - YouTube

When I have time later today I’ll test the Hitech servos and see how they compare.

Hey Jeff,

How much voltage were you pushing through the servo when you tested it? Some servos will have more predictable performance at 6V, or at least that’s what I gather from my readings.

Yes, 6v is a common voltage which suits best.

I am powering the servo with 6V (4 * AA batteries). The specs on these servos are 4.5V~6V as I recall. I would expect that the RPM will vary linearly with voltage as is the typical case with a DC motor, so at 5V the motor will be a bit slower at a given PWM command than at 6V but the response curve should remain the same ‘shape’.