Understanding Servo Control....
jeremya
Posts: 26
I have been working with the homework board and I am trying to wrap my mind around how the servo knows which direction to move? I haven't messed with it too much, but after reading through the first activity with the servo several times and it's still unclear to me how the pulses control the Servo.
Thanks,
Jeremy
Thanks,
Jeremy
Comments
Dave
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae
Tech Support
dandreae@parallax.com
Http://www.parallax.com
·
-- Jeremy
The center pulse is 1.25ms wide, a pulse-width less than that is "interpreted" (by the servo electronics) as a position in one direction from center/home and a pulse-width more than that is "interpreted" as a position in the other direction from center.
What the benefit of making the pulses larger or smaller? If 1.26 makes it go one way then whats the benfit of making the pulse 2.0? Anything?
Thanks!
-- Jeremy
The center value is around 1.5 mSec, actually. With a 'non-modified' servo, the output gears are connected to a variable resistor. When you send the servo a 1.8 mSec pulse (repeated every 20 mSecs), the pulse-width comparator drives the motor inside the servo in the proper direction to get the variable resistor to create a pulse width that matches the pulse-width you are inputting.
Now, with a 'modified' servo, the variable resistor is disconnected, and set to its center position, which SHOULD match a 1.5 mSec pulse. And the output gears are modified slighly so they can turn continuously.
Thus, when you send the servo a 2.0 mSec pulse, it turns the gears so that the (once attached) variable resistor would turn to the 2.0 msec position. Since the variable resistor is no longer attached, the gears just keep turning, and turning, and turning -- making a very nice, small robot wheel motor.
Now, to turn the other way, you send it a 1.0 mSec pulse. Now the servo does the same thing, but in the other direction, since 1.0 mSec is LESS than the 1.5 mSec the resistor is set to.
And if you send a 1.5 mSec pulse, then the variable resistor already matches that, and the servo stops turning.
Now, it would be nice if the amount your pulse differed from 1.5 mSec actually affected the SPEED at which the wheel turns. And it does, but only over a pretty narrow range. There's a modification you can make inside the servo (with a soldering iron, a capacitor, and a resistor) which can widen this range -- but most people don't go that far.
I am sorry for all the questions. I am new to microcontrollers, electronics, and servos.
Thanks,
Jeremy
-- Jeremy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
Note all of this came from the model airplane industry -- where there's a hand-held RC control sending these pulses to a radio reciever in the plane, which uses these pulses to control the position of an aileron, or elevator, or rudder on the plane. So sending a repeating signal to the plane was the simplist way of providing immediate response to control inputs.
Thanks for that pic PJ - that really helped me understand how this works! Just what I needed to visualize it myself.
Most Refreshing
I really like the basic stamp. I think the section on servos could be rewritten to explain things better.
Can anyone suggest a good book that might explain basic electronics as it pertains to robots? Something more thorough than "Whats a Microcontroller?". Maybe I am denser than most and need things spelled out a little more than average guy.
-- Jeremy
·· The horn's position is not an indication of the center position.· The two are not related as the horn could be in any position in relation to the shaft of the servo.· There are many different types of servo horns, including round ones.· How would you center the servo with that?· The servo center position is roughly in the center of its range of motion, but as there are component variances/tolerances, no two servos are really identical.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks for the help!
-- Jeremy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Post Edited (Chris Savage (Parallax)) : 4/21/2006 3:22:33 PM GMT
There's really no "more detailed" or simpler tutorial than what Parallax already puts out. There are more 'general' books, but you'll have the same problem there. But it sounds like you "get it" now. Any further questions, come on back and we'll see what we can do.
-- jeremy