EE Project Report
EE Project Report
Technique
Hafsa Sajjad Hassan Ali Khan Muhammad Abdullah
SMME SMME SMME
National University of Science and National University of Science and National University of Science and
Technology Technology Technology
Islamabad, Pakistan Islamabad, Pakistan Islamabad, Pakistan
Reg no. 222366 Reg no.209946 Reg no. 214061
Abstract— According to the problem statement, we were to system by quite a bit. PWM is more effective at controlling
design a system which controls speed of a DC geared motor motor speeds at low RPM than linear methods.
using PWM technique.
I. INTRODUCTION
The circuit is connected with help of jumper wires and
breadboard having DC motor (whose speed is to be
controlled), Arduino UNO, H-bridge and power sources. The
PWM signal is provided to one of analogue pins of Arduino
and HIGH and LOW signals are provided to two digital pins.
The motor speed controller system using PWM technique
was developed. The relationship between the duty cycle and
the converter output voltage has been investigated. The
microcontroller provides flexibility in controlling the speed
by changing the duty cycle of the PWM pulse.
interactive objects that can sense and control both physically
Pulse Width Modulation affects motor speed in a way and digitally.
that it is used to generate pulses with variable duty cycle rate.
As the duty cycle increases, more voltage is applied to the B. H-Bridge (L298N)
motor. This contributes to the stronger magnetic flux inside
the armature windings and the increase the RPM of motor. An H bridge is an electronic circuit that switches the
polarity of a voltage applied to a load. These circuits are
PWM technique is more effective because motors as a often used in robotics and other applications to allow DC
class require very high currents to operate. Being able to vary motors to run forwards or backwards.
their speed with PWM increases the efficiency of the total
In general, an H-bridge is a rather simple circuit, containing
four switching elements, with the load at the center, in an H-
like configuration:
Code
The code devised through which we successfully
executed the task of controlling the speed of the motor is
given below:
C. DC Geared Motor
A DC Motor is the basic requirement of the task to be
performed. Arduino through the H-bridge is connected to
the DC motor and its speed is varied as required. As the
name states, it functions on Direct Current Source.
D. Jumper Wires
It is an electrical wire which entails a connecter pin at each
end. There are two types of jumper wires, male and female.
Both types are used for this very project. They are very
convenient to use and make connections where required.
III. METHODOLOGY, EXPLANATION & CODE
To pull off the required task of controlling the DC motor
speed through an Arduino and an H-Bridge, we had to devise IV. COST ANALYSIS
a code coherent with the connections we made with the H- For material required, we surveyed in market and found
bridge and the motor. Firstly, in the code we initialized three
our required electronic devices on following rates;
different pins on the Arduino, of which pin 11 was the one
integrated as PWM. Then we arbitrarily gave the two input
pins (8 and 9) High and Low values respectively. This would Components Price (Rs.)
be interpreted as 1 and 0 and would hence help the motor DC motor 90/-
rotate. Now to control the motor speed, we first used a for Arduino UNO 550/-
loop to gradually increase the speed of the motor from 0 to H-Bridge 280/-
255. After maximum speed is achieved, we then used the for Power Source 70/-
loop again to lower the speed from 255 to 0, hence brining Total Cost 990/-
the motor to a gradual stop. And the speed would start
increasing again and the cycle would continue in a
continuous loop. The connection dynamics are given below:
The practical learning and implementation of what
we studied in course theory for instance using
V. CONCLUSION breadboard.
Market analysis is done which gives students an
The project on the whole was a success. The concluding
remarks are as under: experience about how a problem solving approach
is adopted bearing in mind the cost effectiveness of
PWM or Pulse Width Modulation is a phenomenon the solution.
widely used to control output of any electrical
Implementation of theoretical knowledge in
device such as speed in case of motors, light
practical problem solving to add value in society as
intensity in case of electric bulbs and many other
an engineer.
examples. We learnt how to program Arduino
UNO and combine it with an H-bridge and motor
to analyze motor speed variation. VI. ACKNOWLEDGMENT
Team work which cannot be really taught in First of all we would like to thank Almighty Allah for his
classrooms but was learnt in this group projects. blessings. We would also like to thank Sir Faisal Mehmood
We got familiar with the basic idea of electronics who guided us regarding this project and gave us a basic
understanding of the basic components we used in this
as well as pretty advanced knowledge of PWM project.
technique widely used to control motor speed and
other electronic devices power consumption as
VII. REFERENCES
well.
Arduino UNO usage and its components and
[1] https://www.arduino.cc/en/Main/Software
details about its pins, micro controls and working is [2] https://howtomechatronics.com
learnt through this project.
We got familiar with the H-bridge and its
functioning in voltage supply and connecting
motors and other components.