• How to Place an Order

  • bKash Payment Method

  • Request for Quotation/ International Sourcing

Arduino Uno R3

Arduino UNO in Bangladesh The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller.

Price BDT 399
More
In Stock

EM4100 125kHz RFID Card

It is proximity ID card of 125KHz, EM4100. It has been specially manufactured and packaged to be clean from dust. And you can print any pictures on the PVC blank cards. You can use it with our RDM6300 RFID reader module.

Price BDT 15
More
In-Stock
All best sellers
L298N H-Bridge Dual Motor Driver, Stepper Motor Driver
  • L298N H-Bridge Dual Motor Driver, Stepper Motor Driver
  • L298N H-Bridge Dual Motor Driver, Stepper Motor Driver

L298N H-Bridge Dual Motor Driver, Stepper Motor Driver

This dual bidirectional motor driver is based on the very popular L298 Dual H-Bridge Motor Driver IC. This module will allow you to easily and independently control two motors of up to 2A each in both directions.

It is ideal for robotic applications and well suited for connection to a microcontroller requiring just a couple of control lines per motor.

BDT 150
rating Read the 5 reviews
Average rating: 5/5 - Number of reviews: 5
Quantity
In Stock

  • Store Pickup Available! Store Pickup Available!
  • Shipping Available Shipping Available
Description

In this tutorial, we'll explain how to use our L298N H-bridge   Dual Motor Controller Module 2A with Arduino. This allows you to control the speed and direction of two DC motors, or control one bipolar stepper motor with ease. The L298N H-bridge module can be used with motors that have a voltage of between 5 and 35V DC. 

There is also an onboard 5V regulator, so if your supply voltage is up to 12V you can also source 5V from the board.

These L298 H-bridge dual motor controller modules  are inexpensive and available from the Tronixlabs Australia store. Furthermore, if you're completely new to the world of Arduino we highly recommend you  review a copy of "Arduino Workshop", and if you have questions, ask in our customer forum

So let's get started!

L298N Dual Motor Controller Module 2A from Tronixlabs Australia

First, we'll run through the connections, then explain how to control DC motors then a stepper motor. 

Module pinouts

Consider the following image - match the numbers against the list below the image:

L298N Motor Controller for Arduino from Tronixlabs Australia

  1. DC motor 1 "+" or stepper motor A+
  2. DC motor 1 "-" or stepper motor A-
  3. 12V jumper - remove this if using a supply voltage greater than 12V DC. This enables power to the onboard 5V regulator
  4. Connect your motor supply voltage here, a maximum of 35V DC. Remove 12V jumper if >12V DC
  5. GND
  6. 5V output if 12V jumper in place, ideal for powering your Arduino (etc)
  7. DC motor 1 enables jumper. Leave this in place when using a stepper motor. Connect to PWM output for DC motor speed control.
  8. IN1
  9. IN2
  10. IN3
  11. IN4
  12. DC motor 2 enable jumper. Leave this in place when using a stepper motor. Connect to PWM output for DC motor speed control.
  13. DC motor 2 "+" or stepper motor B+
  14. DC motor 2 "-" or stepper motor B-

Controlling DC Motors

To control one or two DC motors is quite easy. First, connect each motor to the A and B connections on the L298N  module. If you're using two motors for a robot (etc) ensure that the polarity of the motors is the same on both inputs. Otherwise, you may need to swap them over when you set both motors to forward and one goes backward!

Next, connect your power supply - the positive to pin 4 on the module and negative/GND to pin 5. If you supply is up to 12V you can leave in the 12V jumper (point 3 in the image above) and 5V will be available from pin 6 on the module. This can be fed to your Arduino's 5V pin to power it from the motors' power supply. Don't forget to connect Arduino GND to pin 5 on the module as well to complete the circuit. 

Now you will need six digital output pins on your Arduino, two of which need to be PWM (pulse-width modulation) pins. PWM pins are denoted by the tilde ("~") next to the pin number, for example:

Arduino UNO PWM pins

Finally, connect the Arduino digital output pins to the driver module. In our example we have two DC motors, so digital pins D9, D8, D7 and D6 will be connected to pins IN1, IN2, IN3 and IN4 respectively. Then connect D10 to module pin 7 (remove the jumper first) and D5 to module pin 12 (again, remove the jumper). 

The motor direction is controlled by sending a HIGH or LOW signal to the drive for each motor (or channel). For example for motor one, a HIGH to IN1 and a LOW to IN2 will cause it to turn in one direction, and  a LOW and HIGH will cause it to turn in the other direction.

However, the motors will not turn until a HIGH is set to the enable pin (7 for motor one, 12 for motor two). And they can be turned off with a LOW to the same pin(s). However, if you need to control the speed of the motors, the PWM signal from the digital pin connected to the enable pin can take care of it.

This is what we've done with the DC motor demonstration sketch. Two DC motors and an Arduino Uno are connected as described above, along with an external power supply. Then enter and upload the following sketch:

// connect motor controller pins to Arduino digital pins
// motor one
int enA = 10;
int in1 = 9;
int in2 = 8;
// motor two
int enB = 5;
int in3 = 7;
int in4 = 6;
void setup()
{
  // set all the motor control pins to outputs
  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
}
void demoOne()
{
  // this function will run the motors in both directions at a fixed speed
  // turn on motor A
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  // set speed to 200 out of possible range 0~255
  analogWrite(enA, 200);
  // turn on motor B
  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
  // set speed to 200 out of possible range 0~255
  analogWrite(enB, 200);
  delay(2000);
  // now change motor directions
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);  
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH); 
  delay(2000);
  // now turn off motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);  
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);
}
void demoTwo()
{
  // this function will run the motors across the range of possible speeds
  // note that maximum speed is determined by the motor itself and the operating voltage
  // the PWM values sent by analogWrite() are fractions of the maximum speed possible 
  // by your hardware
  // turn on motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);  
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH); 
  // accelerate from zero to maximum speed
  for (int i = 0; i < 256; i++)
  {
    analogWrite(enA, i);
    analogWrite(enB, i);
    delay(20);
  } 
  // decelerate from maximum speed to zero
  for (int i = 255; i >= 0; --i)
  {
    analogWrite(enA, i);
    analogWrite(enB, i);
    delay(20);
  } 
  // now turn off motors
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);  
  digitalWrite(in3, LOW);
  digitalWrite(in4, LOW);  
}
void loop()
{
  demoOne();
  delay(1000);
  demoTwo();
  delay(1000);
}

Product Details
13 Items

Click here to leave a review

works fine
rating
24/08/2019
mashur sakib
works fine
Excellent
rating
30/07/2019
Mir Rashed
This product is working like butter
Good
rating
10/07/2019
Hasnine
Good
Arduino Bluetooth Module (HC-05)
rating
09/07/2019
razib
satisfied
Well item Faster delivery ......
rating
01/05/2018
Mashud R.
It works fast It can be operated by 5 volts mobile charger.
20 other products in the same category:

3650 Brushless Motor 3930KV + 60A Waterproof BEAST Series ESC

3650 1/10 Scale Brushless Motor 3930KV + 60A Waterproof BEAST Series ESC Motor Feature:4 poles 12 slot Hi-torque motor designCNC machined 6061 T6 windings maxinmizes efficiencyHigh RPM ABEC5 oversize bearingsUniversal fit, fit all 1/10 brushless cars-multi-mounting system for M3 screwsPrecision balanced rotor,smoothness for best reliability and maximum RPM

Price BDT 8,000
More
In-Stock

Torobot 32 Channel USB UART Servo Motor Controller

32 Channel USB UART Servo Motor Controller  Application: Hexapod, Robotics Arm, Servo Drive This is the newly upgraded controller board. Up to 32 servo motors can be controlled at the same time, either by using a software on a PC, or UART communication ( TTL serial port) of MCU (51, AVR, ARM, FPGA, PIC, etc. to send commands to control the steering.

Price BDT 3,300
More
In-Stock

DRV8825 Stepper Motor Driver Module

This breakout board for TI’s DRV8825 micro stepping bipolar stepper motor driver features adjustable current limiting, overcurrent and over-temperature protection, and six micro step resolutions (down to 1/32-step). It operates from 8.2 V to 45 V and can deliver up to approximately 1.5 A per phase without a heat sink or forced air flow (rated for up to...

Price BDT 500
More
Last items in stock

Monster Moto Shield Dual VNH2SP30 Motor Driver Module 30A

Monster Moto Shield uses VNH2SP30 full-bridge motor drivers. We’ve also beefed up the support circuitry so this board is capable of driving a pair of high-current motors! Voltage max: 16V Maximum current rating: 30 A Practical Continuous Current: 14 A Current sensing available to Arduino analog pin MOSFET on-resistance: 19 mΩ (per leg) Thermal Shutdown

Price BDT 5,000
More
In Stock

A4988 StepStick Stepper Motor Driver Module

This breakout board for Allegro’s A4988 microstepping bipolar stepper motor driver features adjustable current limiting, overcurrent and over-temperature protection, and five different microstep resolutions (down to 1/16-step). It operates from 8 V to 35 V and can deliver up to approximately 1A per phase without a heat sink or forced air flow (it is rated...

Price BDT 350
More
In-Stock

Follow us on Facebook