0% found this document useful (0 votes)
3 views

Stepper Motor Control Unit

Uploaded by

vijay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Stepper Motor Control Unit

Uploaded by

vijay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Exp.

No: 2 Stepper Motor Control Unit


Date: 04.05.2023 1
AIM :- Design Stepper motor control unit and verify its functionality.
Apparatus :
1.Laptop/Desktop - 1
2.Arduino Uno R3 with USB Cable - 1
3.5V DC battery - 1
4.L2983D Motor Module - 1
5.Jumper wires (male to male) - 4

PROCEDURE:-
• Go to https://www.arduino.cc/en/Main/Software - select windows 10 &
just Download.
• Double click the arduino-2.0.1-windows setup file & proceed with installation
by simply clicking ‘agree & next‘ in installation pop-up window.
• Double click Arduino icon. Open library manager install Adafruit Motor shield
v1.0.1
• Go to Menu - File → New. Write c program for stepper motor control unit.
• go to menu bar &click on verify ✅ option.(clear if any errors are there)
• Connect your Arduino board to laptop using it’s usb cable
• Go to menu – Tools – Board - Arduino Uno R3.
• Go to Tools → Port - COM3(Arduino uno)
• go to Menu – select the right arrow icon ➡ (Upload).
• Then remove the usb cable from Arduino board
• Connect the circuit as per circuit diagram
• Make sure all the connections are made properly & avoiding loose connections.
• Switch on the power supply and verify its functionality with theoretical.

PIN CONNECTIONS:
• L293D motor module designed in a way as that it can be directly placed on
Arduino uno board.
• There would be 4 terminals for the stepper motor connect 1st 2 terminals to the
2 ports of M3 of the L293D, another 2 terminals to the 2 ports of M4 of the
L293D module respectively.
• Red wire(+5v) of stepper motor wire should be ignored.Because providing
source to stepper motor through L293D module which is connected to battery
• ARDUINO CODE:-
#include <AFMotor.h> //Adafruit motor shield package
const int stepsPerRevolution = 48;
// 48 steps per output rotation, Change this as per your motor's specification
AF_Stepper motor(stepsPerRevolution, 2);

void setup() {
motor.setSpeed(100 ); // 100 rpm
}

void loop() {
//Single step coils
motor.step(100, FORWARD, SINGLE);
motor.step(100, BACKWARD, SINGLE);

//Double step coils


motor.step(100, FORWARD, DOUBLE);
motor.step(100, BACKWARD, DOUBLE);

//Interleave coil steps


motor.step(100, FORWARD, INTERLEAVE);
motor.step(100, BACKWARD, INTERLEAVE);

//Microsteps coil
motor.step(100, FORWARD, MICROSTEP);
motor.step(100, BACKWARD, MICROSTEP);
}

OBSERVATION:-
• The actuator moved in to and fro according to the given program.

RESULT:- Thus designed the stepper motor control unit & verified its functionality.

You might also like