How to control a modified (to continously rotate) servo??
Hi!
I bought a servo off of servocity.com and had it modified by them to run continuously. Now though, I cannot seem to control it in pbasic. Once it starts rotation, it keeps going. After a little research, I guess this is what it's supposed to do!
What do I need now to get this thing controllable by my pbasic programs? The Parallax continuously rotating servos are able to be controlled, why can't this one as well?
From what I understand, by modiifying it like this, they basically turned it into a gear motor and no longer a servo. Do I need to buy some sort of motor controller now? Does Parallax have any for sale?
Thanks guys, all help is much appreciated!
Here's the servo I bought
http://servocity.com/html/hs-5585mh_servo.html
I bought a servo off of servocity.com and had it modified by them to run continuously. Now though, I cannot seem to control it in pbasic. Once it starts rotation, it keeps going. After a little research, I guess this is what it's supposed to do!
What do I need now to get this thing controllable by my pbasic programs? The Parallax continuously rotating servos are able to be controlled, why can't this one as well?
From what I understand, by modiifying it like this, they basically turned it into a gear motor and no longer a servo. Do I need to buy some sort of motor controller now? Does Parallax have any for sale?
Thanks guys, all help is much appreciated!
Here's the servo I bought
http://servocity.com/html/hs-5585mh_servo.html
Comments
Edit: Does your CR servo still have a potentiometer? You can use the pot to calibrate the servo so it says still when it receives a 1500us pulse.
I looked over that section of the manual and can't quite figure out what you mean by 1500us?
As a basic test, I tried
The servo begins to rotate very fast clockwise and then continues to do so without stopping and changing directions.
I can barely zero in the dang thing. I set it to 750 and can BARELY get it to stop using the small potentiometer attached to it.
This thing is very frustrating!
The "PULSOUT" statement uses 2us increments so "PULSOUT 14 750" sends a pulse of 1500us.
It can be easier to zero the servo if you use a multi-turn trim pot instead of a normal pot.
Digi-Key no longer sells the ones I use, but this one should work.
According to erco a 10K trim pot also works and 10K units might be less expensive than the 5K trim pots.
Yes, I'd think it would react with either 650 or 850.
Do you have a link to the method you used to convert the servo to CR? (Though I doubt this should be the problem.)
It might help if you post your entire code. Use code blocks to post code instead of quotes so the indentation is preserved.
Here's a link to a tutorial of using code blocks.
BTW, it's my observation that most servo problems I've seen on the forum arise from power supply problems. A servo pulls a lot of current when it first starts to move which can cause the voltage to dip and the Stamp to reset. What are you using for a power supply?
FOR W1= 500 to 1000
PULSOUT 14, W1
PAUSE 20
NEXT
erco, your code did exactly that. Reversed directions just fine. However, it doesn't stop. Once W1 gets to 1000, it keeps rotating.
I tried:
It does some very strange stuff. First, it starts going CW at 850 for a few seconds. Then it slows down for a few seconds, then it starts going CCW slowly, then a little faster CCW, then gradually goes to very fast CCW. Then it starts gradually going back down. That's not written in the code ANYWHERE!
I should take a video of it with my iphone, it's the weirdest thing.
It's hooked up to the BoeBot board and it's plugged into the wall.
As erco said, the servo needs a pulsout of 750 to stop and it should keep getting this pulse 50 times a second.
One of the big challenges of writing code for the BS2 (and many other uCs) is the need to keep pulsing the servos every 20ms (some can go a bit longer without a pulse).
So even though you only need to rotate the servo every 20 seconds, you'll still need to send it pulses to tell it to stay still the rest of the time. You could use a relay on the servo's power line to turn the servo on and off if you don't what to keep sending it pulses.
There's also the Servo Pal that will keep sending a signal to the servo for you.
As erco mentioned (and I believe an earlier post mentioned the same thing), servo projects often have power supply issues. Many AC adaptors don't provide enough current to keep your BS2 happy when the servo starts to move.
Edit: A Propeller board such as the QuickStart could be used as a Super Servo Pal. If anyone wants to use a Propeller this way, let me know and I'll write some code that will read in a pulse on one pin and keep sending the same pulse on a different pin. It would be easy to write the code for a six-servo, Servo Pal using a Prop. An additional eight servos could be added to these six with a bit of extra work. I don't know of an object to read from 14 different pins at once so I'd need to modify one of the current objects before making a 14-servo version of a Servo Pal.