L293D driver

Dermotx

Member
I'm using an L293D chip to power a solenoid valve. It receives its signal from an 08 chip. I'm using leg 3 and leg 7 of the o8 chip to power leg 2 and leg 7 of the L293D. Do I need to have a resistor between leg 3 0f the 08 chip and leg 2 of the L293D and between leg 7 of the 08 chip and leg 7 of L293D. I don't at the moment but the operation of the L293 is fine for a few weeks but then it stops working. Any ideas would be appreciated.
 

Michael 2727

Senior Member
What are you using for a power supply ?
Do the solenoids have back EMF protection
diodes fitted, they can produce high voltage spikes ?
Try adding a 1 to 10µF capacitor as well as
the 100n across the supply, close to the chip.
A little extra info will go a long way.
 

BeanieBots

Moderator
I'm with Michael 2727 re back EMF possibly killing the L293D or over current/temperature.
By "stops working", do you mean sometimes doesn't switch, requires a power down reset, needs a new chip or dramitically blows itself apart?
What voltages are you using?
What is the coil resistance of the solenoid?
 

Dermotx

Member
Thanks for the replies. I'm using four AA batteries to power the L293D i.e. 6V. I haven't filtered the supply to the L293D although I have filtered the 4.5V supply to the 08 picaxe. The back EMF is supposed to be taken care of by the fly back diodes which form part of the L293D IC. By stopping working I mean it doesn't activate the solenoid anymore. It hasn't overheated or anything like that. From what I read later on today on the web I think I should have used 1k protection resistors on the trigger inputs to the L293D i.e. on pins 2 and 7. The resistance of the solenoid is 15 ohms so the current draw is only about one third of an amp which is well within the capability of the L293D. It only draws this current for 50 millisecond so it doesn't get a chance to heat up.
 

BeanieBots

Moderator
Sounds like a back EMF noise issue that may be resetting the PICAXE. The diodes will protect the drive from overvoltage but there will still large spikes/currents floating around.
Re-arranging the wiring might help but it would be difficult to describe with text the best way to do that.
Make sure reset is pulled high with a resistor and has a cap down to 0v.
Good decoupling close to the PICAXE power pins.
Large electrolytic cap on supply to driver.
If it's not a frequent issue then you probably have a fairly good layout already and getting it better will prove difficult. When it crashes every other activation it easier to know that the 'fix' has worked.
Good luck with it.
If you do find a fix, please post back for the benefit of others. I have confidence that a few caps in the right place will do it.

Resistors between PICAXE and driver are always a good idea in general but should not be a requirement and IMHO is not the cause of your problem. 3/4A from 12v into an inductive load will generate a massive spike. Even with a chip that built in didoes I would still fit some fast diodes externally for added (and faster) protection.

Edited by - beaniebots on 19/04/2007 22:23:29
 

Rickharris

Senior Member
As a note the L293D has an in built thermal cut out that inhibits the chip if excess current is drawn - Perhaps you are activating this feature?

One way to get round this is to use the 293 to trigger a suitable FET or transistor that will then supply the required current - or relay of course for the mechanically minded.
 

Denzel

Senior Member
I recently used a L293D to control a 12v solenoid valve, without resistors on the inputs which worked fine and never stopped working, I did havea 1n4004 diode across the solenoid though.
 

Michael 2727

Senior Member
I would also be thinking of a larger supply
for the solenoid.
4 x AAA cells @ 300mA won't get you far.
In a relay, coil or motor the back EMF
voltages can be as high as 10 x the input
voltage e.g. 5V = 50V Back EMF.
Don't believe me ?
Wire up a 12V relay straight to a battery
(no Diode)and touch both terminals while switching it on and off a few times.

You could use an IRF540N MOSFET via a 1K to
2k2 resistor, they work better if the Picaxe
supply is 5V to 5.5V though.
Or there are logic level switching types
available, they cost a bit more.
 

Dermotx

Member
Hi Everybody,
Firstly thank you all for your replies. I have got to the root of the problem.
I was using 4 AA batteries to drive a 6V solenoid. When the batteries were fresh I was getting nearly 7 volts from them. There is a voltage drop across the L293D of 2.7V which gave me 4.3 volts to operate the 6V solenoid.
This is just enough to operate the solenoid. However when the battery voltage falls to 6V after a while the voltage available to the solenoid is just 3.3V. This is just on the limit of what it takes to operate the solenoid.
I added another two batteries to my battery pack, giving me 9V and cycled the solenoid 20,000 times and it worked perfectly every time.
One peculiar thing however is that when I use 9 volts to operate the solenoid there is a 4.3 volts drop across the L293D. This doesn't matter as I am then getting 4.7V across the solenoid which is still enough to make it operate.
Thanks again for all your suggestions and help.

Dermot
 
Top