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