jimLee:
How much power are you needing? And why the Ti constraints?
Sorry for the late response on this, but I am looking to drive these motors from Pololu at either 3V or 6V: Pololu - Solarbotics GM3 224:1 Gear Motor 90 deg. Output
The TI constraints are so that I can enter this project into the TI Analog Design contest, where it requires the use of at least 3 TI ICs for the project.
I've hooked up the circuit as shown in the tutorial I posted earlier:
I am running it with the following code (where pins 11 and 12 are the LEDs so that I can see where the code is running when):
int motor1Pin1 = 3; // pin 2 on SN754410
int motor1Pin2 = 4; // pin 7 on SN754410
int enable1Pin = 9; // pin 1 on SN754410
int motor2Pin1 = 5; // pin 10 on SN754410
int motor2Pin2 = 6; // pin 15 on SN754410
int enable2Pin = 10; // pin 9 on SN754410
int LED1 = 11;
int LED2 = 12;
void setup() {
// set the motor pins as outputs:
pinMode(motor1Pin1, OUTPUT);
pinMode(motor1Pin2, OUTPUT);
pinMode(enable1Pin, OUTPUT);
pinMode(motor2Pin1, OUTPUT);
pinMode(motor2Pin2, OUTPUT);
pinMode(enable2Pin, OUTPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
// set enablePins high so that motor can turn on:
digitalWrite(enable1Pin, HIGH);
digitalWrite(enable2Pin, HIGH);
}
void loop() {
digitalWrite(motor2Pin1, HIGH);
digitalWrite(motor2Pin2, LOW);
digitalWrite(motor1Pin1, LOW);
digitalWrite(motor1Pin2, HIGH);
digitalWrite(LED1, HIGH);
digitalWrite(LED2, LOW);
delay(1000);
digitalWrite(motor2Pin1, LOW);
digitalWrite(motor2Pin2, HIGH);
digitalWrite(motor1Pin1, HIGH);
digitalWrite(motor1Pin2, LOW);
digitalWrite(LED2, HIGH);
digitalWrite(LED1, LOW);
delay(1000);
}
However the motors do not turn (I have a 9V battery hooked up to the rails, and yes the red rail is backwards here...its negative).
Yet when I hooked up the motors directly to the Arduino they turn...slowly. What is the purpose of a motor controller? Is it anything other than to give the motors power from an external power source? Is using a 9V battery to power 2 3V (or 6V) motors too high? What will happen if I over-volt these?
Thanks for all of the help!