DPRG List  

[DPRG] PWM vs. voltage motor control

Subject: [DPRG] PWM vs. voltage motor control
From: Clay Timmons ctimmons at cadence.com
Date: Tue Jun 12 14:42:21 CDT 2001

Just wanted to throw in my thoughts on PWM vs. voltage motor control.

I use PWM on Eye Robot with a PWM rate of about 100Hz.  Yes you
can hear the motors buzzing.   I had difficulty getting good speed control
at low RPMs.  Ed Koeffman said that I would get better results with
a higher PWM frequency of say 20Khz.   I tested this by hooking my
bench function generator to a large mosfet driving a motor.  I could vary
the PWM frequency and duty cycle.   I set the PWM to 20Khz but
still found that the motor had virtually no torque at low RPM.

I also took the same motor and hooked it up to the bench power supply.
The 12v motor ran fine down to around 1.5 - 2 volts and it had plenty
of torque!   I was not able to get the low speed torque from PWM
no matter what frequency and duty cycle I tried.

Another thing I noticed is that PWM control is horribly non-linear.
I plotted the motor RPM vs voltage on the power supply.  It
was a nice perfect flat linear response.  Next I plotted motor RPM
vs.  PWM duty cycle from 5-95%.   It was a very steep curve
flatting out to almost level.  Not linear at all.  I spoke with David Anderson
about the non-linearity of PWM.  He confirmed this and said he
uses a look up table to linearize motor speed via PWM.

I also confirmed PWM is no-linear with a quick C code simulation.
I computed the RMS value of a PWM signal from 5-95% duty cycle
and saw the same non-linear response.

Date: Tue, 12 Jun 2001 14:43:21 -0500

I'm thinking of using a pure voltage contoller on my next motor controller.
Critics say that it wastes power.  Well I say...  It only wastes power at
low speeds.  My robot software goes as fast as possible and only
goes slow for fine control.   Thus it would only "waste" power
when slowing down to grab a can, etc.   A bit of power is a reasonable
price to pay for the ability to have control at low speeds.   Besides
robot contests are only a few minutes long.  Who cares how much
power I waste for 5 minutes!


-Clay Timmons-

>From dprglist-admin at nimon.ncc.com  Tue Jun 12 15:01:29 2001
Received: from mta5.rcsntx.swbell.net (mta5.rcsntx.swbell.net [])
	by nimon.ncc.com (8.9.3/8.9.3) with ESMTP id PAA06895
	for <dprglist at dprg.org>; Tue, 12 Jun 2001 15:01:28 -0500
Received: from Mercury ([]) by mta5.rcsntx.swbell.net
 (Sun Internet Mail Server sims.3.5.2000.
 with SMTP id <0GEU00J4R23M8Z at mta5.rcsntx.swbell.net> for dprglist at dprg.org;
 Tue, 12 Jun 2001 14:57:22 -0500 (CDT)
Date: Tue, 12 Jun 2001 14:53:30 -0500
>From: "R. Bickle" <rbickle at swbell.net>
Subject: RE: [DPRG] Researching Robotics Design Tools
In-reply-to: <Pine.GH9.4.30.0106121433570.29876-100000 at beanix.metronet.com>
To: "'Ralph Tenny'" <rten at metronet.com>, "'jeffrey loper'" <jcloper at yahoo.com>
Cc: "'DPRG'" <dprglist at dprg.org>
Message-id: <002101c0f379$5ccc9e40$64df6d0a at Mercury>
MIME-version: 1.0
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0)
Content-type: text/plain; charset="us-ascii"
Content-transfer-encoding: 7bit
Importance: Normal
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
X-Priority: 3 (Normal)

That's a fairy common way to generate a PWM output.
If you have a triangle wave (or a sawtooth) you can compare it with an
adjustable voltage refrence to get a PWM output. Just increase the refrence
voltage to decrease the PWM duty.

I am trying to minimize the part count however, so I'm doing the PWM and the
PID on a single microcontroller.

Rick Bickle

-----Original Message-----
>From: dprglist-admin at dprg.org [mailto:dprglist-admin at dprg.org]On Behalf
Of Ralph Tenny
Sent: Tuesday, June 12, 2001 2:40 PM
To: jeffrey loper
Subject: RE: [DPRG] Researching Robotics Design Tools

PWM from a triangular wave? Very elegant!

On Tue, 12 Jun 2001, jeffrey loper wrote:

> --- "R. Bickle" <rbickle at swbell.net> wrote:
> > I was not planning to run the PWM at anywhere near
> > that speed. I have my
> > system running now at 250Hz. The Motor Mind Module
> > that many people are
> > using runs at 100Hz. Is there any advantage to
> > running the PWM faster for
> > motor control? Seems to me you will just get more
> > MOSFET switching losses in
> > the H bridge.
> >
> > Rick
> >
> >
> The advantage is less velocity ripple about your
> desired speed.  If that is not important (which is
> definately true for hobby projects) then 250Hz is
> fine.  But unless you have a well tuned, high gain
> controller your gonna have some ripple.  That's
> because the motor will slow down slightly when the PWM
> is off and speed back up slightly when it is on for
> any cycle.
> I generally use PIC's for my robot brains and other
> projects.  And they have the nice counter/capture/pwm
> modules that can be set off the base clock (up to
> 20MHz these days).  With them I can use 15KHz PWM
> frequency.
> If your module is all analog then maybe you could
> generate a PWM signal with a comparator between your
> control voltage and a triangle wave oscillator.  That
> will create a square wave based upon your voltage,
> that can then be fed into your H-bridge.
> -Cameron Loper
> =====
> ****
> Jeffrey C. Loper
> jcloper at yahoo.com
> ****
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
> _______________________________________________
> DPRGlist mailing list
> DPRGlist at dprg.org
> http://nimon.ncc.com/mailman/listinfo/dprglist

DPRGlist mailing list
DPRGlist at dprg.org

More information about the DPRG mailing list