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