L9110S H-bridge motor driver (dual) | Botshop

L9110S H-bridge motor driver (dual)

R60.00

A very compact dual channel H-bridge motor driver module. The module incorporates two L9110S H-bridge driver IC’s to allow either one stepper or two DC motors to be independently controlled.

19 in stock

Purchase this product now and earn 60 Bot Points!
SKU: h-2 Category:

Description

L9110S H-bridge motor driver (dual)

A very compact dual channel H-bridge motor driver module. The module incorporates two L9110S H-bridge driver IC’s to allow either one stepper or two DC motors to be independently controlled.

The module can accept a supply voltage between 2.5 to 12V allowing for motors within this supply. Perfect to be used with An Arduino and robot chassis.

L9110S H-bridge motor driver (dual) Pins explanation:

  • VCC and Ground. Connect the VCC and Gnd pins to a battery pack or similar to drive the motors, that way you do not get the power from your Arduino board, protecting it from over current.
  • A-IA: Control the forward movement of motor A
  • A-IB: Control the backwards movement of motor A
  • B-IA: Control the forward movement of motor B
  • B-IB: Control the backwards movement of motor B

Below is a sketch to get you going. Connect the h-bridge to the PWM pins on your Arduino. To quickly explain the code the sketch has 4 functions called forward(), backward(), left() and right(). I added another one called stop() to make it more complete.

This sketch also comes with a speed variable that you can change if the bot moves too fast, currently, it is set to 255 that might be too fast,

The first 4 lines of code in the sketch it shows you the pin hook up to your Arduino.  From here on it is relatively easy, if you have an IR remote for example you can assign each of the keys to the different motor function for example:

if (irrecv.decode(&results)) {
if (results.value==”xxxx”){      //xxxx represents the remote forward button code
forward();
}
irrecv.resume(); //wait for the next signal
}

The remote control library I use is available here: www.botshop.co.za/libs/AIRremote.zip. The library includes lots of code examples, in particular, look for this one example called IRrecord. You can use that one as is to view the remote controller’s key codes. You can for example then replace the xxxx of the forward button with your remote’s forward button code in your sketch.

Do the same for the backwards, left, right and stop remote control buttons and you have a working robot operated by a remote controller!

PDF DOCUMENT: L9110_2_CHANNEL_MOTOR_DRIVER

L9110S H-bridge motor driver (dual) Sketch

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);
  stop();
  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);
}
void stop()
{
  analogWrite(AIA, 0);
  analogWrite(AIB, 0);
  analogWrite(BIA, 0);
  analogWrite(BIB, 0);
}

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

You may also like…