
L9110 H-bridge
I bought another small motor driver, this time a module with 2 L91110 H-bridge chips. These dual L9110 H-bridge modules can be found for 3-4$ on Ebay or from Chinese webshops. The module has 2 L9110 IC’s, so it can control 2 DC motors or 1 stepper motor. You can download the datasheet of the chip here. The L9110 works with voltages from 2.5 to 12V and can give a continues current of 800mA. With a maximum peak current of 1.5-2A. More then enough for a small DC motor.
The board has 6 male pins and 2 double terminals. The motors connect to the 2 terminals. In the middle of the male pins are the VCC and GND pins. This is the input voltage for the L9110 chips. Some H-bridges like the L293 and L298 require a logic voltage and a separate voltage for the motors, the L9110 does not. You only have to supply it one voltage (between 2.5 and 12V). The other 4 pins control the direction and speed of the motors. Pin A-IA and A-IB control motor A, and Pin B-IA and B-IB control motor B. To control motor A you set pin A-IA high and pin A-IB low, to change the direction you just set pin A-IA low and pin A-IB high. Same thing for motor B. If you want to control the speed of both motors you will need 4 pwm pins. Instead of just setting a pin high you pwm it. I tested the board with 2 small dc motors and fed the chip 5V, the output voltage at full pwm was 4.5V. Here is the sketch to test the module with 2 small DC motors:
/*
http://www.bajdi.com
L9110 motor driver controlling 2 small DC motors
*/
const int AIA = 9; // (pwm) pin 9 connected to pin A-IA
const int AIB = 5; // (pwm) pin 5 connected to pin A-IB
const int BIA = 10; // (pwm) pin 10 connected to pin B-IA
const int BIB = 6; // (pwm) pin 6 connected to pin B-IB
byte speed = 255; // change this (0-255) to control the speed of the motors
void setup() {
pinMode(AIA, OUTPUT); // set pins to output
pinMode(AIB, OUTPUT);
pinMode(BIA, OUTPUT);
pinMode(BIB, OUTPUT);
}
void loop() {
forward();
delay(1000);
backward();
delay(1000);
left();
delay(1000);
right();
delay(1000);
}
void backward()
{
analogWrite(AIA, 0);
analogWrite(AIB, speed);
analogWrite(BIA, 0);
analogWrite(BIB, speed);
}
void forward()
{
analogWrite(AIA, speed);
analogWrite(AIB, 0);
analogWrite(BIA, speed);
analogWrite(BIB, 0);
}
void left()
{
analogWrite(AIA, speed);
analogWrite(AIB, 0);
analogWrite(BIA, 0);
analogWrite(BIB, speed);
}
void right()
{
analogWrite(AIA, 0);
analogWrite(AIB, speed);
analogWrite(BIA, speed);
analogWrite(BIB, 0);
}




