Welcome! Log In Create A New Profile

Advanced

Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?

Posted by Joshua Merchant 
Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 24, 2008 08:04PM
I've been working on my shopping lists for my G2 (Arduino-based) electronics. Most of the stuff I need I can get from Mouser and the RRRF store, but a couple parts are backordered on Mouser, and it would probably be cheaper if I could just find alternative parts in stock on Mouser that fill the same roles instead of shipping it from another supplier.

The first part is the L293D Texas Instruments IC for controlling motors, a component of the DC Motor Driver v1.1 [reprap.org]. The parts lister suggests L293DNE [www.mouser.com], which is out of stock and not available until 9/1/08 (about month from now).
With a bit of looking around, I found that L293NE [www.mouser.com] is available now (and the same price). I looked at the specs on Mouser and then at the manufacturer's (TI's) datasheet, and I cannot find a difference between the two. The DNE and NE suffixes seem to describe identical ICs.
So, is there any reason I should not use the L293NE?

The second part I can't find is the H21LOI Fairchild optical interrupter switch, the main component of the Opto Endstop v1.0 [reprap.org]. The suggested part [www.mouser.com] is out of stock and not available until 2/2/2009 (I think that's about 6 months from now). I found H21LOB [www.mouser.com], which essentially has non inverted output (the output is on when the H21LOI's would be off, etc.).
I think I can use it and just change the software code. Is this incorrect? Would there be any downside to this? I imagine there might be some power usage differences, but they won't be significant, right?

Thanks!

[Edit- heh, the subject line had the H21LOB ) turned into H21LOcool smiley when I didn't put in the space...]

Edited 1 time(s). Last edit at 07/24/2008 08:05PM by Joshua Merchant.
The details can bite you, the L293NE has higher current drive capability than the L293DNE (good so far) but the L293NE does not have the internal clamping diodes the L293DNE does. I am guessing the board design does not include redundant diodes, you would have to find space to add them. A better option might be to seek an alternate source. TI lists distributors on their product pages, it looks like Newark actually has stock. [octopart.com] also has a good distributor search, through them jameco also appears to have stock (of course so does mouser so you have to follow through with them).

Digikey has stock of teh H21LOI
[www.digikey.com]

I am not familiar enough with the optoisolator circuit to know if a software or firmware inversion would allow you to use the non-inverting version. I would make sure before going down that path.

It does stink to have to do two small orders from different distributors, digikey especially gets you with a handling fee.

Hope this helps.
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 25, 2008 02:42PM
d0ubled Wrote:
-------------------------------------------------------
> The details can bite you, the L293NE has higher
> current drive capability than the L293DNE (good so
> far) but the L293NE does not have the internal
> clamping diodes the L293DNE does. I am guessing
> the board design does not include redundant
> diodes, you would have to find space to add them.
Darn. I'm betting the amount of time and money I'll spend rearranging everything to compensate for the external clamping diodes would be more than just paying the shipping and handling from another supplier (but then again, maybe not - trying to figure out which combination of supplier(s) to order from could add to the price [in time] of using another supplier).

If anyone has any more information on this, please enlighten me.

> I am not familiar enough with the optoisolator
> circuit to know if a software or firmware
> inversion would allow you to use the non-inverting
> version. I would make sure before going down that
> path.
Any advice on how to go about doing this check? I looked at the basic testing code here [reprap.org]. It seems to me that instead of
if(digitalRead(ENDSTOP_PIN))
   Serial.println("blocked.");
else
   Serial.println("open.");
you could have
if(!digitalRead(ENDSTOP_PIN))
   Serial.println("blocked.");
else
   Serial.println("open.");
It looks like C, so I'm assuming the NOT will work correctly. If it doesn't, you could just switch the contents of the if and else blocks.
I don't see why this couldn't apply to the actual code. Any comments/suggestions/advice/etc?

> It does stink to have to do two small orders from
> different distributors, digikey especially gets
> you with a handling fee.
If that's the way it is, that's just the way it is [but don't you believe them].

> Hope this helps.
I hope it helps me too. grinning smiley
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 28, 2008 06:38PM
I searched for the L293D on SparkFun and came up with the SN754410 [www.sparkfun.com]. They say it "is a pin to pin compatible replacement for the L293D".
It's also sold by Mouser ($0.10 cheaper than SparkFun at $2.25/unit).

So can I just use this instead of the L293DNE? I don't see why I couldn't. Am I missing something? The thing that doesn't make sense is that they (Texas Instruments) would make essentially the same chip under two different names... A clue to this seems to be the following features:
L293DNE lists "Functionally Similar to SGS L293 and SGS L293D".
SN754410 lists "Improved Functional Replacement for the SGS L293".
The SN754410 datasheet was last revised November 1995 (can you believe that was actually 13 years ago?), while the L293/L293D datasheet was last revised November 2004.
The thing that worries me is that the SN754410 says "SGS L293" not "SGS L293D", and it lists "TTL- and CMOS-Compatible High-Impedance Diode-Clamped Inputs" where the L293D lists "Output Clamp Diodes for Inductive Transient Suppression"; that is, it says it uses diodes on the input instead of the output, which may or may not have the same effect (I really don't know).
The L293D page [focus.ti.com] does list SN754410 as an alternative, but it also lists the unclamped L293, so I don't think this part helps.

Combined with the trade for H21LOB (available at Mouser) instead of H21LOI, this would allow me to only have to buy my Seedling parts from Lowes (sales tax, no shipping), McMaster, Mouser, and SparkFun, reducing the shipping costs and ordering complications.
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 28, 2008 07:14PM
Clamp diodes on the inputs aren't the same as on the output, each protects different parts of the chip.

The good news is that clamping diodes are very simple to add as they can be added to the wiring leading to the stepper. Each of the four stepper wires needs two diodes connecting to it, eight in total. For each wire; A diode is connected between the wire and ground with the white stripe on the diode nearest the wire. A diode is also placed between the wire and the supply voltage with the white line furthest from the wire.

Any Schottky diode rated for the voltage and current being used should work fine.
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 28, 2008 08:05PM
peteredworthy Wrote:
-------------------------------------------------------
> Clamp diodes on the inputs aren't the same as on
> the output, each protects different parts of the
> chip.
sad smiley
> The good news is that clamping diodes are very
> simple to add as they can be added to the wiring
> leading to the stepper. Each of the four stepper
> wires needs two diodes connecting to it, eight in
> total. For each wire; A diode is connected between
> the wire and ground with the white stripe on the
> diode nearest the wire. A diode is also placed
> between the wire and the supply voltage with the
> white line furthest from the wire.
>
> Any Schottky diode rated for the voltage and
> current being used should work fine.

Interesting. I figured I could use external diodes if I had to.
Why do you say "wiring leading to the stepper"? Isn't the DC Motor Driver used for the extruder DC motor (GM3)?
Also, what exactly is the function/purpose of the diodes? Is it to make sure that a current doesn't flow from the motor back into the chip and fry it? How/why would such a current be created from the motor? Would it be when the motor turns independently of the power source, acting like a generator?
What would happen if I just left the diodes out?

Edit: There's also this [www.mouser.com] which seems to be the STMicroelectronics equivalent of the TI L293D. It appears to be the same thing, but I'm really not educated enough in electronics to know for sure.
Also, the TI SN754410 has "output clamp voltage" rows in the electrical characteristics table, something the L293D has which the L293 does not (as far as I can tell). Perhaps this means that it also clamps the ouput?
Edit2: The datasheet for the L293 also says "On the L293, external high-speed output clamp diodes should be used for inductive transient suppression." (As opposed to the L293D which has these internally.) The datasheet on the SN754410 says nothing about requiring external clamping diodes.

Edited 2 time(s). Last edit at 07/28/2008 08:46PM by Joshua Merchant.
Ru
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 29, 2008 03:59AM
Quote

Also, what exactly is the function/purpose of the diodes? Is it to make sure that a current doesn't flow from the motor back into the chip and fry it?

I did a little research on what goes in to a good H-bridge motor driver, to see what sort of work is required to replace the really expensive bits like the L298.

Turns out motor control is an unpleasantly complex problem. Amongst other things, when you slow the motor down, it does indeed work like a generator. Those coils work like nice big inductors too.

Quote

Why do you say "wiring leading to the stepper"? Isn't the DC Motor Driver used for the extruder DC motor (GM3)?

Motor drivers are motor drivers winking smiley

Look at the layout of the stepper driver board with its external diodes. I couldn't tell you if you can just copy that method (with smaller, cheper diodes) but I don't see why not... *if* the problem being solved is the same on both driver circuits!

See if you can find some example circuits containing this cheaper chip. STM provide some quite nice documentation for the L297 and L298 and other motor driver related ICs, so I don't see why you shouldn't be able to find something useful for this L293
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 29, 2008 06:29AM
> Why do you say "wiring leading to the stepper"?
Sorry, it was 12am and I actually have the PIC based electronics rather than the Arduino ones ;-}>

On the 'DC Motor Driver v1.1' build page the wires are called channel A and channel B, with each channel having two wires.

The driver can be used for a number of things other than just dc motors though. It can also be used for operating solenoids and stepper motors.

> Also, what exactly is the function/purpose of the diodes?

Inductive loads, such as motors, by definition oppose changes in current. Inductance is normally likened to inertia. When the controller switches off the device it stops current flowing through the rest of the circuit almost instantly. The current on the inductors side can't stop that rapidly though and will continue to flow.

The flow of current/charge into an isolated wire causes it's voltage to rise, very much like a capacitor. As the capacitance of the wire is generally very low its voltage rises very rapidly as charge is added. If nothing is done the voltage could become high enough to destroy the transistor that is blocking the charges flow.

The diode between the motor's wire and the supply voltage gives the current an alternative, when the induced voltage becomes greater than the supply voltage the charge can flow into the supply, limiting the wires charge. This keeps the maximum voltage of the wire down to the supply voltage plus a little as diodes don't start conducting until a threshold difference is reached.

Fast diodes are used to avoid high voltages building up while the diode is 'turning on'.

Finally capacitors are added to increase the wires capacitance and so slow the voltage rise. The capacitor size is a balance though as while larger caps provide better protection they are doing this by slowing the rate of voltage change when the controller switches on or off. It needs to be slow enough that the voltage doesn't rise to dangerous levels before the diode starts conducting but it also needs to be fast enough for the device that is being controlled.

With a DC motor this isn't much of a worry, but for a stepper motor slow switching would limit the maximum speed the stepper could reach. It may even be possible to use a capacitor that is large enough that the diodes aren’t needed, the current doesn’t keep flowing forever.
Re: Part alternatives for L293DNE and H21LOI (L293NE and H21LOB )?
July 29, 2008 05:32PM
Some great news!
SparkFun's claim that the SN754410 is a suitable pin-for-pin replacement of the L293D seems to be supported by other sources.

[www.kronosrobotics.com] says "L293D from Texas Instruments is rated at 600ma and includes the diodes" and "SN754410 from Texas Instruments is rated at 1A and does have the clamping diodes."

"Duncan" [www.embeddedrelated.com] says "...incidentally, this chip has a higher
current handling (1A vs. 600mA) than the L293D and also has the protection
diodes of the 'D' model".

"Elliot" [letsmakerobots.com] says "The L293 has 1A drive, but no clamping diodes while the L293D has 600mA drive with clamping diodes. The SN gets you both 1A and diodes, and they're a tad cheaper at Digikey or Mouser (in the US at least). And they're otherwise pin-compatible, so you don't even have to change your designs."

[www.robotstorehk.com] (describing the SN754410): "This is a great basic H-Bridge for controlling small motors at roughly 1Amp peak current. This chip is also a direct replacement for the lower capacity LM293D (pin to pin compatible)."

The ITP guys at NYU [itp.nyu.edu] are caught saying "an L293E from Texas Instruments (the alternate name for this chip is the SN754410".

And so on.

Lastly, if you look at the datasheet for the SN754410, on page 2 (as pointed out by at least one source linked to above), there are diodes on the "TYPICAL OF ALL OUTPUTS" diagram. I'm guessing these are the internal clamping diodes.


This means that the SN754410 is not only a suitable replacement, but also has a higher current rating (the latter part is backed up by TI's datasheets).
Mouser sells the L293DNE for $3.05 and the SN754410NE for $2.25.
So it's better. It's cheaper. And it's available. Do I need to say how hot that is?

I win. smoking smiley


[Note, some source(s?) seem to suggest that the output diodes may only be for electrostatic discharge (ESD) protection, and may not be guaranteed to protect against the inductive kickback [www.google.com]. See "ppanbura"s comment [letsmakerobots.com]. He seems to be unsure, however. I might email TI and ask them about it, but I'll probably just try it myself and report back, based on the other sources.]
Sorry, only registered users may post in this forum.

Click here to login