1
\$\begingroup\$

Hi I am using the SN754410 h-bridge driver to try to control a motor using two switches. As I understand the SN754410 should be identical to the L293D. I have hooked up a circuit and I think I have followed this tutorial correctly, however when I try to use it the motor will not work when I try to attach pins 2 or 7 to a 5 volt positive source the motor will not start. Even stranger when I try to attach one of those pins to the ground the motor starts in one direction, and when the other pin is attached to the ground the motor spins in the other direction. Can anyone explain this weird behavior to me. I understand that the problem is caused by floating inputs acting as a high and when one of the inputs is brought low the motor moves, but i do not understand how I would fix this problem, as suggested i have connected a diode between the input and ground, however the circuit still doesn't work.

enter image description here

\$\endgroup\$
1
\$\begingroup\$

The inputs need to be actively pulled-down for them to operate: -

enter image description here

Notice the PNP transistor will not be turned on unless a current is taken from the base to GND. To be sure, if you are using switches, use 10k pull-up resistors (as indicated in the data sheet) and the switches should ground the inputs to activate them.

\$\endgroup\$
  • \$\begingroup\$ I am not sure i understand your explanation, i have attached diodes from the input to the ground, but the circuit still does not work as it is supposed to. \$\endgroup\$ – popgalop Mar 3 '14 at 14:47
  • \$\begingroup\$ @popgalop the picture in my answer shows the equivalent input circuitry inside the chip - the inputs are activated by pulling them low so attach a 10k pull-up to Vcc1 and both inputs and use your switch to short the input to ground. \$\endgroup\$ – Andy aka Mar 3 '14 at 14:56
  • \$\begingroup\$ I cant do that as my real project involves using a micro controller to control the motor for a robot. The switches are just me trying to simplify the circuit so that i could build it on a breadboard and draw a schematic. \$\endgroup\$ – popgalop Mar 3 '14 at 15:03
  • \$\begingroup\$ As far as I can tell I've explained the "weird" behavior. Taking this to the next step isn't part of the question. Having said that, your MCU will drive a signal high and low and this will likely work just fine. \$\endgroup\$ – Andy aka Mar 3 '14 at 15:07
  • \$\begingroup\$ I dont see how i can drive a signal low using a PIC in all other example i have seen floating pins seem to be counted as a low \$\endgroup\$ – popgalop Mar 3 '14 at 15:26
1
\$\begingroup\$

The SN754410 is being used in H-Bridge mode. Since the motor is attached to both outputs, it is a XOR function. A simple truth table will explain.

enter image description here

That means one input must be pulled high while the other pulled low, for the motor to move. Essentially, you are providing the positive and negative power through the driver, and if both sides of the motor are positive, no current flows, if both sides are negative/0v, no current flows. One side must be positive and one side negative for current to flow and the motor to move. Which side is which is what determines if it moves clockwise or anti-clockwise.

Since the internal setup of the input pins are PNP transistors as @Andy has shown, a floating input makes the output High. Ideally, you do not want floating inputs, as the switch you have in your schematic does. But this explains why simply grounding one input allows the motor to move.

\$\endgroup\$
  • \$\begingroup\$ So what would i need to do to make the circuit function properly. \$\endgroup\$ – popgalop Mar 3 '14 at 14:44
  • \$\begingroup\$ @popgalop Tie the switches at pin 2 and pin 7 to ground, not 5V+. That's all. It's actually working as designed. \$\endgroup\$ – Passerby Mar 4 '14 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.