continuous servos
By Tedificator
2008-07-10 06:54
2008-07-10 06:54
For all you guys who have bought or modified a continuous 360 servo, how does it work?
I want to be able to have a very controllable motor that I can tell to make specific number of turns and stop. Would that be a way the continuous servo could work?
I mean, for other servos, sending different square waves gives different angles, but if the servo goes all the way around and again... how do you tell it what you want?
(just want to know if it is feasible and a general sense of how it works before I buy one and try it)

I haven't tried out the
I haven't tried out the whole modified servo thing, but I don't think you can use it to be able to turn a specific number of turns.
The trick with the modified servo thing is that normally a servo has a potentiometer attached to the output shaft and this makes it able to measure the current angle it is at by simply measuring the resistance of the potentiometer. When you modify it you remove the potentiometer and replace it by two equal valued resistors in a voltage divider setup where you connect the measuring circuitry to the joint between the two resistors. This makes the servo think that it is always centered. There is no way to get back any information on how many turns the servo has done. You should think of the modified servo as a geared motor with a simple control interface where you can set it in forward, reverse or stop. I'm not sure of this - so anyone with better intel please correct me if I'm wrong - but I think that a servo turns faster with greater angles, so if you set the servo to turn to an angle close to center, the servo will not turn as fast as if you set the servo to turn to an angle far from center.
You can add wheel encoders to your project to be able to measure how many turns each wheel has done. You can see a small project for the Tamiya twin motors here.
I see... Well, it still
I see... Well, it still sounds like the interface makes it easy to control.
@ people who use continuous servos: do you find them pretty consistent in rotation speed vs. settings? What I'm thinking is having one on each side of my robot for some solid control in movement: so if the two servos are not very consistent with the settings they are given, or each other, that would make my plan a waste of money (since gear motors would have worked just as well for cheaper).
*edit* or I can be a man and learn PID control :-P http://letsmakerobots.com/node/865, but seriously can two servos be pretty close?
No
Two modded servo motors would be no similar in speed than any two other "identical" motors. Unless you have closed loop control (AKA feedback, AKA PID) there is absolutely no way you can have any two motors run at the same speed. There will be slight differences in coil length, magnet strength (which will change depending on the number of times they've been dropped and stuff) the bearings will have different mechanical resistances... No two motors go and the same speed without closed loop control.
(Except steppers, and even there, you need to assume that a commanded step has actually taken place...)
If you would rather just BUY
If you would rather just BUY a modded servo, this would be one place.
http://www.hobbyengineering.com/H1429.html
From my exp with the
I use servos for drive and they are AWESOME!!!
My little erector-set robot (with the green wheels) uses servos for drive. They came with the "Vex" kit but they are nothing more than a std. continous rotation servo. I have full fwd and rev AND speed control! Not to mention you get fwd and rev with one pin!
The command I use simply servo 1,b1 where b1 is a value between 75 and 175. If 75 is used the servo turns forward at full speed. 175 is full reverse. As you change these values (moving them closer to 150) the motors slow down. In practice it seems there is a usable range:
75: Fast fwd
95 Wiked slow fwd
160 Crazy slow rev
175 Fast Rev
I have found that changing the value even by one is noticable. Right now the "forward" on my bot is servo 1,75 servo 2,78 -the 3 point difference is how I "trimmed" the robot to drive straight!
As for feedback, you can't count rotations. But I have been playing with encoders and I might have some ideas for you.
www.rocketbrandcustom.com baby!!
so...
so can you just power the 360 servo with the pins on the picaxe board like a regular servo?
I was reading about the solarbotics "secret" motor driver, and they implied that you need to use an h-bridge ...
you can use the same pins
you can use the same pins yeah. But i still can't get it to work with "servo x,y",unless i put the whole thing in a cycle, EG:
driveservo:
servo x,y
pause 20
goto driveservo
and some sort of driver will make everything easier, and by easier i mean not having the loop in your program, but still i saw some guys on this forum drive them "on the background", without having any loops, just giving one command and that's all.
continuous servo don't work on First Robot
well i guess you are using
well i guess you are using it to rotate the ... ultrasonic sensor right?
well why not just make it rotate at full speed and stop it some seconds later. that should do it. you know it may be slower than a normal servo but you (or we...got a continuous one too) could make something nice out of it.
How would I do that? What
How would I do that? What the programing code to go with that.
well ... you just have to
well ... you just have to stick with chris' codes i guess, they do work for my servo:
75: Fast fwd
95 Wiked slow fwd
160 Crazy slow rev
175 Fast Rev
so you could write something like this:
turnleft:
servo 0, 75
wait 1
servo 0, 150
Thanks Chris, this was
Thanks ! I'll try this when
Thanks ! I'll try this when I am home.
Ok this seems like a really bad idea...
First of all, the "wait" command need to go bye-bye. Use "pause" instead. You can get down to milliseconds with pause i.e. pause 1000 is just one second and you now you can break up that second into 1000 tiny, tiny parts -much more accurate. However, all I can imagine is one missed or screwed up code and the next thing you know you have wrapped the sonar leads around the sensor about 3 times before it breaks the board in half. You know, a servo is only 10 bucks and can be stopped at very precise stops. Using a "timed" stop, is going to get funny as your batts get low and the servo moves slower. If nothing else, use some solid stops and/or a couple little buttons to tell the pic that the servo has gotten to where you told it to go. -Just a thought.
www.rocketbrandcustom.com baby!!
Feedback for servos
There is a company called Nubotics that makes something called a Wheelwatcher.
http://www.nubotics.com/index2.html
Basically it is an encoder wheel attached to the output of a servo (or other motors too) that is aligned to a PCB attached to the servo. The PCB has the photo interupters to read the quadrature postion, so that your microcontroller can keep track of where the shaft has rotated. I think Acroname and a couple other robot places carries them. Adds about $26 to the price of the servo though.
In some servo mods for continuous rotation, the pot can be left intact, but centered, so that a center point can be adjusted later. ( For changing a stop value, or whatever else. )
Dave
Rotary (Quadrature) Encoders
Can you please give me the
what do I do wrong here?
Symbol dangerlevel = 70' how far away should thing be, before we react?
symbol turn = 300' this sets how much should be turned
symbol servo_turn = 20' This sets for how long time we should wait for the servo to turn (depending on it´s speed) before we measure distance
main: ' the main loop
readadc 1, b1 ' read how much distance ahead
if b1 < dangerlevel then
gosub nodanger ' if nothing ahead, drive forward
else
gosub whichway ' if obstacle ahead then decide which way is better
end if
goto main ' this ends the loop, the rest are only sub-routines
nodanger:' this should be your combination to make the robot drive forward, these you most likely need to adjust to fit the way you have wired your robots motors
high 5 : high 7 : low 4 : low 6
return
whichway:
gosub totalhalt ' first stop!
'Look one way:
gosub lturn ' look to one side
pause servo_turn ' wait for the servo to be finished turning
gosub totalhalt
servo 1, b1
'Look the other way:
gosub rturn ' look to another side
pause servo_turn ' wait for the servo to be finished turning
gosub totalhalt
servo 1, b2
' Decide which is the better way:
if b1<b2 then
gosub body_lturn
else
gosub body_rturn
end if
return
body_lturn:
high 7 : low 5 : low 6 : high 4 ' this should be your combination that turns the robot one way
pause turn : gosub totalhalt
return
body_rturn:
high 4 : low 7 : low 4 : high 6 ' this should be your combination that turns the robot the other way
pause turn : gosub totalhalt
rturn:
servo 0,95' look to one side
wait 1
return
lturn:
servo 0, 160 ' look to the other side
wait 5
totalhalt:
low 4 : low 5 : low 7 : low 6' low on all 4 halts the robot!
Servo 1,75' face forward
wait 1 ' freeze all for one second
return
You might get help if you
Okay I'll try to post the
Okay I'll try to post the picture later I just having a hard time getting a close up. The problem with the code I have posted is that the robot do like 3 circle to the right and the same back the other way. I have a PARALLAX (continuous rotaion) servo. So far I understand most of the code from the first robot but I don't get why my servo is not working right.
i'm just gonna get a 180
i'm just gonna get a 180 servo...that's much simpler and anyways i guess i'll use some 360 servos for my next bot (instead of geared motors).
and as to your code (vince) if you want to try out the "timed turning" you have to change the lines where the "servo" command is used (as i wrote before).
I bought a standard servo
I bought a standard servo and its all working. My robot is alive!:) next the YDM.
still have problems moving
still have problems moving my continuous servo motor in "background" (without using loops that is). I've read the manual again and again, and by what i've understood, the "servo" command sends pulses to the motor every 20ms, but still if i only use that my motors won't turn (so far i've only managed to make them turn using a loop, which is annoying if you also want the brain to do other things).
Could you help me understand how it works? Frits suggested pwm pins, i haven't tried them yet to be honest, but i'd prefer not to use them (need them for IR modulation) and since i know some of you have managed to make them run without them i'd like to know how :)