Professional Documents
Culture Documents
The aim of developing this project is to control the speed a 2h DC motor. The main
advantage in using a DC motor is that the Speed-Torque relationship can be varied to
almost any useful form. To achieve the speed control an electronic technique called
Pulse Width Modulation is used which generates High and Low pulses. These pulses
vary the speed in the motor. For the generation of these pulses a microcontroller
(AT89c51) is used. As a microcontroller is used setting the speed ranges as per the
requirement is easy which is done by changing the duty cycles time period in the
program. This project is practical and highly feasible in economic point of view, and
has an advantage of running motors of higher ratings. This project gives a reliable,
durable, accurate and efficient way of speed control of a 2hp DC motor.
CHAPTER ONE
1.0 INTRODUCTION
1.1 BACKGROUND OF STUDY
The device that converts electrical energy into mechanical energy is
called as a motor. The motor that utilizes a DC supply to produce mechanical output is
DC Motor. The advantages of using these types of motors over conventionally used AC
motors are stated below.
• DC motors have higher controller efficiency.
• DC motors have typical 98% efficiency.
• DC motors have better overload and peak voltage characteristics.
The main advantage of using these DC motors is that the speed- torque characteristics
can be varied to almost any useful form.
As a result of all these advantages these motors have a wide range of applications in
places where constant speed is to be maintained at varying loads. Conveyor belts,
elevators, cranes, ski lifts, extruders, mixers, sewing machines are few such applications
where DC motors are used. So controlling the speed of a DC motor is a purposeful and
required place to work on. The various types of DC motors are
• Series field wound type
• Shunt field wound type
• Compound field wound type
For all these types of DC motor common methods of speed controls.
The above figure shows the circuit of the DC motor speed controller. 230V, AC mains
is stepped down by transformer X1 to deliver secondary output of 12V, 500mA.The
secondary output is rectified by a full-wave bridge rectifier comprising diodes D1
through D4, filtered by capacitor C1 and regulated by IC 7805(IC1). Capacitor C2
bypasses any ripple present in the regulated output. LED1 acts as the power-„on‟
indicator. Resistor R1 limits the current passing through LED1. IC AT89C51 (IC2) is a
low power, high-performance, 8-bit microcontroller. At the heart of the speed
controller system is microcontroller AT89C52 (IC2), which creates (using timer 0)
pulses of varying width for pulse width modulation and controls the motor speed. To
change the speed of the motor, switches S2 and S3 are interfaced to interrupt the input
to pins P3.2 and P3.3 of IC2, respectively. Whenever any of switches S2 and S3 is
pressed, an interrupt is generated, which changes the duty cycle of the pulse train.
Switch S2 interfaced to Interrupt-0 increases the duty cycle of the pulse waveform,
whereas switch S3 interfaced to Interrupt-1 decreases the duty cycle of the pulse
waveform. Power-on reset for the microcontroller is achieved through capacitor C6 and
resistor R2. Switch S1 provides manual reset to the microcontroller. A 12MHz crystal
(XTAL) is used for basic clock frequency. Port pin P1.1 is internally pulled cup. It is
used as the output to control the motor with driver transistor T1. Whenever timer-0
overflows, the status of pin P1.1 is complemented and hence a square wave with
appropriate duty cycle is generated. This pin is interfaced to power transistor TIP122
(T1), which is used to drive the motor. When the transistor is driven into saturation,
current flows through the motor. When the transistor is cut off, the motor current keeps
flowing because of the motor’s inductance. Diode D6 connected across the motor coil
prevents reverse current flow. The software is written in “C” language and compiled
using Keil C compiler, which generates Intel hex code for the microcontroller. The
μVision3 integrates all tools including the “C” compiler, micro assembler,
linker/locator and hex file generator. The generated hex code is burnt into the
microcontroller using a suitable programmer. Whenever any switch is pressed, the duty
cycle of PWM varies. The software then calculates the appropriate values for TH0 and
TL0 for „on‟ and „off‟ time of the output, which are copied in TH0 and TL0 on timer
interrupts. In this circuit, we have used timer 0 of the microcontroller for generating
PWM pulses, which is clocked using a 12MHz crystal oscillator. The base frequency is
kept constant at 1 kHz and the duty cycle of this wave is varied to change the analogue
level at output pin P1.1 of the microcontroller.
3.3 SPEED CONTROL METHODS IN A DC ELECTRIC MOTOR
The motor speed can be controlled by controlling armature voltage and armature
current. It is obvious that speed control is possible by varying
• Flux per pole, Φ (Flux control)
• Resistance Ra of armature circuit (Rheostat
Control)
• Applied voltage V (Voltage Control)
The above methods have some demerits like a large amount of power is wasted in the
controller resistance. Hence, efficiency is decreased. It needs expensive arrangement
for dissipation of heat produced in the controller resistance. It gives speeds below the
normal speed. By these data that are acquainted we can draw a conclusion that these
electric and electromechanical methods are less adaptive so electronic techniques are
used for speed control. These methods provide higher efficiency, greater reliability,
quick response, higher efficiency. One such technique is Pulse Width Modulation. We
apply this technique in our project so as to control the speed of the DC motor.
3.4 PULSE WIDTH MODULATION
Pulse width modulation (PWM) is a method for binary signals generation, which has 2
signal periods (high and low). The width (W) of each pulse varies between 0 and the
period (T). The main principle is control of power by varying the duty cycle. Here the
conduction time to the load is controlled. Let for a time t1, the input voltage appears
across the load i.e. ON state and for t2 time the voltage across the load is zero.
• The average voltage at output is given by Va = 1/T ∫ vodt = t1/T Vs = ft1
Vs = kVs
• the average load current Ia = Va/R = kVs/R where, T is the total time period =t1+t2, k
= t1/T is the duty cycle.
• The rms value of output voltage is V0 = ( i/T ∫ V02 dt ) ½ = k Vs
• The output power and is given by Pi = 1/T ∫v0idt = 1/T ∫ v02/R dt = kVs2/R
• The duty cycle can be varied from 0 to 1 by varying t1, T or f. Therefore, the output
voltage V0 can be varied from 0 to Vs by controlling k, and the power flow can be
controlled.
• As the time t1 changes the width of pulse is varied and this type of control is called
pulse width modulation (PWM) control.
For better understanding of PWM these diagrammatic representations can be used.
These figures represent the waveforms obtained as output at different voltage
requirements.
HIGH SPEED SIGNAL (90%): The green part of the signal represents the ON
time and the white part of it represents time when it is not receiving any voltage.
4.3 TESTING
Frequency Response Test
After the construction of the hardware and software setup, it was subjected to tests to
determine its frequency response which indicates the range of frequencies for which
the appliance is suitable. To do this, a signal generator was used to feed signals of fixed
amplitude but varying frequency to the voltage and current input of the motor. The gain
at each signal variation was found by using a double beam oscilloscope to measure and
compare the output and input signals.
4.4 RESULT USING VSM OSCILLOSCOPE
Voltage Speed
4.3V 860 rpm
3.6V 720rpm
CHAPTER FIVE
CONCLUSSION
This project brought together several components and ideas to achieve a common goal:
to prove that it is possible to run DC series motor on variable speed using PWM. We
put a lot of time in to achieve a variable speed of DC series motor and to perform best
it possibly could. Now that the project as a whole is finished, we hand it over to future
generations to design and improve each component. The designing of a sustainable
system to control the speed and orientation of a geared DC Electric Motor was
successfully implemented in this paper. DC motors have speed control capabilities
which means that speed, torque and even direction of rotation can be changed at
anytime to meet new condition. The hardware of the proposed system and interfacing
with computer using RS232 serial communication port. The project can be divided into
two element which is hardware and software. The developed system can be used in the
GUI to monitor and control the speed of DC electric motor. The paper provides a
platform for further advancement in the field of industrial use of DC geared motors.
REFERENCE
[1] Gopal K. Dubey, “Fundamentals of Electric Drives”,.Narosa Publishing House
New Delhi,1989.
[2] S. M. Bashi, I. Aris and S.H. Hamad “Development of Single Phase Induction
Motor Adjustable Speed Control Using M68HC11E-9 Microcontroller,” Journal of
Applied Sciences 5 (2), pp. 249-252 .
[3] Kumara MKSC, Dayananda PRD, Gunatillaka MDPR,Jayawickrama SS, “PC
based speed controlling of a dc motor”, A fmal year report University of Moratuwa
Illiniaus USA, 2001102.
[4] J Nicolai and T Castagnet , “A Flexible Microcontroller Based Chopper Driving a
Permanent Magnet DC Motor”, The European Power Electronics Application. 1993.
[5] J. Chiasson, Nonlinear Differential-Geometric Techniquesfor Control of a Series
DC Motor, IEEE Transactionson Control Systems Technology.vol 2, pp.35-42,1994.
[6] Yodyium Tipsuwan and Mo-Yuen Chow “FuzzyLogic microcontroller
implementation for DC motor speed control”, IEEE Transactions on Power Electronics,
V0l.11, No.3, June 1999, pp 1271-1276.
SOURCE CODE
void USARTInit
(uint16_t ubrr_value)
{ UBRR= ubrr_value;
//Set Baud rate UCSRC=(1<<URSEL)|(3<<UCSZ0);// Set Frame Format
UCSRB=(1<<RXEN)|(1<<TXEN);//
//Enable The receiver and transmitter }
Reading From The USART This function will read data from the USART. char
USARTReadChar()
{ while(!(UCSRA & (1<<RXC)))
//Wait until a data is available { //Do nothing } return UDR;
//Now USART has got data from host and is available is buffer }
Writing to USART:
void
USARTWriteChar(char data)
{ while(!(UCSRA & (1<<UDRE)))
//Wait until the transmitter is ready
{ //Do nothing } UDR=data; //Now write the data to USART buffer }
#include<reg51.h>
These are the ports from where the microcontroller gets the information about the switch positions.
sbit SW_1 = P2^6; //connecting switch 1 to the port 2 ,pin 6.
sbit SW_2 = P2^7; // connecting switch 1 to the port 2 ,pin 7.
sbit MTR = P1^0; // from this pin we get the signal that is to be fed to the base
void main() microcontroller doesn’t get any voltage so the
switches are considered as 0’s. At this condition the
{ int x; - program is written so that the output signal given by
the microcontroller should have 150 machine cycles
while(1) of ON state and 600 machine cycles of OFF state.
{
This condition is stated when the switch1 is closed
if(SW_1==0 & SW_2==0) and switch 2 is open in this position the supply from
{ the switch1 is shorted into the ground terminal so
microcontroller doesn’t get any voltage so the switch
MTR=1; is considered as 0. Similarly switch 2 is open and
supply is sent to microcontroller so it is considered
for(x=0;x<150;x++); - 1.At this condition the program is written so that the
MTR=0; output signal given by the microcontroller should
have 300 machine cycles of ON state and 300
for(x=0;x<600;x++); machine cycles of OFF state.
}
This condition is stated when the switch2 is closed
if(SW_1==0 & SW_2==1)
and switch 1 is open in this position the supply from
the switch2 is shorted into the ground terminal so
microcontroller doesn’t get any voltage so the switch
{ is considered as 0. Similarly switch 1 is open and
MTR=1; supply is sent to microcontroller so it is considered
1.At this condition the program is written so that the
for(x=0;x<300;x++); output signal given by the microcontroller should
have 600 machine cycles of ON state and 150
MTR=0;
machine cyclesofOFFstate
for(x=0;x<300;x++);
}
if(SW_1==1 & SW_2==0)
{
MTR=1;