DC motor driver (using L293D)


In this article, i will tell about running motor with help of L293D IC. Before we start, lets have a recall about H Bridge. An H bridge is an electronic circuit that enables a voltage to be applied across a load in either direction. These circuits are often used in robotics and other applications to allow DC motors to run forwards and backwards.

The H-bridge arrangement is generally used to reverse the polarity of the motor, but can also be used to 'brake' the motor, where the motor comes to a sudden stop, as the motor's terminals are shorted, or to let the motor 'free run' to a stop, as the motor is effectively disconnected from the circuit. The following table summarises operation, with S1-S4 corresponding to the diagram above.

1 0 0 1 Motor moves right
0 1 1 0 Motor moves left
0 0 0 0 Motor free runs
0 1 0 1 Motor brakes
1 0 1 0 Motor brakes
1 1 0 0 Shoot-through
0 0 1 1 Shoot-through
1 1 1 1 Shoot-through

L293D also works in similar way. It has a proper packaging of the H bridge system. It offers two H-bridge functionality, That is, we can control 2 motors individually in both directions.The motor operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Below shown the pin diagram of L293D motor driver.

Besides that, with this L293D driver motor it will control four DC motors at one time but with fix direction of motion. L293D has output current of 600mA and peak output current of 1.2A per channel. Moreover for protection of circuit from back EMF output diode are included within the L293D. The output supply hich is external supply has a wide range from 4.5V to 36V which has made L293D a best choice for DC motor driver. 

A simple schematic for interfacing a DC gear motor using L293D driver motor is shown with truth table for this circuit.








Below is complete Pin description of L293D:

Making motor driver module

Circuit of L293D on breadboard is usually made for testing the circuit, but its not recommended because L293D usually invoves high current and bread board can have loose connections. This leads to heat and sparks sometime.

Here you can see that both PIC  and L293D circuit are made on bread board and both the channels are tested by LEDs too.

Best way to work with L293D are:

1. Soldering on universal PCB

2. Small PCB modules (recommended because it can be easily replaced in a robotic system if get burns)

3. Integrated with the development board (very convinient)


Soldered on universal PCB

Below is the video showing universal PCB soldered with L293D motor driver and a brief working with a motor.



Small PCB module


Here, you can see a small module of L293D developed by me which can be replaced anytime during the project with another one. I have made several simple robots with help of single module of L293D, a Remote control, LM393 comparator IC and IR sensors, about which i will discuss in details in some other article.

Robotic car with remote

Robotic car with wireless remote.

Robotic car to follow line automatically with help of IR sensors and comparator IC LM393. About this robot, i will discuss in some other article in detail.

Integrated with in Dev Board

Integrating this IC in robotics project is prooved to be very convinient because due to motion neither the connection of the seperate module will get loose nor there will be headache of connections seperately. To make the circuit PCBs, there are several steps from designing on a software like EAGLE, DIPTRACE, ExpressPCB to developing the PCB with chemicals and soldering.
Some sample of my designs are: 
All this, is explained by me in my another tutorial of own custom circuit board designing.