DC Motor Control
DC Motor Control
L298 motor driver is already explained in separate article. In this article, we will use
L293D since it does not need external protection diodes.
WORKING OF H-BRIDGE
H-bridge can also be made with the help of transistors and MOSFETs etc. It will be
cheap but they increase the size of the design and circuit board which is mostly not
required, so a small 16 pin IC is preferred for this purpose. Actually, the name “H-
Bridge” is derived from the shape of the switching circuit which controls the motion of
the motor. It is also known as “Full Bridge”. Basically there are four switching elements
in the H-Bridge as shown in the figure below.
As we can see in the figure that there are four switching elements named as:
High side left
High side right
Low side right
Low side left
When these switches are turned on in pairs, the motor changes its direction accordingly.
If we switch on “High side left” and “Low side right”, then motor will rotate in forward
direction, as current from Power supply flows through the motor coil and goes to ground
through switch low side right. This is shown in the figure below.
Similarly, when we switch on low side left and high side right, the current flows in
opposite direction and motor rotates in backward direction. This is the basic working of
H-Bridge. We can also make a small truth table according to the switching of H-Bridge
explained above.
High Left High Right Low Left Low Right Description
So we have seen that using simple switching elements we can make our own H-Bridge.
Other option is to use IC based H-bridge driver. Obviously, we will use Driver IC
otherwise heat sinks will be used for MOSFETs etc.
L293D for dc motor interfacing with 8051
microcontroller
It is designed to provide bidirectional drive currents of up to 600mA at voltages from
4.5V to 36V. It can drive inductive loads such as solenoids, relays, DC and bipolar
stepping motors. It contains internally protection diodes across the motor.
PIN DIAGRAM:
PIN DESCRIPTION:
L293D contains four Half H Bridge drivers. We can drive two DC Motors by single
driver.
VSS pin is used to provide input voltage to L293D. For 8051 interface, 5v is given
to it.
The motor supply is given to VS pin of the L293D. It depends upon motor
requirement.
EN1 is used to enable input pair 1 (IN1, IN2, for OUT1, OUT2) and EN2 is used
to enable input pair 2 (IN3, IN4, for OUT3, OUT4). EN is connected to 5V for to
enable any input.
Direction of motor 1 is controlled through input pins logic. IN1 and IN2 control
motor connected output OUT1 and OUT2.
Direction of motor 2 is controlled through input pins logic. IN3 and IN4 control
motor connected output OUT3 and OUT4.
All GND pins should be connected to ground.
CONNECTIONS:
P2 of 8051 microcontroller is used as output port and it gives inputs to the motor
driver IC. Its lower four pins are connected to drive two DC motors.
P0 is used as input port. 2 Buttons are connected to its lower two pins so that
whenever we can manually start and stop the motors.
Motor 1 is connected between OUT1 and OUT2 of L293D. Motor 2 is connected
between OUT3 and OUT4 of L293D.
12V battery is used to give input to the VS for motors.
5V battery is used to give input to VSS for motor driver IC.
PROTEUS SIMULATIONS:
Circuit Components:
AT89C51 microcontroller
12 MHz Oscillator.
12V DC battery.
5V DC battery.
L293D motor driver
DC motor – 2.
2 Ceramic capacitors – 33pF
300Ω resistors – 2
Push buttons – 2
Connecting wires.