Subject:
|
RE: r/c servos and firmware
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Fri, 20 Aug 1999 22:03:14 GMT
|
Viewed:
|
1271 times
|
| |
| |
Ok, Here's my 2 cents on servos...read to the bottom if you are
interested in helping to develop the code for this.
The servo takes a 60Hz (approx) pulse width signal between 1 and 2 msec
The pulses are fed into a little circuit that generates an analog level
that is used in a comparator whose other input comes from a pot on the
output arm of the servo. A standard servo has three wires, two for
power and the third is for the pulses. We could connect a standard
servo right to the battery pack and then use the RCX motor output as
the pulse signal...
The 1 msec pulse corresponds to one end of the limit of rotation, and the
2 msec pulse is the other end. 1.5 msec is about the "center" of the limits.
So far so good. The reason for the "trim tabs" on RC transmitters is that
from one servo to the next, you will get some variations in the actual
output angle for a particular setting. Remember, the standard servos are
pretty low cost items.
In order to get the RCX to do anything useful, we need a way to program
one of the timers to interrupt in useful increments of 1 msec. In other
words:
1. Once every 60 msec figure out how long the pulse width should be.
2. Turn on the output
3. Program a timer to run between 1 and 2 msec. in ? steps
4. Turn off the output when the timer ISR is hit.
This is impossible with the basic RCX firmware, difficult with pbFORTH (because
I'd have to make a special word), and difficult with LegOS for the same reason.
Off the top of my head, I know one timer is used for the IR modulation, and the OC1A
timer is used for the RCX firmware loop. If I can figure out how to use OC2 (and it's
pretty similar to the HC11 timers) then I could write a little word for
pbFORTH that gives you a servo compatible output on the RCX. In fact, since the
pulse rate is about 60 msec and the pulses are only 2 msec max, we could handle the
pulses on all three outputs!!!
Is there much interest in this? I'm asking because I can do it, but if it means
using non-Lego parts, then most builders would balk at it. On the other hand, wouldn't
it be nice if LEGO actually picked up on this and made servos? NAH...
Cheers,
Ralph Hempel - P.Eng
--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to: rhempel at bmts dot com
--------------------------------------------------------
|
|
Message has 1 Reply: | | Re: r/c servos and firmware
|
| (...) Okay! Finally I got it! (-: It sounds to me like servos can't rotate continuously in the same direction. In other words, they're good for steering but not for turning the wheels that make the car go. Is that right? Anyway, having heard that (...) (25 years ago, 20-Aug-99, to lugnet.robotics)
|
Message is in Reply To:
| | Re: r/c servos
|
| (...) That doesn't make sense either. If a single step of 2.0 ms causes 180 degrees of rotation, then how does 45 steps allow you to control it 5 degrees at a time? (...) Are you saying that the servo actually operates in steps of one degree each? (...) (25 years ago, 20-Aug-99, to lugnet.robotics)
|
20 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
|
|
|
Active threads in Robotics
|
|
|
|