Introduction: Tutorial for L298 2Amp Motor Driver Shield for Arduino
Description
L298 2Amp Motor Driver Shield for Arduino is based on L298 motor driver integrated circuit, a full- bridge motor driver. It can drive two seperate 2A DC motors or 1 2A step motor. Motor's velocity and directions can be controlled separately and also there are 6 connectors connected to Arduino analog pins. This motor driver shield with PWM speed control mode and the PLL mode, using jumper to switch.
Features
- input voltage : 5V
- Onboard buzzer (D4), can set the astern alarm ringtone.
It has six digital interface that are not occupied(including D2 , D3 , D5 , D6 , D7 , D9)
It has six analog interfaces(A0, A1, A2, A3, A4, A5)
It has indicator for forward and backward changing direction .
For details of this module, you may refer to here.
Step 1: Pin Definition
Step 2: Material Preparation
For this tutorial, we required these items:
1. L298 2Amp Motor Driver Shield for Arduino
2. Arduino Uno Board and USB
3. 2x Plastic Gear Motor
Step 3: Hardware Connection
In this tutorial, you need to use this motor driver shield pins stacked on the Arduino Uno. Then, connect the two gear motor to the terminal block of MOTOR A and MOTOR B.
Step 4: Sample Source Code
Download this sample source code.
Step 5: Results
Based on the result, the Motor 1 moves in reverse direction while Motor 2 moves in forward direction. After 3 seconds, the Motor 1 will forward direction and Motor 2 moves in reverse direction and this cycle is repeating continuously.
Step 6: Video
This video shows the demonstration of the tutorial for L298D 2Amp Motor Driver Shield for Arduino.
3 Comments
1 year ago
I am using this motor shield set up for an arduino robot car. I am trying to add a servo to move a sensor around to allow guidance through an obstacle course. When I add a servo and begin programming pins 9 and 10 stop allowing analog input and only work at full speed. Is there any way to rework this shield to allow the control of a motor off of pin 3?
Question 2 years ago
hallo,thanks a lot for the article it really helped me.,but i have a different situation here .i have a nodemcu ESP8266 and BMT DUAL DC MOTOR SHIELD L298P.Iam builting a rc car with 1 motor for the rear wheels forward and reverse and 1 servor to control the steering..the motor driver shield i have is compatible with Arduino uno,i am finding difficulties in connecting it to nodemcu.
any help i will appreciate
thank you.
Question 2 years ago on Introduction
How do I address my third motor connected to the shield (or board) on top of the stack?
Any help will be greatly appreciated. Thank you. John L.