0% found this document useful (0 votes)
36 views

PWM Based Motor Speed Controller Using Arduino

Uploaded by

farwarehman801
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

PWM Based Motor Speed Controller Using Arduino

Uploaded by

farwarehman801
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

PWM BASED MOTOR SPEED CONTROLLER

USING ARDUINO
Muhammad waqar yousaf Roll # 2445

Muhammad Zeeshan Roll # 2456

Abdulhameed Roll # 2458

Muhammad Attique Roll # 2460

ABSTARCT
The Arduino-based DC motor speed controller is a cost-effective and versatile solution designed to regulate the speed of DC
motors in various applications. This project utilizes the Arduino microcontroller platform, which offers a wide range of
programmability and flexibility to control the motor's speed with precision.

The main objective of this project is to design a simple, yet efficient, DC motor speed control system using an Arduino board. The
system employs Pulse Width Modulation (PWM) technique to vary the voltage supplied to the motor, thereby controlling its
rotational speed. The user can set the desired speed through a user interface, such as a potentiometer or a digital input, making it
convenient to adapt the motor's speed to specific requirements.

The hardware implementation involves connecting the Arduino board to the motor driver module, which handles the high current
requirements of the DC motor. The microcontroller reads the input signal and converts it into PWM signals that regulate the
motor's speed. Additionally, safety features, such as overcurrent protection and thermal shutdown, are incorporated to ensure the
system's reliability and prevent damage to the motor or the controller.

Moreover, the project showcases the significance of open-source platforms like Arduino, fostering innovation and encouraging
enthusiasts to experiment with electronics and programming. The DC motor speed controller finds applications in robotics,
automation, conveyor systems, and various other fields where precise motor control is essential.

The experimental results demonstrate the successful implementation of the Arduino-based DC motor speed controller,
showcasing its ability to accurately adjust and maintain the motor's speed within the desired range. The simplicity, cost-
effectiveness, and scalability of the system make it an attractive solution for hobbyists, students, and professionals seeking to
control DC motors efficiently in their projects.

Keywords: Arduino, DC motor, speed control, PWM, motor driver, microcontroller, robotics, automation. Arduino, DC Motor,
Power supply

1. Introduction

DC motor is an electrical machine which converts electrical energy into mechanical energy. In the past few years the use of DC
motor has widely increased due to it’s good characteristics like high starting torque, high response performance, rapid braking
and easier to be liner control. Because of these characteristics it has gained a wide application in industries. DC motor are
highly versatile and flexible in aspects of speed control and thus it is use in steel rolling mills, cutting tool, high precision
digital tools and other applications etc. The advantage of using DC motor over AC motor is that the DC motor are simple and
less expensive. Also the speed-torque characteristics of DC motor are superior to that of AC motor. There are several different
control techniques adapted to control the speed of DC motors. In this paper the speed of DC motor is controlled by using
Arduino microcontroller. Simulink will in turn pass this speed to the DC motor using a PWM pins on arduino uno board. The
PID controller will generate corresponding PWM pulses to control the speed of DC motor.
2. Basic Block Diagram:- Fig.2.1
3. PID Controller

Feedback control is a control mechanism that uses information from measurements in a feedback control system, the
output is sensed and the required action is taken by the controller. PID is widely used is feedback control of
industrial processes. The pid controller can be understood as a controller that takes the present, the past and the
future of the error into consideration. A proportional-integral-derivative controller (PID controller) is a closed loop
control method. In this method there are three controllers namely-

1. Proportional Controller

2.Integral Controller

3.Derivative Controller

3.1 Proportional controller

This controller deals with the present error. It produces an output value equivalent to the error value to stabilize the
system. It’s response can be adjusted by multiplying the error value by constant value (K p), which is known as the
proportional gain constant. The proportional value can be represented as

Pout=Kp*e(t)

Depending on the change in the value of proportional gain the output for given error changes.

3.2 Integral controller

This contributes to both the magnitude of error and duration of error. The error value in integral controller is
multiplied with the integral gain (Ki) and is then added to the controller output to get the desired response. The
integral term is given by
I =K ∫
out i

The integral term eliminate the steady state error and helps in accelerating the response of the system towards the
setpoint.

3.3 Derivative control

The derivative term of the process error is calculated by determining the slope of the error overtime and multiplying
this rate of change by the derivative gain(Kd). The value of the derivative term is given as

Dout
=K d

4. Tuning Method used for PID

4.1 Trial and error method:-

This method is commonly used for tuning of PID. In this method different values for PID are set for desired output.
Initially we set all the values to zero afterwards by varying the values in the order of P, I and D we achieve the
desired response. However this method is time consuming.
5. DC Motor

Controlling the speed of DC motor is easier than AC motor. Also the speed-torque characteristics of DC motor are
superior to that of AC motor. The specifications of the motor are

voltage -7V

Speed -5000rpm

current -3.2A ( max)

6. Arduino

The Arduino is a microcontroller board based on the ATmega 328 consisting of 14 digital input/output pins out of
which 6 can be used as PWM outputs and other 6 can be used as analog inputs. It has 16MHz ceramic resonator, a
USB connection, a power jack, ICSP header and a reset button. It is user friendly and has all the characteristics
which are required in a microcontroller

Fig.6.1:- Arduino Board

The specifications of Arduino:-

Microcontroller - ATmega 328

Operating voltage - 5V

Input voltage (recommended) - (6-20)V

DC current per I/O pin - 40mA

DC current for 3.3V pin - 50mA

Flash memory -32KB

SRAM -2KB

EEPROM -1KB
7. Liquid Crystal Display Module:
16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of combinations available like, 8×1,
8×2, 10×2, 16×1, etc. But the most used one is the 16*2 LCD, hence we are using it here.

All the above mentioned LCD display will have 16 Pins and the programming approach is also the same and hence the
choice is left to you. Below is the Pinout and Pin Description of 16x2 LCD Module:

Fig.7.1:-
4-bit and 8-bit Mode of LCD:

The LCD can work in two different modes, namely the 4-bit mode and the 8-bit mode.
In 4 bit mode we send the data nibble by nibble, first upper nibble and then lower
nibble. For those of you who don’t know what a nibble is: a nibble is a group of four
bits, so the lower four bits (D0-D3) of a byte form the lower nibble while the upper
four bits (D4-D7) of a byte form the higher nibble. This enables us to send 8 bit data.

Whereas in 8 bit mode we can send the 8-bit data directly in one stroke since we use
all the 8 data lines.

Now you must have guessed it, Yes 8-bit mode is faster and flawless than 4-bit mode.
But the major drawback is that it needs 8 data lines connected to the
microcontroller. This will make us run out of I/O pins on our MCU, so 4-bit mode is
widely used. No control pins are used to set these modes. It's just the way of
programming that change.

Read and Write Mode of LCD:

As said, the LCD itself consists of an Interface IC. The MCU can either read or write
to this interface IC. Most of the times we will be just writing to the IC, since reading
will make it more complex and such scenarios are very rare. Information like position
of cursor, status completion interrupts etc.

8. Future scope

Implementation of this project on larger scale can be useful in various industrial applications like Steel rolling mills,
paper mills, etc.
9. References

1. Thirupathi Allam, Matla Raju, S.Sundeep Kumar "Design of PID controller for DC motor speed control using
Arduino microcontroller" Volume:03 (IRJET)2016

2. Pooja Hanchate, Priyanka Gadag "Speed control of DC motor using PID controller".

3. Muhammad Khan, Aleem Khan "Speed control of DC motor under varying load using PID controller" IJE,
Volume9.

4. Pratap Vikhe, Neelam Punjabi "Real time DC motor speed control using PID in LabVIEW" volUME3 IJAREEIE.

5.Martin Evans, Joshua Noble "Arduino in Action".

You might also like