SlideShare a Scribd company logo
1 of 10
SPEED CONTROL OF DC MOTOR Page 1
International Islamic University
Islamabad
CONTROL SYSTEM LAB PROJECT
SPEED CONTROL OF DC MOTOR
Group Members:
Mafaz Ahmed 1882-F12D
Rafi Uzman 1891-F12D
Submitted To:
Sir Muhammad Asad
SPEED CONTROL OF DC MOTOR Page 2
TABLE OF CONTENTS Page
1. Introduction …………………………………………………….(3)
2. Schematic …………………………………………………….(3)
3. DC MOTOR …………………………………………………….(3)
 Types
4. Arduino …………………………………………………….(4)
 Featured
5. PCB design …………………………………………………….(5)
6. H-Bridge …………………………………………………….(6)
7. Optocoupler ……………….…………………………………….(7)
8. Rotary Encoder ………………………….………………………….(8)
9. Code …………………………………………………….(8)
10.Conclusion …………………………………………..……….(10)
11.References …………………………………………………….(10)
SPEED CONTROL OF DC MOTOR Page 3
INTRODUCTION:
In this project wewill be controlling the speed of Dc motor
using Arduino controller. Dc motor is driveby using PWM technique and then
using encoder to sensethe rpm of DC motor. Encoder produces pulses in the
output, which is feed into Arduino and Arduino controls the speed of DC
motor. So we have implemented the feedback systemwhich controls the
speed of DCmotor.
Schematic:
DC motor:
DC motor is a type of electric machines which converts direct current
into mechanical power. The very basic construction ofa dc motor contains
a current carrying armature which is connected to the supplyend through
commutatorsegments and brushes and placed within the north south
poles of a permanent or an electro-magnet.
ARDUINO
DC motor
ENCODER
and SENSOR
H-Bridge
SPEED CONTROL OF DC MOTOR Page 4
TYPES:
There are three types of DC motor,
1. ShuntDC motor
2. Series DC motor
3. Compound DC motor
Arduino:
Arduino is an open sourcecomputer hardware. An Arduino board
consists of an Atmel 8-, 16- or 32-bit AVRmicrocontroller with complementary
components that facilitate programming and incorporation into other circuits.
Ithas 14 digital input/output pins (of which 6 can be used as PWMoutputs), 6
analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an
ICSP header, and a resetbutton. Itcontains everything needed to supportthe
microcontroller; simply connect it to a computer with a USB cable or power it
with AC-to-DC adapter or battery.
SPEED CONTROL OF DC MOTOR Page 5
FEATURES:
Microcontroller ATmega8
Operating Voltage 5V
InputVoltage (recommended) 7-12V
InputVoltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 providePWMoutput)
Analog InputPins 6
DC Currentper I/O Pin 40 mA
DC Currentfor 3.3V Pin 50 mA
EEPROM 1 KB
Clock Speed 16 MHz
PCB design:
SPEED CONTROL OF DC MOTOR Page 6
H-Bridge (L293D):
An H bridgeis an electronic circuit that enables a
voltage to be applied across a load in either direction. These circuits are often
used in robotics and other applications to allow DC motors to run forwards and
backwards.
L293D is a dual H-bridgemotor driver integrated circuit (IC). Motor drivers act
as current amplifiers since they take a low-currentcontrolsignaland providea
higher-currentsignal. This higher current signalis used to drivethe motors.
L293D contains two inbuilt H-bridgedriver circuits. In its common mode of
operation, two DC motors can be driven simultaneously, both in forward and
reversedirection. The motor operations of two motors can be controlled by
input logic at pins 2 & 7 and 10 & 15. Inputlogic 00 or 11 will stop the
corresponding motor. Logic 01 and 10 will rotate it in clockwiseand
anticlockwisedirections, respectively. Enable pins 1 and 9 (corresponding to
the two motors) mustbe high for motors to start operating. When an enable
input is high, the associated driver gets enabled. As a result, the outputs
become active and work in phase with their inputs. Similarly, when the enable
input is low, that driver is disabled, and their outputs are off and in the high-
impedance state.
SPEED CONTROL OF DC MOTOR Page 7
Optocoupler:
An optical coupler, also called opto-isolator,
optocoupler, optocoupler, photocoupler or optical isolator, is a passiveoptical
component that can combine or split transmission data (optical power) from
optical fibers. Itis an electronic device which is designed to transfer electrical
signals by using light waves in order to providecoupling with electrical
isolation between its input and output. The main purposeof an optocoupler is
to prevent rapidly changing voltages or high voltages on one side of a circuit
fromdistorting transmissions or damaging components on the other side of
the circuit.
SPEED CONTROL OF DC MOTOR Page 8
Rotary Encoder:
A rotary encoder is an electro-mechanical device that
converts the angular position or motion of a shaftor axle to an analog or digital
code. Our encoder is self-made which is attach to the motor.
CODE:
float rev=0;
int rpm;
int prpm=1100;
int dcyl=155;
int oldtime=0;
int time;
void isr() //interruptservice routine
{rev++;
}
void setup()
{attachInterrupt(0,isr,FALLING); //attaching the interrupt
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
}void loop()
{
delay(2000);
detachInterrupt(0); //detaches the interrupt
time=millis()-oldtime; //finds the time
SPEED CONTROL OF DC MOTOR Page 9
rpm=(rev/(2*time))*60000; //calculates rpm
oldtime=millis(); //saves the currenttime
rev=0;
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
if(rpm>(prpm-10 ) && rpm<(prpm+10))
{dcyl=dcyl;}
else if(rpm>prpm)
{ if (dcyl>154)
dcyl-=5;}
else if(rpm<prpm)
{ if (dcyl<251)
dcyl+=5;}
else
dcyl=dcyl;
analogWrite(9, dcyl);
//sets the desired speed
//finds the duty cycle %
attachInterrupt(0,isr,FALLING);
delay(200);
}
SPEED CONTROL OF DC MOTOR Page 10
Conclusion:
We haveimplemented a feedback control of DCmotor. When
Speed changes, sensor (auto coupler) output changes (pulses). Fromthe pulses
Arduino detects change of speed, and tries to minimize it by increasing the
duty cycle.
REFERENCES:
http://en.wikipedia.org/wiki/Arduino
http://www.electrical4u.com/working-or-operating-principle-of-dc-motor/
http://www.arduino.cc/en/Main/ArduinoBoardUno
https://www.futureelectronics.com/en/optoelectronics/optocouplers.aspx

More Related Content

What's hot

speed control of three phase induction motor
speed control of three phase induction motorspeed control of three phase induction motor
speed control of three phase induction motorAshvani Shukla
 
FOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLER
FOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLERFOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLER
FOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLERshiv kapil
 
3 ph induction motor ppt
3 ph induction motor ppt3 ph induction motor ppt
3 ph induction motor pptAjay Balar
 
Buck-Boost Converter
Buck-Boost ConverterBuck-Boost Converter
Buck-Boost ConverterSagar Patil
 
Metal detector robot
Metal detector robotMetal detector robot
Metal detector robotf114n
 
Three phase inverter - 180 and 120 Degree Mode of Conduction
Three phase inverter - 180 and 120 Degree Mode of ConductionThree phase inverter - 180 and 120 Degree Mode of Conduction
Three phase inverter - 180 and 120 Degree Mode of ConductionMalarselvamV
 
Extra high voltage long ac transmission lines
Extra high voltage long ac transmission linesExtra high voltage long ac transmission lines
Extra high voltage long ac transmission linesShivagee Raj
 
Current Source Inverter and Voltage Source Inverter
Current Source Inverter and Voltage Source Inverter Current Source Inverter and Voltage Source Inverter
Current Source Inverter and Voltage Source Inverter Sadanand Purohit
 
Street Light that Glows on Detecting Vehicle Movement
Street Light that Glows on Detecting Vehicle MovementStreet Light that Glows on Detecting Vehicle Movement
Street Light that Glows on Detecting Vehicle MovementEdgefxkits & Solutions
 
Speed Control of DC Motor using Microcontroller
Speed Control of DC Motor using MicrocontrollerSpeed Control of DC Motor using Microcontroller
Speed Control of DC Motor using MicrocontrollerSudip Mondal
 
Obstacle avoidance robot
Obstacle avoidance robotObstacle avoidance robot
Obstacle avoidance robotRahuldey1991
 
Closed loop speed control
Closed loop speed controlClosed loop speed control
Closed loop speed controlAbhishek Choksi
 
Gesture Control Robot
Gesture Control RobotGesture Control Robot
Gesture Control Robotnikhilsaini25
 
Automatic control of street light using LDR
Automatic control of street light using LDRAutomatic control of street light using LDR
Automatic control of street light using LDRDevang Loharikar
 
Power electronics Introduction
Power electronics   IntroductionPower electronics   Introduction
Power electronics IntroductionBurdwan University
 
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEMAUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEMJOLLUSUDARSHANREDDY
 

What's hot (20)

Artificial intelligence in Power Stations
Artificial intelligence in Power StationsArtificial intelligence in Power Stations
Artificial intelligence in Power Stations
 
speed control of three phase induction motor
speed control of three phase induction motorspeed control of three phase induction motor
speed control of three phase induction motor
 
ppt on inveters
ppt on invetersppt on inveters
ppt on inveters
 
FOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLER
FOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLERFOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLER
FOUR QUADRANT DC MOTOR SPEED CONTROL WITH MICROCONTROLLER
 
3 ph induction motor ppt
3 ph induction motor ppt3 ph induction motor ppt
3 ph induction motor ppt
 
Sensors
SensorsSensors
Sensors
 
Buck-Boost Converter
Buck-Boost ConverterBuck-Boost Converter
Buck-Boost Converter
 
Metal detector robot
Metal detector robotMetal detector robot
Metal detector robot
 
Three phase inverter - 180 and 120 Degree Mode of Conduction
Three phase inverter - 180 and 120 Degree Mode of ConductionThree phase inverter - 180 and 120 Degree Mode of Conduction
Three phase inverter - 180 and 120 Degree Mode of Conduction
 
Extra high voltage long ac transmission lines
Extra high voltage long ac transmission linesExtra high voltage long ac transmission lines
Extra high voltage long ac transmission lines
 
Current Source Inverter and Voltage Source Inverter
Current Source Inverter and Voltage Source Inverter Current Source Inverter and Voltage Source Inverter
Current Source Inverter and Voltage Source Inverter
 
Street Light that Glows on Detecting Vehicle Movement
Street Light that Glows on Detecting Vehicle MovementStreet Light that Glows on Detecting Vehicle Movement
Street Light that Glows on Detecting Vehicle Movement
 
Speed Control of DC Motor using Microcontroller
Speed Control of DC Motor using MicrocontrollerSpeed Control of DC Motor using Microcontroller
Speed Control of DC Motor using Microcontroller
 
Bldc motors ppt
Bldc motors pptBldc motors ppt
Bldc motors ppt
 
Obstacle avoidance robot
Obstacle avoidance robotObstacle avoidance robot
Obstacle avoidance robot
 
Closed loop speed control
Closed loop speed controlClosed loop speed control
Closed loop speed control
 
Gesture Control Robot
Gesture Control RobotGesture Control Robot
Gesture Control Robot
 
Automatic control of street light using LDR
Automatic control of street light using LDRAutomatic control of street light using LDR
Automatic control of street light using LDR
 
Power electronics Introduction
Power electronics   IntroductionPower electronics   Introduction
Power electronics Introduction
 
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEMAUTOMATIC RAILWAY GATE CONTROL SYSTEM
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
 

Viewers also liked

Report on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm methodReport on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm methodshivam singh
 
Speed control of dc motor using pulse width modulation
Speed control of dc motor using pulse width modulationSpeed control of dc motor using pulse width modulation
Speed control of dc motor using pulse width modulationviveksinghdew
 
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
 
Speed control of DC Machine
Speed control of DC MachineSpeed control of DC Machine
Speed control of DC MachineSHAHBAAZ AHMED
 
Doc speed control of a dc motor using micro controller 8051
Doc speed control of a dc motor using micro controller 8051Doc speed control of a dc motor using micro controller 8051
Doc speed control of a dc motor using micro controller 8051embdnew
 
BIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLER
BIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLERBIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLER
BIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLERShanmukha S. Potti
 
BLDC Motor Speed Control with RPM Display and PWM
BLDC Motor Speed Control with RPM Display and PWMBLDC Motor Speed Control with RPM Display and PWM
BLDC Motor Speed Control with RPM Display and PWMEdgefxkits & Solutions
 
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
 
Parallel Operation on Alternators.
Parallel Operation on Alternators.Parallel Operation on Alternators.
Parallel Operation on Alternators.R-One Power
 
To control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWTo control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWAnkita Tiwari
 
An overview of a continuous monitoring and control system for 3 phase induct
An overview of a continuous monitoring and control system for 3 phase inductAn overview of a continuous monitoring and control system for 3 phase induct
An overview of a continuous monitoring and control system for 3 phase inductIAEME Publication
 
Dc motor speed control with feedback monitor based on c# application
Dc motor speed control with feedback monitor based on c# applicationDc motor speed control with feedback monitor based on c# application
Dc motor speed control with feedback monitor based on c# applicationeSAT Journals
 
Power electronics titles 2015 2016
Power electronics titles 2015 2016Power electronics titles 2015 2016
Power electronics titles 2015 2016igeeks1234
 
Best Practices for Motion Control: Stepper Motor and Encoder Selection
Best Practices for Motion Control: Stepper Motor and Encoder SelectionBest Practices for Motion Control: Stepper Motor and Encoder Selection
Best Practices for Motion Control: Stepper Motor and Encoder SelectionDesign World
 
implementing pid controller in c programing
implementing pid controller in c programingimplementing pid controller in c programing
implementing pid controller in c programingYared Tadesse
 
Low drift high impedance jfet dc voltmeter
Low drift high impedance jfet dc voltmeterLow drift high impedance jfet dc voltmeter
Low drift high impedance jfet dc voltmeterMafaz Ahmed
 
Implementing a Digital Stopwatch Using Basic Stamp2
Implementing a Digital Stopwatch Using Basic Stamp2Implementing a Digital Stopwatch Using Basic Stamp2
Implementing a Digital Stopwatch Using Basic Stamp2Vijay Elavunkal
 
Series and parallel operation of power devices
Series and parallel operation of power devicesSeries and parallel operation of power devices
Series and parallel operation of power devicesMafaz Ahmed
 

Viewers also liked (20)

Report on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm methodReport on speed control of d.c. motor using pwm method
Report on speed control of d.c. motor using pwm method
 
Dc motor speed control
Dc motor speed controlDc motor speed control
Dc motor speed control
 
Speed control of dc motor using pulse width modulation
Speed control of dc motor using pulse width modulationSpeed control of dc motor using pulse width modulation
Speed control of dc motor using pulse width modulation
 
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
 
Speed control of DC Machine
Speed control of DC MachineSpeed control of DC Machine
Speed control of DC Machine
 
Speed Controller for DC Motor
Speed Controller for DC MotorSpeed Controller for DC Motor
Speed Controller for DC Motor
 
Doc speed control of a dc motor using micro controller 8051
Doc speed control of a dc motor using micro controller 8051Doc speed control of a dc motor using micro controller 8051
Doc speed control of a dc motor using micro controller 8051
 
BIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLER
BIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLERBIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLER
BIDIRECTIONAL SPEED CONTROL OF DC MOTOR USING 8051 MICROCONTROLLER
 
BLDC Motor Speed Control with RPM Display and PWM
BLDC Motor Speed Control with RPM Display and PWMBLDC Motor Speed Control with RPM Display and PWM
BLDC Motor Speed Control with RPM Display and PWM
 
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
 
Parallel Operation on Alternators.
Parallel Operation on Alternators.Parallel Operation on Alternators.
Parallel Operation on Alternators.
 
To control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEWTo control the dc motor speed using PWM from LabVIEW
To control the dc motor speed using PWM from LabVIEW
 
An overview of a continuous monitoring and control system for 3 phase induct
An overview of a continuous monitoring and control system for 3 phase inductAn overview of a continuous monitoring and control system for 3 phase induct
An overview of a continuous monitoring and control system for 3 phase induct
 
Dc motor speed control with feedback monitor based on c# application
Dc motor speed control with feedback monitor based on c# applicationDc motor speed control with feedback monitor based on c# application
Dc motor speed control with feedback monitor based on c# application
 
Power electronics titles 2015 2016
Power electronics titles 2015 2016Power electronics titles 2015 2016
Power electronics titles 2015 2016
 
Best Practices for Motion Control: Stepper Motor and Encoder Selection
Best Practices for Motion Control: Stepper Motor and Encoder SelectionBest Practices for Motion Control: Stepper Motor and Encoder Selection
Best Practices for Motion Control: Stepper Motor and Encoder Selection
 
implementing pid controller in c programing
implementing pid controller in c programingimplementing pid controller in c programing
implementing pid controller in c programing
 
Low drift high impedance jfet dc voltmeter
Low drift high impedance jfet dc voltmeterLow drift high impedance jfet dc voltmeter
Low drift high impedance jfet dc voltmeter
 
Implementing a Digital Stopwatch Using Basic Stamp2
Implementing a Digital Stopwatch Using Basic Stamp2Implementing a Digital Stopwatch Using Basic Stamp2
Implementing a Digital Stopwatch Using Basic Stamp2
 
Series and parallel operation of power devices
Series and parallel operation of power devicesSeries and parallel operation of power devices
Series and parallel operation of power devices
 

Similar to Speed Control of DC Motor

Design and Development of a prototype of AGV
Design and Development of a prototype of AGVDesign and Development of a prototype of AGV
Design and Development of a prototype of AGVKUNJBIHARISINGH5
 
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
 
major project ppt 27-4-16
major project ppt 27-4-16major project ppt 27-4-16
major project ppt 27-4-16rafiya begum
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLshiv kapil
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Boxncct
 
Arm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC MotorArm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC MotorUday Wankar
 
Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control Uday Wankar
 
Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control Uday Wankar
 
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...moiz89
 
A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...
A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...
A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...IRJET Journal
 
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...IRJET Journal
 
LINE FOLLOWER ROBOT
LINE FOLLOWER ROBOTLINE FOLLOWER ROBOT
LINE FOLLOWER ROBOTrehaan ukaye
 

Similar to Speed Control of DC Motor (20)

Design and Development of a prototype of AGV
Design and Development of a prototype of AGVDesign and Development of a prototype of AGV
Design and Development of a prototype of AGV
 
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
 
major project ppt 27-4-16
major project ppt 27-4-16major project ppt 27-4-16
major project ppt 27-4-16
 
Metal Detector Robotic Vehicle
Metal Detector Robotic VehicleMetal Detector Robotic Vehicle
Metal Detector Robotic Vehicle
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROL
 
PLCandSCADA.pdf
PLCandSCADA.pdfPLCandSCADA.pdf
PLCandSCADA.pdf
 
Manual fsr'14
Manual fsr'14Manual fsr'14
Manual fsr'14
 
Cockpit White Box
Cockpit White BoxCockpit White Box
Cockpit White Box
 
Arm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC MotorArm Processor Based Speed Control Of BLDC Motor
Arm Processor Based Speed Control Of BLDC Motor
 
Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control
 
Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control Arm cortex ( lpc 2148 ) based motor speed control
Arm cortex ( lpc 2148 ) based motor speed control
 
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
 
Wifi controlled rover prototype
Wifi controlled rover prototypeWifi controlled rover prototype
Wifi controlled rover prototype
 
INTELIGENT RAILWAY SYSTEM
INTELIGENT RAILWAY SYSTEMINTELIGENT RAILWAY SYSTEM
INTELIGENT RAILWAY SYSTEM
 
Ppt
PptPpt
Ppt
 
Obstacle avoiding robot(Lab report)
Obstacle  avoiding  robot(Lab report)Obstacle  avoiding  robot(Lab report)
Obstacle avoiding robot(Lab report)
 
A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...
A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...
A Low Cost Yet Super efficient Means to Prevent Overloading as Well as Accide...
 
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
IRJET- Testing the Induction Motor Voltage, Current, Torque, Speed, Power and...
 
Module 4
Module 4Module 4
Module 4
 
LINE FOLLOWER ROBOT
LINE FOLLOWER ROBOTLINE FOLLOWER ROBOT
LINE FOLLOWER ROBOT
 

More from Mafaz Ahmed

A course in fuzzy systems and control by li xin wang solution manual
A course in fuzzy systems and control by li xin wang solution manualA course in fuzzy systems and control by li xin wang solution manual
A course in fuzzy systems and control by li xin wang solution manualMafaz Ahmed
 
INTERACTIVE FLOOR PROJECTION SYSTEM
INTERACTIVE FLOOR PROJECTION  SYSTEMINTERACTIVE FLOOR PROJECTION  SYSTEM
INTERACTIVE FLOOR PROJECTION SYSTEMMafaz Ahmed
 
Series and parallel connection of igbt
Series and parallel connection of igbtSeries and parallel connection of igbt
Series and parallel connection of igbtMafaz Ahmed
 
Series and parallel connection of mosfet
Series and parallel connection of mosfetSeries and parallel connection of mosfet
Series and parallel connection of mosfetMafaz Ahmed
 
Electronic Instrumentation and Measurement Solution Manual
Electronic Instrumentation and Measurement Solution ManualElectronic Instrumentation and Measurement Solution Manual
Electronic Instrumentation and Measurement Solution ManualMafaz Ahmed
 
Internet of Things
Internet of ThingsInternet of Things
Internet of ThingsMafaz Ahmed
 
Interoperability among various Generations of Telecom Technologies
Interoperability among various Generations of Telecom TechnologiesInteroperability among various Generations of Telecom Technologies
Interoperability among various Generations of Telecom TechnologiesMafaz Ahmed
 
Energy Crisis, Different Energy Sources and Role of Power Electronics
Energy Crisis, Different Energy Sources and Role of Power ElectronicsEnergy Crisis, Different Energy Sources and Role of Power Electronics
Energy Crisis, Different Energy Sources and Role of Power ElectronicsMafaz Ahmed
 
RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...
RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...
RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...Mafaz Ahmed
 
Temperature Control Fan Using 8051 Microcontroller
Temperature Control Fan Using 8051 MicrocontrollerTemperature Control Fan Using 8051 Microcontroller
Temperature Control Fan Using 8051 MicrocontrollerMafaz Ahmed
 
Project Management Project
Project Management ProjectProject Management Project
Project Management ProjectMafaz Ahmed
 
Real Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGAReal Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGAMafaz Ahmed
 
Tweety modelling in pro engineering
Tweety modelling in pro engineeringTweety modelling in pro engineering
Tweety modelling in pro engineeringMafaz Ahmed
 
Truck modelling in pro engineering
Truck modelling in pro engineeringTruck modelling in pro engineering
Truck modelling in pro engineeringMafaz Ahmed
 
Bicycle modelling in pro engineering
Bicycle modelling in pro engineeringBicycle modelling in pro engineering
Bicycle modelling in pro engineeringMafaz Ahmed
 
Laptop modelling in pro engineering
Laptop modelling in pro engineeringLaptop modelling in pro engineering
Laptop modelling in pro engineeringMafaz Ahmed
 
Chair modelling in pro engineering
Chair modelling in pro engineeringChair modelling in pro engineering
Chair modelling in pro engineeringMafaz Ahmed
 
Fsk modulation and demodulation
Fsk modulation and demodulationFsk modulation and demodulation
Fsk modulation and demodulationMafaz Ahmed
 

More from Mafaz Ahmed (20)

A course in fuzzy systems and control by li xin wang solution manual
A course in fuzzy systems and control by li xin wang solution manualA course in fuzzy systems and control by li xin wang solution manual
A course in fuzzy systems and control by li xin wang solution manual
 
INTERACTIVE FLOOR PROJECTION SYSTEM
INTERACTIVE FLOOR PROJECTION  SYSTEMINTERACTIVE FLOOR PROJECTION  SYSTEM
INTERACTIVE FLOOR PROJECTION SYSTEM
 
Series and parallel connection of igbt
Series and parallel connection of igbtSeries and parallel connection of igbt
Series and parallel connection of igbt
 
Series and parallel connection of mosfet
Series and parallel connection of mosfetSeries and parallel connection of mosfet
Series and parallel connection of mosfet
 
Electronic Instrumentation and Measurement Solution Manual
Electronic Instrumentation and Measurement Solution ManualElectronic Instrumentation and Measurement Solution Manual
Electronic Instrumentation and Measurement Solution Manual
 
Project loon
Project loonProject loon
Project loon
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
Interoperability among various Generations of Telecom Technologies
Interoperability among various Generations of Telecom TechnologiesInteroperability among various Generations of Telecom Technologies
Interoperability among various Generations of Telecom Technologies
 
Dc motor drive
Dc motor driveDc motor drive
Dc motor drive
 
Energy Crisis, Different Energy Sources and Role of Power Electronics
Energy Crisis, Different Energy Sources and Role of Power ElectronicsEnergy Crisis, Different Energy Sources and Role of Power Electronics
Energy Crisis, Different Energy Sources and Role of Power Electronics
 
RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...
RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...
RADIO ON RADIO OVER FIBER EFFICIENT FRONTHAULING FOR SMALL CELLS AND MOVING C...
 
Temperature Control Fan Using 8051 Microcontroller
Temperature Control Fan Using 8051 MicrocontrollerTemperature Control Fan Using 8051 Microcontroller
Temperature Control Fan Using 8051 Microcontroller
 
Project Management Project
Project Management ProjectProject Management Project
Project Management Project
 
Real Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGAReal Time Clock Interfacing with FPGA
Real Time Clock Interfacing with FPGA
 
Tweety modelling in pro engineering
Tweety modelling in pro engineeringTweety modelling in pro engineering
Tweety modelling in pro engineering
 
Truck modelling in pro engineering
Truck modelling in pro engineeringTruck modelling in pro engineering
Truck modelling in pro engineering
 
Bicycle modelling in pro engineering
Bicycle modelling in pro engineeringBicycle modelling in pro engineering
Bicycle modelling in pro engineering
 
Laptop modelling in pro engineering
Laptop modelling in pro engineeringLaptop modelling in pro engineering
Laptop modelling in pro engineering
 
Chair modelling in pro engineering
Chair modelling in pro engineeringChair modelling in pro engineering
Chair modelling in pro engineering
 
Fsk modulation and demodulation
Fsk modulation and demodulationFsk modulation and demodulation
Fsk modulation and demodulation
 

Recently uploaded

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Coursebim.edu.pl
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewsandhya757531
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfisabel213075
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodManicka Mamallan Andavar
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solidnamansinghjarodiya
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSsandhya757531
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Communityprachaibot
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfManish Kumar
 

Recently uploaded (20)

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
Katarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School CourseKatarzyna Lipka-Sidor - BIM School Course
Katarzyna Lipka-Sidor - BIM School Course
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Artificial Intelligence in Power System overview
Artificial Intelligence in Power System overviewArtificial Intelligence in Power System overview
Artificial Intelligence in Power System overview
 
List of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdfList of Accredited Concrete Batching Plant.pdf
List of Accredited Concrete Batching Plant.pdf
 
Levelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument methodLevelling - Rise and fall - Height of instrument method
Levelling - Rise and fall - Height of instrument method
 
Engineering Drawing section of solid
Engineering Drawing     section of solidEngineering Drawing     section of solid
Engineering Drawing section of solid
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Prach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism CommunityPrach: A Feature-Rich Platform Empowering the Autism Community
Prach: A Feature-Rich Platform Empowering the Autism Community
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdfModule-1-(Building Acoustics) Noise Control (Unit-3). pdf
Module-1-(Building Acoustics) Noise Control (Unit-3). pdf
 

Speed Control of DC Motor

  • 1. SPEED CONTROL OF DC MOTOR Page 1 International Islamic University Islamabad CONTROL SYSTEM LAB PROJECT SPEED CONTROL OF DC MOTOR Group Members: Mafaz Ahmed 1882-F12D Rafi Uzman 1891-F12D Submitted To: Sir Muhammad Asad
  • 2. SPEED CONTROL OF DC MOTOR Page 2 TABLE OF CONTENTS Page 1. Introduction …………………………………………………….(3) 2. Schematic …………………………………………………….(3) 3. DC MOTOR …………………………………………………….(3)  Types 4. Arduino …………………………………………………….(4)  Featured 5. PCB design …………………………………………………….(5) 6. H-Bridge …………………………………………………….(6) 7. Optocoupler ……………….…………………………………….(7) 8. Rotary Encoder ………………………….………………………….(8) 9. Code …………………………………………………….(8) 10.Conclusion …………………………………………..……….(10) 11.References …………………………………………………….(10)
  • 3. SPEED CONTROL OF DC MOTOR Page 3 INTRODUCTION: In this project wewill be controlling the speed of Dc motor using Arduino controller. Dc motor is driveby using PWM technique and then using encoder to sensethe rpm of DC motor. Encoder produces pulses in the output, which is feed into Arduino and Arduino controls the speed of DC motor. So we have implemented the feedback systemwhich controls the speed of DCmotor. Schematic: DC motor: DC motor is a type of electric machines which converts direct current into mechanical power. The very basic construction ofa dc motor contains a current carrying armature which is connected to the supplyend through commutatorsegments and brushes and placed within the north south poles of a permanent or an electro-magnet. ARDUINO DC motor ENCODER and SENSOR H-Bridge
  • 4. SPEED CONTROL OF DC MOTOR Page 4 TYPES: There are three types of DC motor, 1. ShuntDC motor 2. Series DC motor 3. Compound DC motor Arduino: Arduino is an open sourcecomputer hardware. An Arduino board consists of an Atmel 8-, 16- or 32-bit AVRmicrocontroller with complementary components that facilitate programming and incorporation into other circuits. Ithas 14 digital input/output pins (of which 6 can be used as PWMoutputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a resetbutton. Itcontains everything needed to supportthe microcontroller; simply connect it to a computer with a USB cable or power it with AC-to-DC adapter or battery.
  • 5. SPEED CONTROL OF DC MOTOR Page 5 FEATURES: Microcontroller ATmega8 Operating Voltage 5V InputVoltage (recommended) 7-12V InputVoltage (limits) 6-20V Digital I/O Pins 14 (of which 6 providePWMoutput) Analog InputPins 6 DC Currentper I/O Pin 40 mA DC Currentfor 3.3V Pin 50 mA EEPROM 1 KB Clock Speed 16 MHz PCB design:
  • 6. SPEED CONTROL OF DC MOTOR Page 6 H-Bridge (L293D): An H bridgeis an electronic circuit that enables a voltage to be applied across a load in either direction. These circuits are often used in robotics and other applications to allow DC motors to run forwards and backwards. L293D is a dual H-bridgemotor driver integrated circuit (IC). Motor drivers act as current amplifiers since they take a low-currentcontrolsignaland providea higher-currentsignal. This higher current signalis used to drivethe motors. L293D contains two inbuilt H-bridgedriver circuits. In its common mode of operation, two DC motors can be driven simultaneously, both in forward and reversedirection. The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Inputlogic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwiseand anticlockwisedirections, respectively. Enable pins 1 and 9 (corresponding to the two motors) mustbe high for motors to start operating. When an enable input is high, the associated driver gets enabled. As a result, the outputs become active and work in phase with their inputs. Similarly, when the enable input is low, that driver is disabled, and their outputs are off and in the high- impedance state.
  • 7. SPEED CONTROL OF DC MOTOR Page 7 Optocoupler: An optical coupler, also called opto-isolator, optocoupler, optocoupler, photocoupler or optical isolator, is a passiveoptical component that can combine or split transmission data (optical power) from optical fibers. Itis an electronic device which is designed to transfer electrical signals by using light waves in order to providecoupling with electrical isolation between its input and output. The main purposeof an optocoupler is to prevent rapidly changing voltages or high voltages on one side of a circuit fromdistorting transmissions or damaging components on the other side of the circuit.
  • 8. SPEED CONTROL OF DC MOTOR Page 8 Rotary Encoder: A rotary encoder is an electro-mechanical device that converts the angular position or motion of a shaftor axle to an analog or digital code. Our encoder is self-made which is attach to the motor. CODE: float rev=0; int rpm; int prpm=1100; int dcyl=155; int oldtime=0; int time; void isr() //interruptservice routine {rev++; } void setup() {attachInterrupt(0,isr,FALLING); //attaching the interrupt pinMode(9, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); }void loop() { delay(2000); detachInterrupt(0); //detaches the interrupt time=millis()-oldtime; //finds the time
  • 9. SPEED CONTROL OF DC MOTOR Page 9 rpm=(rev/(2*time))*60000; //calculates rpm oldtime=millis(); //saves the currenttime rev=0; digitalWrite(7, LOW); digitalWrite(8, HIGH); if(rpm>(prpm-10 ) && rpm<(prpm+10)) {dcyl=dcyl;} else if(rpm>prpm) { if (dcyl>154) dcyl-=5;} else if(rpm<prpm) { if (dcyl<251) dcyl+=5;} else dcyl=dcyl; analogWrite(9, dcyl); //sets the desired speed //finds the duty cycle % attachInterrupt(0,isr,FALLING); delay(200); }
  • 10. SPEED CONTROL OF DC MOTOR Page 10 Conclusion: We haveimplemented a feedback control of DCmotor. When Speed changes, sensor (auto coupler) output changes (pulses). Fromthe pulses Arduino detects change of speed, and tries to minimize it by increasing the duty cycle. REFERENCES: http://en.wikipedia.org/wiki/Arduino http://www.electrical4u.com/working-or-operating-principle-of-dc-motor/ http://www.arduino.cc/en/Main/ArduinoBoardUno https://www.futureelectronics.com/en/optoelectronics/optocouplers.aspx