advice motors


I am thinking on a project where I need to have acrylic discs (30cm diameter) turning very very slowly. I though stepper would be a good idea, but now I am testing some stepper for this application, and it bothers me a little bit that I can actually "see" the steps. It is not a fluent movement what I get, but a stepped movement.

What motor would you suggest to use for this application?

A geared DC motors can be very smooth. A microstepping driver for the stepper can smooth the motion a lot.

Tell us more about your project. Define very slowly (revs per minute, hour, day, ...)? Is precise positioning necessary? Do the discs need to be synchronized?

the code that I am currently using follows.

I am finding extremely difficult to play around with the speed of the steppers, so you might see that what I am doing in the code is plain ridiculous. I still need to figure this out...

But, my idea is to place objects on these discs, and that they slowly turn, imperceptible if you glance quick, but noticeable if you pay attention.

positioning is irrelevant.

synchronisation is irrelevant but I am expecting the three discs to turn at the same speed.

Btw, in the following code I have a step per stepper, consecutively. I would actually like to have all stepper doing the step at the same time. How do I achieve that?

(I am using Nema 17)

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "utility/Adafruit_MS_PWMServoDriver.h"

Adafruit_MotorShield AFMS1(0x60);
Adafruit_MotorShield AFMS2(0x61);

Adafruit_StepperMotor *myMotor1 = AFMS1.getStepper(1, 1);
Adafruit_StepperMotor *myMotor2 = AFMS1.getStepper(1, 2);
Adafruit_StepperMotor *myMotor3 = AFMS2.getStepper(1, 1);

void setup() {

void loop() {
  myMotor1->step(1, FORWARD, MICROSTEP);
  myMotor2->step(1, FORWARD, MICROSTEP); 
  myMotor3->step(1, FORWARD, MICROSTEP); 

I am using Nema 17

Nema 17 is the motor physical size, it does not tell us anything about about the motor other than that. A data sheet for the motor would be very useful.

I suggest that you use a proper stepper driver like the A4988 or DRV8825 (if the motor coil current is within their specs). You get micro stepping of up to x16 (A4988) or X32 (DRV8825), coil current control and step/dir control. With X16 microstepping on a 200 pulse per rev motor you get 3200 steps per revolution, 6400 steps per rev at X32.

Then you can send the step pulses to all three motors at once and they will turn at the same rate.

A couple of good stepper links:
Simple stepper code.
Stepper basics.

the steppers were bought in ebay with the following information:

Model: 42BYGH34-0400A
Material: Metal
Color: Silver
Dimensions: 42x42x34mm (Length x Width x Thickness)
Step Angle:1.8°
Rated Voltage 12V
Rated Current 0.4A
Number of phase: 2
Resistace Per Phase 30Ω±10%
Rotor Intertia: 34g.cm2
Holding Torque:
Detent Torque:

And I am using a motor shield, also from ebay, clon from the motor shield from adafruit, with its library. You dont think this shield allows microstepping?

I will be searching for more information and checking the links you have sent me. thank you very much!!!

That is the wrong shield for those steppers. Get ones with a DRV8825 chip.

For really slow movement, add a gearbox between the motor and output. Hobby shops have lots of great gearboxes.

There also are steppers with integral planetary geaboxes. A Google search for "stepper planetary gearbox" will turn up many with different ratios.

ok. so DRV8825 is on the way.

I can imagine that with microsteps and without a gearbox should be enough. the speed that I currently see in the steppers is right, what bothers me is that I can see the steps.

Could you please explain why the Adafruit motor shield is "wrong" for this steppers?

They are made for controlling DC motors with PWM. They have no coil current control nor real microstepping.

Be sure to carefully read the page that I linked for the DRV8825. It is very important to set the coil current as described on that page. And be very careful to never disconnect the motor from a powered driver as the driver will be killed.

ok, thank you very much. I will have to wait for the DRV8825 since I ordered online. as soon as I have them, I will come back to this thread.

I am still missing how to send the step pulses to all three motors at once in my code. it has to be pretty straight forward. could you please guide me?

void loop() {
  myMotor1->step(1, FORWARD, MICROSTEP);     
  myMotor2->step(1, FORWARD, MICROSTEP); 
  myMotor3->step(1, FORWARD, MICROSTEP); 

You could connect all 3 step pins from the drivers to one Arduino digital output then use a variation on Robin2's simple stepper code to send the step pulses to all 3 drivers at once. The code that you posted is not going to work with the DRV8825 driver.

The timing between pulses will depend on the required rotation speed and the type of microstepping. For instance, if you want 1 rev per minute and you have X32 microstepping there would be 7200 steps per minute or 107 steps per second. So the delay between steps would be 9 milliseconds.


uln2003 is not capable of microstepping, but I got a rather good pace for my project with the code that can be found in 28BYJ-48 & uln2003 - stepper as slow as possible - Project Guidance - Arduino Forum #7.

I tried a4988 following the guide It didnt work and the circuit is quite straight forward, so I am assuming the driver is not working. I have another on the way to test it again. It should be 1/16th microsteps capable.

a3967 works really nice with 1/8th steps. Everything hooked and tested as explained at Easy Driver Hook-up Guide - SparkFun Learn

Adafruit motor shield v2 library does support microstepping up to 16ths.

I am really looking forward to test DRV8825 which is 1/32th steps capable.

Some other driver I should try for fine microstepping?

and, I have just found the following article on microstepping

I have finally received the DRV8825 driver, hooked it up as explained in polulu´s website and tested it with the Simple stepper programm and also with the code at the end of this post.

It didnt work. the same way my a4988 didnt worked when I tested it as explained in this tutorial, so I am starting to believe that my a4988 is not broken, but I am doing something fundamentally wrong for both systems, but I dont see what, since the wiring is very straight forward.

I dont know where to start troubleshooting...
Some new eyes please?

The stepper works correctly as I was able to test it with a a3967 driver.

const int stepPin = 3; 
const int dirPin = 4; 
void setup() {
void loop() {
  for(int x = 0; x < 200; x++) {
  delay(1000); // One second delay
  for(int x = 0; x < 400; x++) {

Does the motor make any noise? Did you connect the enable pin or leave it floating? Can you post a clear photo of your wiring?

motor makes no noise

I did not connect the enable pin, since I havent seen it connected in the diagram of the manufacterer ( // Pololu - A4988 Stepper Motor Driver Carrier)

photos attached. couldnt insert them...

How to post image.

What are the specs of the motor power supply (Volts, Amps)?

massive mistake... confused with the position of the potentiometer, I had the dvr8825 upside down... dvr8825 works... (the one that I had upside down doesnt work, so it is possible I damaged it)

now I need to figure out what is going on with a4988, but I only have one driver of its kind, so I cannot be 100% if the one I have is actually in good shape... I have some more of these on the way, so I will wait until they arrived.

power supply is 12v 3A


dvr8825 (edit: driver is upside down!!! do not connect like this!!!)