Subject:
|
Re: Encoder Implemenation questions
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Thu, 11 Jan 2001 17:01:55 GMT
|
Viewed:
|
1092 times
|
| |
| |
You step into the morass that separates reality from theory :-)
The "right" way to do this is to measure the current on the servos, ramp
their accelleration up and then down again as you approach your final
endpoint. Read up on feedback systems and you will see that the best you
can do is crtically damped for the fastest arrival time at the destination
position. (some over shoot involved). If overshoot is "illegal" (as in your
robot falls off the table if you overshoot, or in the case of robot sumo
off the edge of the ring) then you need to over damp your system for faster
response to the end condition. This means you will approach your end point
more slowly but without the risk of overshooting it.
There is also backlash, so when you approach a position based on wheel
encoder values you will find that if you approach it from one direction of
rotation you get to one place, if you approach it from another direction of
rotation you get to another place. With two wheels clearly there are four
conditions (each wheel approaching the appropriate encoder reading using
counterclockwise and clockwise rotation). This gives you a "box" in which a
variety of robot attitudes may be achieved all meeting the same encoder
readings.
This is the first step on the road to inverse kinematics, how to predict
what you need to do to your robot (from a control standpoint) to put the
robot in a particular postion with a particular attitude.
Did that answer your question? :-)
--Chuck
At 03:43 PM 1/11/01 +0000, James Munro wrote:
> I have contructed a robot that I want to be able to move and position itself
> accurately.
>
> I have encoders (the Hamamatsu P5587) attached to analog inputs 4 & 5
> using sencdr4 & 5. I have 24 segment encoders that should give me a
> resolution of about .33". Not super accurate probably but close enough
> for my purposes.
>
> I am using 2 standard servos that have been gutted into simple gear motors.
>
> With this configuration I am able to accurately count ticks from the wheels.
>
> My question is: how can I accurately get a wheel to stop after any number of
> ticks? I coded a routine to count up to 24 and stop. Its obvious from
> watching
> the wheel that once it turns off it continues to rotate about 3 to 5 more
> ticks
> which is over 1"! Not good.
>
> I have been able to get it to stop exactly at 24 ticks by turning off the
> motor
> and reversing it for 50 Msecs which has worked for me but seems like a kludge
> solution to the problem. Is there any way to short the motor or do
> something to
> get a precision stop? Something more elegant than my method :)
>
> Thanks in advance for any help on the matter.
>
> -Jim Munro
> <jimmn@xnet.com>
|
|
Message has 2 Replies: | | Re: Encoder Implemenation questions
|
| (...) No, your conclusion is too broad, simply stated if you don't monitor motor current (and to some extent model the inertia of the motor) in software, then your damping algorithm (which is effectively a constant based on your description) won't (...) (24 years ago, 11-Jan-01, to lugnet.robotics.handyboard)
| | | Re: Encoder Implemenation questions
|
| (...) It certainly helps. I guess I'll stick to my kludge... it's easier. ;) So in order to do effective rotation sensors I need to monitor not only the rotations, but the power applied to the motor as well? That seems fairly complex but I guess (...) (24 years ago, 11-Jan-01, to lugnet.robotics.handyboard)
|
Message is in Reply To:
| | Encoder Implemenation questions
|
| I have contructed a robot that I want to be able to move and position itself accurately. I have encoders (the Hamamatsu P5587) attached to analog inputs 4 & 5 using sencdr4 & 5. I have 24 segment encoders that should give me a resolution of about (...) (24 years ago, 11-Jan-01, to lugnet.robotics.handyboard)
|
6 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|