rc serco motor control
Just a quick question,
Is it possible to control a standard rc servo (e.g. Futaba micro mini) in forward and backward mode?
I have a loop that moves the servo 120 degree forward. I thought I just can count backwards and then it will move backwards the same distance. But this doesn't work. The servo is moving on its own back and not with the stepsize that I want.
The motor control looks like that in the moment:
MAIN: FOR i=334 TO 1166 STEP 10
GOSUB MOVE
NEXT
MOVE: LOW 15
PULSEOUT 15, i
PAUSE 20
RETURN
The same would be for the backward movement, just with negative counting in the FOR LOOP.
ChcKsss
Is it possible to control a standard rc servo (e.g. Futaba micro mini) in forward and backward mode?
I have a loop that moves the servo 120 degree forward. I thought I just can count backwards and then it will move backwards the same distance. But this doesn't work. The servo is moving on its own back and not with the stepsize that I want.
The motor control looks like that in the moment:
MAIN: FOR i=334 TO 1166 STEP 10
GOSUB MOVE
NEXT
MOVE: LOW 15
PULSEOUT 15, i
PAUSE 20
RETURN
The same would be for the backward movement, just with negative counting in the FOR LOOP.
ChcKsss
Comments
FOR i=1166 TO·334 STEP 10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
With the backward counting I meant the FOR Loop, like you defined it. But with this the motor is not moving backwards :-(
ChcKsss
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
There may be a slight conceptual problem here, at least from my point of view. Ordinary R/C servos only operate in one direction. There really is no forwards or backwards per se, only forwards.
However, that is not to say that you can't move forward in successively larger or smaller steps or that you can't move radially fewer and fewer degress with each succesive 20 mS pass. The latter case would "simulate" (if you will) moving backwards.
Just to reinforce what Chris said, the variable "i" MUST be a WORD sized variable:
i var WORD
Once you change that, I suspect the situation will change in your favor.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
The servo that I use can move backwards and can also move just a maximum angle of 120 degree. (But I also wasn't sure at first if this is possible or not...)
Chris,
I just forgot the whole time to reset the Stamp... Sorry. It is working that way now.
Thank you for the help from both of you.
Have a nice day
ChcKsss