Even the simplest robot requires a motor to rotate a wheel or performs particular action. Since motors require more current then the microcontroller pin can typically generate, you need some type of a switch which can accept a small current, amplify it and generate a larger current, which further drives a motor. This entire process is done by what is known as a Motor driver. With L293D Motor Driver IC, that task is made simple and has helped in a number of applications with relative ease. Now let’s see what a L293D Motor Driver IC is all about.
Before we explain what a L293D Motor Driver IC is, we need to know what a Motor driver is ??
Motor driver is basically a current amplifier which takes a low-current signal from the microcontroller and gives out a proportionally higher current signal which is used to control and drive a Motor. With this method the Motor rotates in a single direction.
Now we came to know about how Motor driver works, but what if we want to reverse the flow of direction.
It’s getting tricky now!!!
The turning a Motor ON and OFF requires only one switch to control a single motor in a single direction. Reversing the polarity will the serve the purpose. So here we will be making use of the H-bridge circuit.
We are getting deeper into and now the question arises what is an H-Bridge circuit?
H-bridge is a circuit which allows the voltage to be flown in either direction. And we do know that voltage need to change its direction for being able to rotate the motor in clockwise or anticlockwise direction, hence H-bridge IC are ideal for driving a DC motor.
But what has H-Bridge circuit got to do with the L293D Motor Driver IC and how does it help in its functions. Let us see the working of a L293D Motor Driver IC.
L293D MOTOR DRIVER IC INTRO
L293D Motor Driver IC generally is a standard 16-pin DIP (dual-in line package). This Motor driver IC can simultaneously control two small motors in either direction; forward and reverse with just 4 microcontroller pins. The L293D Motor Driver IC can drive both small and quiet big motors as well.
In a single L293D Motor Driver IC chip there two H-Bridge circuit inside the IC which can rotate two DC Motors independently.
PIN DIAGRAM
- There are 4 input pins for this L293D Motor Driver IC, pin 2, 7 on the left and pin 15, 10 on the right as shown on the pin diagram. Left input pins will regulate the rotation of motor connected across left side and right input for motor on the right hand side. The motors are rotated on the basis of the inputs provided across the input pins as LOGIC 0 or LOGIC 1.
- VCC pin 16 is the power supply for its own internal operation. The maximum voltage can range from 5v and up to 36v.
- VCC is the voltage that it needs for its own internal operation 5v; L293D Motor Driver IC will not use this voltage for driving the motor. For driving the motors it has a separate provision to provide motor supply VSS (V supply). L293D Motor Driver IC will use this to drive the motor. So if we want to operate a motor at 9V then we need to provide a supply of 9V across VSS Motor supply. The maximum voltage for VSS motor supply is 36V. It can supply a max current of 600mA per channel.
- Pin1 and Pin9 are “Enable” pins. They should be connected to +5V for the drivers to function. If they pulled low (GND), then the outputs will be turned off regardless of the input states, stopping the motors. If you have two spare pins in your microcontroller, connect these pins to the microcontroller, or just connect them to regulated positive 5 Volts.
- Pin4, Pin5, Pin12 and Pin13 are ground pins which should ideally be connected to microcontroller’s ground.
- Pin3, Pin6, Pin11, and Pin14 are output pins. Tie Pin3 and Pin6 to the first motor, Pin11 and Pin14 to second motor.
- Pin8 powers the two motors and should be connected to positive lead of a secondary battery. As per the datasheet, supply voltage can be as high as 36 Volts.
WORKING OF A L293D MOTOR DRIVER IC
Let’s consider the Motors are connected on left side output pins (pin 2, 7). For rotating the motor in clockwise direction the input pins has to be provided with Logic 1 and Logic 0.
• Pin 2 = Logic 1 and Pin 7 = Logic 0 which is a Clockwise Direction
• Pin 2 = Logic 0 and Pin 7 = Logic 1 which is an Anticlockwise Direction
• Pin 2 = Logic 0 and Pin 7 = Logic 0 – It is Idle with no rotation and is in Hi-Impedance state.
• Pin 2 = Logic 1 and Pin 7 = Logic 1 – This is also Idle with no rotation at all.
In a very similar way the motor can also be made to operate across input pin 15, 10 for motor on the right hand side.
Thanks for reading the blog,
For more information on the product with a demo, go to file:///C:/Users/Irappa/Downloads/Application_note.pdf
For more information on the product on video, go to
https://www.youtube.com/watch?v=TAsRD7gIFXk&list=UUyRZXnQeh8xgmgDYxQfN8eA
For more information if you want to buy, go to