DC Motor will not reverse

Hi, I am using a sn754410 H driver and the motor will run forward and respond appropriately to changes in PWM so i am assuming the circuitry is correct.

int speedPin = 3; // h bridge enable pin for speed control

int motor1APin = 6;
 
int motor2APin = 7;
 
int ledPin = 13; 

int speed_value_motor1;

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

void loop() {
digitalWrite(ledPin, HIGH); //indicator led

digitalWrite(motor1APin, HIGH); // I believe if i inverse motor1Apin and 
//motor 2 the motor should reverse... but it's not
digitalWrite(motor2APin, LOW); 

speed_value_motor1 = 90; 

analogWrite(speedPin, speed_value_motor1); 
}

You might want to post your schematic...

digitalWrite(motor1APin, HIGH);
digitalWrite(motor2APin, LOW);

will send the motor in one direction and:-
digitalWrite(motor1APin, LOW);
digitalWrite(motor2APin, HIGH);

will send it in the other direction.

When i set motor1APin = High and motor2Pin = low the motor simply stops running. what could possibly cause this?

Here are the instructions i am following
web.ics.purdue.edu/~fwinkler/616/sn754410_Arduino.pdf

We may need to see a picture of your actual circuit to be able to help as well...

When i set motor1APin = High and motor2Pin = low the motor simply stops running. what could possibly cause this?

Have you verified that the signals at the pins of the Arduino are high/low for the pins? How about at the h-bridge chip? Are you certain the h-bridge chip is connected properly (here's where a picture would help us - you've given us the schematic, which is good, but we don't know for certain that you followed it completely without seeing your implementation)?

:slight_smile:

Let me know if you can't veiw these

and

as you can see in the first picture i a spare H bridge and i have plugged that one in as well... It performs in the same unsatisfactory manner