Subject:
|
Servo Motor Control
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Mon, 27 Dec 2004 01:39:28 GMT
|
Viewed:
|
971 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
"danny" <daniele_benedettelli@yahoo.it> wrote in message
news:I9BszE.1KF0@lugnet.com...
> In lugnet.robotics, Dick Swan wrote:
> > First "official" version of Mindstorm replacement firmware can now be
> > <<snip>>.
>
> With new timer resolution and fine motor power control, will RCX
> control SERVO
> MOTORS with precision?
> I tried to learn PBforth, but I prefer NQC.
> It would be great!
No. It doesn't appear that it will be possible to directly control a
servo.
Servos are controlled by a single variable width pulse repetitively sent
about every 20 milliseconds. The neutral position is usually 1-msec on
the popular servos. The servo measures the difference in pulse width
from the neutral value. It uses this "difference" value to calculate the
servo position. A quick web search indicates that the usual control
range is from 1 to 2 milliseconds. Without some pretty specific
interrupt support this is simply not possible on the RCX.
I suspose you could build a (simple?) circuit that averaged the motor
output over a time period; 16 msec would give you 32 steps if the PWM
was configured at the 0.5 msec rate. The circuit would use this average
motor output value as a input to a pulse generator to determine the
pulse width. The pulse generator would have to trigger one pulse every
20 msec.
You don't need to use servos. If you've got a rotation sensor and a
spare sensor port, you can get extremely fine position control with the
new firmware. I've got a small PID control demo using the new firmware
using a motor and rotation sensor. The PID program smoothly accelerates
and decelerates the motor to reach any desired rotation count value. It
works without any overshoot! I've geared the rotation sensor 1:5 so
that I get 80 counts per revolution of the main shaft. The motor is
connected to the shaft with 1:1 gearing. I get position accuracy within
one count with the shaft rotating at 5 revolutions per second (i.e. full
motor speed). A practical application would surely gear the shaft down .
I suspect this is far finer resolution than you can get with a SERVO. I
hope to post a video of this soon.
The new firmware does allow very fine control of the motor control
output but the resolution is at 1-msec or (optionally) 0.5 msec range.
It has some currently undocumented features to bypass the PWM software
and set a user supplied bit stream to use on the motor control output.
This bit stream will be output to the appropriate motor control register
|
|
Message has 1 Reply: ![](/news/x.gif) | | Re: Servo Motor Control
|
| (...) Dick, I am very eager to see this! For a long time, I've been trying to do exactly this with limited success. Can you elaborate a bit on what you did code-wise to achieve this? Iain (20 years ago, 29-Dec-04, to lugnet.robotics)
|
Message is in Reply To:
![](/news/x.gif) | | Re: Replacement Firmware Released
|
| (...) With new timer resolution and fine motor power control, will RCX control SERVO MOTORS with precision? I tried to learn PBforth, but I prefer NQC. It would be great! (20 years ago, 26-Dec-04, to lugnet.robotics)
|
25 Messages in This Thread: ![Replacement Firmware Released -Dick Swan (10-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/246.gif) ![Re: Replacement Firmware Released -Philippe Hurbain (10-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Paul Kleniewski (10-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -John Hansen (10-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: Replacement Firmware Released -Mitchell Lichtenberg (11-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: Replacement Firmware Released -Stef Mientki (12-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: Replacement Firmware Released -Ed Parrent (12-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/268.gif) ![Re: Replacement Firmware Released -Mario Ferrari (13-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -lego-robotics@crynwr.com (dan miller) (23-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/246.gif) ![Re: Replacement Firmware Released -Steve Lane (23-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Philippe Hurbain (23-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Dick Swan (23-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/246.gif) ![Re: Replacement Firmware Released -Claude Baumann (24-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Replacement Firmware Released -lego-robotics@crynwr.com (dan miller) (25-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: Replacement Firmware Released -Philippe Hurbain (23-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Dick Swan (23-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/246.gif) ![Re: Replacement Firmware Released -Claude Baumann (24-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Replacement Firmware Released -lego-robotics@crynwr.com (dan miller) (24-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Dick Swan (25-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Steve Lane (25-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![Re: Replacement Firmware Released -Brian Davis (25-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Replacement Firmware Released -Juergen Stuber (23-Dec-04 to lugnet.robotics)](/news/x.gif)
![](/news/x.gif) ![](/news/68.gif) ![Re: Replacement Firmware Released -Daniele Benedettelli (26-Dec-04 to lugnet.robotics)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/46.gif) ![Re: Servo Motor Control -Iain Hendry (29-Dec-04 to lugnet.robotics)](/news/x.gif)
- 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
|
|
|
|