Hello,
I'm working on a project where I can control the movement of two stepper motors with a joystick. The motors don't move but give a slight vibrate. Is it a power supply issue? I'm using a 12V 1A DC to AC Adapter as it source and 2 Nema 17HS402 stepper motors. I also attached the datasheet regarding the Stepper motor in the link:
The current from your power supply is a bit on the low side. The motors need 0.7 amps at 12v which amounts to 1.4 amps (minimum) for two motors. I suggest you get a 12v 3amp power supply, or (assuming you are using specialised stepper motor drivers such as the A4988) an 18v or 24v power supply would be better.
Always start testing with very slow step speeds - perhaps just 5 steps per second.
That motor is 0.7A and 4 ohms. This means it uses 0.7 x 0.7 x 4 = 1.96W
Allowing for 50% loss in the driver that's 4W needed per motor/driver, so 8W total
from 12V, meaning about 0.67A taken from the supply in light use.
The key thing is the stepper drivers - these need to be constant current stepper
drivers such as DRV8825 or A4988 modules (others exist).
They should be set to 0.7A.
Note that the current going to the motors is typically much more than drawn from the
supply by the driver, due to the drivers acting as buck converters.
Thank you for the feedback. Would a 5A 24V power supply suffice? And yes, I am using 2 A4988 stepper motor drivers.
MarkT:
That motor is 0.7A and 4 ohms. This means it uses 0.7 x 0.7 x 4 = 1.96W
My Reply #1 is incorrect - apologies. I had only read 12v and 0.7 amps and assumed it had a resistance of 17 ohms. I shall slap my wrist later.
However it would be worth measuring the resistance to verify that it really is 4ohms.
...R
Regarding the stepper motor resistance, its roughly 4.7 ohms.
mlem_ular:
Regarding the stepper motor resistance, its roughly 4.7 ohms.
That's close enough to 4 ohms.
...R
So it all depends on the amperage? Is it better for a 12V 10A supply or a 24V 5A supply?
mlem_ular:
So it all depends on the amperage? Is it better for a 12V 10A supply or a 24V 5A supply?
The limiting factor for the motor is the amount of current passing through the coils. In the case of your motor the coils can take 0.7 amps.
The torque available from a stepper motor falls off rapidly as speed increases. Using a higher voltage will allow the motor to maintain more torque at higher speeds. But (even at 12v) you MUST adjust the current limit on the stepper driver to match the current acceptable to the motor.
As @MarkT has said in Reply #2 you need a power supply capable of providing at least 8 watts. That means 0.67 amps at 12v or 0.33 amps at 24v. Being practical a 12v 1 amp supply or a 24v 1 amp supply would be fine. However it will do no harm to have more amps available.
...R
Hello Robin2, thanks for replying. I've tested one stepper motor with the code you've provided. I changed the power supply with a 19V 3.42A but the motor doesn't seem to move. If I touch it, there is this small ticking feeling which follows the int millisbetweenSteps value. Is the stepper motor faulty instead of insufficient power supply?
mlem_ular:
Hello Robin2, thanks for replying. I've tested one stepper motor with the code you've provided. I changed the power supply with a 19V 3.42A but the motor doesn't seem to move. If I touch it, there is this small ticking feeling which follows the int millisbetweenSteps value. Is the stepper motor faulty instead of insufficient power supply?
Please post the code YOU have uploaded to your Arduino and also please make a drawing showing how you have everything connected and post a photo of the drawing. See this Simple Image Posting Guide
If the resistance of both motor coils is about 4 ohms then I don't think there is anything wrong with the motor.
It's much more likely that the stepper motor driver is damaged. If you disconnect a wire between the driver and the motor while the motor power supply is connected to the driver the driver is likely to be destroyed instantly.
...R
Hello Robin2, Here's the code that I uploaded:
// testing a stepper motor with a Pololu A4988 driver board or equivalent
// on an Uno the onboard led will flash with each step
// this version uses delay() to manage timing
byte directionPin = 9;
byte stepPin = 8;
int numberOfSteps = 100;
byte ledPin = 13;
int pulseWidthMicros = 20; // microseconds
int millisbetweenSteps = 100; // milliseconds - or try 1000 for slower steps
void setup() {
Serial.begin(9600);
Serial.println("Starting StepperTest");
digitalWrite(ledPin, LOW);
delay(2000);
pinMode(directionPin, OUTPUT);
pinMode(stepPin, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(directionPin, HIGH);
for(int n = 0; n < numberOfSteps; n++) {
digitalWrite(stepPin, HIGH);
delayMicroseconds(pulseWidthMicros); // this line is probably unnecessary
digitalWrite(stepPin, LOW);
delay(millisbetweenSteps);
digitalWrite(ledPin, !digitalRead(ledPin));
}
delay(3000);
digitalWrite(directionPin, LOW);
for(int n = 0; n < numberOfSteps; n++) {
digitalWrite(stepPin, HIGH);
// delayMicroseconds(pulseWidthMicros); // probably not needed
digitalWrite(stepPin, LOW);
delay(millisbetweenSteps);
digitalWrite(ledPin, !digitalRead(ledPin));
}
}
void loop() {
}
And here's the circuit I made:
mlem_ular:
And here's the circuit I made:
testing hosted at ImgBB — ImgBB
Please make your image visible in your Post. I gave you a link to the instructions.
...R
Fritzing diagram may look nice but they are very easy to misinterpret - and you can't read the pin labels. As I requested earlier just make a simple drawing (with pencil and paper) and post a photo of the drawing.
...R
Thanks. That's a much better diagram.
I presume you have checked carefully that pins 8 and 9 really do go to step and direction and have not accidentally been swapped?
Have you tried my code with the larger value of 1000 for the variable millisBetweenSteps ?
...R
Hi guys, turns out the driver was fried. I swapped it out and everything works fine. Thanks again everyone for the insight and help.

