www.eleinmec.com

Pulse Width Modulation
By Michael Adler and Tim Surtell

The control of electric motors is something which interests nearly everyone involved with Meccano model building.  Every model has its own motor requirements with regard to the space available, the power of the motor, its speed, whether it must stop and start frequently, and the need for reduction gearing.

On the face of it, simple methods of control are perfectly adequate, with a regulated voltage supply, a simple on/off switch, and the means to reverse the motor. Speed can be controlled with a wire-wound potentiometer (variable resistor) or a circuit such as the Darlington Pair Speed Control.

Further Information Darlington Pair Speed Control - A circuit for linear motor control

In reality, these methods can provide very unrealistic results.  The main problem is poor starting performance, the motor tending to jump almost instantly from a stationary position to what is often more than half speed.  The main cause of this seems to be the starting characteristic of the motor itself which when under load seems reluctant to start.

Motor Characteristics

A motor has a relatively low resistance when it is stationary.  As the speed control is advanced, the current through the motor increases, but the voltage across the motor remains quite low.  The speed control therefore has to be well advanced before the voltage and power fed to the motor are high enough to overcome its reluctance to start.  As the motor speed and the load on it changes, there are changes in its internal resistance.  Speed regulation is not very good under these circumstances, particularly at low speed.

Pulse Width Modulation

Pulse Width Modulation (PWM) is a common technique for speed control which can overcome the problem of the poor starting performance of a motor.

A good analogy is bicycle riding.  You peddle (exert energy) and then coast (relax) using your momentum to carry you forward.  As you slow down (due to wind resistance, friction, road shape) you peddle to speed up and then coast again.  The 'duty cycle' is the ratio of peddling time to the total time (peddle + coast time).  A 100% duty cycle means you are peddling all the time, and a 50% duty cycle means you are peddling only half the time.

PWM for motor speed control works in a very similar way.  Instead of supplying a varying voltage to a motor, it is supplied with a fixed voltage value (such as 12V) which starts it spinning immediately.  The voltage is then removed and the motor 'coasts'.  By continuing this voltage on/off cycle with a varying duty cycle, the motor speed can be controlled.

The waveforms in figure 1 help to explain the way in which this method of control operates.  In each case the signal has maximum and minimum voltages of 12V and 0V.

By varying the mark-space ratio of the signal over the full range, it is possible to obtain any desired average output voltage from 0V to 12V. The motor will work perfectly well, provided that the frequency of the pulsed signal is set correctly, a suitable frequency being 30Hz.  Setting the frequency too low gives jerky operation, and setting it too high might increase the motor's impedance.

Figure 1: Pulse width modulation waveforms

Designing a PWM Circuit

The concept of PWM inherently requires timing.  Two 555 timer ICs and some potentiometers can be used to generate a PWM signal, and since PWM provides a digital, on/off signal, it is also easy to use a PC or micro-controller to create the signal; however this is beyond the scope of this article.

The circuit in figure 2 uses two 555 ICs and is actually a combination of two types of circuit.  The first is a free running multivibrator (astable) with an adjustable frequency around 30Hz.  The output of this circuit then triggers a pulse shaping (monostable) circuit which adjusts the width of the pulse.  The circuit produces a duty cycle in the range of approximately 0.3% to 97%.

Figure 2: A pulse width modulation circuit using 555 ICs

The speed of the motor is controlled with a single potentiometer (variable resistor).  It is possible to run a Meccano M5 motor to test the circuit, and it will run from dead still to full speed using the potentiometer speed control and a 6V battery as the sole power source.  If you have a 12V motor, you can of course use a 12V power source.

The motor is switched on and off via a TIP31C transistor (shown in figure 3) which can handle motors rated up to 3A at 100V, or a total power of 40W.  If you are using a high power motor, make sure there is a heatsink bolted to the transistor.

Figure 3: Pin-out diagram of the TIP32C transistor

Further Information The 555 Timer - Background information about the 555
The 555 Astable Circuit
The 555 Monostable Circuit
Calibrating the Circuit

The nature of this circuit means that the motor can never be fully switched off.  However, the minimum 0.3% duty cycle should be low enough to effectively stop the motor running.

When you first switch the circuit on and move the speed potentiometer slowly from its minimum position to its maximum position, you will probably find that the speed of the motor increases linearly, then suddenly drops slightly before increasing again.  This is due to the pulse width becoming longer than the time allowed for it by the 555 astable.

The frequency preset of the 555 astable circuit solves this problem by allowing the frequency of the signal to be adjusted so that the speed potentiometer can achieve its full range.  To calibrate it, set the speed potentiometer to its maximum position, then adjust the frequency preset so that the motor runs as fast as possible.  If you have a multimeter that can measure frequency, you can check the modulation frequency at pin 3 of the 555 astable, and confirm the range of the duty cycle at pin 3 of the monostable.

Article Information
Source: Electronics in Meccano - www.eleinmec.com | First published in EiM: Issue 6 (January 2000)
Topic: Controlling Motors | Created: 17/06/2003 | Last modified: 11/02/2007

Top of Page | Homepage | About | Search | Topics | Features | Circuits Shop | yourEiM

Hosted on a Memset Dedicated Server | © 1998 - 2019 Tim Surtell