Motor Velocity Control (Update)
Well, I received lots of comments on the PWM velocity control of gutted R/C
servo motors that now just a plain ole gear motor. For those who are
interested, the motors I am currently playing around with are Tower Hobbies
TS-53 servo motors. They are about $10 each (U.S. funds).
Last night I ran a test I should have done a long time ago. I removed the
entire PWM circuit and tested the motors with regular batteries. I hooked
up the motor to 1, 2, 3, and 4 AA battery cell packs, and measured the
velocity of the motor. Well, guess what, just like all of the books say,
the speed was proportional to the applied voltage.
So, this result removed the question whether the motor had variable speed
capability or not.
So the next question was how to get the PWM method to work. I have heard
comments about PWM should be run at low frequencies or high frequencies. My
original PWM circuit operated at 400 Hz. This wasn't working, so I ran a
several tests by varying the PWM frequency. The frequencies tested was 400,
800, 1600, 2400, 4000, and 8000 Hz. Which each of the frequencies, I
measured the motor velocity with 100%, 80%, 60%, 50%, 40%, and 20% duty
cycles. The results were very interesting. Remember my original post that
the motor speed response range was very short, and that the motor ran at
near max speed for most of the duty cycles, well that was at a 400 Hz PWM
frequency. The results from my tests showed that as the PWM frequency
increased the closer the plot lines approached the famous "speed is
proportional to the applied voltage" line. At 4,000 Hz, the various PWM
duty cycles was very close to the different battery cases. But at 8,000 Hz,
it became worse that the 400 Hz case.
So, for these particular motors, it looks like the near optimal PWM
frequency should be around 4,000 Hz.
I have received a couple comments that there is a motor dependence with PWM
frequencies. I guess I had to learn this little fact the hard way.
Now it is time for me to implement the closed loop portion of the speed
control.
I am hoping the problems I have had, and are going through, on this motor
speed contol will be helpfull two others trying to do the same type of stuff
I have been trying to do.
Pete Miles
petem@w...
servo motors that now just a plain ole gear motor. For those who are
interested, the motors I am currently playing around with are Tower Hobbies
TS-53 servo motors. They are about $10 each (U.S. funds).
Last night I ran a test I should have done a long time ago. I removed the
entire PWM circuit and tested the motors with regular batteries. I hooked
up the motor to 1, 2, 3, and 4 AA battery cell packs, and measured the
velocity of the motor. Well, guess what, just like all of the books say,
the speed was proportional to the applied voltage.
So, this result removed the question whether the motor had variable speed
capability or not.
So the next question was how to get the PWM method to work. I have heard
comments about PWM should be run at low frequencies or high frequencies. My
original PWM circuit operated at 400 Hz. This wasn't working, so I ran a
several tests by varying the PWM frequency. The frequencies tested was 400,
800, 1600, 2400, 4000, and 8000 Hz. Which each of the frequencies, I
measured the motor velocity with 100%, 80%, 60%, 50%, 40%, and 20% duty
cycles. The results were very interesting. Remember my original post that
the motor speed response range was very short, and that the motor ran at
near max speed for most of the duty cycles, well that was at a 400 Hz PWM
frequency. The results from my tests showed that as the PWM frequency
increased the closer the plot lines approached the famous "speed is
proportional to the applied voltage" line. At 4,000 Hz, the various PWM
duty cycles was very close to the different battery cases. But at 8,000 Hz,
it became worse that the 400 Hz case.
So, for these particular motors, it looks like the near optimal PWM
frequency should be around 4,000 Hz.
I have received a couple comments that there is a motor dependence with PWM
frequencies. I guess I had to learn this little fact the hard way.
Now it is time for me to implement the closed loop portion of the speed
control.
I am hoping the problems I have had, and are going through, on this motor
speed contol will be helpfull two others trying to do the same type of stuff
I have been trying to do.
Pete Miles
petem@w...
Comments
So what characteristics in particular decide which pwm frequency to use for a
given
motor? Thanks for sharing your work!
Bill Katakis
Pete Miles wrote:
> Well, I received lots of comments on the PWM velocity control of gutted R/C
> servo motors that now just a plain ole gear motor. For those who are
> interested, the motors I am currently playing around with are Tower Hobbies
> TS-53 servo motors. They are about $10 each (U.S. funds).
>
> Last night I ran a test I should have done a long time ago. I removed the
> entire PWM circuit and tested the motors with regular batteries. I hooked
> up the motor to 1, 2, 3, and 4 AA battery cell packs, and measured the
> velocity of the motor. Well, guess what, just like all of the books say,
> the speed was proportional to the applied voltage.
>
> So, this result removed the question whether the motor had variable speed
> capability or not.
>
> So the next question was how to get the PWM method to work. I have heard
> comments about PWM should be run at low frequencies or high frequencies. My
> original PWM circuit operated at 400 Hz. This wasn't working, so I ran a
> several tests by varying the PWM frequency. The frequencies tested was 400,
> 800, 1600, 2400, 4000, and 8000 Hz. Which each of the frequencies, I
> measured the motor velocity with 100%, 80%, 60%, 50%, 40%, and 20% duty
> cycles. The results were very interesting. Remember my original post that
> the motor speed response range was very short, and that the motor ran at
> near max speed for most of the duty cycles, well that was at a 400 Hz PWM
> frequency. The results from my tests showed that as the PWM frequency
> increased the closer the plot lines approached the famous "speed is
> proportional to the applied voltage" line. At 4,000 Hz, the various PWM
> duty cycles was very close to the different battery cases. But at 8,000 Hz,
> it became worse that the 400 Hz case.
>
> So, for these particular motors, it looks like the near optimal PWM
> frequency should be around 4,000 Hz.
>
> I have received a couple comments that there is a motor dependence with PWM
> frequencies. I guess I had to learn this little fact the hard way.
>
> Now it is time for me to implement the closed loop portion of the speed
> control.
>
> I am hoping the problems I have had, and are going through, on this motor
> speed contol will be helpfull two others trying to do the same type of stuff
> I have been trying to do.
>
> Pete Miles
> petem@w...
Your results disproved my "saturation" theory, but what you observed seems
weird. I wonder if there is something going on between the motor inductance
and your driver circuit. Wayne Roderick runs his model trains at 40 pps
using a transistor H-bridge. He is using the pulsout command since he said
it worked better. If you are so inclined, would you describe your driver
circuit?
Thanks,
Ray McArthur
Original Message
From: Pete Miles <petem@w...>
To: <basicstamps@egroups.com>; <stamps@p...>;
<srs@s...>
Sent: Thursday, April 27, 2000 9:41 PM
Subject: [noparse][[/noparse]basicstamps] Motor Velocity Control (Update)
> So, for these particular motors, it looks like the near optimal PWM
> frequency should be around 4,000 Hz.
> Pete Miles
> petem@w...
I believe that there is more to driving motors than what most people know.
I have hear many comments from many different people about different way to
run the motors. I did get one comment that I find interesting is that each
motor has a unique motor PWm frequency range it operates well in. I am
beginning to believe this since some people talk about 65 Hz is all you
need, others talk about 20 kHz is what you need.
The h-bridge circuit I am using is a L293D dual h-bridge chip. It has the
builtin transistors. The L293D has the flyback diodes in the chip to
protect the chip from kick back voltages from the motor.
The wiring is simple on these. The 1Y and 2Y (pins 3 and 6) are wired
directly to the motor. The 1A and 2A (pins 2 and 7) are the motor direction
select lines (typical h-bridge setup). Pin 1, the 1,2EN line, is the line
that enables the motor. It is this line that the PWM signal comes into.
Pin 8 is the motor V+ line. Pins 4,5,12,and 13 are ground pins. Pin 16 is
the Vdd pin for the L293D. The other pins not described run the second
h-bridge on this chip.
Hope this helps.
Pete Miles
petem@w...
>
> From: rjmca[noparse]/noparse]SMTP:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=UNAFwe9TUuSD0LT7O3EvrkxcRZMO6QQi93IDNICIwipzNO5XamZQiR1xRKZdU0M4Mk68qi6mUDM6K8_J]rjmca@w...[/url
> Reply To: basicstamps@egroups.com
> Sent: Friday, April 28, 2000 2:36 PM
> To: basicstamps@egroups.com
> Subject: Re: [noparse][[/noparse]basicstamps] Motor Velocity Control (Update)
>
> Pete:
> Your results disproved my "saturation" theory, but what you observed seems
> weird. I wonder if there is something going on between the motor
> inductance
> and your driver circuit. Wayne Roderick runs his model trains at 40 pps
> using a transistor H-bridge. He is using the pulsout command since he
> said
> it worked better. If you are so inclined, would you describe your driver
> circuit?
>
> Thanks,
> Ray McArthur
>
>
Original Message
> From: Pete Miles <petem@w...>
> To: <basicstamps@egroups.com>; <stamps@p...>;
> <srs@s...>
> Sent: Thursday, April 27, 2000 9:41 PM
> Subject: [noparse][[/noparse]basicstamps] Motor Velocity Control (Update)
>
> > So, for these particular motors, it looks like the near optimal PWM
> > frequency should be around 4,000 Hz.
> > Pete Miles
> > petem@w...
>
>
>
>
>
Thanks for the reply. Your circuit looks simple and foolproof, but I still
think there is "weirdness" here. When I just looked at the TI datasheet for
the L293D, I couldn't find a spec for enable/disable times. The Stamp
manual says that PWM output is a "random" switching waveform with only the
overall duty cycle guaranteed. Today's guess is that maybe the PWM random
switching times are sometimes too fast for the L293 enable/disable,
depending on the PWM frequency? Maybe this is why Wayne said that Pulsout
worked better on his model RR speed control?
Ray McArthur
Original Message
From: Pete Miles <petem@w...>
To: <basicstamps@egroups.com>
Sent: Friday, April 28, 2000 7:07 PM
Subject: RE: [noparse][[/noparse]basicstamps] Motor Velocity Control (Update)
> Ray,
>
> I believe that there is more to driving motors than what most people know.
> I have hear many comments from many different people about different way
to
> run the motors. I did get one comment that I find interesting is that
each
> motor has a unique motor PWm frequency range it operates well in. I am
> beginning to believe this since some people talk about 65 Hz is all you
> need, others talk about 20 kHz is what you need.
>
> The h-bridge circuit I am using is a L293D dual h-bridge chip. It has the
> builtin transistors. The L293D has the flyback diodes in the chip to
> protect the chip from kick back voltages from the motor.
>
> The wiring is simple on these. The 1Y and 2Y (pins 3 and 6) are wired
> directly to the motor. The 1A and 2A (pins 2 and 7) are the motor
direction
> select lines (typical h-bridge setup). Pin 1, the 1,2EN line, is the line
> that enables the motor. It is this line that the PWM signal comes into.
> Pin 8 is the motor V+ line. Pins 4,5,12,and 13 are ground pins. Pin 16
is
> the Vdd pin for the L293D. The other pins not described run the second
> h-bridge on this chip.
>
> Hope this helps.
>
> Pete Miles