2019年12月30日星期一

Working of the Stepper Motor Driver Circuit

The working of this analog Stepper Motor Driver circuit is very simple. We will see a step – by – step working explanation.First, the 555 Timer IC is configured as an Astable Multivibrator i.e. it acts as a square wave generator.

Based on the position of the Potentiometer, the frequency of the square wave will vary anywhere between 7 Hz to 340 Hz.

This square wave is given to the CD4017 Counter IC as its Clock Input. For every positive transition of the clock signal i.e. a low to high transition, the counter output advances by one count.

For first positive transition on clock, Q0 will be high, for second positive transition, Q1 will be high and so on.

Since we need only 4 outputs, the fifth output i.e. Q4 is connected to the Reset pin so that the counter will reset and the counting starts once again.

The outputs of the Counter IC CD4017 are given to 4 different transistor, which are in turn connected to the 4 coil terminals of the Stepper Motor. We can understand better from the following diagram.

Working of the Stepper Motor Driver Circuit

Assume the points A, B, C and D are the contacts of the coils connected to the transistors. The common wire in the stepper motor is given to 12V supply.

When the first clock signal is applied to the CD4017, Q0 becomes HIGH. This will turn ON the corresponding Transistor.

As a result, the supply from the common wire goes through point A to ground. This will energize the coil and acts as an electromagnet. The rotor will get attracted and turns to that position.

During the second clock pulse, output Q1 become HIGH and as a result, the transistor associated with it is turned ON. Now, the current flows from common wire to GND through point B.

Hence, this coil will be energized and turns in to an electromagnet. This will further rotate the rotor. This process continues and depending on the frequency of the clock signal, the speed of rotation of the stepper motor varies.

Advantages
A DIY type Stepper Motor Driver is designed here that can drive Unipolar Stepper Motors.
By using this stepper motor driver, we can avoid costly dedicated Stepper Motor Driver boards.

Disadvantages
This design is not an efficient one.
Requires a lot of complex wiring for a small application. 



2019年12月12日星期四

¿Por qué motores de avance por pasos?

Las primeras pruebas caseras con motores se suelen hacer con los de corriente continua (CC), del tipo que se usan en los juguetes. Estos motores giran libremente y a una velocidad alta. Cualquier intento de lograr que uno de estos motores gire una cantidad acotada de recorrido, como por ejemplo dos vueltas, es imposible. Los motores no giran enseguida a una velocidad conocida: hay que calcular un tiempo de arranque, porque la inercia no les permite llegar a la velocidad normal de inmediato. Y cuando se les corta la alimentación continúan girando, también por inercia.

Note el lector que no hablamos de pedirle a uno de estos motores que se mueva sólo una fracción de una vuelta, como por ejemplo un cuarto de revolución, o un valor así. Esto sería aún más difícil de lograr.

¿Por qué motores de avance por pasos?
23HS22-2804S

Lograr que un motor común de corriente continua gire una fracción de vuelta o una cantidad precisa de vueltas no es sólo muy difícil, es prácticamente imposible. Aún si se controla con extremada precisión la corriente necesaria, buscando fijar con exactitud el tiempo de arranque y detención del motor, de todos modos al cortar la corriente la armadura no se detendrá, ya que continúa moviéndose por inercia, y esta inercia tendrá un valor muy difícil de determinar, ya que dependerá del peso del rotor, la fricción del eje sobre sus cojinetes, la temperatura de las bobinas, núcleos de hierro, imanes y la del propio ambiente, y otras variables del entorno y de la construcción.

     
Agregando engranajes para la reducción de la velocidad se logra atenuar el problema. De todos modos, sigue presentándose el problema de la inercia, lo que producirá un error de posición, aunque disminuido por el factor de reducción de los engranajes. Y se agrega ahora la fricción combinada del juego de engranajes, o sea mayor dificultad para cualquier cálculo.

La manera de lograr una posición precisa con motores de corriente continua es utilizarlos en una configuración de servo. Así funcionan los servomotores que se usan en modelismo (stepper motor for 3d printer ), que constan de un pequeño motor de CC, un juego de engranajes de reducción, un mecanismo de realimentación (que usualmente es un potenciómetro unido al eje de salida) y un circuito de control que compara la posición del motor con la que se desea lograr y mueve el motor para realizar el ajuste.

https://forum.derivative.ca/t/hokuyo-laser-scanner-support/7935/18
http://forums.framboise314.fr/viewtopic.php?f=57&t=5463&p=33244


2019年12月9日星期一

Why do you use a stepper motor?

Easy to use: 34%
Inexpensive: 17%
Simple operations:16%
No need for tuning: 12%
Other: 21%
*# of questionees: 258 (multiple answers allowed)/ researched by Oriental Motor

Key Points: Ease-of-Use, Simple Operations and Low Cost

According to the survey of hybrids stepper motors users, many favor stepper motors for their "ease-of-use," "simple operations", and "low cost" derived from the structure and system configuration. It makes sense that many users find such positive aspects in stepper motors, thanks to the simple structure and system configuration.

Point 1

Fantastic Stopping Accuracy!
For example, when converting stopping accuracy ±0.05° of a stepper motor to the ball screw mechanism:
Operating Conditions:
• Motor: RK II Series
• Lead of ball screw: 10mm Stopping Accuracy: ±1.4μm
Generally, accuracy of a ground ball screw type is ±10μm. When using a rolled ball screw type, its accuracy declines to ±20μm, indicating that the stopping accuracy of a stepper motor is much higher than that of ball screw types.

Point 2

Excellent Mid/ Low-Speed Range!
Example: Torque of a motor frame size 85 mm is equivalent to a rated torque of a 400 W servo motor when 1000 r/min.
Torque in an even lower speed range can be up to 5 times higher. For a short- distance positioning, having high torque in the mid/low-speed range is essential.
Impressive "Stopping Accuracy," "Mid/Low-Speed Range" and "Responsiveness"
Stepper motors have remarkable stopping accuracy, and accurate control with open-loop is possible. For example, when using the RK II Series for positioning of a rotating table, its stopping accuracy is within ±0.05 degrees (with no load). Because stopping position errors do not accumulate between steps, high accuracy positioning is possible. The structure of the stepper motor, which requires no encoder, allows for the simple drive system and low cost.

High Responsiveness and Excellent Synchronization

The third remarkable feature of stepper motors is the responsiveness. The open-loop control, which sends one-way commands to the motor, has a very high follow-up mechanism toward commands. 

Suitable Applications!

Other than an inching applications with frequent starting and stopping, stepper motors are suitable for positioning of image check processors that dislike vibrations, cam drives that would be difficult to adjust with servo motors, and low rigidity mechanisms such as a belt drive. Furthermore, cost is reduced significantly by replacing a ball screw drive to a belt drive.

Cost Reduction and the Advantage of Great Features

Besides cost reduction, stepper motors have many advantages in terms of performance. I hope this article provides an opportunity for those who have routinely selected servo motors to start considering stepper motors as their options. On the followong pages, detailed information of stepper motors, such as basic structure, system and example applications, is introduced for those who want to learn more about stepper motors.

Operation & Structure

A stepper motor rotates with a fixed step angle, just like the second hand of a clock. Highly accurate positioning can be performed with open-loop control thanks to the mechanical structure within the motor.


2019年11月23日星期六

Nema 17 motor case and gearbox for 3520 Motors

Hey everyone;

Today a few of us over on the discord channel 3 were discussing how to gear down small BLDC motors and it was suggested that we move the discussion over to here so that more people can join in.

So first things first:

Why gear down small BLDC motors? Why not just use a lower KV motor?
Small BLDC motors (e.g. a 3520 motor, which is 35 mm in diameter, 20 mm long) are only available with moderate KV values of about 420 and larger. This gives them a relatively high top speed compared to their bigger brothers but low torque. Lower KV values are available as gimbal motors but their high winding resistance means you can only drive them at a couple of amps, resulting in even less torque. In theory you could make a very high voltage odrive (> 100 V) but I’m told that high current, high voltage MOSFETs are very expensive and therefore impractical.

By gearing down a motor you also increase the torque, increase your effective encoder resolution and reduce the apparent effects of cogging torque.

Why not use a stepper motor?
You can! Here is a 4.5 N.m hybrid stepper motor and it’s motor driver for comparison. The motor is the same as this model 22 ($48 USD).
IMG_20171217_175901
It’s not exactly small being a NEMA 34 motor light weight at 2.5 kg. It’s high coil inductance and high effective pole count also mean that its torque falls off rapidly as you increase speed. It’s also difficult to drive a stepper above ~1000 rpm open loop as I believe you run into problems when you hit certain resonance frequencies. This all results in a relatively low peak power output due to a limited top speed.

For comparison the design shown below is for a ~4 N.m, 2000 rpm servo motor with integrated drive electronics (odrive one concept) and 21217 counts per rotation on the output. It would also only weigh about 0.5 kg, would fit in a NEMA 17 form factor and the cost of the parts minus electronics (cost TBA) would be around $50 USD with volume.

Odrive one with gearbox - no L bracket

It works by taking the ‘odrive one’ single axis electronics concept describe here 25 which will be able to supply 40A continuous and 80A peak and use a 4096 count per rotation magnetic encoder. This is used to power a ~200g 3520 size motor ($22 USD) with 420 KV for a maximum speed of ~10,000 rpm at 24 V and an estimated 0.8 N.m of torque. The planetary gearbox ($15.5 USD) gives a 5.18:1 reduction to give the 4 N.m output at 2000 rpm for a peak output power of around 650W with conservative estimates for losses.

The power electronics are mounted on the rear. The back of the motor shaft has a magnet located on it which is position next to the magnetic rotary encoder chip on the pcb. The motor is coupled to the back plate which is then connected via four bolts to the gerabox which has a nema17 mounting hole spacin.
Odrive one with gearbox side view - no L bracket

Of course there are drawbacks to this approach. A stepper motor can operate at its rates torque all day without having to worry about overheating while this servo design will let the smoke out after about a minute at full torque. However, for a lot of application the effective duty cycle is low enough that this is not a problem. A good use-case would be something like a CNC mill where the peak load is only seen during brief moments of rapid acceleration and deceleration. A bad use-case would be trying to hold up your robot arm against gravity with this drive or using it to power your ebike flat-out up a hill.

Odrive one with gearbox - with L bracket

If you would like to check out the model you can find a copy here 15. I mostly just modified existing parts that were available on grabcad so credit goes to those people. Nuts 1, stepper motor gearbox 26, terminal block 2, motor 6, L bracket 2.

@Wetmelon has been working on a similar setup for the larger and more powerful N5065 motor over in this thread 18 in case anyone is interested in going one size up.

This is only a rough first pass on the idea so if anyone has any thoughts at all (good or bad) I would love to hear them.

How to Choose the Right Stepper motor for Medical Use

When selecting a stepmotor for a medical device, engineers need to consider many factors. For example, a systolic pump may require accuracy in a small package while lab devices, such as a blood sampler, may need to be exceptionally quiet. Although requirements for stepmotors vary from device to device, there are several factors that should always be considered.

Making it small
In terms of size, stepmotor manufacturers adhere to various NEMA frame sizes. NEMA is the industry standard governing motor dimensions, including the size of the front flanges used to mount motors to devices. NEMA sizes for stepmotors range from NEMA-8 to NEMA-42 Motor. For comparison, NEMA-8 motors with 0.8-in.2 front flanges generate about 2 to 3 oz-in. of torque, while NEMA-42 motors have 4.2-in.2 front flanges and output over 2,000 oz-in. of torque.

How to Select the Right Stepper motor for Medical Use


Pinpoint accuracy
Stepmotors rotate in terms of degrees. Each step can be in increments of 1.8°, 0.9°, or even 0.45°. This is the inherent and natural step the motor takes. Motors can also be microstepped or forced to take even finer increments. For example, a 0.9° motor can be made to step every 0.45°, which is called half-stepping the motor. And 64× microstepping a motor divides the 0.9° into 64 steps of 0.014°. Microstepping is usually handled by the driver electronics.

Smooth, quiet steps
Stepmotors can stop and hold position at any location a program tells it to. But as their name indicates, they take steps when moving. For example, to complete a full revolution, a 1.8° motor takes 200 steps. A stepmotor’s rotational speed is stated in terms of step pulses, or hertz, and is considered a frequency. At certain speeds, stepmotors resonate and vibrate loudly, and this vibration translates into jerky motion. The loud noise is due to the rotational frequency matching the motor’s inherent resonant frequency, which every stepmotor has. And the resonant frequency is generated with each step the motor takes. But there are ways to either eliminate or diminish the noise a motor makes.

Reliability and quality
When looking for reliable stepmotors, engineers often request MTBF (mean-time-between-failure) data to ensure the potential motor will last a certain number of cycles. Stepmotors typically have an MTBF of over 20,000 hr of continuous operation. When stepmotors operate at their bearings’ rated axial and radial loads or less with temperatures kept to less than 50°C, stepmotors usually last 20 years, assuming a 50% duty cycle.

So, whether your application involves making intricate cuts within a patient’s eyes, pumping critical bodily fluids, or any other type of medical application, taking a motor’s size, accuracy, smoothness of motion, noise level, quality, and reliability are a must.

https://forum.duet3d.com/topic/13002/thread-holes-on-nema-17-motor-arent-deep-enough

2019年11月21日星期四

Stepper Motors For CNC Routers

Generally, you are going to need at last NEMA23 from 175oz/in upwards unless your machine is very small such as a CNC engraver. These are quite often used for making Printed Circuit Boards(PCB) and if you check the description they will say only for soft materials.

Stepper Motors For CNC Routers


So let’s look at a couple of examples.

For routers, the cutting material plays a big part in our decision. Harder materials will need a more powerful stepper because the cutting bit is being driven into the material.

The WorkBee from Oyostepper in the China which is based on the OpenBuilds design. It uses NEMA23 of 175 oz/in. If you check some of the offerings on eBay for 6040 CNC routers you’ll quite often see in the description 57 size motors, which is the metric equivalent of 2.3 inches or NEMA23’s and these usually come with 175-200oz-in motors.

If you intended to cut very hard materials then high torque steppers motors will be required usually around 300-400 oz/in and you may need to go up to NEMA34 and you will need a strong frame to support that.

How to choose Step Motor for CNC Machine

2019年11月19日星期二

When stepper motor generates vibration and noise, how to do it?

When the stepper motor is running, if there is obvious noise and vibration is caused to the stepper motor, the following steps is helpful to troubleshooting:

It really does matter whether the stepper motor is matched with the driver. If not, it may be useless to take following steps such as division, drive current and speed adjustment. It is suggested to buy a set and ensure it is qualified when selecting the stepper motor and driver.

Now the stepper motor driver is divided into digital and analog. The noise of the analog stepper motor driver is large while it is basically no for the digital one, generally because one DSP chip is added to the digital driver to optimize the stepper motor drive. Therefore, to ensure the noise and vibration is as small as it is, it is advised to use the digital stepper driver.


Correctly adjust the subdivision and current of the stepper motor driver. The larger the subdivision is, the smaller the change amplitude of coil in motor is. That is, the noise is mitigated. As for subdivision, it is advised to set it as 8 and above. Under the circumstance that there is enough torque to drive the load for the stepper motor, it is also necessary to reduce the driver current. The smaller the parameter set, the small the change amplitude of the coil in the motor is.
Correctly set the stepper motor’s acceleration and deceleration and highest rotational velocity. It is easy to generate additional noise during the acceleration and deceleration of the stepper motor. The solution is to increase the acceleration and deceleration of the stepper motor appropriately under the circumstance that acceleration and deceleration doesn’t cause losing step.
3. Why the stepper motor doesn’t rotate or move back and forth after it is powered?
If the stepper motor doesn’t rotate sometimes or move back and forth after starting, the following inspection for troubleshooting can be taken into considerations.

When selecting the stepper motor, considering whether the working torque is large enough and whether it can drive the load or not. Therefore, it is recommended to select the motor which has 30%-50% larger torque than the actual needs, because the stepper motor cannot rotate under overload, or causing losing step even if it overloads just one second. More seriously, the stalling or repeated and irregular motioning on the spot will be caused.

Check whether the input stroke pulse from the upper controller is correct, or whether the input frequency is high and maybe it is filtered by opt coupler.

Check whether the start frequency is too high and whether acceleration process is set in the start procedure. It is better to begin accelerating to the set rate from the start frequency regulated for the motor. No matter the acceleration time is very short, or it cannot be stable.

When the motor is not fixed, it is normal that such situation like the motor intense resonance may emerge sometimes. Therefore, the motor should be fixed.
Considering whether there is lack of phase. If so, the motor will vibrate and won’t rotate normally. As for 2-phase stepper motor, the motor also cannot work normally in case of wrong phase wiring.

https://socialsocial.social/user/xiangzhao32/
http://biznas.com/Biz-postsm60751_Stepper-Motors-For-Hot-Wire-CNC-Foam-Cutters.aspx#post60751


2019年11月14日星期四

2 Phase and 3 Phase Motors You Should Know About

Oyostepper offers several families of hybrid step motors with a different number of phases and step angles. Each has a combination of advantages that are better suited to specific applications.

• 2 Phase - 1.8 degree step angle
This is the most popular step motor. It has a great combination of torque, speed and accuracy. Due to their high volumes, drives for 2 phase motors are very common and economical.

The basic method of control is to have the motor make one full step as the drive applies full current to the motor windings. This causes the motor to move in full step increments. When the motor is stepped at different rates it may make a distinctive sound and can vibrate (resonate) at certain speeds. This is not a problem for most applications. If it is an issue, motors can be controlled with micro-stepping drives that smooth motor torque. And many times, resonate speeds can simply be avoided by programming the drive.

Oyostepper offers 2 phase 0.9 degree step motors, and three phase 1.2 degree step motors, for applications that need even more accuracy, or motion that is very smooth and quiet.



• 2 Phase - 0.9 degree step angle
Because each step moves only ½ the distance of 1.8 degree motors, these motors have higher accuracy and very smooth movement. The drive for this motor is exactly the same as the 2 phase, 1.8 degree motors. For the same speed, these motors must have a step rate that is 2 times that of a 1.8 degree motor. This higher step rate leads to less torque at high speeds. However, for many applications high speed is not needed, or higher voltage drives can be used to increase torque at high speeds.

2 Phase stepper motor and 3 Phase stepper motors, 0.9 degree, 1.2 degree, 1.8 Degree step angle
14HK0 Shown Full Size
An example of a good application for 0.9 degree motors are security cameras. These motors allow the camera to be precisely moved without "camera shake" which causes the picture to vibrate. Oyostepper' offers small encapsulated sizes that reduce camera package size, and helps withstand the outdoor environment.

• 3 Phase - 1.2 degree step angle
The use of three phases inherently helps to reduce torque ripple and smooth motor performance. 3 phase motors require a 3 phase drive that is different than the drive for 2 phase motors. As compared to the 1.8 degree two phase motors, the low speed torque is somewhat less. But design improvements introduced by Oyostepper', minimizes this difference. High speed torque can also be comparable. In addition, Oyostepper' size 24 three phase motors are available with PowerPlus technology, for maximon torque. 3 phase motors are used where maximum performance, and very quiet, smooth precise movement is need. An example of a good application for three phase motors is in performance lighting. These spotlights lights need quick movement, and quiet operation so as not disturb the performance.

http://www.apsense.com/article/whats-the-difference-among-4wire6wire8wire-step-motor.html

2019年11月11日星期一

Troubleshooting of getting speed up on a Nema 34 Motor

Hi Guys, i was hoping someone on here could help me work out a issue I'm having.


I have a ESAB waterjet machine. It has 3 heads the first two have failed. This is a very expensive yet older machine, so rather than pay to fly in a tech, put him up in a hotel, pay for $1000's servo drives to be replaced. I decided to replace the first head AC servo motor with a nema 34 stepper motor controlled by an arduino. I have it installed and all my code and buttons work, I'm using a very primitive coding system to pulse the microstepper 1 step every time the button is pressed. It takes 1400 steps to do a revolution. If I hold the button it will just turn until I let go. I control the speed by changing the delay. The lower the delay the faster the rotation. The longer the delay the slower. So to get my speed up to a usable speed I had to set it to 90 microseconds.


I'm using a SainSmart CNC Micro-Stepping Stepper Motor Driver 2M542 Bi-polar 2phase 4.2A Switch.

I'm using a 960 oz-in NEMA 34 Motor capable of 7 amps of current.

I'm using a NEWSTYLE 24V 15A Dc Universal Regulated CNC Switching Power Supply 360W.

I'm using a Arduino Nano as well.


Now I know my microstepper is only capable of 4.5 amps of current but that is plenty to lift and lower my head. I was actually going to use a Nema 23 but the nema 34 was a direct replacement. I also know the Nema 34 and microstepper would be better suited to a 48v power supply but for now the 24v should be fine.


So the Problem. The way I set it up is 4 buttons, one slow up/one slow down and one fast up/one fast down. It does work, but I can't get my speeds as fast as i want. Also I know the machine is not moving with the torque I feel it should. If I try to change my delay down to say 10-75 microseconds the motor makes a noise and doesn't move. It's not missing steps and it's nowhere near using much in the terms of current. Maybe 1.6 amps at 600 microsecond delay and 1.2 amps at 90 microsecond delay. I'm sure there is a better way to code this using the accelstepper function library but i haven't got that far yet and this would work fine for me if I could get the speed up. I've seen this motor do 1400 ipm rapids on a cnc router so I know it's capable.


I'm wondering if by pulsing every 90 microseconds am I pushing too much code through the arduino causing it to stall out. Or is it possible my power supply is just to small. Regardless i do have a larger one on order. But meanwhile I was just curious what the experts thought. And also this code might help some people get a microstepper working in the simplest possible way IMO.


Thanks for any help in advance. I'm very new to the Arduino so take it easy on me. I'm trying.



As for my code here it is:

Troubleshooting help getting speed up on a Nema 34


#define DISTANCE 1 //Set the amount steps per button press, if set to 1 and held it will rotate forever at one step increments, if set to 1600 it will do one revolution per press//


int StepCounter = 0;
int Stepping = false;
int SteppingFast = false;

void setup() {
 pinMode(8, OUTPUT); //direction on microstepper//
 pinMode(9, OUTPUT); //pul on microstepper//
 digitalWrite(8, LOW);
 digitalWrite(9, LOW);

 pinMode(2, INPUT); //button slow up, not positive on these//
 pinMode(3, INPUT); //button slow down, machine is at work//
 pinMode(4, INPUT); //button fast down, will check later//
 pinMode(5, INPUT); //button fast up//
}

void loop() {
 if (digitalRead(3) == LOW && Stepping == false)
 {
   digitalWrite(8, LOW);
   Stepping = true;
 }
 if (digitalRead(2) == LOW && Stepping == false)
 {
   digitalWrite(8, HIGH);
   Stepping = true;
 }

 if (Stepping == true)
 {
   digitalWrite(9, HIGH);
   delayMicroseconds(600); //changing to delaymicroseconds allows the loop to run faster acting like a faster rpm//
   digitalWrite(9, LOW);
   delayMicroseconds(600);

   StepCounter = StepCounter + 1;
 }
 if (StepCounter == DISTANCE)
 {
   StepCounter = 0;
   Stepping = false;
 }

 if (digitalRead(4) == LOW && SteppingFast == false)
 {
   digitalWrite(8, LOW);
   SteppingFast = true;
 }
 if (digitalRead(5) == LOW && SteppingFast == false)
 {
   digitalWrite(8, HIGH);
   SteppingFast = true;
 }
 if (SteppingFast == true)
 {
   digitalWrite(9, HIGH);
   delayMicroseconds(90); //changing to delaymicroseconds allows the loop to run faster acting like a faster rpm//
   digitalWrite(9, LOW);
   delayMicroseconds(90);

   StepCounter = StepCounter + 1;
 }
 if (StepCounter == DISTANCE)
 {
   StepCounter = 0;
   SteppingFast = false;
 }
}

https://www.dopr.net/oyostepper

2019年11月1日星期五

50-56 N⋅cm Stepper Motor – The "Big Beef" of NEMA 17 Motors

Stepper motors are relatively simple mechanisms: A series of electromagnetic coils are activated in a specific sequence to spin a motor shaft a precise number of degrees. The NEMA specification is what allows stepper motors to be identified, and references the size of the faceplate of the motor.

Nema 17 Stepper Motor Bipolar 0.9 deg 46Ncm 2A 2.8V 42x42x48mm 4 Wires(17HM19-2004S)
17HM19-2004S

This variety of stepper motors Nema 17 is rather rare in the world of 3D printers, simply because they are almost too big and powerful. Common applications of this motor are for moving extremely large or heavy print beds in Prusa i3 style printers.

Being longer and distinguished than their counterparts, 50-56 N⋅cm motors are rarely used on moving gantries, as their mass causes issues with inertia at higher printing speeds. Typically used in a fixed position, these motors are usually better suited to CNC work than 3D printing applications.

However, if you need to move a large, heavy print bed quickly, like on the Creality CR-10 S4 and S5, then these motors are the ones for you.

NEMA Specifications and Torque Ratings of Stepper Motor
HOW TO CONTROL NEMA17 STEPPING MOTOR BY USING ARDUINO AND A4988 DRIVER


2019年10月30日星期三

Circuit diagram to control Nema 17 stepper motor with Arduino

Circuit Diagram
Circuit diagram to control Nema 17 motor with Arduino is given in the above image. As A4988 module has a built-in translator that means we only need to connect the Step and Direction pins to Arduino. Step pin is used for controlling the steps while the direction pin is used to control the direction. Stepper motor is powered using a 12V power source, and the A4988 module is powered via Arduino. Potentiometer is used to control the direction of the motor.

Circuit diagram to control Nema 17 stepper motor with Arduino


If you turn the potentiometer clockwise, then stepper will rotate clockwise, and if you turn potentiometer anticlockwise, then it will rotate anticlockwise. A 47 µf capacitor is used to protect the board from voltage spikes. MS1, MS2, and MS3 pins left disconnected, that means the stepper driver will operate in full-step mode.

Circuit diagram to control Nema 17 stepper motor with Arduino


Complete connections for Arduino Nema 17 A4988 given in below table.
S.NO.
A4988 Pin
Connection
1
VMOT
+ve Of Battery
2
GND
-ve of Battery
3
VDD
5V of Arduino
4
GND
GND of Arduino
5
STP
Pin 3 of Arduino
6
DIR
Pin 2 of Arduino
7
1A, 1B, 2A, 2B
Stepper Motor

Code Explanation

Complete code with working video control Nema 17 with Arduino is given at the end of this tutorial, here we are explaining the complete program to understand the working of the project.
First of all, add the stepper motor library to your Arduino IDE. You can download the stepper motor library from here.
After that define the no of steps for the NEMA 17.  As we calculated, the no. of steps per revolution for NEMA 17 is 200.
#include <Stepper.h>
#define STEPS 200

After that, specify the pins to which driver module is connected and define the motor interface type as Type1 because the motor is connected through the driver module.
Stepper stepper(STEPS, 2, 3);
#define motorInterfaceType 1

Next set the speed for stepper motor using stepper.setSpeed function. Maximum motor speed for NEMA 17 is 4688 RPM but if we run it faster than 1000 RPM torque falls of quickly.
void setup() {
    stepper.setSpeed(1000);

Now in the main loop, we will read the potentiometer value from A0 pin. In this loop, there are two functions one is potVal, and the other is Pval. If the current value, i.e., potVal is higher than the previous value, i.e., Pval than it will move ten steps in the clockwise direction and if the current value is less than previous value than it will move ten steps in the counter-clockwise direction.
potVal = map(analogRead(A0),0,1024,0,500);
  if (potVal>Pval)
      stepper.step(10);
  if (potVal<Pval)
      stepper.step(-10);

Pval = potVal;

Now connect the Arduino with your laptop and upload the code into your Arduino UNO board using Arduino IDE, select the Board and port no and then click on the upload button.
Now you can control the direction of Nema17 stepper motor using the potentiometer. The complete working of the project is shown in the video below. If you have any doubts regarding this project, post them in the comment section below.   
Code
#include <Stepper.h> 
#define STEPS 200
// Define stepper motor connections and motor interface type. Motor interface type must be set to 1 when using a driver
Stepper stepper(STEPS, 2, 3); // Pin 2 connected to DIRECTION & Pin 3 connected to STEP Pin of Driver
#define motorInterfaceType 1
int Pval = 0;
int potVal = 0;
void setup() {
  // Set the maximum speed in steps per second:
  stepper.setSpeed(1000);
}
void loop() {
 
  potVal = map(analogRead(A0),0,1024,0,500);
  if (potVal>Pval)
      stepper.step(10);
  if (potVal<Pval)
      stepper.step(-10);
Pval = potVal;

2019年10月25日星期五

Which is better for 4-Wire, 6-Wire and 8-Wire Stepping Motor

I have a stepper motor with either 4, 6, or 8 lead wires available to connect to a stepper drive. What is the difference between these wiring types, and does this affect how I connect the motor to my drive?

Solution

The basic operation of any stepper motor relies on the use of inductive coils which push or pulls the rotor through its rotation when they are energized. A pair of wire leads coming from a stepper motor will correspond to at least one of these windings and possibly more depending on the motor type. In each of the following cases a chassis ground lead is also pictured to ensure the motor is correctly grounded.
 
  • 4-Wire Stepper Motors
While many motors take advantage of 6- and 8-wire configurations, the majority of bipolar (one winding per phase) stepper motors provide four wires to connect to the motor windings. A basic 4-wire  Nema 34 - 86 x 86m stepper motor is shown in Figure 1. Connecting this motor type is very straightforward and simply requires connecting the A and A' leads to the corresponding phase outputs on your motor drive.
 
Figure 1: 4-Wire Stepper Motor
 
  • 6-Wire Stepper Motors
A 6-wire stepper motor is similar to a 4-wire configuration with the added feature of a common tap placed between either end of each phase as shown in Figure 2. Stepper motors with these center taps are often referred to as unipolar motors. This wiring configuration is best suited for applications requiring high torque at relatively low speeds. Most National Instruments stepper motor interfaces do not support 6-Wire stepper motors, although some motors do not require the center taps to be used and can be connected normally as a 4-wire motor.
 
Figure 2: 6-Wire Stepper Motor (Left) 8-Wire Stepper Motor in Parallel (Right)
 
  • 8-Wire Stepper Motors
Some motors are also offered in 8-Wire configurations allowing for multiple wiring configurations depending on whether the motor's speed or torque is more important. An 8-wire stepper motor can be connected with the windings in either series or parallel. Figure 3 shows an 8-Wire stepper motor with both windings of each phase connected in series. This configuration is very similar to the 6-wire configuration and similarly offers the most torque per amp at the expense of high speed performance.
 
Figure 3: 8-Wire Stepper Motor (Series Configuration)
 
It is also possible to connect an 8-wire stepper motor with the windings of each phase connected in parallel as shown in Figure 4. This configuration will enable better high speed operation while requiring more current to produce the rated torque. This connection type is sometimes known as parallel bipolar wiring.
 
Figure 4: 8-Wire Nema Stepper Motor (Parallel Configuration)

Although every stepper motor operates in the same basic way, it is important to understand the difference between each wiring type and when each should be used.