Let's Make Robots!

Using SN754410 for tank bot -- trouble turning

I have wired up a little four motor tank. I'm using the SN754410 chip to drive it--everything works fine, except I can't get the motors on each side to go in opposite directions.

Forward works
Back works.
Turn right, only fires left side motors.
Turn left, only the right side motors fire.

What I would like, is if turning right--the left motors go forward and right motors go back. Making a zero point turn.

I'm a hack, and content with it. But, I'm obsessing over this detail.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

he is trying to drive 4 motors with a single 754410. While you are more than welcome to drive 4 devices, you only get to turn them on and off, not, forward and reverse like you would if you only were driving 2 motors with the 754410 with the Enable1, 1A, and 1B controlling one motor, and, Enable2, 2A, and 2B controlling the other motor.

It all boils down to not having enough drivers to have full control over 4 motors.

Solved on another forum -- IC logic wont allow it.

Forward one motor and reverse the other should be possible. They are totally independant motor drivers and most LMRers started off with this chip or its sister the L293D.

Unless I`m missing something?


int LspeedPin = 10; // Left H-bridge enable pin for speed control

int Lmotor1APin = 7; // Left H-bridge leg 1

int Lmotor2APin = 8; // Left H-bridge leg 2

int Lspeed_value_motor1; // Left value for motor speed


int RspeedPin = 9; // Right H-bridge enable pin for speed control

int Rmotor1APin = 3; // Right H-bridge leg 1

int Rmotor2APin = 4; // Right H-bridge leg 2

int Rspeed_value_motor1; // Right value for motor speed


int sonarPin = A1; //pin connected to analog out on maxsonar sensor

int lookRight; //Used to store clarity of right.

int lookLeft; //Used to store clarity of left.

int inchesAway; // inches away from the maxsonar sensor


int tLed = 2;


int X; //Move duration.


void setup() {

// set digital i/o pins as outputs:

pinMode(LspeedPin, OUTPUT);

pinMode(Lmotor1APin, OUTPUT);

pinMode(Lmotor2APin, OUTPUT);

pinMode(RspeedPin, OUTPUT);

pinMode(Rmotor1APin, OUTPUT);

pinMode(Rmotor2APin, OUTPUT);

pinMode(tLed, OUTPUT);


Without the setup function it's hard to tell what's going on in the code-knowing how the pins are assigned will make all the difference here.

Forgot to add my Arduino code.

void Z_Right(){

// Small Turn Right

for (int i = 0; i < 3; i++) { 

    digitalWrite(Lmotor1APin, LOW); // set leg 1 of the H-bridge low

    digitalWrite(Lmotor2APin, HIGH); // set leg 2 of the H-bridge high

    digitalWrite(Rmotor1APin, HIGH); // set leg 1 of the H-bridge low

    digitalWrite(Rmotor2APin, LOW); // set leg 2 of the H-bridge high

    // just invert the above values for reverse motion,

    // i.e. motor1APin = HIGH and motor2APin = LOW

    // control the speed 0- 255

    Lspeed_value_motor1 = 127; // half speed

    Rspeed_value_motor1 = 127; // half speed

    analogWrite(LspeedPin, Lspeed_value_motor1); // output speed as

    analogWrite(RspeedPin, Rspeed_value_motor1); // output speed as

    // PWM value