I have built two parallel H-bridges from "Design 1" on this page as you can see in the attached schematic.
However when I apply the external power (VCC1 in the center of the diagram) the two motors do not spin.
Using my multimeter, I can see that the entire circuit is working: the motor is getting a 'forward' and 'backward' current as the Arduino sets the pins high. The multimeter is reading +/- 5.54V with the motor replaced by the multimeter. (Across the motor this drops to 0.13V)
So then I measure the current by putting my multimeter both in series with the motors and replacing the motors. There's only 40mA available! Looking around the web I found the suggestion to reduce the 220Ω resistors at R2, R3, R5 and R6. So I switched in (randomly) 27Ω resistors and the output current is still only 40mA.
What else should I try to bring up the current enough to drive the motors?
Edit: So my uneducated guess is that it's likely that the limitation is coming from the transistors. The Ns are BC549 and the Ps are BC559. The datasheets list "low current" as a feature, but I figured that was the collector.
Edit 2: The motor is this one which requires 70mA when running (and presumably more during startup)
Edit 3: Code driving the Arduino:
// Pin setup
int pinLeftMotorFwd = 5;
int pinLeftMotorBck = 6;
int pinRightMotorFwd = 10;
int pinRightMotorBck = 11;
// Directions for the {left, right} motors to achieve the four directions
int FORWARD[] = { 1, 1 };
int BACKWARD[] = { -1, -1 };
int RIGHT[] = { -1, 1 };
int LEFT[] = { 1, -1 };
void setup() {
Serial.begin(9600);
pinMode(pinLeftMotorFwd, OUTPUT);
pinMode(pinLeftMotorBck, OUTPUT);
pinMode(pinRightMotorFwd, OUTPUT);
pinMode(pinRightMotorBck, OUTPUT);
}
void loop() {
go( FORWARD, 10 );
go( RIGHT, 3 );
go( FORWARD, 10 );
go( LEFT, 6 );
}
// Move the bot in a particular direction from the array above for a given number of seconds
void go ( int dir[], int dur ){
leftMotor( dir[0] );
rightMotor( dir[1] );
delay( dur * 1000 );
}
// Sill both motors (OK, so stop both motors. But stop is a keyword in C)
void still(){
leftMotor( 0 );
rightMotor( 0 );
}
// Set the left motor to Backward (-1), Forward (1), or Stop (0)
void leftMotor( int dir ){
// Pull both pins low
digitalWrite(pinLeftMotorFwd, LOW );
Serial.println("pinLeftMotorFwd LOW");
digitalWrite(pinLeftMotorBck, LOW );
Serial.println("pinLeftMotorBck LOW");
// If we're going forward, pull the Fwd pin high
if( dir == 1 ){
digitalWrite(pinLeftMotorFwd, HIGH);
Serial.println("pinLeftMotorFwd HIGH");
}
// otherwise, pull the Bck pin high
else if( dir == -1 ) {
digitalWrite(pinLeftMotorBck, HIGH);
Serial.println("pinLeftMotorBck HIGH");
}
}
// Set the right motor to Backward (-1), Forward (1), or Stop (0)
void rightMotor( int dir ){
// Pull both pins low
digitalWrite(pinRightMotorFwd, LOW );
Serial.println("pinRightMotorFwd LOW");
digitalWrite(pinRightMotorBck, LOW );
Serial.println("pinRightMotorBck LOW");
// If we're going forward, pull the Fwd pin high
if( dir == 1 ){
digitalWrite(pinRightMotorFwd, HIGH);
Serial.println("pinRightMotorFwd HIGH");
}
// otherwise, pull the Bck pin high
else if( dir == -1 ) {
digitalWrite(pinRightMotorBck, HIGH);
Serial.println("pinRightMotorBck HIGH");
}
}