Tutorial for MD-L298 Motor Driver Module
by mybotic in Circuits > Arduino
18778 Views, 13 Favorites, 0 Comments
Tutorial for MD-L298 Motor Driver Module
Description
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 micro-controller requiring just a couple of control lines per motor.
Features:
- Driver: L298
- Driver power supply: +5V~+46V
- Logic power output Vss: +5~+7V (internal supply +5V)
- Logic current: 0~36mA
- Controlling level: Low -0.3V~1.5V, high: 2.3V~Vss
- Dimension: 2.7 * 4.5 * 4.5 cm
- Driver weight: 48g
Pin Definition
Theory of Operation
In this module, the rotation directions of motors are controlled by Motor Control Pin. The IN1 and IN2 are controlling Motor 1 while IN3 and IN4 are controlling Motor 2.
Beside motor rotate direction, this Motor Driver Module is able to control motors’ speed as well by Motor PWM Control Pin. The pin ENA is controlling speed of Motor 1 while ENB is controlling speed of Motor 2.
Sample Hardware Installation
The diagram shows the hardware connection between Motor Driver Module and Arduino UNO. Besides Arduino, it may interface with any microcontroller such as PIC and etc.
Note: The Ground of battery, Motor Driver Module and Arduino should be connected together.
Connection between:
- IN1 > Arduino Pin 9
- IN2 > Arduino Pin 8
- ENA > Arduino Pin 10
- IN3 > Arduino Pin 7
- IN4 > Arduino Pin 6
- ENB > Arduino Pin 5
To see the result, download the sample source code in Arduino UNO.
Results
Based on the results, the Motor 1 moves in one direction with gradually increase speed until maximum follow by gradually decrease until stop. This cycle is repeating continuously. It same goes for Motor 2 but moves in different direction.
Video
This video shows the demonstration of the tutorial for MD-L298 Motor Driver Module.