[sci.electronics] Variable speed motor control ... need help.

lampman@heurikon.UUCP (Ray Lampman) (01/05/89)

I need a circuit that will provide variable speed control of a DC motor. The
operator control should be via some device with a knob attached. Would this
be a variable resister? The control should be roughly linear, let me explain.

         +               o
         |             /        When the control knob is set half way between
control  |           /          minimum and maximum, the motor should run at a
setting  |         o            rate half way between the rate at the minimum
         |       /              knob setting and the maximum knob setting.
         |     /
         +   o

             +-----------+
               motor rate

I have an appropiate DC power supply for the system. Should I be able to locate
parts for this circuit at a Radio Shack store? Thanks for any help you may give.
-- 
I am seriously considering a career on  | Ray Lampman (608) 276-3431
the beach. I'll need a microwave modem, | Madison Wisconsin USA Earth
solar power supply, and a little shade. | {husc6,rutgers}!uwvax!heurikon!lampman

larry@kitty.UUCP (Larry Lippman) (01/06/89)

In article <288@heurikon.UUCP>, lampman@heurikon.UUCP (Ray Lampman) writes:
> I need a circuit that will provide variable speed control of a DC motor. The
> operator control should be via some device with a knob attached. Would this
> be a variable resister? The control should be roughly linear, let me explain.
> 
>          |             /     When the control knob is set half way between
> control  |           /       minimum and maximum, the motor should run at a
> setting  |         o         rate half way between the rate at the minimum
>          |       /           knob setting and the maximum knob setting.

	In general, with either a series or shunt wound DC motor, using just
a variable resistor you don't have a prayer of a chance of achieving a linear
transfer function between the control setting and effective RPM - even at
no load.  Loading the motor makes the matter significantly worse.  Of course,
you could always have a custom-wound non-linear variable resistor :-) - but
this is not what you are seeking.

	Now, if the DC motor is permanent magnet or has a field winding that
is separately excited at constant current, the transfer function between
a linear variable resistor setting and effective RPM gets "straighter" -
but by no means is it perfectly linear.  Should there be any change in
load upon the motor, this transfer function will go to hell in a handbasket
real quick-like. :-)

	Unfortunately, it is really not possible to achieve the _linear_
relationship which you seek without having an electronic motor control
circuit that utilizes feedback through back-EMF sensing and/or a tachometer
measurement.  Such motor control circuits are not that complex, but they
are going to require transistor or SCR control.  Under these circumstances,
the variable resistor would be a 3-terminal voltage divider providing
only a low-current control voltage to the motor control circuit, say,
0 to 10 volts for 0 to full RPM.  Even under these circumstances the
transfer function will not be perfectly linear - but you can get it pretty
straight with clever circuit design.

	Now as to a source for an appropriate circuit, I would suggest
perusing application manuals from semiconductor manufacturers such as
National, RCA, Signetics, etc.

> I have an appropiate DC power supply for the system. Should I be able to
> locate parts for this circuit at a Radio Shack store?

	Yes, believe it or not. :-)

<>  Larry Lippman @ Recognition Research Corp., Clarence, New York
<>  UUCP:  {allegra|ames|boulder|decvax|rutgers|watmath}!sunybcs!kitty!larry
<>  VOICE: 716/688-1231          {att|hplabs|mtune|utzoo|uunet}!/
<>  FAX:   716/741-9635 {G1,G2,G3 modes}   "Have you hugged your cat today?" 

stu@hpficad.HP.COM (Stu Bell) (01/10/89)

> I need a circuit that will provide variable speed control of a DC motor. The
> operator control should be via some device with a knob attached. Would this
> be a variable resister? The control should be roughly linear, let me explain.

I use the circuit below for model trains (I have left out the direction
switches):

                 3A rectifier		

                    |\ |
    +12-15V >-------| >|---------+---------------------+-----------+
		    |/ |         |                     |           |
				 |                    ---      ---------
				 |          3A         ^       | motor |
				 |       rectifier    / \      ---------
				 |                    ---          |
				 |                     |           |
				/             /--------+-----------+
				\            / 
				 \          /  (Emitter)
				  \       |< 
			1K Pot    /<------|   PNP, 3A General Purpose
				 /        |\       (WITH HEAT SINK!)
				/           \ 
				\            \
				 \            \
				  \            |
				  /            |
				 |             |
				 |             |
   Ground   <--------------------+-------------+

This gives a roughly linear relationship between knob position and motor RPM.
Matching the "halfway" points depends on what motor you are using.  If you
insist on the "halfway" criterion, or if you want STRICTLY linear operations,
you probably will have to follow Larry Lippman's advice.  However, you might
want to experiment with this first.

By the way, you didn't say how much current the motor takes -- for small "can"
motors, 500 mA is more than enough; for larger motors, 2-3A (or more!) could be
used.  You probably should experiment with an ammeter to see how much you're
using.  This design is good for most SMALL DC motors.

All parts are available from Radio Shack, but if you buy from them you're on
your own :-).

Make sure you heat sink the PNP transistor -- If you are pulling a couple of
amps through the motor at ~10 volts, the PNP will be dissipating 20 Watts!
This is plenty enough to get (VERY!) warm.

E-mail me if you have more questions.

Stu Bell
HP Colorado "Chips 'R' Us" Division

Disclaimer: The above circuit may have been generated by line noise.  HP
certainly knows nothing about it.  In fact, >I< may know nothing about it, or
what is said here.  Don't sue me, please!

rsd@sei.cmu.edu (Richard S D'Ippolito) (01/11/89)

In article <15880003@hpficad.HP.COM> stu@hpficad.HP.COM (Stu Bell) writes:

>I use the circuit below for model trains (I have left out the direction
>switches):
>
> [deleted]
>
>Make sure you heat sink the PNP transistor -- If you are pulling a couple of
>amps through the motor at ~10 volts, the PNP will be dissipating 20 Watts!
>This is plenty enough to get (VERY!) warm.

Nope.  The motor will -- the transistor sees only the difference between the
supply voltage and the motor voltage. Maximum dissipation occurs when both
the motor and transistor see v_supply/2.


Rich
--

---------------------------------------------------------------------------
You can lead a horse to water,                              RSD@sei.cmu.edu
but you can't make him fish.
---------------------------------------------------------------------------

ld@hpirs.HP.COM (Larry Dwyer) (01/11/89)

The Pulse Width Modulator (PWM) also has the advantage that it overcomes
Sliding Friction.  An example of Sliding Friction is obvious in the
following graph (which I lifted from my Physics notes):

       ^
    friction
         Fs __|                                                      
              | \                                                    
              |   \                                                  
              |     \                                                
         Fk __|       \________________________________              
              |                                                      
              |                                                      
              |                                                      
              |                                                      
              |                                                      
              |                                                      
              |________________________________________                                                      
                           velocity >                                
                                                                     
 	Fs = static friction
	Fk = kinetic friction

This friction is noticeable when one is trying to start a "classic" DC
motor at low RPM.  The motor will not start as the voltage is applied,
then it suddenly springs to a higher RPM than the operator intended.
After the static friction is overcome, the motor operates linearly (I
know, part of this friction is caused by the position of the rotor and
the residual internal magnetic fields that tend to keep the shaft in
place plus a number of other factors I probably don't know about).

Since a PWM kicks the motor with the full voltage, if only for a very
short duration during low RPM operation, the kick overcomes the static
friction in the motor (and the rest of the transmission system).

Another advantage is that the transistor which is switching the
voltage on and off need not be of as high a power rating as one
which is acting as a variable voltage divider.  It is either on
(low voltage, high current) or off (high voltage, no current).
This is why switching regulators are more efficient than linear
series regulators.

A disadvantage that has been reported to me is that a PWM is rough on
some kinds of DC motors.  At the very least, it requires limiting diodes
to shunt the back EMF when the current is removed during the off cycle.

PWM's are available for model railroad use (generally 12-18 volt systems).

A PWM can be built with a dual LM555 (or equiv.), a transistor for
driving the motor and one to isolate the modulation input to the LM555,
some resistors, some capacitors, a potentiometer and diodes for
kick-back.  The configuration for the LM555 can be ascertained in any
good product guide for that IC.  The rest of the components depend upon
the specifics of the motor to be driven (voltage, current, etc.).
All of these can be purchased at Radio Shack.  If the requester of this
response needs information about how to design such a circuit, I suggest
he contact the responders directly (the schematic is too difficult to
enter here but simple enough to be build by a hobbiest).

Don't forget a current limit circuit if you are going to use this on a
model railroad.  Someone may inadvertently place a small screwdriver on the
tracks and bask in the glow of molten metal.

		Larry Dwyer

Disclaimer: The statements made here are those of an individual and
do not represent any recommendations Hewlett Packard Company may make.

myers@hpfcdj.HP.COM (Bob Myers) (01/14/89)

>... not to mention what the inductive backlash can do to your *transistor*!

>The appropriate fix is a clamp diode around the motor, I suppose, but that
>raises another question: Does the motor behave differently when it's allowed
>to backlash, instead of being clamped?

>And another question I just thought of: What exactly does placing a clamp
>diode around the *transistor* do?  It seems to me that the motor would try
>to backlash through the power supply.  I often see these extra diodes as part
>of Darlington packages, etc.


Hmmm; I'm getting in a bit late on this, so forgive me if the answer below
doesn't address the specific circuit in question.  You don't say exactly
what "around the transistor" means, so here's a generic answer on clamping
transistors/inductors:

"Inductive backlash" results from the fact that an inductor doesn't like to
see changes in the current passing through it, which is what the formula
V = L * di/dt  means.  If you attempt to interrupt the current through an
inductor suddenly (by switching of a transistor, for example), the voltage
across the inductor increases drastically; the "polarity" of the voltage across
the inductor is reversed, too, as the inductor goes from being a "sink" to
a "source". (We're suddenly sourcing current from the inductor, as the field
collapses.  An inductor is, after all, simply a device which stores energy in
a magnetic field.)  If this causes the voltage across the switching transistor
to exceed that transistor's rated breakdown voltage, it's good-bye
transistor; so a hefty diode is commonly connected "backwards" across the
transistor (cathode to collector, anode to emitter - assuming an NPN device)
in order to limit the peak reverse voltage to the forward drop of the diode.

Now, as you may have realized, this doesn't do diddly for the case of switching
an inductive load in series with the collector; the inductor current still
has to go *somewhere* without breaking down the transistor.  For this reason,
a diode is typically connected "backwards" across the inductive load,
letting the energy stored in the inductor's field dissipate harmlessly.
(Harmlessly, that is, assuming a hefty enough diode on a good heat sink!)

There is another "clamp" diode which is often associated with transistors; 
this is a diode connected from base to collector, and often referred to as
a "Baker clamp".  This serves a different purpose entirely, that of keeping
the transistor out of saturation.  If the forward drop of the diode is less
than the forward drop of the base-collector junction, then the transistor
will never truly enter saturation (which requires both the B-E and B-C
junctions to be forward biased).  Instead, current is diverted around the
B-C junction, and the transistor is kept *just* out of saturation.  This
"speeds up" the transistor's switching time, as there is no charge build-up
in this juction during the "on" time.  A Schottky diode is typically used,
due to its lower forward drop as compared to a silicon P-N junction.

Hope this helps!


Bob Myers  KC0EW   HP Graphics Tech. Div.|  Opinions expressed here are not
                   Ft. Collins, Colorado |  those of my employer or any other
{the known universe}!hplabs!hpfcla!myers |  sentient life-form on this planet.

stu@hpficad.HP.COM (Stu Bell) (01/17/89)

> 
> >I use the circuit below for model trains (I have left out the direction
> >switches):
> >
> > [deleted]
> >
> >Make sure you heat sink the PNP transistor -- If you are pulling a couple of
> >amps through the motor at ~10 volts, the PNP will be dissipating 20 Watts!
> >This is plenty enough to get (VERY!) warm.
> 
> Nope.  The motor will -- the transistor sees only the difference between the
> supply voltage and the motor voltage. Maximum dissipation occurs when both
> the motor and transistor see v_supply/2.
> 

You're right, of course.  Still, that heat sink gets PLENTY hot.  I know, as
I've burned my fingers more than once.

For everyone that gave a PWM solution, your solution will work BUT...  some
motors (especially the expensive Japanese "can" (or "micro") motors) are
reportedly sensitive to the pulses and tend to burn up with even moderate
(100 HZ - 1 KHZ) frequency pulses.  I have no experience with this, but I'm
not willing to sacrifice an $80 motor just to find out.

Stu Bell
HP Colorado "Chips 'R' Us" Division

Thot for the Day:  What if I didn't give a Disclaimer and nobody sued?
                   ^^^^^^^-(NOT an HP advertisement!)

Disclaimer:  The above may have been generated with line noise.  Hewlett
Packard Company certainly knows nothing about this,  Please don't sue me!