pwm

Upload: richihots2

Post on 13-Oct-2015

8 views

Category:

Documents


0 download

TRANSCRIPT

  • 5/23/2018 PWM

    1/16

  • 5/23/2018 PWM

    2/16

    PWM Motor Speed Controller / DC Light Dimmer

  • 5/23/2018 PWM

    3/16

    Pulse Width Modulator for 12 and 24 Volt applications

    This circuit was featured in an article in Home Power Magazine #75

    (C) G. Forrest Cook 1999

    Introduction

    A pulse width modulator (PWM) is a device that may be used as an efficient light dimmeror DC motor speed controller. The circuit described here is for a general purpose device

    that can control DC devices which draw up to a few amps of current. The circuit may be

    used in either 12 or 24 Volt systems with only a few minor wiring changes. This device hasbeen used to control the brightness of an automotive tail lamp and as a motor speed control

    for small DC fans of the type used in computer power supplies.

    A PWM circuit works by making a square wave with a variable on-to-off ratio, the average

    on time may be varied from 0 to 100 percent. In this manner, a variable amount of power is

    transferred to the load. The main advantage of a PWM circuit over a resistive powercontroller is the efficiency, at a 50% level, the PWM will use about 50% of full power,

    almost all of which is transferred to the load, a resistive controller at 50% load power

    would consume about 71% of full power, 50% of the power goes to the load and the other

    21% is wasted heating the series resistor. Load efficiency is almost always a critical factorin solar powered and other alternative energy systems.

    One additional advantage of pulse width modulation is that the pulses reach the full supplyvoltage and will produce more torque in a motor by being able to overcome the internal

    motor resistances more easily. Finally, in a PWM circuit, common small potentiometers

    may be used to control a wide variety of loads whereas large and expensive high power

    variable resistors are needed for resistive controllers.

    The main Disadvantages of PWM circuits are the added complexity and the possibility ofgenerating radio frequency interference (RFI). RFI may be minimized by locating the

    controller near the load, using short leads, and in some cases, using additional filtering on

    the power supply leads. This circuit has some RFI bypassing and produced minimalinterference with an AM radio that was located under a foot away. If additional filtering is

    needed, a car radio line choke may be placed in series with the DC power input, be sure not

    to exceed the current rating of the choke. The majority of the RFI will come from the high

    current path involving the power source, the load, and the switching FET, Q1.

    Specifications

    PWM Frequency: 400 Hz

    Current Rating: 3 A with an IRF521 FET, >10A with an IRFZ34N FET and heat

    sink

    PWM circuit current: 1.5 ma @ 12V with no LED and no load

    Operating Voltage: 12V or 24V depending on the configuration

    Theory

  • 5/23/2018 PWM

    4/16

    The PWM circuit requires a steadily running oscillator to operate. U1a and U1d form a

    square/triangle waveform generator with a frequency of around 400 Hz.

    U1c is used to generate a 6 Volt reference current which is used as a virtual ground for the

    oscillator, this is necessary to allow the oscillator to run off of a single supply instead of a

    +/- voltage dual supply.

    U1b is wired in a comparator configuration and is the part of the circuit that generates the

    variable pulse width. U1 pin 6 receives a variable voltage from the R6, VR1, R7 voltageladder. This is compared to the triangle waveform from U1-14. When the waveform is

    above the pin 6 voltage, U1 produces a high output. Conversely, when the waveform is

    below the pin 6 voltage, U1 produces a low output. By varying the pin 6 voltage, the on/offpoints are moved up and down the triangle wave, producing a variable pulse width.

    Resistors R6 and R7 are used to set the end points of the VR1 control, the values shown

    allow the control to have a full on and a full off setting within the travel of the

    potentiometer. These part values may be varied to change the behavior of the

    potentiometer.

    Finally, Q1 is the power switch, it receives the modulated pulse width voltage on the gateterminal and switches the load current on and off through the Source-Drain current path.

    When Q1 is on, it provides a ground path for the load, when Q1 is off, the load's ground is

    floating. Care should be taken to insure that the load terminals are not grounded or a shortwill occur.

    The load will have the supply voltage on the positive side at all times. LED1 gives avariable brightness response to the pulse width. Capacitor C3 smooths out the switching

    waveform and removes some RFI, Diode D1 is a flywheel diode that shorts out the reverse

    voltage kick from inductive motor loads.

    In the 24 Volt mode, regulator U2 converts the 24 Volt supply to 12 Volts for running the

    pwm circuit, Q1 switches the 24 Volt load to ground just like it does for the 12 Volt load.See the schematic for instructions on wiring the circuit for 12 Volts or 24 Volts.

    When running loads of 1 amp or less, no heat sink is needed on Q1, if you plan to switchmore current, a heat sink with thermal greas is necessary. Q1 may be replaced with a higher

    current device, suitable upgrades include the IRFZ34N, IRFZ44N, or IRFZ48N. All of the

    current handling devices, switch S1, fuse F1, and the wiring between the FET, power

    supply, and load should be rated to handle the maximum load current.

    Construction

    The prototype for this circuit was constructed on an IC proto board with parts and wires

    stuck into the holes of the proto board. One version of the finished circuit was used to make

    a variable speed DC fan, the fan was mounted on top of a small metal box and the PWMcircuit was contained inside of the box.

  • 5/23/2018 PWM

    5/16

    A simple circuit board (see picture) was built using a free circuit board CAD program, PCB(1) that runs on the Linux operating system. The circuit board image was printed on a

    PostScript laser printer onto a mask transfer product called Techniks Press-n-Peel blue film

    (2). The printed on film is then ironed on to a cleaned piece of single sided copper cladboard. The board is etched with Ferric Chloride solution. Holes are drilled with a fine

    gauge drill bit, parts are soldered in, and the board is wired to the power and load. Thistechnique is great for producing working boards in a short time but is not suitable formaking large numbers of boards. A board pattern is shown in Fig 3, this may be photo-

    copied onto a piece of press-n-peel blue film, or used in a photographic etching process.

    Alternately, the dead-bug construction method may be used. This involves taking a piece of

    blank copper PC board, glueing a wire-wrap IC socket sideways to the board with 5 minute

    epoxy, then soldering all of the parts to the wire wrap pins. Grounded pins can be soldered

    directly to the copper board.

    It is advisable to check your wiring very closely before applying power the first time.

    Wiring mistakes can cause instant destruction of sensitive semiconductor components.

    Alignment

    No alignment is required with this circuit.

    Use

    This circuit will work as a DC lamp dimmer, small motor controller, and even as a small

    heater controller. It would make a great speed control for a solar powered electric train. Thecircuit has been tried with a 5 Amp electric motor using and IRFZ34N FET and worked ok,

    D1 may need to be replaced with a faster and higher current diode with some motors. Thecircuit should work in applications such as a bicycle motor drive system, if you experiment

    with this, be sure to include an easily accessible emergency power disconnect switch incase the FET shorts out and leaves the circuit full-on.

    Wire the circuit for 12 Volts or 24 Volts as per the schematic, connect the battery to the

    input terminals, and connect the load to the output terminals, be sure not to ground either

    output terminal or anything connected to the output terminals such as a motor case. Turn

    the potentiometer knob back and forth, the load should show variable speed or light.

    Parts

    U1: LM324N quad op-amp

    U2: 78L12 12 volt regulator

    Q1: IRF521 N channel MOSFET

    D1: 1N4004 silicon diode

    LED1 Red LED

    C1: 0.01uF ceramic disc capacitor, 25V

    C2-C5: 0.1uF ceramic disk capacitor, 50V

    R1-R4: 100K 1/4W resistor

    R5: 47K 1/4W resistor

  • 5/23/2018 PWM

    6/16

    R6-R7: 3.3K 1/4W resistor

    R8: 2.7K 1/4W resistor

    R9: 470 ohm 1/4W resistor

    VR1: 10K linear potentiometer

    F1: 3 Amp, 28V DC fast blow fuse

    S1: toggle switch, 5 Amps

    `

  • 5/23/2018 PWM

    7/16

    PWM DC Motor Speed Control

  • 5/23/2018 PWM

    8/16

    Circuit Description

    This is a circuit for controlling the speed of small DC motors, it works nicely as a speedcontroller for an HO or N gauge model railroad.

    Theory

    The left half of the 556 dual timer IC is used as a fixed frequency square wave oscillator.

    The oscillator signal is fed into the right half of the 556 which is configured as a variable

    pulse width one-shot monostable multivibrator (pulse stretcher). The output of the one-shotis a variable width square wave pulse, the pulse width is set with the speed control pot on

    the control voltage input. The variable width output pulse switches the IRF521 MOSFET

    transistor on and off. The MOSFET amplifies the current of this signal so that it is powerfulenough to control a small DC motor. The 311 comparator is used to cut off the one-shot via

    the reset pin when the control voltage is below a certain threshold, the 311 is also

  • 5/23/2018 PWM

    9/16

    controlled by the speed control pot. The cut off circuit is necessary because the 556 one-

    shot circuit will always put out a small pulse, even when the control voltage is at zero.

    Calibration

    Adjust the 10K cutoff pot so that the motor is completely off when the speed pot is fullycounter clockwise.

    Use

    Connect a source of 12V DC power to the DC power input, connect a DC motor to the DCmotor output. Adjust the speed control for the desired motor speed.

    See thePWM Motor Speed Controllerpage for an improved single-IC PWM circuit

    Pulse Width Modulation Control

    http://www.solorb.com/elect/pwm/pwm1/index.htmlhttp://www.solorb.com/elect/pwm/pwm1/index.htmlhttp://www.solorb.com/elect/pwm/pwm1/index.htmlhttp://www.solorb.com/elect/pwm/pwm1/index.html
  • 5/23/2018 PWM

    10/16

    PWM Control

  • 5/23/2018 PWM

    11/16

    Pulse-width modulation control works by switching the power supplied to the motor on

    and off very rapidly. The DC voltage is converted to a square-wave signal, alternating

    between fully on (nearly 12V) and zero, giving the motor a series of power "kicks".

    If the switching frequency is high enough, the motor runs at a steady speed due to its

    fly-wheel momentum.

    By adjusting the duty cycle of the signal (modulating the width of the pulse, hence the

    'PWM') ie, the time fraction it is "on", the average power can be varied, and hence the

    motor speed.

    Advantages are,

    1. The output transistor is either on or off, not partly on as with normalregulation, so less power is wasted as heat and smaller heat-sinks can be

    used.

    2. With a suitable circuit there is little voltage loss across the output transistor,so the top end of the control range gets nearer to the supply voltage than

    linear regulator circuits.

    3. The full-power pulsing action will run fans at a much lower speed than anequivalent steady voltage.

    Disadvantages:

    1. Without adding extra circuitry, any fan speed signal is lost, as the fanelectronics' power supply is no longer continuous.

    2. The 12V "kicks" may be audible if the fan is not well-mounted, especially atlow revs. A clicking or growling vibration at PWM frequency can be amplified

    by case panels. A way of overcoming this by "blunting" the square-wave

    pulse is described inApplication Note #58from Telcom. (a 58k pdf file,

    right-click to download). I've tried this, it works, but some of advantage #3

    is lost.

    3. Some authorities claim the pulsed power puts more stress on the fanbearings and windings, shortening its life.

    How It Works

    http://www.pcsilencioso.com/cpemma/an58.pdfhttp://www.pcsilencioso.com/cpemma/an58.pdfhttp://www.pcsilencioso.com/cpemma/an58.pdfhttp://www.pcsilencioso.com/cpemma/an58.pdf
  • 5/23/2018 PWM

    12/16

    An oscillator is used to generate a triangle or sawtooth waveform (green line). At low

    frequencies the motor speed tends to be jerky, at high frequencies the motor's

    inductance becomes significant and power is lost. Frequencies of 30-200Hz are

    commonly used.

    A potentiometer is used to set a steady reference voltage (blue line).

    A comparator compares the sawtooth voltage with the reference voltage. When the

    sawtooth voltage rises above the reference voltage, a power transistor is switched on.

    As it falls below the reference, it is switched off. This gives a square wave output to

    the fan motor.

    If the potentiometer is adjusted to give a high reference voltage (raising the blue line),

    the sawtooth never reaches it, so output is zero. With a low reference, the comparator

    is always on, giving full power.

    A Practical PWM Circuit

  • 5/23/2018 PWM

    13/16

    LM324 pin connections (top view)

    This uses the LM324, a 14-pin DIL IC containing four individual op-amps and running

    off a single-rail power supply. The sawtooth is generated with two of them (U1A andU1B), configured as a Schmitt Trigger and Miller Integrator, and a third (U1C) is used

    as a comparator to compare the sawtooth with the reference voltage and switch the

    power transistor.

    Rather than have the fourth op-amp sat there doing nothing, it's used as a voltage

    follower to buffer the reference potential divider. The high input and low output

  • 5/23/2018 PWM

    14/16

    impedance of this draws very little current from the PD, so high value thermistors can

    be used in the thermal version of this controller.

    Here's the very neat saw-tooth wave coming from the output pin on U1B. Frequency is

    about 130Hz with the components as shown, with the amplitude swinging between

    3.5V and 9.5V on a 12V supply.

    The reference voltage system is designed to apply a level ranging from 3V to 7.5V to

    the comparator. At 3V the fan is getting power all the time, at 7.5V about 30% of the

    time (when the sawtooth wave goes over 7.5V). Below is the pulse power applied to

    the fan at the minimumsetting, which was just enough to keep my test fan spinning.

    Construction

  • 5/23/2018 PWM

    15/16

    Parts List

    U1LM324 quad op-amp, 14-pinDIL socket

    Q1IRF530 n-channel mosfet(see below)

    R1, R2, R6100k (all resistors 0.25W 5%or better)

    R3 56k

    R4, R5 47k

    R7 68k

    R8 (see below)

    VR1 100k 16mm lin PCB pot

    C133n mylar film or ceramicdisc

    C2 220u 16V radial electrolytic

    C3 100n ceramic disc

    C44u7 16V radial electrolytic(kick-start option)

    Pulse width modulation (PWM) DC motor speed controller circuit

  • 5/23/2018 PWM

    16/16

    http://www.seekic.com/uploadfile/ic-circuit/201142943159571.jpghttp://www.seekic.com/uploadfile/ic-circuit/201142943159571.jpg