Hello,
I have this continuous rotation servo: http://www.robot-r-us.com/vmchk/motor-robot-servo/springrc-sm-s4315r-continuous-rotation-servo.html
And I have http://electricimp.com/ device for controlling it.
I'm somewhat puzzled what am I doing wrong, so here I am looking for advice from someone who's more experienced than me.
The spec says that 1.5ms pulse is the rest point, while lower values will make the motor rotate counter clockwise and higher values make the motor rotate clockwise.
The Electric Imp API lets me set up the output pin, specifying the PWM period (in seconds) and duty cycle (0 to 1). I chose arbitrary period value 0.02, and thus I can get the rest point (1.5ms) with duty cycle 0.075. And the lower values really make the motor turn counter-clockwise, and the higher values make it go clockwise. So far so good. The performance of the motor is remarkably unreliable (rotation period time can differ by 10%), and also the pulse width relation to the speed doesn't follow any reasonable mathematical formula. But if I can calibrate to that, no problem.
But then I decided to change the period to other arbitrary value, 0.05. And to my surprise, the motor response to pulse width was no more the same, even if the duty time was properly recalculated to take the wider period in effect. I don't have oscilloscope to see if the PWM signal is really what I think it is, but I'm pretty sure the signal is correct, because the 1.5ms pulse correctly stops the motor.
Since the motor specs do not talk about the PWM period, I thought there is some industry standard that is so "common knowledge" that it is not specified in specs. That would explain different motor behaviour with 1.1ms signal at 0.02s period and 0.05s period.
I have this continuous rotation servo: http://www.robot-r-us.com/vmchk/motor-robot-servo/springrc-sm-s4315r-continuous-rotation-servo.html
And I have http://electricimp.com/ device for controlling it.
I'm somewhat puzzled what am I doing wrong, so here I am looking for advice from someone who's more experienced than me.
The spec says that 1.5ms pulse is the rest point, while lower values will make the motor rotate counter clockwise and higher values make the motor rotate clockwise.
The Electric Imp API lets me set up the output pin, specifying the PWM period (in seconds) and duty cycle (0 to 1). I chose arbitrary period value 0.02, and thus I can get the rest point (1.5ms) with duty cycle 0.075. And the lower values really make the motor turn counter-clockwise, and the higher values make it go clockwise. So far so good. The performance of the motor is remarkably unreliable (rotation period time can differ by 10%), and also the pulse width relation to the speed doesn't follow any reasonable mathematical formula. But if I can calibrate to that, no problem.
But then I decided to change the period to other arbitrary value, 0.05. And to my surprise, the motor response to pulse width was no more the same, even if the duty time was properly recalculated to take the wider period in effect. I don't have oscilloscope to see if the PWM signal is really what I think it is, but I'm pretty sure the signal is correct, because the 1.5ms pulse correctly stops the motor.
Since the motor specs do not talk about the PWM period, I thought there is some industry standard that is so "common knowledge" that it is not specified in specs. That would explain different motor behaviour with 1.1ms signal at 0.02s period and 0.05s period.