Let's Make Robots!

Inconsistency in my L293D

Sorry, I have no schematic prepared to make this easier.

L293D by ST Electronics (datasheet) (quad half-H-bridge), only one power source: 5V from battery.
V1 = V2
Enable pins for 1+2 and for 3+4 are high.
Input pins for all half-bridges are pulled to GND via 22kOhm resistors
Motors connected to outputs: M1 to outputs 1+2, M2 to outputs 3+4.

All on the breadboard, I have an extra wire in the V+ bus. I use it to make the inputs high. Start experimenting.

experiment A)
start as above
inputs: 1 high, 2 low = M1 forwards
inputs: 1 low, 2 high = M1 backwards
leave one input (1 or 2) high, motor keeps on running, remove V+ from Enable pin "1+2", it is now floating. Motor stops

Cool = as I expected.

experiment B)
start as above
inputs: 3 high, 4 low = M2 forwards
inputs: 3 low, 4 high = M2 backwards
leave one input (3 or 4) high, motor keeps on running, remove V+ from Enable pin "3+4", it is now floating. Motor keeps on running!

What the Freak?

experiment C)
situation as produced by B)
I pull Enable "3+4" down to GND via 22kOhm resistor. Motor Stops. Finally!

experiment D)
situation as produced by A)
I pull Enable "1+2" down to GND via 22kOhm resistor. Makes no difference. Motor was already stopped.
Make enable high (with pull down resistor still in place). Motor starts running again. Makes sense.

Conclusion 1
The half bridges 1+2 need no pull down resistor on their shared enable pin. Half bridges 3+4 do. It does not hurt to pull them both down.

Experiment E)
Remove the pull down resistors on the enable pins. Make them high.
Make both motors run whichever way: for example input pins 1 and 3 high, 2 and 4 pulled low.
Remove V+ from Enable 3+4 (floating): M2 does not stop without pull down resistor on the Enable pin.
Makes sense now that we have learned the above.
Make it high again.

Experiment D)
Remove V+ from Enable pin 1+2 (floating): both motors stop!
Fudge around with some more pull down resistors on enable pins: makes no bleeping difference!

Conclusion 2
I gotta get me some sleep.

I cannot make M2 run (enable pin high) while M1 is stopped (enable pin low). But I can do that the other way around.

Suggestions? Cheap suppliers for replacement chips? Last time I spent 7 Euro.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
When I use the SN754410 (pin compat. and more powerful) I constantly drive the pin low or high, so there is no floating of the line.
I have to do the same.  I noticed all my inputs were always high on the SN754410NE and needed pull down resistors.  On my L293Ds I did not need them.

The reason you need pull up/down resistors with cmos IC's is that the inputs are FET inputs. Basically they are open circuit and the charge on them determines if they are high or low.

When you disconnected them they continued to have the same electrical charge on them. This may have dissapated eventually.
This is why the manuals reccomend using pull up/down resistors when driving "H" bridges, especially FET "H" bridges.

I don't know about the enabling of one motor and not the other unless it was caused by lack of sleep on your part :P

 

L293D is BJT, not FET

 

If you look at the internal representative schematic on page 3 of this ST L293 datasheet,  you'll see lots of little current mirrors that can have some screwy behaviors, sometimes one side pulling up another or vice versa. Some parts of it does offer the thermal and overcurrent protections, but there are many conductive paths that can turn things on when one input is left floating.

I think I read somewhere that you can actually tell whether it's FET or BJT inside by inspecting supply pin. It should be called VCC when BJT-based and VDD when FET-based and the VCC refers to voltage at collector and VDD refers to voltage at drain. Equally VEE and VSS refers to voltage at emitter and voltage at source but many manufacturers use GND in the datasheet. Does anyone know if this really holds true in the chip business?

Yes, that's where those abreviations came from. Back in the day. Way back. When it mattered more than it does now.

I doubt datasheet writers honour this system 100% reliably. In other words: don't bet your house on it.

I should have remembered this one. Still trying to figure out why disabling 1+2 also disables the other bridge. Maybe it doesn't at all. Maybe it was a fata morgana.