# 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

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!

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: