SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By BushWhacker
#160091
Okay, Gonna make myself look stoooopid here, I'm sure. Just got the SN754410 H-bridge today, eagerly popped it into a breadboard to check it out. I built the most basic of circuits: 1,2EN are run to the +5V rail; Vcc1 (pin 16) goes to +5V rail; Vcc2 (pin 8 ) gets +3V. Pins 4,5,12,13 all go to Gnd. 1Y and 2Y run to the motor. According to the Data Sheet, if I send 1A or 2A high, the motor should turn (direction determined by which is taken high). Right????? Here's where I got lost....I ran 1A and 2A to momentary switches then onto the +5V rail. Powered the circuit up, pressed the 1A switch and got NOTHING. Pressed the 2A switch and got NOTHING. But wait, there's more... while fiddling, I ran the switch (from 1A) to Gnd, and viola, the motor began turning. So I ran the switch from 2A to the Gnd rail as well, and shock of all shocks... the motor turns one way when the 1A button is pressed, and the other way when the 2A button is pressed.... WTF??????? Any thoughts on what I've done here. I've managed the impossible, but I have no idea why!!
By jremington
#160092
Spend a bit more time with the data sheet, paying attention to the "Function Table". You need to have one of the Y outputs high and the other Y output low in order for the motor to run. Also, the minimum recommended voltage on either Vcc is 4.5V.
By BushWhacker
#160093
I appreciate that, jremington, but I did check the Data Sheet "Function Table"... all it tells me is that for each driver, if the A and EN pins are both high, the output (Y) will be high, if A is low, output should be low, and if EN is low then Y is off and in high impedence. My point is in the configuration that I have, when the motor is turning, A is Low on one (the one with the button pressed, and it's an open circuit (which should be low) on the other.... both outputs SHOULD be low ... but the motor's turning. Here's a new twist.... in fiddling with the circuit, I took it all the way down so that only the Vcc's, EN, and grounds are connected. I'm using only 1 driver; there is nothing going into the A pin. The Y (output) goes to one side of the motor, with the other side of the motor going to grnd -- when I power the board, the motor turns!!!!! I know I've got to be missing something, but to my mind, this can't be happening. With the A pin open, the Y should be low... but it ain't! I'm beginning to accept that I could have gotten a bad IC, but I put that at the bottom of my list of possibilities... well below "I'm doing something wrong". BTW - I'm putting Vcc2 at +3V because I'm using 3V motors.
By BushWhacker
#160094
Maybe I'm finally learning something about electronics... or at least maybe some of the help so many of you guys have given me has at least got me thinking better -- I still don't know why my original circuit didn't work as expected; but I have learned enough that I decided to try putting a couple of pull-down resistors on the A pins, and like magic the circuit is working just as it is supposed to. I'd still be interested to hear anyone's thoughts on why the circuit didn't work without the pull-downs.... and why it does work with them. Thanks everyone!
By jremington
#160095
An open circuit on the A input of the SN754410, given the "upside down" PNP configuration, is effectively high. For this type of circuit current never flows INTO the input. Rather, in order to activate the A input (i.e. make the input transistor conduct), a small current must flow OUT of the input, into ground.

If you connect the A inputs to either Vcc1 (high) or ground (low) in various combinations, you will see that the function table is correct. It is not a good idea to leave inputs open or to make assumptions about the logic state of an open input.
By dlotton
#160108
BushWhacker wrote:...Here's a new twist.... in fiddling with the circuit, I took it all the way down so that only the Vcc's, EN, and grounds are connected. I'm using only 1 driver; there is nothing going into the A pin. The Y (output) goes to one side of the motor, with the other side of the motor going to grnd -- when I power the board, the motor turns!!!!!
jremington is spot-on correct. The observed behavior is because you're assuming the open switch means that the SN754410 sees the input as a valid 'low' input. Bad assumption in this case. This particular part will tend to see an open input as a 'high' value(by analyzing the input circuit on p2 of the datasheet). Depending on the part, an open digital input may be indeterminate, meaning that you can't count on how the part will see an open input. Unless a part explicity says how in input will behave, or states that it has an internal pull-up or pull-down, you should drive the input to the intended level.

If you go back to your original circuit configuration, without pushing any buttons, you'll find that if you measure both sides of the motor (with respect to GND), both sides will measure Vcc2(minus some voltage drop). Basically, both sides of the motor are connected to Vcc2 and no current will flow through the motor (and the motor won't spin).

As JR noted, the datasheet states the minimum recommended voltage for Vcc2 is 4.5V. When you operate outside the recommended specs the circuit may or may not work correctly, or may be erratic.