STEPPER MOTOR CONTROL BY L298N MOTOR DRIVER MODULE USING ARDUINO UNO

Project Guide
2 min readJul 2, 2021

--

If you want a make machine or want to make a robot or work on a project. where the motor is controlled very precisely. is known as step motor. it is type of brush less electric dc motor. cnc
so you should use a stepper motorStepper motorwhich moves a discrete steps according to steps resolution of
stepper motor They have multiple coils and each coils are energized separately that rotator is moved step by step at time.

Schematics Diagram:-

Circuit Diagram:-

Interface Stepper Motor With L298n Motor Driver Module And Arduino Uno

Firstly You will have to download stepper motor library so open the Arduino IDE on your computer. Goto -> sketch ->include Library -> Manage libraries -> type stepper motor on search bar-> Select version and install it.

And again goto -> File -> Examples -> Stepper -> stepper_one Resolution

#include <Stepper.h>

// change this to fit the number of steps per revolution

// for your motor

const int stepsPerRevolution = 200;

// initialize the stepper library on pins 8 through 11:

Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup()

{

// set the speed at 60 rpm:

myStepper.setSpeed(60);

// initialize the serial port:

Serial.begin(9600);

}

void loop()

{

// step one revolution in one direction:

Serial.println(“clockwise”);

myStepper.step(stepsPerRevolution);

delay(500);

// step one revolution in the other direction:

Serial.println(“counterclockwise”);

myStepper.step(-stepsPerRevolution);

delay(500);

}

--

--

Project Guide
Project Guide

Written by Project Guide

0 Followers

we are providing technical projects like Arduino projects, Raspberry pi projects, iot, robots etc. for school, college and many more .

No responses yet