L293D

{{Component


 * Image = L293D.png


 * Manufacturer = Texas Instruments


 * Supply Voltage = 4.5V - 7V for the IC, 4.5V - 36V for the motors


 * Communication Method = TTL


 * Spec Sheet =


 * Doc Sheet =

The L293D is a quadruple half-H-bridge Motor driver. It is designed to provide 600mA current at voltages from 4.5V up to 36V. It is possible to drive 2 DC-Motors in both directions with it, using only 2 pins per motor.
 * Overview =


 * Hooking it up =

The L293D has a total of 16 pins.


 * 1,2 EN - Used to enable outputs 1 and 2, hook up to Vcc to enable or to Gnd to disable
 * 1) 1A - Controls the output direction, hook up to Vcc to enable or to Gnd to disable
 * 2) 1Y - Output to the motor, hook up one wire of the motor to this pin
 * 3) GND/Heatsink - Hook up to GND (only 1 GND in total must be connected to GND)
 * 4) GND/Heatsink - Hook up to GND (only 1 GND in total must be connected to GND)
 * 5) 2Y - Output to the motor, hook up the other wire of the motor to this pin
 * 6) 2A - Controls the output direction, hook up to Vcc to enable or to Gnd to disable
 * 7) Vcc2 - Connect the positive contact of your powersupply for the motor to this pin
 * 3,4 EN - Used to enable outputs 3 and 4, hook up to Vcc to enable or to Gnd to disable
 * 1) 3A - Controls the output direction, hook up to Vcc to enable or to Gnd to disable
 * 2) 3Y - Output to the motor, hook up one wire of the motor to this pin
 * 3) GND/Heatsink - Hook up to GND (only 1 GND in total must be connected to GND)
 * 4) GND/Heatsink - Hook up to GND (only 1 GND in total must be connected to GND)
 * 5) 4Y - Output to the motor, hook up the other wire of the motor to this pin
 * 6) 4A - Controls the output direction, hook up to Vcc to enable or to Gnd to disable
 * 7) Vcc1 - Connect to a powersource between 4.5V and 7V. This is used to power the Motor driver itself.

How to use
So, let's say you have built yourself a small car with a single DC-motor and you want to use a L293D to drive the motor.

Connecting the motor
At first, we need to connect the motor to the L293D. The best way to do this is to solder 2 wires to the motor's contacts or use alligator clips or similar. You connect one wire to 1Y and another pin to 2Y.

Powering the whole thing
Now you need a power source to drive the motors. The best way to use on a car is either a battery or a solar cell. You connect the positive contact of the battery/solar cell to Vcc2. The voltage for this pin must be between 4.5V and 36V. The IC itself also needs power, so we connect Vcc1 to the microcontroller's power source. This voltage should be between 4.5V and 7V. Note that you shouldn't use the same battery for Vcc2 and powering the microcontroller, as the motor draws too much current and the microcontroller may not get enough power and browns out. Also connect 1,2 EN to Vcc1, so that 1Y and 2Y are enabled.

The logic behind everything
Now we get to the actual fun: controlling the motor! To accomplish this, we need to connect a digital pin each to 1A and 2A using a resistor. Pick a nice value between 100ohm and 1,000ohm. In the basic state, both pins should be low. In that state, the motor doesn't move in any direction. When pin 1A is high and pin 2A low, the motor will move one way. If pin 1A is low, and pin 2A high, the motor will move the other way. If both pins are high, the motor also won't move in any directions.

Hint: You can also use PWM to make the motor move slower.


 * Code Information = -


 * bildrCode ID =L293D


 * Availability =


 * Links =


 * References =

}}