My incredibly frustrating H Bridge dilemma

Ok, I think I am going to need an H bridge expert for this one that or someone with lots of common sense. I am using an SN754410 H bridge. I have wired the circuit appropriately and in accordance with these two sources

Here are images of my circuit


The motor will turn and respond accordingly to changes in PWM but WILL NOT REVERSE!
Here is the code i am using

int speedPin = 3;

int motor1APin = 6; 

int motor2APin = 7;

int speed_value_motor1;

void setup() {
pinMode(speedPin, OUTPUT);
pinMode(motor1APin, OUTPUT);
pinMode(motor2APin, OUTPUT);


void loop() {

digitalWrite(motor1APin, HIGH); 
digitalWrite(motor2APin, LOW); 
speed_value_motor1 = 255; 
analogWrite(speedPin, speed_value_motor1); 

Theoretically, when I inverse motor1APin and motor2APin as such:
digitalWrite(motor1APin, LOW);
digitalWrite(motor2APin, HIGH);
The motor should run in the opposite direction... correct? However it does not. The motor simply stops running. I have tried several things (of course after checking the circuit with a multi tester etc.), including;

  1. Replacing the sn754410 with another sn754410. Result = no change
  2. Swapping from motor1 pins to motor 2 pins. Result = no change
  3. Crying. Result = -10 dignity points
  4. Throwing things while swearing. Result = +10 manly points

Has anybody had this problem before? what was the solution?

The motor simply stops running

so simply half of the H-bridge is not switching over.
Can you post those pictures of your stuff where they are freely available and don't have to have a Google account before you can see them.
Get a meter and see what half of the bridge is not switching. Write some code that swaps them over, that code will just run in the same direction all the time.
Why start a new thread when I answered this yesterday?

sorry for cross posting.... i don't get what you are telling me. it is completely obvious that half of the H bridge is not switching over. I have multi-tested and observed on an oscilloscope and I know that when i send 5 volts to pin 2 (1a) of the h bridge and 0 volts to pin 7 (2a) the output from pins 3 and 6 (1y and 2y) on the H bridge is 0 when i should be -9 volts... however 0 volts to pin 2 and 5 volts to pin 7 the output is 9 volts as it should be.
as for the code, your right it does run only in one direction but i rewrite it using inverse values for digitalWrite(motor1Apin, LOW) etc. and upload it to the Arduino. and still nothing.
After posting this i am going to provide 5 volts to pin 2 of the H bridge from digital output pin number 4 instead of pin 6 of the Arduino because pin 6 is a PWM pin and maybe that screwing with something. I will let you know if it works

I realize in the picture it looks like i am using digital output pins 8,7 and 4 from the Arduino but it is simply the angle of the camera. i am really plugged into pins 7, 6 and 3.

here is a more clear image of which pins i am using from the Arduino

here is a more clear image


haha sorry, i’m no photographer. Assuming that i plugged the wires into the Arduino in the same configuration as provided on this website what else could be going wrong?
I should note that i have also tried wiring the other side of the h bridge for motor2 and the same problem occurs.

I FIGURED IT OUT!!!!!! WAAAAAAHOOOOOOOOO! for anybody else reading this thread who has encountered the same problem the solution is to add a capacitor (10 - 100uF) from pin 8 (Vcc2) of the H bridge to ground.