PDA

View Full Version : L293D problem



dr0w
07-30-2005, 05:15 AM
hi guys,
i tried to make something like a motor driving board using l293d,
i built it on a protoboard layout is represented on this schematic
http://users.verat.net/~silence/linkable/motorbrd.jpg
i connected it to a microcontroller, and to the parallel port, but nothing.
i multimetered chip's output pins, no voltage, where am i wrong? i guess something with supply wiring.
i found some examples of this chips usage, but they all connected analog and digital supply to the 4.5V from which was microcontroller supllied because motors were small.
please help this has been torturing me for days.
thanx!

maxasimo
07-30-2005, 09:15 AM
Try to check the voltage at Vcc pins of the chip...i guess there's something wrong with 7'9'05....u must use 7805 for +5 volts...also try to connect both Vcc to the same 9V supply...

Better to be on safer side....do't ever connect this chip directly to ur PC or uC....back voltage spikes may destroy them...use opto isolators b/w L293 and controller...

Also give a try directly before u connect the circuit to controller....simply connect the inputs to appropriate power lines...and see if motor runs.....

07-30-2005, 03:43 PM
can you elaborate on what opto isolators are??

maxasimo
07-30-2005, 04:19 PM
Well microcontrollers and PC I/O ports are delicate devices...they don't like if you abuse them with voltages and currents from other parts of the world...they simply die!!!

An optoisolator is a chip which contains a photodiode and a photodetector...both aligned inside the chip...when you put on the diode...the transistor gets on...

Use an optoisolator to protect uC from voltage/current spikes from motor control circuits or anything that can 'abuse' the uC with high voltages...just connect the photodiode pin of optoisolator to the uC and the put the device to be driven at the output of diode...and you are controlling the device remotely (optically)...

A polular IC is MCT2E....10 bucks....and very easy to interface...refer the datasheet for more...

http://www.fairchildsemi.com/ds/MC/MCT2E.pdf

Enjoy

yogi
07-30-2005, 06:32 PM
voltage at pin8 should be greater than at pin16

pin8 voltage to motor can be upto 12v

pin 16 logic voltage=5V

Test the pins of motor with multimeter without connecting motor

any probs mail me on njbibin@yahoo.co.in


Bibin John
www.bibinjohn.tk

07-30-2005, 08:19 PM
Use a IN4148 diode in series with 1k resistor and connect between the uc
and l293d.And be sure to use separate supply for your pin 16 and pin 8.I had the same problem...Hope this will help :D .I made a similar bot.U can check out the schematic.
http://vighneshwaran.tripod.com/id4.html

pratik123
07-31-2005, 01:04 PM
jus give pin 8 abt 12 v since that is the voltage that drives the motor and give pin 16 5v and from a regulated supp..It will work..

Rachit
07-31-2005, 08:19 PM
The 8th pin of L293D is connected to unregulated voltage supply (and this will actually drive the motor ) and the 16th pin is connected to regulated supply (5v). Just do this & it will definitely work.

dr0w
08-01-2005, 06:32 AM
oh, my mistake,
i misdrew the schematic, yes 9V go to pin8, and 5 to pin16,
but if, for example, i bring +5 from 7805, and 9V from a battery, which ground goes to pins 4,5,12,13 ????
battery needs to be grounded in order for electricity to flow, but what about the current from 7805???
thanx guys!

08-01-2005, 09:00 PM
Tie all grounds together and then to the IC grounds

dr0w
08-02-2005, 06:37 AM
ok, so thats my mistake, probably
ill try it and post end results back here
(ill put resistors-diodes also to protect the uC)
thx again!

dr0w
08-04-2005, 09:04 AM
ugh...
ok, i saw somebody mention that pin8 sgould get upto 12V,
but, since i will connect 2 9V mabuchi DC motors, which voltage should go there???
my guess is 9V battery, but since i built a voltage regulator for my bot which acts as a power supply for the whole unit (it passes 9V and 5V at the same time, 5V to the uC and l293d pin16, 9V for motors and i think of adding severl other 5V devices, like IR detectors and such)
will 9V battery be sufficient for all that or should i separate and go for several batteries?

thanx!

ice
08-05-2005, 07:08 PM
jst a mention



pin8 voltage to motor can be upto 12v
pin 16 logic voltage=5V


The datasheet says that Vs(pin8) and Vss(pin16) can both go upto 36V..


but since i built a voltage regulator for my bot which acts as a power supply for the whole unit (it passes 9V and 5V at the same time, 5V to the uC and l293d pin16, 9V for motors and i think of adding severl other 5V devices, like IR detectors and such)

separate the Uc and Motor batteries..you will be thankfull..the motrs just induce too much noise ...the controller will keep on resetting and have a lot of problems workin smoothly..


will 9V battery be sufficient for all that or should i separate and go for several batteries?
Two 9V in parallel would be good....(1 will also do)..you get more current with 2 in parallel.


Use a IN4148 diode in series with 1k resistor and connect between the uc
and l293d
A good idea to protect the Uc..but if you look at the L293D datasheet..its already equiped with "clamp diodes"..which is meant for the same reason you mentioned....however the L293B doesnt have the" clamp diodes"....so you can use the IN4148 diode there.

dr0w
08-10-2005, 05:20 AM
ahhh,
it finally worked, my motors are rollin' great.
but i am a bit confused, are enable pins enabling on logic high (1) or low (0), because when i send it 1 from my uC, motors are off, when i 0 it they start running?
is that ok? datasheet didnt mention this.

dr0w
08-10-2005, 05:20 AM
ahhh,
it finally worked, my motors are rollin' great.
but i am a bit confused, are enable pins enabling on logic high (1) or low (0), because when i send it 1 from my uC, motors are off, when i 0 it they start running?
is that ok? datasheet didnt mention this.

ice
08-10-2005, 09:23 AM
hey,
which Uc are u using..
Are using any pull-up resistors between the Uc and the enable line?

check ur code..you must be assuming "0" for a "1" by mistake in your code..

The l293d enable line accpets "1" for on and "0" for off

dr0w
08-10-2005, 05:07 PM
i used my avr devboard with atmega 8515 for testing, but ill use it with atmega8 on a board i built. my devboard has a jumper for pull up or down resistors, and it was in pull-down mode when i tested it.

08-11-2005, 04:51 PM
Only a high on input pins should turn it on.I think your
ur L293d is fried.Try testing the L293D before connecting to uc