Professional Documents
Culture Documents
This is a quick guide with a bit of extra info (pin configurations etc..) that I’ve learnt
along the way on how to use the L293D with the Arduino, showing that we can:
UPDATE: If you intend to use this for robotics then please check out this page here to
get the most out of this chip – I actually found the SN754410 easier to work with that the
L293D, its exactly the same apart from it can handle more current Arduino obstacle
avoidance robot
“The L293D is a monolithic integrated, high voltage, high current, 4-channel driver.”
Basically this means using this chip you can use DC motors and power supplies of up to
36 Volts, thats some pretty big motors and the chip can supply a maximum current of
600mA per channel, the L293D chip is also what’s known as a type of H-Bridge. The H-
Bridge is typically an electrical circuit that enables a voltage to be applied across a load
in either direction to an output, e.g. motor.
This means you can essentially reverse the direction of current and thus reverse the
direction of the motor. It works by having 4 elements in the circuit commonly known as
corners: high side left, high side right, low side right, and low side left. By using
combinations of these you are able to start, stop and reverse the current. You could make
this circuit out of relays but its easier to use an IC – The L293D chip is pretty much 2 H-
Bridge circuits, 1 per side of the chip or 1 per motor.
The bit we really care about in all of this is the 2 input pins per motor that do this logic
and these, more importantly for our needs, can be controlled from the Arduino board.
You also don’t have to worry about voltage regulation so much because it allows for 2
power sources – 1 direct source, upto 36V for the motors and the other, 5V, to control the
IC which can be supplied from the Arduino power supply or since my motor power
supply is only 6V I’m going to use this (if the motor supply was higher I would consider
using a transistor or voltage regulator). The only thing to remember is that the grounding
connection must be shared/ common for both supplies. Below you can see the pin layout
for the chip and the truth table showing the output logic.
Generally speaking most DC motors require a lot more current than the Arduino board
can provide for instance the motor that I’m using needs around 5 to 6 Volts. Now I could
use a 12 Volt power source for the Arduino, but then its going to drain quickly when it
has to power everything, especially if I was to add in another motor and a couple of
servos, so instead my Arduino runs off of my 9 Volt power supply I made. (here)
You’ll need a few capacitors in this circuit to smooth out the power load to the motors as
much as possible to help avoid any spikes and stabalise the current. I’m using a 50 Volt
10 uF capacitor on the power supply – I suggest you do this as the bare minimum. You
could also add in a capacitor for each motor that you use – something like a 220nF
multilayer ceramic capacitor should be OK for the small motors.
You can see from my photos how I’ve placed the L293D and wired it according to the
above pins. Next I have my switch on Arduino digital pin 2 and I have the GND pin from
Arduino connected to the GND rail on my breadboard. I also add the capacitor in
between the power supply – making sure that the negative and positive terminals are
correctly aligned. Finally I complete the circuit by adding in wires to carry the current
from one side of the breadboard to the other and I add in the motor and its power supply.