Subject:
|
Re: "Servo" Driver for NQC
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Wed, 30 Jan 2002 03:09:55 GMT
|
Viewed:
|
829 times
|
| |
| |
On Sun, 27 Jan 2002 15:06:28 GMT, "Rebel Transcanner"
<hendryjr@oxford.net> wrote:
> Hi All,
>
> I've got a bit of a problem! Whenever I do a cartesian (or other) robot
> model, I typically (in NQC) will program a "driver" which can spin the
> motors with the rotation sensors to any position and delecerate to finely
> reach the destination. However, I've not been able to do this ever very
> smoothly.
>
> Has anyone done something similar?
>
> I'm changing a variable in the main task (like, xPos or yPos or similar),
> and the "servo" task will note the difference between it's actual position
> and the desired position. It'll spin the motor in the direction it should
> go, and when it gets within a certain number of counts on the rotation
> sensor, jumps to a slow speed by pulsing the motor (on, wait 1, off, wait
> 1).
> Anyway, I'm just anxious to see if anyone else has ever done something
> similar, because with a robot I'm working on for an upcoming competition,
> the method of control I just mentioned is far too "jumpy" and causes my
> robot to vibrate, shake, and spring all over.
Well I haven't seen your version of the Project-X design, but I'll
assume it's similar (albeit vastly inferior) to the one I'm entering.
I'm assuming that for the sake of speed, you are keeping moving mass
to a minimum and hence, not loading the motors very much. The problem
is that when you apply power to the motor, even breifly, the motor
will apply torque to the gear and, because it isn't loaded (much) will
result in a rapid accelleration. Ironically, this is actually what you
wan't to do to control the motor. Several years ago I built a
controller for an N scale train set where I used a pulse width
modulation technique (which is what you're describing) to drive the
engines around. This system works very well, but the frequency must be
fairly high. If you slow the frequency down considerably you get
exactly what you described - jerky on-off motion. I'm somewhat of the
opinion that the NQC doesn't allow you to toggle the power fast enough
to make the motion smooth. The 50% duty cycle you describe would work
if the frequency were higher. I've been giving serious consideration
to using assembler to program the RCX in order to give me the control
over the output's frequency and duty cycle that I require. The bottom
line is, I'm having the same problem as you are.
See you on the 24th!
Matthias Jetleb
|
|
Message has 2 Replies: | | Re: "Servo" Driver for NQC
|
| (...) But it doesn't need to. The 'power' settings built into the RCX firmware are already using pulse-width modulation to adjust the amount of power the motor delivers. ---...--- Steve Baker ---...--- Mail : <sjbaker1@airmail.net> WorkMail: (...) (23 years ago, 29-Jan-02, to lugnet.robotics)
| | | Re: "Servo" Driver for NQC
|
| "Matthias Jetleb" <Jetleb@Netcom.ca> wrote in message news:3c5763f6.195969...net.com... (...) Ooooooooo, someone else is actually NOT doing a gantry? ;) (...) The mass is at a minumum, but due to the size fo the robot to get the required work (...) (23 years ago, 30-Jan-02, to lugnet.robotics, lugnet.org.ca.rtltoronto)
|
Message is in Reply To:
| | "Servo" Driver for NQC
|
| Hi All, I've got a bit of a problem! Whenever I do a cartesian (or other) robot model, I typically (in NQC) will program a "driver" which can spin the motors with the rotation sensors to any position and delecerate to finely reach the destination. (...) (23 years ago, 27-Jan-02, to lugnet.robotics)
|
18 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
|
|
|
|