when does a servo reach its position?
julia_nosewater
Posts: 4
Hi,
Just a general question about servos using the basic stamp.· All the examples I've seen on the parallax site only use serout... don't you somehow need to know how to get the current position of the servo?· Otherwise, once you send a serout, how do you know when the proper position has been reached?· Also, maybe it didn't quite get where you wanted (ie small error) shouldn't you be able to track this?
Thanks!
julia
Just a general question about servos using the basic stamp.· All the examples I've seen on the parallax site only use serout... don't you somehow need to know how to get the current position of the servo?· Otherwise, once you send a serout, how do you know when the proper position has been reached?· Also, maybe it didn't quite get where you wanted (ie small error) shouldn't you be able to track this?
Thanks!
julia
Comments
A standard servo - one that rotates only 180 degrees, can be positioned by the width of its driving pulse.· For instance, a pulse 800·us wide will always take the servo to the same position.· If you want a reference for the servo position, set a variable pos = to 750, then pulse your servo
pos + 100, pos - 75, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
NEW! 4 MB EEPROM
http://hometown.aol.com/newzed/page4.html
·
How does one acurately position a servo that needs continuous rotation?
For example, let's say I know I need the servo to make x rotations.· If x is large, then it will take a while.· How can I know when it's reached its destination?· I have to time it?· Thats seems very unaccurate.· There must be more accurate ways of doing this?· Stepper motors might be better perhaps?
After some reasearch, I think what I'm looking for is an "encoder" for the motor (stepper or servo?).· Does anyone know where to find hobby versions of these?· Basically, I want to be able to read the position of my motor so I know exactly how far it's moved.
Thanks for your time!
julia
You can precisely position a stepper.· If it takes 200 pulses to make a complete revolution and you wanted 10 revolutions then you would pulse it it 2000 times.· One additional pulse would give you 360/200 = 1.8 degrees per pulse.· Micro-step steppers can be set for 800 pulses per revolution and that would make 1 pulse = 360/800 = .45 degrees per pulse.· I think some stepper controller can go to 1600 pulses per revolution, but as you have probably figured out, higher resolution results in less rotational speed.
Check the Parallax site for stepper motors and also Jon's N&V columns for more info.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
NEW! 4 MB EEPROM
http://hometown.aol.com/newzed/page4.html
·
Sid
If you're working a gearbox, you could put the encoder on the final gear to be able to determine your 'turntable' position rather than just the stepper/servo.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://ca.geocities.com/steve.brady@rogers.com/index.html
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
www.netzerprecision.com/prodrot.asp
Good idea, good price, but needs additional sotware. Anyone know how to go about making something like this, if possible?
kelvin
Post Edited (Paul Baker) : 3/6/2005 7:28:12 AM GMT
Wheel encoders can be self made with this great article... http://www.seattlerobotics.org/encoder/200010/dead_reckoning_article.html
Or you can purchase one from http://www.nubotics.com/
Channel A: 0 1 1 0
Channel B: 0 0 1 1
rotation in one direction produces a sequence of A leading B, the reverse direction produces B leading A. Like I mentioned in the previous post, your stamp must detect absolutely every transistion, if you have computationally intensive operations that you don't split up into smaller chunks, you run the risk of missing a transition and ending up with an incorrectly computed position.
It takes 11,167 20us pulses for one revolution.· That translates to .0322
degrees of rotation per pulse, or 31 pulses for one degree.· I have the stepper programmed to rotate right X number of degrees, X being entered by the user.· Same thing to rotate left.· The program remembers its last position, and rotates X or -X number of degrees from that position.· The debug screen displays its current position, expressed as X or -X degrees,
using 0 degrees - 12 o'clock - as a reference point.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
NEW! 4 MB EEPROM
http://hometown.aol.com/newzed/page4.html
·