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?
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?
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.
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: 28N.cm
Detent Torque: 1.6N.cm
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!!!
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?
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.
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() {
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
}
void loop() {
digitalWrite(dirPin,HIGH);
for(int x = 0; x < 200; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
delay(1000); // One second delay
digitalWrite(dirPin,LOW);
for(int x = 0; x < 400; x++) {
digitalWrite(stepPin,HIGH);
delayMicroseconds(500);
digitalWrite(stepPin,LOW);
delayMicroseconds(500);
}
delay(1000);
}
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.