Home - Search - Members
Full Version: DC Motor with AT89C51 along with driver L293D and L298 not working properly!
Mar 13 2010, 6:59 PM

I have selected this project : Controlling a toy car (made with AT89C51 + 2 DC Motors driven by drivers L293D) from a PC wirelessly. (using RF)

I interfaced one AT89C51 to the PC through the COM PORT(RS232) which receives serial input as commands. With respect to the inputs I transmit a particular information through the TWS434 and receive it using the RWS434 (Transmitter and receiver ICs)

The received information is then given as input to the Port P1 of another AT89C51 which gives input to the Motor driver IC (Dual-H bridge) L293D through the Port P2. I have connected the 2 motors to output ports of L293D.

Whatever data that I wish to transmit is being transmitted and also received. The data also gets output from the Port P2 of the Receiver side AT89C51 (verified it through a Digital Mulitmeter)
The problem I am encountering is that, the motor doesn't rotate properly, it just rotates too slowly (less than 6 rpm - Note that the motor(12V DC) when directly conntcted to the power supply rotates at its mentioned speed of 40 rpm).
I found that if I remove the L293D driver IC from its socket and insert it back(while it is still powered on), the motor rotates properly until it is made to rotate in the opposite direction (by giving suitable values). I also found that whenever I try to measure the output voltage at the motor's end when it is rotating slowly through a Digital Multimeter the motor starts to rotate properly until its made to change direction.

So I thought L293D should be the problem and I switched to L298 driver IC.
Here the problem I am seeing is that I get Voltage of 12V from the out terminal of the L298 (across pins OUT1 and OUT2) but the motor does not rotate.

The following image gives you an idea of the L298 problem :
This does not work even though there is output voltage

But if modified like this it works (but obviously only in one direction )

Kindly help me out in this regard.
Both the L293D and L298 oriblems.


Mar 13 2010, 8:21 PM
Well this may not be best answer but i think with 1st controller when motor rotates slowly that ic's VSS and VS is connected to positive Logic 5V not with battery connect battery there and give it a try

Mar 13 2010, 8:59 PM
You should have 100nF capacitors on Vcc and Vs.

I would also add larger capacitors in addition to the 100nF.

Ajay Bhargav
Mar 14 2010, 12:03 PM
also check if your power supply is enough to provide sufficient current to motors.
Ajay Bhargav
Mar 14 2010, 12:03 PM
[Topic moved to 8051 Discussion forum]
Mar 14 2010, 1:32 PM
Thanks for the replies guys..
I found out the problem associated with the L293D.. it was a driver problem!!
Bought another IC and its working fine!!
thanks for your help guys..

But I'm still wondering as to why it gives problems when using with the L298!! I tried changing IC but still the same.

@Ajay Bhargav : Checked the power supply, its about enough to run a motor..
@ExperimenterUK : No change sir.. Its still the same! :-(
@Afnan : Connected according to data sheet and still the same.. The motor rotates only when Out2 and Out4 are grounded! So no rotation in opposite direction
Ajay Bhargav
Mar 14 2010, 2:25 PM
well all is well when ends well

do submit your project here.. its a good learning project.
Mar 14 2010, 10:33 PM

Here the problem I am seeing is that I get Voltage of 12V from the out terminal of the L298 (across pins OUT1 and OUT2) but the motor does not rotate.

Are you sure you were getting 12V across pins OUT1 and OUT2
and *also* across the motor connections ?

Logically, the motor would turn, unless it is faulty.
Could there be a bad connection or dry soldered joint ?.

What model is the motor ?.
Does it rotate both ways if connected to a battery ?.
Jan 3 2011, 4:51 PM
hi everybody, i urgently the circuit diagram n code in c of this project.. plz present it here.
i would be thankful..
Jan 3 2011, 4:58 PM
i mean i need it.. sorry for the mistake
Jan 3 2011, 5:54 PM
hi yadavmahesh
its a simple just connect l298 to controller it has 4 pin interface with controller
in1 and in2 for 1 pair
if in1=0 and in1=1 let say clock wise direction
if in1=0 and in1=1 then anti clock wise direction
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Rickey's World © 2003 - 2007