Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 18

INTRODUCTION

Today’s industries are increasingly demanding process automation in all sectors.


Automation results in better quality, increased production and reduced costs.
The variable speed drives, which can control the speed of A.C./D.C. motors, are
indispensable controlling elements in automation system. Depending on the
applications, some of them are fixed speed and some of the variable speed
drives.

The variable speed drives, till a couple of decades back, had various limitations,
such as poor efficiencies, larger space, lower speeds etc., however the above
advent power electronic devices such as power MOSFETs, IGBTs, etc., and also
with the introduction of micro-controllers with many features on the same
silicon wafer, transformed the scene completely and today we have variable
speed drive systems which are not only in the smaller size but also very
efficient, highly reliable and meeting all the stringent demands of various
industries of modern era.

Direct current (D.C.) motors have been used in variable speed drives for a long
time. The versatile characteristics of dc motor can provide high starting torque
which is required for traction drives. Control over a wide speed range, both
below and above the rated speeds can be easily achieved. The methods of speed
control are simpler and less expensive than those of A.C. motors.

COMPONENTS USED
 Arduino UNO
 L293D Motor Driver IC
 12V DC Motor
 Push button
 10KΩ Potentiometer
 5V DC Adapter
 Connecting wires

1
BLOCK DIAGRAM

Figure 4: Block Diagram of the system

HARDWARE DESCRIPTION
1. Arduino Microcontroller
The Arduino is a programmable logic controller. It is a prototype platform
(open-source) based on an easy to use hardware and software used for building
electronic projects. It performs the task as per the designed application program.
Arduino is an open source embedded development platform that consists of a
simple development board based on Atmel' s AVR microcontroller. Arduino
consists of a both a physical programmable board (often referred to as a

2
microcontroller) and a piece of software or IDE (Integrated Development
Environment) that runs on your computer, used to write and upload computer
code to the physical board.

Key Features:
The key features are –

1. Arduino UNO is available with both the ATmega8 and the ATmega328.

2. Compatible with all Arduino development tools, hardware, etc. and can be
used as a direct cost effective replacement for the official Arduino.

3. Completely open source, hence easy to understand, work with and modify as
per individual requirements.

4. Huge online community for help and assistance.

5. Can be powered through USB or through an external power input(7-15 V


DC).

6. Power Status LED(Green) along with a general purpose LED connected to


Pin 13.

7. Onboard quartz crystal 16 MHz oscillator circuit.

8. A right angled reset switch which can be used even when a shield is plugged
onto the board.

9. All IO pins are brought out to female header pins, for easy plugging of wires
and prototyping.

10. Every IO pin has an empty parallel next to each which can be used for easy
expansion by soldering in required connectors or wires from external circuits.

Various kinds of Arduino boards are available depending on different


microcontrollers used. However, all Arduino board have one thing in common:
they are programmed through the Arduino IDE. The difference are based on the
number of inputs and outputs (the number of sensors, LEDs and buttons you can
use on a single board), speed, operating voltage, form-factor etc. Some boards

3
are designed to be embedded and have no programming interface (hardware),
which you would need to buy separately. Some can run directly from a 3.7V
battery, others need at least 5V.

Arduino UNO
Arduino/Genuino Uno is a microcontroller board based on the ATmega328P. It
has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an
ICSP header and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it
with a AC-to-DC adapter or battery to get started. You can tinker with your
UNO without worring too much about doing something wrong, worst case
scenario you can replace the chip for a few dollars and start over again.

Figure 1. The Arduino Uno Board


4
The UNO is the best board to get started with electronics and coding. If this is
your first experience tinkering with the platform, the UNO is the most robust
board you can start playing with. The UNO is the most used and documented
board of the whole Arduino & Genuino family.

"Uno" means one in Italian and was chosen to mark the release of Arduino
Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE)
were the reference versions of Arduino, now evolved to newer releases. The
Uno board is the first in a series of USB Arduino boards, and the reference
model for the Arduino platform; for an extensive list of current, past or outdated
boards see the Arduino index of boards.

Arduino/Genuino Uno is a microcontroller board based on the ATmega328P


(datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power
jack, an ICSP header and a reset button. It contains everything needed to support
the microcontroller; simply connect it to a computer with a USB cable or power
it with a AC-to-DC adapter or battery to get started. You can tinker with your
UNO without worrying too much about doing something wrong, worst case
scenario you can replace the chip for a few dollars start over again.

Features of ATmega328 Microcontroller


Properties Specifications
Microcontroller ATmega328
Operating Voltage 5V
Input voltage (Recommended) 7.2V
Input Voltage (Limits) 6.2V
Analog Input Pins 6
Digital I/O Pins 14(of which 6 provide PWM output)
DC Current Per I/O Pin 40 mA
DC current for 3.3 V 50 mA
EEPROM 1 KB
Clock Speed 16 MHz

5
2. Motor Driver IC
L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive
on either direction. L293D is a 16-pin IC which can control a set of two DC motors
simultaneously in any direction. It means that you can control two DC motor with a
single L293D IC.Dual H-bridge Motor Driver integrated circuit (IC).
It works on the concept of H-bridge. H-bridge is a circuit which allows the
voltage to be flown in either direction. As you know voltage need to change its
direction for being able to rotate the motor in clockwise or anticlockwise
direction, Hence H-bridge IC are ideal for driving a DC motor.

In a single L293D chip there are two h-Bridge circuit inside the IC which can
rotate two dc motor independently. Due its size it is very much used in robotic
application for controlling DC motors. Given below is the pin diagram of a
L293D motor controller.

There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the
motor, the pin 1 and 9 need to be high. For driving the motor with left H-bridge
you need to enable pin 1 to high. And for right H-Bridge you need to make the
pin 9 to high. If anyone of the either pin1 or pin9 goes low then the motor in the
corresponding section will suspend working. It’s like a switch.

6
Figure 2: L293D Motor Driver IC

3. DC Motor
A DC Motor is a type of electric motor that converts DC electrical power to
mechanical power i.e. a DC supply is converted to rotation or movement. DC
motors are one of the commonly used motors in different applications like
electronic toys, power tools, portable fans, etc.

DC Motors are further classified in to different types like series, shunt and
compound and each type is used in different areas of applications. Some DC
motors are also used in Robotic and Industrial applications for their easy control
and precision.

Since DC motors are generally associated with small to medium applications,


where the system mainly consists of a Microcontroller as the main processing
unit, controlling and driving a DC motor is very important. This is because,
driving a motor directly using the microcontroller is not advised (sometimes not
possible) as the current from the Microcontroller is very small (usually less than
30mA).

7
In this project, a small DC Motor is controlled with an Arduino and a Motor
Driver IC where both the speed of the motor and the direction of rotation are
controlled.

Figure 3: A DC Motor

Specifications of DC motor
• Speed - 300RPM
• Voltage - 12V DC motor with Gearbox
• Diameter - 6mm shaft diameter with internal hole 125gm weight
• Stall Torque - 0.5kgcm torque
• No-load current - 60 mA(Max)
• Load current - 300 mA(Max)

4. PUSH SWITCHES
A push button is a momentary or non-latching switch which causes a temporary
change in the state of an electrical circuit only while the switch is physically
actuated. An automatic mechanism (i.e. a spring) returns the switch to its default
position immediately afterwards, restoring the initial circuit condition.

8
Figure 4: Push Switches/Buttons

There are two types:

1. A push to make switch allows electricity to flow between its two contacts
when held in. When the button is released, the circuit is broken. This type of
switch is also known as a Normally Open (NO) Switch.
(Examples: doorbell, computer case power switch, calculator buttons,
individual keys on a keyboard).

2. A push to break switch does the opposite, i.e. when the button is not pressed,
electricity can flow, but when it is pressed the circuit is broken. This type of
switch is also known as a Normally Closed (NC) Switch.
(Examples: Fridge Light Switch, Alarm Switches in Fail-Safe circuits).

Many Push switches are designed to function as both push to make and push to
break switches. For these switches, the wiring of the switch determines whether
the switch functions as a push to make or as a push to break switch.

5. POTENTIOMETERS
A potentiometer, informally a pot, is a three-terminal resistor with a sliding or
rotating contact that forms an adjustable voltage divider. If only two terminals
are used, one end and the wiper, it acts as a variable resistor or rheostat.

9
Figure 5: A Potentiometer

The measuring instrument called a potentiometer is essentially a voltage


divider used for measuring electric potential (voltage); the component is an
implementation of the same principle, hence its name.

Potentiometers are commonly used to control electrical devices such as volume


controls on audio equipment. Potentiometers operated by a mechanism can be
used as position transducers, for example, in a joystick. Potentiometers are
rarely used to directly control significant power (more than a watt), since the
power dissipated in the potentiometer would be comparable to the power in the
controlled load.

SOFTWARE TOOLS
Arduino IDE
The Arduino IDE (integrated development environment) is an application that is
written in Java. It is basically designed to make programming familiar to
learners and other newcomers who are less familiar with software development.
It has a code editor with features like inbuilt library programs, syntax matching,
brace highlighting, and is also capable of compiling and uploading the programs

10
on the board with just a single click. A program or code written in Arduino is
called a sketch. Figure 6 shows the snapshot of the Arduino IDE.

Figure 8: Snapshot of the Arduino IDE

Codes Used in the Project


Insert code here

11
12
CIRCUIT DIAGRAM

Figure X: Circuit Diagram

SCHEMATIC DIAGRAM

Figure X: Schematic Diagram

13
WORKING PROCESS
The aim of this project is to design an Arduino based system for controlling a
DC Motor. All the connections are made as per the circuit diagram mentioned
above. The working of the project is very simple.

Two buttons are used in this project, one each for forward and reverse direction
of the motor. The two buttons are connected to Pins 13 and 12 of Arduino which
are internally pulled-up (using code). The other terminals of the buttons are
connected to ground and hence when the button is pressed, the microcontroller
detects LOW (logic 0).

The output of the POT is an analog signal and hence it is connected to analog
pin of the Arduino. Based on the analog voltage value from the POT, the speed
of the motor is varied.For this to happen, we need to use the concept of PWM in
the circuit. The inputs to the motor driver IC must be in the form of a PWM
signal and hence are connected to Pins 11 and 10 of Arduino respectively,
which are capable of generating PWM signals.

When the system is powered ON, Arduino waits for the button to be pressed. If
the forward direction button is pressed, the Arduino drives input 1 of motor
driver IC (Pin 2) with PWM signal and a logic low to input 2 (Pin 3). Hence, the
motor starts rotating in forward direction.

Similarly, if the reverse direction button is pressed, Arduino drives input 2 (Pin
3) of L293D Motor Driver IC with the PWM signal and input 1 (pin 2) of
L293D is given a logic low. Hence, the motor starts rotating in reverse
directions.

14
RESULTS
The PWM technique is used to control the speed of d.c. motor and the speed of
dc motor can be varied by varying the position of potentiometer thereby
changing the voltage supplied to the motor.On pressing switch 1 the motor can
run in forward direction and on pressing switch 2 the motor runs in reverse
direction by the use L293D IC. The designed circuit was tested on various speed
satisfactorily.

Series 1
Series 11
Speed
Series 10
Series 9
Series 8
Series 7
Series 6
Series 5
Voltage
Series 4
Series 3
Series 2

0 50 100 150 200 250 300 350

15
APPLICATIONS
 This circuit, where a DC motor is controlled using an Arduino UNO, can
be used in applications like Arduino based robots, speed as well as
direction control of DC motors, etc.

 The circuit shown here controls a single DC motor but can be extended to
control two motors with independent speed and direction controls.

ADVANTAGES
 Higher efficiency.
 Greater reliability.
 Quick response.
 Flexibility.
 Less space needed.

LIMITATIONS
 Microcontroller needs software like compiler to insert logics as inputs.
 It cannot interface high power devices directly.
 It is susceptible to EMI (Electromagnetic Interference), sometimes even
produces audible noises.
 Speed control is a little bit slow due to delay of the clock pulse.

16
CONCLUSION
 The dc motor speed can be controlled by using ARDUINO Microcontroller
and also its speed can be varied by using external resistance like a
potentiometer. It is possible to improve overall performance of the motor
speed.

 The Circuit was designed and implemented successfully. This project can be
enhanced by using power electronic devices such as IGBTs to achieve the
speed control higher capacity industrial motors and DC Motor Controller.

 A motor-driver IC is interfaced to the Arduino board for receiving PWM


signals and delivering desired output for speed control of DC motor.

FUTURE SCOPE
 We can use MOSFET and IGBT for the purpose of higher voltage and
power requirement.

 In future we can operate this project fully automatically by the use of 555
Timer IC.

17
BIBLIOGRAPHY
1. Basics of Arduino, Available at:
https://en.m.wikipedia.org/wiki/Arduino

2. Different types of Arduino boards, Available at:


https://learn.sparkfun.com/tutorials/arduino-comparison-guide

3. Specifications of component, Available at:


http://www.electronicshub.org/dc-motor-control-arduino/

18

You might also like