How to Run Stepper Motor with Arduino using L298N Driver Module

Hi Guys, In this post, I will demonstrate how you can run or control 6 wired unipolar stepper motor with Arduino using L298N driver module. The unipolar stepper motor has six wired but L298N driver module has two connectors either side to connect only four wire, I will show you how you can connect and run unipolar stepper motor with L298N driver.

What is L298N driver module

Arduino is running on 5 volts and it’s current output only 500mAmp, so run any dc motor direct with Arduino, not a good idea. Here is the motor driver comes, L298N driver module works on 6 volts to 35 volts and maximum current output is 2Amp. You can run either one stepper motor or two dc motors with this driver module.
Learn How to run two DC motor with L298N driver module

Step by step video guide for stepper motor, L298N driver and Arduino

Subscribe to our channel

Stepper motor and L298N driver connection circuit diagram

stepper motor and l298n driver module connection circuit diagram arduino

Arduino code for stepper motor and L298N driver module

#include 

const int stepsPerRevolution = 200;  
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
  
  myStepper.setSpeed(50);
  
  Serial.begin(9600);

void loop() {
  // step one for one direction:
  Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);
  delay(400);

  // step one for other direction:
  Serial.println("counterclockwise");
  myStepper.step(-stepsPerRevolution);
  delay(400);
}

Related Post

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

or

Log in with your credentials

or    

Forgot your details?

or

Create Account