Вы находитесь на странице: 1из 6

Experiment 7

Title: DC Motor Speed Control.


Abstract: The purpose of this experiment is to get familiar with Microcontroller based motor
speed control. In this lab experiment, we are going to observe the motor speed and its rotational
direction by using the Visual Designer function of Proteus Design Suite.

Theory and Methodology::


PWM – For controlling speed: PWM is a technique where average value of the input voltage
is adjusted by sending a series of On/OFF pulses, the average voltage is proportional to the
width of the pulses known as Duty Cycle. The higher the duty cycle, the greater the average
voltage applied to the dc motor this lead to the highest speed.

Figure 1: PWM due to change of Duty Cycle

H-Bridge for controlling rotation direction: An H-Bridge circuit contains four switches with
the motor at the center forming an H, closing two particular switches at the same time
reverses the polarity of the voltage applied to the motor. This leads to a change in the
direction of the motor.

Figure 2: H Bridge for controlling rotation direction of motor

Rahman, Md. Tauhidur


16-31141-1
Experiment 7

L298N Driver: The L298N is a dual H-Bridge motor driver which allows speed and direction
control of two DC motors at the same time. The module can drive DC motors that have
voltages between 5 and 35V, with a peak current up to 2A.

Figure 3: L298N motor driver

The module has two screw terminal blocks for the motor A and B, and another screw
terminal block for the Ground pin, the VCC for motor and a 5V pin which can either be an
input or output.

Figure 4: L298N motor driver pin outs


This depends on the voltage used at the motors VCC. The module have an onboard 5V
regulator which is either enabled or disabled using a jumper. If the motor supply voltage is up
to 12V we can enable the 5V regulator and the 5V pin can be used as output, for example for
powering our Arduino board. But if the motor voltage is greater than 12V we must disconnect
the jumper because those voltages will cause damage to the onboard 5V regulator. In this
case the 5V pin will be used as input as we need connect it to a 5V power supply in order the
IC to work properly.
We can note here that this IC makes a voltage drop of about 2V. So for example, if we use a
12V power supply, the voltage at motors terminals will be about 10V, which means that we
won’t be able to get the maximum speed out of our 12V DC motor.

Rahman, Md. Tauhidur


16-31141-1
Experiment 7

Figure 5: L298N motor driver output voltage


Next are the logic control inputs. The Enable A and Enable B pins are used for enabling and
controlling the speed of the motor. If a jumper is present on this pin, the motor will be enabled
and work at maximum speed, and if we remove the jumper we can connect a PWM input to
this pin and in that way control the speed of the motor. If we connect this pin to a Ground the
motor will be disabled.

Figure 6: L298N motor driver


Next, the Input 1 and Input 2 pins are used for controlling the rotation direction of the motor
A, and the inputs 3 and 4 for the motor B. Using these pins we actually control the switches
of the H-Bridge inside the L298N IC. If input 1 is LOW and input 2 is HIGH the motor will
move forward, and vice versa, if input 1 is HIGH and input 2 is LOW the motor will move
backward. In case both inputs are same, either LOW or HIGH the motor will stop. The same
applies for the inputs 3 and 4 and the motor B.

Rahman, Md. Tauhidur


16-31141-1
Experiment 7

Figure 7: Circuit Schematics


Proteus Visual Designer: Proteus Visual Designer combines world class Proteus VSM
simulation with an easy to use flowchart editor and a gallery of virtual hardware to provide a
truly integrated and intuitive development environment for Arduino and Raspberry Pi. The
peripheral gallery makes hardware design easy. Simply add a shield or sensor from the
gallery and Visual Designer will automatically place the correct circuitry on the Proteus
schematic for you and add some simple methods to Visual Designer that allow you to control
the hardware.

Apparatus:
 Laptop or Desktop
o Minimum system requirements:
CPU: 1.8GHz, 3 GB RAM, Intel HD Graphics 3000, Windows 10, 100
MB HD space
 Proteus Design Suite 8.6 or above

Rahman, Md. Tauhidur


16-31141-1
Experiment 7

Simulation Results:

Figure 8: Schematic in Proteus Design Suite

Figure 9: Flowchart in Proteus Design Suite

Rahman, Md. Tauhidur


16-31141-1
Experiment 7

Discussion and Conclusion:


Because of COVID-19 this lab experiment is conducted virtually and done using simulation.
Simulation software have ideal condition for error less experiment, which cannot be done in
real life. This simulation was done correctly and result was obtained. In conclusion we can say
that we can simulate motor speed and its rotational direction by using the Visual Designer
function of Proteus Design Suite by completing this experiment.

Reference(s):
[1] "DC Motors Control Using Arduino PWM with L298N H-Bridge", Arduino Project
Hub, 2020. [Online]. Available:
https://create.arduino.cc/projecthub/Fouad_Roboticist/dc-motors-control-using-
arduino-pwm-with-l298n-h-bridge-d6ec91. [Accessed: 07- Apr- 2020].
[2] M. Aqib, "Arduino PWM Tutorial", Arduino Project Hub, 2020. [Online]. Available:
https://create.arduino.cc/projecthub/muhammad-aqib/arduino-pwm-tutorial-ae9d71.
[Accessed: 07- Apr- 2020].
[3] D. Nedelkovski, "Arduino DC Motor Control Tutorial - L298N | PWM | H-Bridge -
HowToMechatronics", HowToMechatronics, 2020. [Online]. Available:
https://howtomechatronics.com/tutorials/arduino/arduino-dc-motor-control-tutorial-
l298n-pwm-h-bridge/. [Accessed: 07- Apr- 2020].
[4] "Flowchart Programming for Arduino & Raspberry Pi Development - Proteus",
Labcenter.com, 2020. [Online]. Available:
https://www.labcenter.com/visualdesigner/. [Accessed: 07- Apr- 2020].

Rahman, Md. Tauhidur


16-31141-1

Вам также может понравиться