SlideShare a Scribd company logo
1 of 21
Download to read offline
SPEED CONTROL OF A DC MOTOR USING
MICROCONTROLLER 8051
A PROJECT REPORT
Submitted by
S. Kamal Viswanath (07241A0206)
M. Gowtham (07241A0203)
P. Ashok Kumar (06241A0205)
K. Rohit Naik (07241A0247)
in partial fulfillment for the award of the degree
of
Bachelor of Technology
IN
ELECTRICAL AND ELECTRONICS ENGINEERING
GOKARAJU RANGARAJU INSTITUTES OF ENGINEERING AND
TECHNOLOGY
JNTU HYDERABAD : 500085
January 2011
GOKARAJU RANGARAJU INSTITUTES OF
ENGINEERING AND TECHNOLOGY
BONAFIED CERTIFICATE
This is to certify that this project report “Speed Control of DC Motor using
microcontroller 8051” is the bonafied work of “Kamal Viswanath,
Gowtham, Ashok Kumar, Rohith Naik” who carried out the project under
my supervision.
SIGNATURE SIGNATURE
P.M. Sharma M. Chakravarthy
HEAD OF THE DEPARTMENT PROJECT GUIDE
ASSOCIATE PROFESSOR
ELECTRICAL AND ELECTRONICS ELECTRICAL AND ELECTRONICS
GRIET, GRIET,
BACHUPALLY, KUKATPALLY, BACHUPALLY, KUKATPALLY,
HYDERABAD-500 090. HYDERABAD-500 090.
ABSTARCT
The aim of developing this project is to
control the speed of 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 DC
motor.
CONTENTS
CHAPTER No. TITLE PAGE No.
ABSTRACT iii
1. INTRODUCTION 1
1.1 DC Motor 1
1.2 Pulse Width Modulation 3
1.3 Microcontroller 6
2. FLOW CHART 8
3. BLOCK DIAGRAM 9
4. CIRCUIT DIAGRAM 10
5. HARDWARE DESCRIPTION 11
6. SOFTWARE DESCRIPTION 12
7. DATA ACQUAINTED 14
8. DATA SHEETS 16
9. COMPONENTS LISTING 24
10. REFERENCES 24
INTRODUCTION
DC MOTOR
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 ids 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.
Speed control methods in a DC 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 (Rheostatic 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.
PWM
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 ∫ V0
2
dt ) ½
= k Vs
• The output power and is given by
Pi = 1/T ∍v0idt = 1/T ∍ v0
2
/R dt = kVs
2
/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.
Signal with half voltage (50%):
Signal with low voltage (10%):
Advantages of PWM :
The main advantage of PWM is that power loss in
the switching devices is very low. When a switch is off there is practically no
current, and when it is on, there is almost no voltage drop across the switch.
Power loss, being the product of voltage and current, is thus in both cases close
to zero. PWM works also well with digital controls, which, because of their
on/off nature, can easily set the needed duty cycle. Using pulse width
modulation has several advantages over analog control. Using PWM to dim a
lamp would produce less heat than an analog control that converts some of the
current to heat. Also, if you use PWM, the entire control circuit can be digital,
eliminating the need for digital-to-analog converters. Using digital control lines
will reduce the susceptibility of your circuit to interference. Finally, motors may
be able to operate at lower speeds if you control them with PWM. When you
use an analog current to control a motor, it will not produce significant torque at
low speeds. The magnetic field created by the small current will be too weak to
turn the rotor. On the other hand, a PWM current can create short pulses of
magnetic flux at full strength, which can turn the rotor at extremely slow
speeds.
The technology has become more pervasive as low cost
microcontrollers incorporate PWM control. Microcontrollers offer simple
commands to vary the duty cycle and frequencies of the PWM control signal.
PWM is also used in communications to take advantage of the higher immunity
to noise provided by digital signals. So by getting these pulses generated by a
microcontroller we can increase the efficiency, accuracy and thus the reliability
of the system. The most commonly used microcontroller is 8051 that has been
used in this project for production of pulses.
MICROCONTROLLER
A microcontroller (abbreviated ÂľC, uC or MCU) is a
small computer on a single integrated circuit containing a processor core,
memory, and programmable input/output peripherals. This programmes
memory in the form of NOR flash or OTP ROM is also often included on chip,
as well as a typically small amount of RAM.
Advantages of Microcontroller
Microcontrollers are widely used in today’s control systems for the following
reasons:
• Design and Simulation – Because you are programming with software,
detailed simulations may be performed in advance to assure correctness
of code and system performance.
• Flexibility – Ability to reprogram using Flash, EEPROM or EPROM
allows straightforward changes in the control law used.
• High Integration – Most microcontrollers are essentially single chip
computers with on-chip processing, memory, and I/O. Some contain
peripherals for serial communication and reading analog signals (with an
analog-to-digital converter or ADC). This differentiates a microcontroller
from a microprocessor. Microprocessors require that this functionality be
provided by added components.
• Cost – Cost savings come from several locations. Development costs are
greatly decreased because of the design/flexibility advantages mentioned
previously. Because so many components are included on one IC, board
area and component savings are often evident as well.
• Easy to Use – Just program and go! While in the past, programming has
often involved tedious assembly code, today C compilers are available for
most microcontrollers. Microcontrollers often only require a single 5V
supply as well which makes them easier to power and use.
8051 is also one such microcontroller with certain features like
• An 8-bit ALU.
• Harvard memory architecture – the external program memory and data
memory have separate address spaces from 0x0000 and separate
controlsignal(s).
• 8-bit internal data bus width and 16-bit internal address bus – Harvard
memory architecture
• CISC (Complex Instruction Set Computer)
• Special function registers (SFRs) –PSW(processor status word), A
(accumulator),B register, SP (stack pointer) and registers for serial IOs,
timers, ports and interrupt handler.
• on-chip RAM of 128 bytes.
• 32 bytes of RAM also used as four banks of registers. Each register-set
thus eight registers.
• External data/stack memory can be added upto 64 kB in most of the
version. In certain 8051 enhancements, this limit enhanced to 16 MB.
After acquiring the data about microcontroller,
DC motor and PWM technique we can get into designing a circuit that uses
these units in controlling the speed of a DC motor
FLOW CHART
Start
Check if both switches are open
No
Yes
Decrease speed
 
 
 
Speed Required      
80% 
No
Speed Required     
50%
 
No 
Close S1&S2 
 
 
 
 
 
 
 
 
 
 
   
  Stop
 
 
 
 
 
 
BLOCK DIAGRAM
CIRCUIT DIAGRAM
HARDWARE DESCRIPTION
The components are connect on a
Printed Circuit Board as per the given connection details in the circuit diagram.
The functioning of the circuit can be explained with respect to the action format
that occurs in the circuit. As the supply is switched ON and both the switches
are open the switching supplies ideally 5V is given to the microcontroller.
Suppose if the any of the switch is closed the supply gets directly shorted with
the ground. This indicates the microcontroller about the switch positions and
thus generates the signal as per the given program for the respective switches
position. The transistor used allows current to conduct through it when ever a
positive pulse is given at its base that is given by the microcontroller
inaccordance with the program. As the transistor is forward biased the supply
that is used to run the motor gets connected with the motor terminals and motor
starts running. As soon as the 0 voltage is encountered the NPN transistor used
goes into reverse bias and stops its conduction so the motor’s armature supply
gets disconnected till the base current is 0 volts. By this we can deduce that the
speed of the motor is directly dependent on the supply given by microcontroller
to the base which indeed depends on the program written. So the speeds of
working of the circuit depends on the number of switches used, for instance in
the above circuit two switches are used so the number of speed levels are 22
= 4.
So the number of speed levels for X switches will be 2X
. So the speed of the
motor can be varied in steps.
SOFTWARE DESCRIPTION
#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()
{ int x;
while(1)
{
if(SW_1==0 & SW_2==0)
{ This condition is stated when both the switches are
closed in this position the supply from the switches is
shorted into the ground terminal so microcontroller
doesn’t get any voltage so the switches are considered
as 0’s. At this condition the program is written so that
the output signal given by the microcontroller should
have 150 machine cycles of ON state and 600 machine
cycles of OFF state.
MTR=1;
for(x=0;x<150;x++);
MTR=0;
for(x=0;x<600;x++);
}
if(SW_1==0 & SW_2==1)
{ This condition is stated when the switch1 is closed 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
is considered as 0. Similarly switch 2 is open and
supply is sent to microcontroller so it is considered
1.At this condition the program is written so that the
output signal given by the microcontroller should have
300 machine cycles of ON state and 300 machine
cycles of OFF state.
MTR=1;
for(x=0;x<300;x++);
MTR=0;
for(x=0;x<300;x++);
}
if(SW_1==1 & SW_2==0)
{ This condition is stated when the switch2 is closed 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
supply is sent to microcontroller so it is considered
1.At this condition the program is written so that the
output signal given by the microcontroller should have
600 machine cycles of ON state and 150 machine
MTR=1;
for(x=0;x<600;x++);
MTR=0;
for(x=0;x<150;x++);
}
if(SW_1==1 & SW_2==1)
In this condition both the switches are open so
they are stated as 1’s and in this condition the
motor runs at full speed.
{
MTR=1;
}
}
}
DATA AQUAINTED
Condition 1 when both the switches are open:
Voltage Speed
4.3V 860 rpm
Condition 2 when switch SW1 is
closed:
Voltage Speed Average speed
4.3V 860rpm
3.6V 720rpm
790 rpm
Condition 3 when switch SW2 is closed:
Voltage Speed Average speed
4.3V 860rpm
3.9V 780rpm
820 rpm
Condition 4 when both the switches are
closed:
Voltage Speed Average speed
4.3V 860rpm
3.3V 660rpm
760 rpm
COMPONENT LIST
Name of the
Component
Make Value Number
AT89C51
Micro Controller
ATMEL 1
Resistors R1,R2 10KΩ 2
Capacitors C1,C2 1nF 2
Capacitor C3 1mF 1
Diode D1 IN4004 1
Transistor T1 TIP122 1
Switches SW1,SW2 2
DC Motor AMETECK 12Volts 1
DC Adapter Q1(C) 12 Volts 1
DC Adapter Q2(C) 5 Volts 1
Crystal Oscillator X1 12MHz 1
REFERENCES
• Books on DC motors: Driving DC Motors by G.
MAIOCCHI, DC Motors and drives by BL. THERAJA.
• Books on PWM technique: Pulse Width Modulated
Power supplies by VALTER QUERCIOLI.
• Books on Microcontroller: The 8051
microcontroller and embedded systems by JANICE GILLISPIE MAZIDI.

More Related Content

What's hot

Position sensors
Position sensorsPosition sensors
Position sensorsusic123
 
Hybrid electric vehicle Seminar Presentation
Hybrid electric vehicle Seminar PresentationHybrid electric vehicle Seminar Presentation
Hybrid electric vehicle Seminar PresentationLakshminarayan Solanki
 
Fire fighting robot ppt
Fire fighting robot pptFire fighting robot ppt
Fire fighting robot pptathmeg
 
Bldc motors ppt
Bldc motors pptBldc motors ppt
Bldc motors pptClint Robby
 
Induction Motor Protection Using PLC
Induction Motor Protection Using PLCInduction Motor Protection Using PLC
Induction Motor Protection Using PLCvivatechijri
 
Vector Control of AC Induction Motors
Vector Control of AC Induction MotorsVector Control of AC Induction Motors
Vector Control of AC Induction MotorsPranjal Barman
 
Electric and Hybrid vehicles
Electric and Hybrid vehiclesElectric and Hybrid vehicles
Electric and Hybrid vehiclesK C KARTHIK
 
Use of plc in industrial automation
Use of plc in industrial automationUse of plc in industrial automation
Use of plc in industrial automationAloka Patro
 
Sensors and actuators
Sensors and actuatorsSensors and actuators
Sensors and actuatorsnazibhmd
 
Phase Lock Loop control of dc drive
Phase Lock Loop control of dc drivePhase Lock Loop control of dc drive
Phase Lock Loop control of dc driveraviarmugam
 
Synchronous motor drive
Synchronous motor driveSynchronous motor drive
Synchronous motor drivevishalgohel12195
 
Unit 2.Converter and Chopper fed Dc drives
Unit 2.Converter and Chopper fed Dc drivesUnit 2.Converter and Chopper fed Dc drives
Unit 2.Converter and Chopper fed Dc drivesraviarmugam
 
light follower robot
light follower robotlight follower robot
light follower robotanuragyadav94
 
TO control the speed of DC Motor Simple Project
TO control the speed of DC Motor Simple ProjectTO control the speed of DC Motor Simple Project
TO control the speed of DC Motor Simple ProjectZunAib Ali
 
SUN Tracking Solar panel presentation
 SUN Tracking Solar panel presentation SUN Tracking Solar panel presentation
SUN Tracking Solar panel presentationAJEETKUMAR397
 
Stepper motor in industrial applications
Stepper motor in industrial applicationsStepper motor in industrial applications
Stepper motor in industrial applicationsDr.Raja R
 
Interfacing stepper motor
Interfacing stepper motorInterfacing stepper motor
Interfacing stepper motorPRADEEP
 

What's hot (20)

Position sensors
Position sensorsPosition sensors
Position sensors
 
Brushless dc motor
Brushless dc motorBrushless dc motor
Brushless dc motor
 
Hybrid electric vehicle Seminar Presentation
Hybrid electric vehicle Seminar PresentationHybrid electric vehicle Seminar Presentation
Hybrid electric vehicle Seminar Presentation
 
Fire fighting robot ppt
Fire fighting robot pptFire fighting robot ppt
Fire fighting robot ppt
 
Bldc motors ppt
Bldc motors pptBldc motors ppt
Bldc motors ppt
 
Induction Motor Protection Using PLC
Induction Motor Protection Using PLCInduction Motor Protection Using PLC
Induction Motor Protection Using PLC
 
Vector Control of AC Induction Motors
Vector Control of AC Induction MotorsVector Control of AC Induction Motors
Vector Control of AC Induction Motors
 
Electric and Hybrid vehicles
Electric and Hybrid vehiclesElectric and Hybrid vehicles
Electric and Hybrid vehicles
 
Use of plc in industrial automation
Use of plc in industrial automationUse of plc in industrial automation
Use of plc in industrial automation
 
PLC Architecture
PLC ArchitecturePLC Architecture
PLC Architecture
 
Sensors and actuators
Sensors and actuatorsSensors and actuators
Sensors and actuators
 
Phase Lock Loop control of dc drive
Phase Lock Loop control of dc drivePhase Lock Loop control of dc drive
Phase Lock Loop control of dc drive
 
Synchronous motor drive
Synchronous motor driveSynchronous motor drive
Synchronous motor drive
 
Unit 2.Converter and Chopper fed Dc drives
Unit 2.Converter and Chopper fed Dc drivesUnit 2.Converter and Chopper fed Dc drives
Unit 2.Converter and Chopper fed Dc drives
 
light follower robot
light follower robotlight follower robot
light follower robot
 
TO control the speed of DC Motor Simple Project
TO control the speed of DC Motor Simple ProjectTO control the speed of DC Motor Simple Project
TO control the speed of DC Motor Simple Project
 
SUN Tracking Solar panel presentation
 SUN Tracking Solar panel presentation SUN Tracking Solar panel presentation
SUN Tracking Solar panel presentation
 
Stepper motor in industrial applications
Stepper motor in industrial applicationsStepper motor in industrial applications
Stepper motor in industrial applications
 
Interfacing stepper motor
Interfacing stepper motorInterfacing stepper motor
Interfacing stepper motor
 
Speed control of dc motors
Speed control of dc motors Speed control of dc motors
Speed control of dc motors
 

Similar to Doc speed control of a dc motor using micro controller 8051

MICROCONTROLLER BASED SOLAR POWER INVERTER
MICROCONTROLLER BASED SOLAR POWER INVERTERMICROCONTROLLER BASED SOLAR POWER INVERTER
MICROCONTROLLER BASED SOLAR POWER INVERTERIAEME Publication
 
Temp based fan speed control
Temp based fan speed controlTemp based fan speed control
Temp based fan speed controlSai Malleswar
 
Speed Control Of DC motor By Using PWM Technique
Speed Control Of DC motor By Using PWM TechniqueSpeed Control Of DC motor By Using PWM Technique
Speed Control Of DC motor By Using PWM TechniqueRITESH D. PATIL
 
Digital Current Mode Controller for Buck Converter
Digital Current Mode Controller for Buck ConverterDigital Current Mode Controller for Buck Converter
Digital Current Mode Controller for Buck ConverterIJMREMJournal
 
Design and Implementation of an Interface Circuit for DC Motor Speed Control ...
Design and Implementation of an Interface Circuit for DC Motor Speed Control ...Design and Implementation of an Interface Circuit for DC Motor Speed Control ...
Design and Implementation of an Interface Circuit for DC Motor Speed Control ...Firas Mohammed Ali Al-Raie
 
DC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY PIC16F877A MICROCONTROLLER
DC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY  PIC16F877A MICROCONTROLLERDC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY  PIC16F877A MICROCONTROLLER
DC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY PIC16F877A MICROCONTROLLERTridib Bose
 
sms based speed change of motor or fan
sms based speed change of motor or fansms based speed change of motor or fan
sms based speed change of motor or fanRahul Gupta
 
4 Way traffic controll new
4 Way traffic controll new4 Way traffic controll new
4 Way traffic controll newMainak Nandi
 
Power theft detection via plc
Power theft detection via plcPower theft detection via plc
Power theft detection via plcbbshashanka
 
Ac motor closedloo[p
Ac motor closedloo[pAc motor closedloo[p
Ac motor closedloo[pPrasanna Jethi
 
IRJET- Hybrid Feed Forward Control for Power Factor Correction Rectifier
IRJET-  	  Hybrid Feed Forward Control for Power Factor Correction RectifierIRJET-  	  Hybrid Feed Forward Control for Power Factor Correction Rectifier
IRJET- Hybrid Feed Forward Control for Power Factor Correction RectifierIRJET Journal
 
To control the pwm dc motor using ic555 timer
To control the pwm dc motor using ic555 timerTo control the pwm dc motor using ic555 timer
To control the pwm dc motor using ic555 timerVINAY KUMAR GUDELA
 
Speed control of D.C motor using Pusle width modulation
Speed control of D.C motor using Pusle width modulationSpeed control of D.C motor using Pusle width modulation
Speed control of D.C motor using Pusle width modulationSantoshkumarVarry
 
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLERFOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLERJournal For Research
 
Doc a.7-tlc report
Doc a.7-tlc reportDoc a.7-tlc report
Doc a.7-tlc report9951081577
 
Design and Implementation of a Microcontroller Based DC/AC Inverter
Design and Implementation of a Microcontroller Based DC/AC InverterDesign and Implementation of a Microcontroller Based DC/AC Inverter
Design and Implementation of a Microcontroller Based DC/AC InverterFiras Mohammed Ali Al-Raie
 
IRJET- Power Stolen Prevention by using PIC16882 Microcontroller
IRJET-  	  Power  Stolen  Prevention by using PIC16882 MicrocontrollerIRJET-  	  Power  Stolen  Prevention by using PIC16882 Microcontroller
IRJET- Power Stolen Prevention by using PIC16882 MicrocontrollerIRJET Journal
 

Similar to Doc speed control of a dc motor using micro controller 8051 (20)

IJET-V2I6P11
IJET-V2I6P11IJET-V2I6P11
IJET-V2I6P11
 
Final_Presentation
Final_PresentationFinal_Presentation
Final_Presentation
 
MICROCONTROLLER BASED SOLAR POWER INVERTER
MICROCONTROLLER BASED SOLAR POWER INVERTERMICROCONTROLLER BASED SOLAR POWER INVERTER
MICROCONTROLLER BASED SOLAR POWER INVERTER
 
Temp based fan speed control
Temp based fan speed controlTemp based fan speed control
Temp based fan speed control
 
Speed Control Of DC motor By Using PWM Technique
Speed Control Of DC motor By Using PWM TechniqueSpeed Control Of DC motor By Using PWM Technique
Speed Control Of DC motor By Using PWM Technique
 
Digital Current Mode Controller for Buck Converter
Digital Current Mode Controller for Buck ConverterDigital Current Mode Controller for Buck Converter
Digital Current Mode Controller for Buck Converter
 
Design and Implementation of an Interface Circuit for DC Motor Speed Control ...
Design and Implementation of an Interface Circuit for DC Motor Speed Control ...Design and Implementation of an Interface Circuit for DC Motor Speed Control ...
Design and Implementation of an Interface Circuit for DC Motor Speed Control ...
 
DC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY PIC16F877A MICROCONTROLLER
DC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY  PIC16F877A MICROCONTROLLERDC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY  PIC16F877A MICROCONTROLLER
DC MOTOR SPEED CONTROL USING ON-OFF CONTROLLER BY PIC16F877A MICROCONTROLLER
 
sms based speed change of motor or fan
sms based speed change of motor or fansms based speed change of motor or fan
sms based speed change of motor or fan
 
4 Way traffic controll new
4 Way traffic controll new4 Way traffic controll new
4 Way traffic controll new
 
Power theft detection via plc
Power theft detection via plcPower theft detection via plc
Power theft detection via plc
 
Ac motor closedloo[p
Ac motor closedloo[pAc motor closedloo[p
Ac motor closedloo[p
 
IRJET- Hybrid Feed Forward Control for Power Factor Correction Rectifier
IRJET-  	  Hybrid Feed Forward Control for Power Factor Correction RectifierIRJET-  	  Hybrid Feed Forward Control for Power Factor Correction Rectifier
IRJET- Hybrid Feed Forward Control for Power Factor Correction Rectifier
 
To control the pwm dc motor using ic555 timer
To control the pwm dc motor using ic555 timerTo control the pwm dc motor using ic555 timer
To control the pwm dc motor using ic555 timer
 
Speed control of D.C motor using Pusle width modulation
Speed control of D.C motor using Pusle width modulationSpeed control of D.C motor using Pusle width modulation
Speed control of D.C motor using Pusle width modulation
 
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLERFOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
 
Doc a.7-tlc report
Doc a.7-tlc reportDoc a.7-tlc report
Doc a.7-tlc report
 
03 TOTAL REPORT
03 TOTAL REPORT03 TOTAL REPORT
03 TOTAL REPORT
 
Design and Implementation of a Microcontroller Based DC/AC Inverter
Design and Implementation of a Microcontroller Based DC/AC InverterDesign and Implementation of a Microcontroller Based DC/AC Inverter
Design and Implementation of a Microcontroller Based DC/AC Inverter
 
IRJET- Power Stolen Prevention by using PIC16882 Microcontroller
IRJET-  	  Power  Stolen  Prevention by using PIC16882 MicrocontrollerIRJET-  	  Power  Stolen  Prevention by using PIC16882 Microcontroller
IRJET- Power Stolen Prevention by using PIC16882 Microcontroller
 

Recently uploaded

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)Dr. Mazin Mohamed alkathiri
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Recently uploaded (20)

Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

Doc speed control of a dc motor using micro controller 8051

  • 1. SPEED CONTROL OF A DC MOTOR USING MICROCONTROLLER 8051 A PROJECT REPORT Submitted by S. Kamal Viswanath (07241A0206) M. Gowtham (07241A0203) P. Ashok Kumar (06241A0205) K. Rohit Naik (07241A0247) in partial fulfillment for the award of the degree of Bachelor of Technology IN ELECTRICAL AND ELECTRONICS ENGINEERING GOKARAJU RANGARAJU INSTITUTES OF ENGINEERING AND TECHNOLOGY JNTU HYDERABAD : 500085 January 2011
  • 2. GOKARAJU RANGARAJU INSTITUTES OF ENGINEERING AND TECHNOLOGY BONAFIED CERTIFICATE This is to certify that this project report “Speed Control of DC Motor using microcontroller 8051” is the bonafied work of “Kamal Viswanath, Gowtham, Ashok Kumar, Rohith Naik” who carried out the project under my supervision. SIGNATURE SIGNATURE P.M. Sharma M. Chakravarthy HEAD OF THE DEPARTMENT PROJECT GUIDE ASSOCIATE PROFESSOR ELECTRICAL AND ELECTRONICS ELECTRICAL AND ELECTRONICS GRIET, GRIET, BACHUPALLY, KUKATPALLY, BACHUPALLY, KUKATPALLY, HYDERABAD-500 090. HYDERABAD-500 090.
  • 3. ABSTARCT The aim of developing this project is to control the speed of 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 DC motor.
  • 4. CONTENTS CHAPTER No. TITLE PAGE No. ABSTRACT iii 1. INTRODUCTION 1 1.1 DC Motor 1 1.2 Pulse Width Modulation 3 1.3 Microcontroller 6 2. FLOW CHART 8 3. BLOCK DIAGRAM 9 4. CIRCUIT DIAGRAM 10 5. HARDWARE DESCRIPTION 11 6. SOFTWARE DESCRIPTION 12 7. DATA ACQUAINTED 14 8. DATA SHEETS 16 9. COMPONENTS LISTING 24 10. REFERENCES 24
  • 5. INTRODUCTION DC MOTOR 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 ids 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
  • 6. • Series field wound type • Shunt field wound type • Compound field wound type For all these types of DC motor common methods of speed controls. Speed control methods in a DC 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 (Rheostatic 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.
  • 7. PWM 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 ∍ V0 2 dt ) ½ = k Vs • The output power and is given by Pi = 1/T ∍v0idt = 1/T ∍ v0 2 /R dt = kVs 2 /R
  • 8. • 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. Signal with half voltage (50%):
  • 9. Signal with low voltage (10%): Advantages of PWM : The main advantage of PWM is that power loss in the switching devices is very low. When a switch is off there is practically no current, and when it is on, there is almost no voltage drop across the switch. Power loss, being the product of voltage and current, is thus in both cases close to zero. PWM works also well with digital controls, which, because of their on/off nature, can easily set the needed duty cycle. Using pulse width modulation has several advantages over analog control. Using PWM to dim a lamp would produce less heat than an analog control that converts some of the current to heat. Also, if you use PWM, the entire control circuit can be digital, eliminating the need for digital-to-analog converters. Using digital control lines will reduce the susceptibility of your circuit to interference. Finally, motors may be able to operate at lower speeds if you control them with PWM. When you use an analog current to control a motor, it will not produce significant torque at low speeds. The magnetic field created by the small current will be too weak to turn the rotor. On the other hand, a PWM current can create short pulses of magnetic flux at full strength, which can turn the rotor at extremely slow speeds. The technology has become more pervasive as low cost microcontrollers incorporate PWM control. Microcontrollers offer simple
  • 10. commands to vary the duty cycle and frequencies of the PWM control signal. PWM is also used in communications to take advantage of the higher immunity to noise provided by digital signals. So by getting these pulses generated by a microcontroller we can increase the efficiency, accuracy and thus the reliability of the system. The most commonly used microcontroller is 8051 that has been used in this project for production of pulses. MICROCONTROLLER A microcontroller (abbreviated ÂľC, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. This programmes memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Advantages of Microcontroller Microcontrollers are widely used in today’s control systems for the following reasons: • Design and Simulation – Because you are programming with software, detailed simulations may be performed in advance to assure correctness of code and system performance. • Flexibility – Ability to reprogram using Flash, EEPROM or EPROM allows straightforward changes in the control law used. • High Integration – Most microcontrollers are essentially single chip computers with on-chip processing, memory, and I/O. Some contain peripherals for serial communication and reading analog signals (with an
  • 11. analog-to-digital converter or ADC). This differentiates a microcontroller from a microprocessor. Microprocessors require that this functionality be provided by added components. • Cost – Cost savings come from several locations. Development costs are greatly decreased because of the design/flexibility advantages mentioned previously. Because so many components are included on one IC, board area and component savings are often evident as well. • Easy to Use – Just program and go! While in the past, programming has often involved tedious assembly code, today C compilers are available for most microcontrollers. Microcontrollers often only require a single 5V supply as well which makes them easier to power and use. 8051 is also one such microcontroller with certain features like • An 8-bit ALU. • Harvard memory architecture – the external program memory and data memory have separate address spaces from 0x0000 and separate controlsignal(s). • 8-bit internal data bus width and 16-bit internal address bus – Harvard memory architecture • CISC (Complex Instruction Set Computer) • Special function registers (SFRs) –PSW(processor status word), A (accumulator),B register, SP (stack pointer) and registers for serial IOs, timers, ports and interrupt handler. • on-chip RAM of 128 bytes. • 32 bytes of RAM also used as four banks of registers. Each register-set thus eight registers. • External data/stack memory can be added upto 64 kB in most of the version. In certain 8051 enhancements, this limit enhanced to 16 MB. After acquiring the data about microcontroller, DC motor and PWM technique we can get into designing a circuit that uses these units in controlling the speed of a DC motor
  • 12. FLOW CHART Start Check if both switches are open No Yes Decrease speed       Speed Required       80%  No Speed Required      50%   No  Close S1&S2 
  • 16. The components are connect on a Printed Circuit Board as per the given connection details in the circuit diagram. The functioning of the circuit can be explained with respect to the action format that occurs in the circuit. As the supply is switched ON and both the switches are open the switching supplies ideally 5V is given to the microcontroller. Suppose if the any of the switch is closed the supply gets directly shorted with the ground. This indicates the microcontroller about the switch positions and thus generates the signal as per the given program for the respective switches position. The transistor used allows current to conduct through it when ever a positive pulse is given at its base that is given by the microcontroller inaccordance with the program. As the transistor is forward biased the supply that is used to run the motor gets connected with the motor terminals and motor starts running. As soon as the 0 voltage is encountered the NPN transistor used goes into reverse bias and stops its conduction so the motor’s armature supply gets disconnected till the base current is 0 volts. By this we can deduce that the speed of the motor is directly dependent on the supply given by microcontroller to the base which indeed depends on the program written. So the speeds of working of the circuit depends on the number of switches used, for instance in the above circuit two switches are used so the number of speed levels are 22 = 4. So the number of speed levels for X switches will be 2X . So the speed of the motor can be varied in steps. SOFTWARE DESCRIPTION #include<reg51.h> These are the ports from where the microcontroller gets the information about the switch positions.
  • 17. 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() { int x; while(1) { if(SW_1==0 & SW_2==0) { This condition is stated when both the switches are closed in this position the supply from the switches is shorted into the ground terminal so microcontroller doesn’t get any voltage so the switches are considered as 0’s. At this condition the program is written so that the output signal given by the microcontroller should have 150 machine cycles of ON state and 600 machine cycles of OFF state. MTR=1; for(x=0;x<150;x++); MTR=0; for(x=0;x<600;x++); } if(SW_1==0 & SW_2==1) { This condition is stated when the switch1 is closed 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 is considered as 0. Similarly switch 2 is open and supply is sent to microcontroller so it is considered 1.At this condition the program is written so that the output signal given by the microcontroller should have 300 machine cycles of ON state and 300 machine cycles of OFF state. MTR=1; for(x=0;x<300;x++); MTR=0; for(x=0;x<300;x++); } if(SW_1==1 & SW_2==0) { This condition is stated when the switch2 is closed 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 supply is sent to microcontroller so it is considered 1.At this condition the program is written so that the output signal given by the microcontroller should have 600 machine cycles of ON state and 150 machine MTR=1;
  • 18. for(x=0;x<600;x++); MTR=0; for(x=0;x<150;x++); } if(SW_1==1 & SW_2==1) In this condition both the switches are open so they are stated as 1’s and in this condition the motor runs at full speed. { MTR=1; } } } DATA AQUAINTED Condition 1 when both the switches are open:
  • 19. Voltage Speed 4.3V 860 rpm Condition 2 when switch SW1 is closed: Voltage Speed Average speed 4.3V 860rpm 3.6V 720rpm 790 rpm Condition 3 when switch SW2 is closed:
  • 20. Voltage Speed Average speed 4.3V 860rpm 3.9V 780rpm 820 rpm Condition 4 when both the switches are closed: Voltage Speed Average speed 4.3V 860rpm 3.3V 660rpm 760 rpm
  • 21. COMPONENT LIST Name of the Component Make Value Number AT89C51 Micro Controller ATMEL 1 Resistors R1,R2 10KΩ 2 Capacitors C1,C2 1nF 2 Capacitor C3 1mF 1 Diode D1 IN4004 1 Transistor T1 TIP122 1 Switches SW1,SW2 2 DC Motor AMETECK 12Volts 1 DC Adapter Q1(C) 12 Volts 1 DC Adapter Q2(C) 5 Volts 1 Crystal Oscillator X1 12MHz 1 REFERENCES • Books on DC motors: Driving DC Motors by G. MAIOCCHI, DC Motors and drives by BL. THERAJA. • Books on PWM technique: Pulse Width Modulated Power supplies by VALTER QUERCIOLI. • Books on Microcontroller: The 8051 microcontroller and embedded systems by JANICE GILLISPIE MAZIDI.