View Full Version : l293d input output mismatch

11-05-2011, 12:10 PM
hi friends,
i need to make a robot which moves to and fro---something like a linear oscillator.
i've used atmega 8l and programmed the D-port using delay function for that.when the motor driver l293d is disconnected the outputs of 8l(i've connected leds to indicate them) work fine..but when l293d and the motors are connected ,the motors' movement are not as expected..moreover the outputs of 8L are getting changed..can anyone help me solve this problem..
.................................................. .....................................hoping a solution from U

11-05-2011, 07:16 PM
Can't suggest anything from the little information you have provided about your setup.

Make sure your L293 and you Atmega8L is working on the same operating voltage(not to be confused with the motor input voltage) and that they have a common ground.

And also ensure that you provide a logic high signal to the enable pins on the L293.

11-06-2011, 01:32 PM
yeah..the connections are intact..i'd supplied pins 1,9 and 16 with 5v....both atmega 8l and l293d have the input from same voltage regulator..pin 8 is connected to input of voltage regulator 7805(+9v).don know where is it going wrong

11-07-2011, 01:50 PM
Try the following:
1.Separate sources for the motor and the microcontroller ckt.
2.Connect pull down resistors(1k resitors connected to ground) to the motor controller pins.
3.Make sure all the ground connections are connected together.

11-08-2011, 02:04 AM
PLease post details like what motors you are using, i.e. voltage, max stall current etc. As you would know (hopefully), the L293d can source only up to 500mA, so if you have motors that are already attached to a tire or something else that might cause an opposing force at the shaft, the excess current pull might mess the output. Also,make sure that logic (uC) power source and motor power source are separate. If both motor and uC are on the same power line, sudden current pull from the motors might cause the uC to reset and show erratic behavior.

11-08-2011, 08:44 PM
Since the Atmega8L is giving proper outputs, it seems like there is a problem with your motor driver circuit.

Try disconnecting the Atmega8 from your circuit and check if the motor driver connections are right by applying 5V and Gnd signals to the input pins of the L293. If the motor doesn't run, then recheck you motor driver connections. If you are sure you have the connections right, then replace you L293 with a new one.

11-08-2011, 11:09 PM
no pratheek l293d is perfectly working...
@lastRites:does separate sources mean separate voltage regulators only or separate power sources to both 7805s??

11-08-2011, 11:10 PM
no pratheek l293d is perfectly working...
@lastRites:does separate sources mean separate voltage regulators only or separate power sources to both 7805s??

11-09-2011, 06:26 AM
Separate voltage regulators should be enough if you power source can handle the current requirements of your motor. Pull down resistors almost always solved the problems I had with the l293d. Can you provide more info on what kind of motor you are using or post a schematic of your circuit? At the very least post a picture or two of you circuit board and motor. Otherwise it becomes very difficult to help you :P

11-09-2011, 06:54 AM
Here is a sample schematic of a motor diver using a l293d:

11-14-2011, 10:45 PM
I guess The possible root cause of this issue is most common mistake beginners make in their circuits.
1. Not enough current capability of the power supply
-- when you connect LEDs they dont draw more than few mA to switch-ON, but when you power the Motor, it draws more current that your power supply can source. So the voltage of power source dips for a moment, and then your MCU resets, this causes the motor turn off, and such a cycle continues...the resets also make the input signals of L293... in tri-state for a moment, and thats when your L293 will really go crazy if there is no pull down resistors on input lines.

Are you using a wall -transformer power supply ? (what is its current rating?)
if yes, crush it with a hammer or burn it, and buy a decent 2A-10A rated power supply or make one yourself using simple transformer and diodes etc...it will go long way in your life.

2. If you did use a capable enough power supply, then its more like a Bypassing issue.
Add a few 100uF or 1000 uF capacitor on motor power-supply line.

all this assuming circuit is built right. LEDs prove a bit but not 100%.

Best Regards