Motor Velocity Control [very long]
I am looking for some help on achieving motor velocity control from modified
R/C servo motors.
I am building a mini sumo robot where I need motor speed control between 0.1
rev/sec to 1.5 rev/sec. I am using standard R/C servo motors modified for
continuous rotation. At 6V they rotate at approximately 1 rev/sec. For
those out there that is interesed, the internal gear reduction of these R/C
servo motors is exactly 68/16933. Thus for a 1 rev/sec output, the internal
DC motor is rotating at 249 rev/sec or approximately 15,000 rpm.
Before responding read on,
The first thing I attempted was the classic R/C servo modification. There
are basically two different ways to do this. One, remove the 5k pot and
replace with two 2.7k resistors. The other, cut off the shaft to the 5k pot
after the motor rotation stops when a 1.5 ms pulse is sent to it (updated on
a 50 to 60 hz basis).
I have done both of these methods, and they both work just fine. I have
done them to Futaba, Tower Hobbies, and Hitec standard R/C servos.
The general belief about the above methods are that as the pulse width
continues to deviate from the centered 1.5 ms pulse width, the faster the
motor will turn. Pulse widths above 1.5 ms the motor turns one direction,
pulse widths below the motor turns the opposite direction. My experiments
have shown that the speed variation control is in a very narrow band around
1.5 ms. My tests have shown that the motors are at near maximum speeds when
the pulse width is outside +/- 0.2 ms from the centered 1.5 ms non rotating
case. Thus out of the whole 0.7 ms to 2.3 ms pulse width range, the motor
speed has only a 0.4 ms range control or about 25% of the total range can be
applied to controlling the speed. Not very good.
Since the speed control range is very narrow and sensitive the the pulse
width values, I decided to abandon this method.
Since on these list groups, PWM is constantly mentioned for motor control, I
decided to try this method. Since a Basic Stamp can not be used to
continually output a PWM signal (and do anything else) I began my quest for
speed control using the Motor Mind B modules from Solutions Cubed. Very
nice module, lots of neat features. They take a serial command as input and
will output a PWM motor control signal. It had the built in h-bridges for
driving the motors.
In order to use the Motor Mind B, I had to remove all of the internal
electronics from the R/C servo motors. Thus they are now just a DC gear
motor. The 1.5 ms pulse width commands will not work with them any more.
When hooked up to the Motor Mind B, the motor turns as commanded from serial
instructions from the stamp. I can control forward, reverse, breaking, and
change the speed of the motor.
After running a bunch of tests, I discovered that motor speed changes only
occured when the PWM duty cycle changed from 0 to about 30%. Any Duty cycle
above this resulted in the motor running a maximum speed. Not very speed
resolution. Though the speed did not change from 30% duty cycle to 100%
duty cycle, the torque did increase. This was puzzling since torque and
speed are linked together. Also, the measured current draw increased as the
PWM duty cycle increased.
After several discussions with Solutions Cubed, I figured that the PWM
frequency of 65 Hz on the Motor Mind B is not sufficient to drive the servo
motors. Thus I moved onto the L293D for the H-Bridge.
At this point I made a dedicated PWM PIC. The PWM frequency is about 1 kHz,
and the duty cycle can be changed from 0 to 100%. The output from the PIC
has been verified on an oscope, so I know it is working correctly. When
hooked up to the L293D and motor, the motor speed does change with different
PWM duty cycles, direction is also controlable.
I can either hook this up as a sign magnitude PWM controller, or add an
inverter I can hook it up as a locked-anti-phase controller. Done both of
them. The problem I have been having from day one is still present, the
speed control range is in the first 30% of the PWM duty cycle range.
Anything past it, the motor is running at max speed. Also, torque increases
as the PWM signal increases.
I get the same type of results if I use a 6V, 9V, 12V, and 18V power
supplies. Speed control only occurs in the first 30% of the PWM duty
cycles. The only difference is that the max speed is faster with the higher
voltages.
An interesting thing observed a 12 V PWM duty cycle of 18% results in the
same motor speed as a 6V PWM duty cycle of 100%. I am measuring the actual
speed of the motors.
I have tried different PWM frequencies from 65 Hz to 2 kHz, and get the same
type of results.
Hopefully the above is usefull for other people trying to do the same thing
I am trying to do.
Now, I still need to figure out the speed control. I am beginning the think
that the motors that are inside these R/C servo motors are not that capable
of variable speed control. In catalogs I see motors spec'ed at say 12V,
and I also see motors spec'ed at 6V - 12V. Why the difference? Are some
motors capable of variable speeds and others are not. I am not an expert on
how the windings, internal resistance, inductance, magnetic fields, and
inertia issues. But I am wondering if all of these things have an effect on
whether a motor really have variable speed control.
The other thing I am wondering is if the L293D or other type H-Bridges just
don't work with low voltage motors.
I am considering on using an op-amp for the variable voltage output. Where
I feed in the PWM signal into to op-amp, the output with or with out an R-C
circuit to make a smooth (semi-smooth) voltage to drive the motors.
Question here is how much current can these op-amps handle. I have measured
current draws of about 700 ma with a stalled motor. In mini sumo, you can
expect to see the motors stall from time to time.
This is a bit on the long side, hopefully this is clear enough to explain
what I am up to.
Pete Miles
petem@w...
R/C servo motors.
I am building a mini sumo robot where I need motor speed control between 0.1
rev/sec to 1.5 rev/sec. I am using standard R/C servo motors modified for
continuous rotation. At 6V they rotate at approximately 1 rev/sec. For
those out there that is interesed, the internal gear reduction of these R/C
servo motors is exactly 68/16933. Thus for a 1 rev/sec output, the internal
DC motor is rotating at 249 rev/sec or approximately 15,000 rpm.
Before responding read on,
The first thing I attempted was the classic R/C servo modification. There
are basically two different ways to do this. One, remove the 5k pot and
replace with two 2.7k resistors. The other, cut off the shaft to the 5k pot
after the motor rotation stops when a 1.5 ms pulse is sent to it (updated on
a 50 to 60 hz basis).
I have done both of these methods, and they both work just fine. I have
done them to Futaba, Tower Hobbies, and Hitec standard R/C servos.
The general belief about the above methods are that as the pulse width
continues to deviate from the centered 1.5 ms pulse width, the faster the
motor will turn. Pulse widths above 1.5 ms the motor turns one direction,
pulse widths below the motor turns the opposite direction. My experiments
have shown that the speed variation control is in a very narrow band around
1.5 ms. My tests have shown that the motors are at near maximum speeds when
the pulse width is outside +/- 0.2 ms from the centered 1.5 ms non rotating
case. Thus out of the whole 0.7 ms to 2.3 ms pulse width range, the motor
speed has only a 0.4 ms range control or about 25% of the total range can be
applied to controlling the speed. Not very good.
Since the speed control range is very narrow and sensitive the the pulse
width values, I decided to abandon this method.
Since on these list groups, PWM is constantly mentioned for motor control, I
decided to try this method. Since a Basic Stamp can not be used to
continually output a PWM signal (and do anything else) I began my quest for
speed control using the Motor Mind B modules from Solutions Cubed. Very
nice module, lots of neat features. They take a serial command as input and
will output a PWM motor control signal. It had the built in h-bridges for
driving the motors.
In order to use the Motor Mind B, I had to remove all of the internal
electronics from the R/C servo motors. Thus they are now just a DC gear
motor. The 1.5 ms pulse width commands will not work with them any more.
When hooked up to the Motor Mind B, the motor turns as commanded from serial
instructions from the stamp. I can control forward, reverse, breaking, and
change the speed of the motor.
After running a bunch of tests, I discovered that motor speed changes only
occured when the PWM duty cycle changed from 0 to about 30%. Any Duty cycle
above this resulted in the motor running a maximum speed. Not very speed
resolution. Though the speed did not change from 30% duty cycle to 100%
duty cycle, the torque did increase. This was puzzling since torque and
speed are linked together. Also, the measured current draw increased as the
PWM duty cycle increased.
After several discussions with Solutions Cubed, I figured that the PWM
frequency of 65 Hz on the Motor Mind B is not sufficient to drive the servo
motors. Thus I moved onto the L293D for the H-Bridge.
At this point I made a dedicated PWM PIC. The PWM frequency is about 1 kHz,
and the duty cycle can be changed from 0 to 100%. The output from the PIC
has been verified on an oscope, so I know it is working correctly. When
hooked up to the L293D and motor, the motor speed does change with different
PWM duty cycles, direction is also controlable.
I can either hook this up as a sign magnitude PWM controller, or add an
inverter I can hook it up as a locked-anti-phase controller. Done both of
them. The problem I have been having from day one is still present, the
speed control range is in the first 30% of the PWM duty cycle range.
Anything past it, the motor is running at max speed. Also, torque increases
as the PWM signal increases.
I get the same type of results if I use a 6V, 9V, 12V, and 18V power
supplies. Speed control only occurs in the first 30% of the PWM duty
cycles. The only difference is that the max speed is faster with the higher
voltages.
An interesting thing observed a 12 V PWM duty cycle of 18% results in the
same motor speed as a 6V PWM duty cycle of 100%. I am measuring the actual
speed of the motors.
I have tried different PWM frequencies from 65 Hz to 2 kHz, and get the same
type of results.
Hopefully the above is usefull for other people trying to do the same thing
I am trying to do.
Now, I still need to figure out the speed control. I am beginning the think
that the motors that are inside these R/C servo motors are not that capable
of variable speed control. In catalogs I see motors spec'ed at say 12V,
and I also see motors spec'ed at 6V - 12V. Why the difference? Are some
motors capable of variable speeds and others are not. I am not an expert on
how the windings, internal resistance, inductance, magnetic fields, and
inertia issues. But I am wondering if all of these things have an effect on
whether a motor really have variable speed control.
The other thing I am wondering is if the L293D or other type H-Bridges just
don't work with low voltage motors.
I am considering on using an op-amp for the variable voltage output. Where
I feed in the PWM signal into to op-amp, the output with or with out an R-C
circuit to make a smooth (semi-smooth) voltage to drive the motors.
Question here is how much current can these op-amps handle. I have measured
current draws of about 700 ma with a stalled motor. In mini sumo, you can
expect to see the motors stall from time to time.
This is a bit on the long side, hopefully this is clear enough to explain
what I am up to.
Pete Miles
petem@w...
Comments
I bet your motors are magnetically saturating at the point that the speed
levels out. If you monitor the input current with no load, and gradually
increase input voltage, the input current should rise slowly. If it hits a
point where input current starts to rise rapidly, it is saturating. Input
current rises because the motor can no longer generate a back EMF to match
the applied voltage, (minus IR armature drop). I have played with model RR
motors, (N-scale & HO), and found that quality units like those by Kato have
low armature resistance and enough iron in the magnetic path to give a large
speed range, but they want ~$25 for replacement motors.
Perhaps servo motors have little excess iron because they don't need it in
normal use. Maybe Dennis Clark or someone on the list can suggest a
different motor at a cheap price.
Just a suggestion,
Ray McArthur
Original Message
From: Pete Miles <petem@w...>
To: <basicstamps@egroups.com>; 'SRS' <srs@s...>;
<stamps@p...>
Sent: Tuesday, April 25, 2000 5:19 PM
Subject: [noparse][[/noparse]basicstamps] Motor Velocity Control [noparse][[/noparse]very long]
> I am looking for some help on achieving motor velocity control from
modified
> R/C servo motors.
> I am looking for some help on achieving motor velocity control from
modified R/C servo motors.
We have been using PWM with model railroad locomotives for some time
and it seems to work very well, giving a linear response (at least
visually - I haven't measured it) across the whole range. Our system
uses the Allegro 2998 dual bridge at 12-16 volts with a PWM frequency
of 100 Hz.
The thing to keep in mind about model airplane servos is that they
are designed act as error correcting systems, bringing the servo to
the commanded position as quickly as possible. Therefore the
characteristics desired in a motor are to move as fast as possible on
the smallest amount of error signal. Linearity is actually a
detriment in this application. The servo amplifiers actually stretch
the smallest error signal to get more power (e.g a wider pulse) to
the motor quickly - that's why they are not suitable for anything
except on/off control. Except for needing some damping to keep the
servo from "hunting" when it is very close to the desired position,
ideally you'd want full voltage to the motor to result from the
slightest deviation from the 1.5 ms center pulse width.
I don't know a great deal about motor characteristics either, but if
I had a choice of motors to use in a servo, my choice would have the
exact opposite characteristics from what I would use for nice smooth
speed control.
An area where there is a great body of expertise on motor speed
controls is the electric model airplane and model car motor control
systems. However, I'm not sure how you would tap into that expertise
to help you with what you're trying to do, short of buying
commercially available controls, which may be too expensive to
consider for your application.
Chuck Davis