Introduction: Control Nema Stepper Motor With Arduino and Micro Stepping Drive

Lots of People want to build Them own small Cnc machine . they started with drives stepper motor but they stacked in controller Programming . In this instructable Robokits will provide Resource to control your Stepper motor with Arduino . before Programming we have to learn some basics Related to Stepper motor .

What is stepper motor ?

A stepper motor is a brushless, synchronous electric motor that converts digital pulses into mechanical shaft rotations. Each rotation of a stepper motor is divided into a set number of steps, sometimes as many as 200 steps. The stepper motor must be sent a separate pulse for each step. The stepper motor can only receive one pulse and take one step at a time and each step must be the same length. Since each pulse results in the motor rotating a precise angle typically 1.8 degrees you can precisely control the position of the stepper motor without any feedback mechanism.

As the digital pulses from the controller increase in frequency, the stepping movement converts into a continuous rotation with the velocity of the rotation directly proportional to the frequency of the control pulses.

Types of Stepper Motors

There are three kinds of step motors: permanent magnet, hybrid, and variable reluctance. Hyrbrid step motors offer the most versatility and combine the best characteristics of variable reluctance and permanent magnet stepper motors. Hybrid stepper motors are constructed with multi-toothed stator poles and a permanent magnet rotor. A standard hybrid stepper motor has 200 rotor teeth and rotates 1.8 degrees per step.

Half Step means that the stepping motor is rotating at 400 steps per revolution (0.9 degree steps x 400 = 360 degrees). First one winding is energized and then two windings are alternately energized. This will cause the rotor of the stepping motor to move at half the distance (0.9 degrees). In half-step mode, a typical stepper motor provides about 30% less torque, but it provides a smoother motion than it would in full-step mode.

Microstep

Microstepping energizes the stepper motor winding in a manner that further subdivides the number of positions between poles. Some microstepping controllers are capable of dividing a full step (1.8 deg) into 256 microsteps. This would result in 51,200 steps in one revolution (.007 deg/step). Microstepping is usually applied to applications that require accurate positioning and smoother motion over a broad range of speeds. As in the half-step mode, microstepping reduces torque by about 30% compared to full-step mode.

Step 1: Control 4.2 Kgcm,4.4 Kgcm,10 Kgcm Motor With Arduino and Micro Stepping Drive

Step 2: Connection Diagram

Step 3: Simple Arduino Program to Give Step and Direction Signal

#define Pulse 9

#define Dir 8

long delay_Micros =1800; // Set value

long currentMicros = 0; long previousMicros = 0;

void setup()

{

pinMode(Pulse,OUTPUT);

pinMode(Dir,OUTPUT);

digitalWrite(Dir,LOW);

}

void loop()

{

currentMicros = micros();

if(currentMicros - previousMicros >= delay_Micros)

{

previousMicros = currentMicros;

digitalWrite(Pulse,HIGH);

delayMicroseconds(500); //Set Value

digitalWrite(Pulse,LOW);

} }

Step 4: Universal Program to Control All Nema Stepper Motor With Arduino and Rmcs Driver

Step 5: Working Video

Step 6: Download Complete Arduino Sample Code Zip File for Our Stepper Motor Drivers

Comments

author
vtram (author)2017-08-05

Hi, for the same setup above i had written a labview program. But the motor is running very slowly. So can you help send me any labview program for this?

author
coffee112358 (author)2017-07-13

Good day. I want to ask how to configure this nema 23 stepper motor with leadshine DM556 driver to microstepping. Thank you

author
shashankk1 (author)2017-05-12

how i can add CNC shield V3 in same circuit ??? i have RMCS driver dont want to use other drivers..

author
MuthukumaranK (author)2017-01-27

I am planning to buy following :

http://robokits.co.in/automation-control-cnc/cnc-p...

But could not find how drives are connected to power supply. Can I just connect -V of each power supply terminal to GND of each driver ? Anything else to be taken into account ?

Also should I adjust the output voltage of power supply. As I understand, input range for driver is 15-50v so 24v output of power supply need not be adjusted. Please correct me if I am wrong

author
Robokits (author)MuthukumaranK2017-02-04

Hello You just simply need to connect 24 v suppy to vcc and Gnd Rest of all pins are connected to controller

http://robokits.co.in/power-supply/industrial-powe...

This Industrial Power supply is giving you constant 24 V .

author
r2diaz2 (author)2017-01-14

Great instructable! I actually didn't know what a stepper motor was until I started researching to put towards a project I intend working on. THANK YOU!! I will keep you informed of the progress!

author
Robokits (author)r2diaz22017-01-16

Hello you are most Welcome we are happy to help you in your specific query .

About This Instructable

6,648views

73favorites

License:

Bio: We are group of makers who love and create different products related to hobby electronics, automation and OEM consumer and industrial products.
More by Robokits:Control Nema Stepper Motor With Arduino And Micro stepping Drive Getting Started with Arduino and Visual Basic 2008WiFi / Internet Controlled Relays using ESP8266 - Quick, 30 minutes IoT project
Add instructable to: