How to Use the L298 Motor Driver Module - Arduino Tutorial: 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 application. Generally, L298N Driver is available as modules that contains all the necessary components and connectors for controlling two DC Motors. One such module is shown below. I’ll explain few important components on this module. The L298N Motor Driver Module consists of two 2-pin screw terminal blocks for connecting two motors.
Arduino Modules - L298N Dual H-Bridge Motor Controller: Quick and simple start guide for using and exploring an L298N Dual H-Bridge Motor Controller module with an Arduino.The model in the example I am using is from Ebay. The L298N module has a very famous L298 Motor driver IC which is the main part of this module. This module uses the PWM method to control the speed of DC motors. Specifications of L298N Motor Driver The module will allow you to control the speed and direction of two DC motors.
This tutorial of Robo India explains how to control DC motor using L293D IC Motor Driver with Arduino. (By Robo India)
1. Introduction
The Motor Driver is a module for motors that allows you to control the working speed and direction of two motors simultaneously .This Motor Driver is designed and developed based on L293D IC.
L293D is a 16 Pin Motor Driver IC. This is designed to provide bidirectional drive currents at voltages from 5 V to 36 V.
1.2 Hardware required
S.No. | Item | Quantity |
1 | Arduino UNO | 1 |
2 | Motor Driver | 1 |
3 | DC Motor | 2 |
4 | Female to Male Jumper wire | 8 |
5 | 6xAA Battery | 1 |
1.3 L293D IC Pin Out
The L293D is a 16 pin IC, with eight pins, on each side, to controlling of two DC motor simultaneously. There are 4 INPUT pins, 4 OUTPUT pins and 2 ENABLE pin for each motor.
Pin 1: When Enable1/2 is HIGH, Left part of IC will work, i.e motor connected with pin 3 and pin 6 will rotate.
Pin 2: Input 1, when this pin is HIGH the current will flow though output 1.
Pin 3: Output 1, this pin is connected with one terminal of motor.
Pin 4/5: GND pins
Pin 6: Output 2, this pin is connected with one terminal of motor.
Pin 7: Input 2, when this pin is HIGH the current will flow though output 2.
Pin 8: VSS, this pin is used to give power supply to connected motors from 5V to 36V maximum depends on Motor connected.
Pin 9: When Enable 3/4 is HIGH, Right part of IC will work, i.e motor connected with pin 11 and pin 14 will rotate.
Pin 10: Input 4, when this pin is HIGH the current will flow though output 4.
Pin 11: Output 4, this pin is connected with one terminal of motor.
Pin 12/13: GND pins
Pin 14: Output 3, this pin is connected with one terminal of motor.
Pin 15: Input 3, when this pin is HIGH the current will flow though output 3.
Pin 16: VCC, for supply power to IC i.e 5V.
2. Connections with Arduino
1. Module 5V (VCC) – Arduino 5V.
2. Module GND – Arduino GND.
3. Module 1 – Arduino D8.
4. Module 2 – Arduino D9.
5. Module 3 – Arduino D10.
6. Module 4 – Arduino D11.
7. Module Motor terminals – DC motors.
8. Module VSS power terminal- External power source of 9V.
Make the connection as shown above.
Make sure that the Jumpers are preset on the Enable 1-2 and Enable 3-4 pins of module, so that motor will be enabled and work at maximum speed.
2.1. Working Mechanism
Rotation of motor depends on Enable Pins. When Enable 1/2 is HIGH , motor connected to left part of IC will rotate according to following manner:
Input 1 | Input 2 | Result |
0 | 0 | Stop |
0 | 1 | Anti Clockwise |
1 | 0 | Clockwise |
1 | 1 | Stop |
3. Programming:
Here is the code to run this circuit.
4. Output
After the connection you will copy and paste this code in Arduino IDE than upload the code. Both motors will start rotating.
Motor Driver L298n
If you have any query please write us at [email protected]
L293d Motor Driver Module Arduino
Thanks and Regards
Content Development Team
Robo India
https://roboindia.com
Content Development Team
Robo India
https://roboindia.com