How to control a continuous servo motor
student2007
Posts: 12
Hi all,
I recently purchased 2 continous servo motor (Duty Futaba S148). Unfortunately, one of them died this morning - heh (it was "smoking" pot).
Anyways, Im a big newbie in electronics and hardwares but theres a school project that requires us to use servo motors. I cannot get a hold of a standard motor so I resorted to buying a continuous one. The set point have been adjusted with my basic stamp 2sx provided here http://www.parallax.com/dl/docs/prod/motors/crservo.pdf. I tried the second chunk of code and it didn't do what it was intended to do (The code below will show center and then rotate the servo to the left and to the right then stop.) The motor was really slow, infact it wasn't even rotating but more like moving step by step by step.
I don't understand how PCM works - I read from this site http://www.thebacons.info/colin/robocube_v2/Index_Servo_control.htm. but i still have difficult understanding how I can control a continuous servo motor.
Please help
Thanks.
P.S. It is powered with 4 1.5v batteries (6v source) with a voltage regulator (L7805CV)
Post Edited (student2007) : 3/16/2007 11:34:20 PM GMT
I recently purchased 2 continous servo motor (Duty Futaba S148). Unfortunately, one of them died this morning - heh (it was "smoking" pot).
Anyways, Im a big newbie in electronics and hardwares but theres a school project that requires us to use servo motors. I cannot get a hold of a standard motor so I resorted to buying a continuous one. The set point have been adjusted with my basic stamp 2sx provided here http://www.parallax.com/dl/docs/prod/motors/crservo.pdf. I tried the second chunk of code and it didn't do what it was intended to do (The code below will show center and then rotate the servo to the left and to the right then stop.) The motor was really slow, infact it wasn't even rotating but more like moving step by step by step.
I don't understand how PCM works - I read from this site http://www.thebacons.info/colin/robocube_v2/Index_Servo_control.htm. but i still have difficult understanding how I can control a continuous servo motor.
Please help
Thanks.
P.S. It is powered with 4 1.5v batteries (6v source) with a voltage regulator (L7805CV)
Post Edited (student2007) : 3/16/2007 11:34:20 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
FOR temp = 0 TO 200 //repeats 200 times
PULSOUT Servo_pin,1875 //set-point zeroed? Since the potentiometer was set to that particular point
PAUSE 20 //pauses for 2µs?
NEXT
FOR temp = 0 TO 200 //repeats 200 times
PULSOUT Servo_pin,2250 //suppose to turn left (why at 2250 that it turns left? At what pulse does a servo change direction?)
PAUSE 20
NEXT
FOR temp = 0 TO 200
PULSOUT Servo_pin,1500 //suppose to turn right
PAUSE 20
NEXT
STOP
Could you possibly explain how this code works. I have a guess but it doesn't seem to match with how the servo is moving.
Sorry for the simple questions but I really dont understand.
My servo still will not change direction.
Rotation of the servo goes like this: Rotates clockwise for 2 seconds then a sudden twitch counterclockwise and then rotates clockwise again for 2 seconds.
I am using basicstamp 2sx and it indicates that 1875 is the set point.
Numbers lower than 1875 does turn clockwise and numbers higher does turn counterclockwise. But when I wanted them to turn right then left, it doesnt. It will continue to turn the same direction.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ D Rat
The other one which is the one Im using now is fine as for as I know hahah. I didnt see smoke or feeling it getting hot.
You may need fresh batteries or a larger size battery pack or a "wall-wart" supply for now.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
The outcome was:
It doesnt reach zzz
So I added another 1.5v to the pack making it 7.38v. The outcome now is:
The stamp is still reseting itself as indicated by the flickering of the LED when it resets.
Oh, what I meant was that it will only turn the initial setting. It will work either counterclockwise or clockwise once but cannot change from counterclockwise to clockwise or visa versa.
I will try to power the basicstamp and motor separately when I find a 9v battery. Hopefully, it will work : ) Thanks.
I ran the program and it doesnt reset itself like it did before - sucess!
However, the motor still does not change direction.
I then realize that the set point is not working anymore. So I tried re-adjusting the set point which simply does not work I turned it left and right as far as it could let me. No matter which direction I turn the potentiometer, the servo would not change direction (the point when the servo changes direction is where the zero should be but it wasnt there). I cannot find the zero.
Ok, so I tried putting everything back the same as before; powering both the stamp and the motor with 6v-7.5v batteries. I re-adjusted the potentiometer and it worked! But I'm pretty much back at the initial problem.
Try recalibrating the servos again (using the scheme in the Robotics tutorial) where you send it a "centered" pulse and adjust the pot for no movement. It is possible to mechanically break the adjustment mechanism or otherwise damage the servo electronics, but it's not easy.
: D
I mix match the wiring in the voltage regulator
The servo is responding correctly now. Phew.
Thank you so much for sticking to this thread.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Steven Kirk Nelson (slamer)
Team K.I.S.S
Build Safe, Build Mean, Build Strong!
Post Edited (slamer) : 3/17/2007 1:32:30 AM GMT