motor too slow when using h-bridge

Hello,

I'm having some problems with my motor. It doesn't get enough power when connected to an h-bridge. (This is the h-bridge I'm using: (HTTP 301 This page has been moved)

I want to drive the motor at 5V and I'm using an external power supply with 1,5 A and 5V which is connected directly to the h-bridge. The Arduino has it's own power supply. When I connect the motor directly to the 5V power it works perfectly, but if I connect it to the L293 it runs to slow. According to the datasheet the h-bridge can output 1 A per channel which should be more than enough for the motor.
(This is the motor: solarbotics.com/products/gm14a)

Here's my code:

int motor1Pin = 3;    // H-bridge leg 1 (pin 2, 1A)
int motor2Pin = 4;    // H-bridge leg 2 (pin 7, 2A)
int enablePin = 12;    // H-bridge enable pin

void setup() {
  pinMode(motor1Pin, OUTPUT); 
  pinMode(motor2Pin, OUTPUT); 
  pinMode(enablePin, OUTPUT);
  digitalWrite(enablePin, HIGH); 
}

void loop() {
  Serial.println(analogRead(0)); --> ca. 150 (LOW)
  Serial.println(analogRead(1)); --> ca. 860 (HIGH)
  digitalWrite(motor1Pin, LOW);   
  digitalWrite(motor2Pin, HIGH);
}

thanks in advance

The L293 is a "bipolar" motor driver (meaning it uses bipolar transistors), which "steal" a little bit of voltage from you before it sees the motors. The key parameters are Voh and Vol (page 5 of the datasheet you referenced) which typically are Vcc2-1.4 (i.e., 5V-1.4==>3.6V) and 1.2V.

Thus, instead of the motor seeing 5V on one terminal and 0V on the other, for a potential difference of 5V, it will see (about) 3.6V on one terminal and 1.2V on the other. That is only a potential difference of 2.4V. Less voltage-->less current-->lower speed/power.

Thank you so much for the quick reply. Exactly the answer I needed :slight_smile: