Arduino Forum

Using Arduino => Motors, Mechanics, and Power => Topic started by: Sly97 on Jun 06, 2019, 12:04 pm

Title: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: Sly97 on Jun 06, 2019, 12:04 pm
Hey guys!

I bought a 10V 0.5A Polulu stepper motor (LINK (https://www.pololu.com/product/1208/specs))
and a Polulu A4988 driver (LINK (https://www.pololu.com/product/2980/specs))
and a (max.) 12V 1A power supply (LINK (https://www.tme.eu/hu/en/details/mw3k10gs/plug-in-power-supplies/minwa-electronics/#))

My problem is that I connected everything well, but the motor doesn't want to do anything. It doesn't rotate or vibrate or anything. Could it be because of the power supply is too weak to make the motor work? Do I need to buy a 24V power supply?

I followed this tutorial:
https://www.youtube.com/watch?v=5CmjB4WF5XA (https://www.youtube.com/watch?v=5CmjB4WF5XA)

And this is the code I used:
Code: [Select]
/*     Simple Stepper Motor Control Exaple Code
 *      
 *  by Dejan Nedelkovski, www.HowToMechatronics.com
 *  
 */
// defines pins numbers
const int stepPin = 3;
const int dirPin = 4;
 
void setup() {
  // Sets the two pins as Outputs
  pinMode(stepPin,OUTPUT);
  pinMode(dirPin,OUTPUT);
}
void loop() {
  digitalWrite(dirPin,HIGH); // Enables the motor to move in a particular direction
  // Makes 200 pulses for making one full cycle rotation
  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); //Changes the rotations direction
  // Makes 400 pulses for making two full cycle rotation
  for(int x = 0; x < 400; x++) {
    digitalWrite(stepPin,HIGH);
    delayMicroseconds(500);
    digitalWrite(stepPin,LOW);
    delayMicroseconds(500);
  }
  delay(1000);
}


Any suggestion would be very very helpful!

Thanks in advance!
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: zwieblum on Jun 06, 2019, 01:12 pm
Did you pull ENABLE to any level (+5/GND)?
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: Sly97 on Jun 06, 2019, 01:36 pm
You mean connect anything to the ENABLE pin? Like VDD or GND?
(https://a.pololu-files.com/picture/0J10073.600.jpg?75d9ca5bb2e095e5c5f64350019e1b81)


No i did not. Should I? In the tutorial there wasn't anything connected to ENABLE.
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: zwieblum on Jun 06, 2019, 01:56 pm
Maybe not anything, but GND would be nice.
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: Sly97 on Jun 06, 2019, 02:20 pm
Thanks for your answer! Should i connect the gnd from arduino or the power supply? (Sorry i'm kinda beginner in electronics)
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: cyberblade6669 on Jun 06, 2019, 02:37 pm
did you buy a prewired stepper wires bet there wrong dont trust color
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: jremington on Jun 06, 2019, 03:43 pm
Did you follow the instructions to set the current limit to 0.5A?
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: zwieblum on Jun 06, 2019, 04:00 pm
.. and have you tried a different stepper driver?
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: Sly97 on Jun 06, 2019, 09:52 pm
Thank you guys. I bought my first multimeter, and I realized I connected the power supply leads inversely. And I didn't set the current limit on the A4988..So I done quite a lot of things bad:D But I learned from my failure, and now the motor is working nicely. Thanks! Problem solved.
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: MarkT on Jun 07, 2019, 02:01 pm
Hey guys!

I bought a 10V 0.5A Polulu stepper motor (LINK (https://www.pololu.com/product/1208/specs))
and a Polulu A4988 driver (LINK (https://www.pololu.com/product/2980/specs))
and a (max.) 12V 1A power supply (LINK (https://www.tme.eu/hu/en/details/mw3k10gs/plug-in-power-supplies/minwa-electronics/#))

My problem is that I connected everything well, but the motor doesn't want to do anything. It doesn't rotate or vibrate or anything. Could it be because of the power supply is too weak to make the motor work? Do I need to buy a 24V power supply?

Yes, a current driven stepper requires a supply voltage much larger than the product of its current and resistance.  Basically you'd be much better off with a low impedance stepper of about 1.5A and 2 ohms, then even 12V would be usable.

That motor could be driven constant voltage (but only slowly, and without microstepping), using 12V and a L293D or L298 dual H-bridge.  I think that's why it has that odd impedance.
Title: Re: 10V 0.5A Polulu stepper motor is not rotating with A4988 Driver
Post by: Robin2 on Jun 07, 2019, 04:56 pm
I have motors that are similar (https://www.sparkfun.com/products/9238) to the OP's and they work fine with A4988 drivers and a 12v power supply. However a higher voltage is better. I normally run mine from a 19v laptop power supply.

...R
Stepper Motor Basics (http://forum.arduino.cc/index.php?topic=284828.0)
Simple Stepper Code (http://forum.arduino.cc/index.php?topic=277692.0)