Go Down

Topic: 3-5v micro stepper connected to A4988 driver not moving and makes whirring noise (Read 142 times) previous topic - next topic

EyesT

I am kind of a newbie when it comes to stepper motors so I am hoping I am not asking any stupid questions.

I am trying to run a 3-5v micro stepper motor (PM15S-020-SKH4) using a Pololu A4988 stepper driver. I know the driver isn't originally meant for low-voltage stepper motors but I had some lying around and from what I understand it should not be a problem as long as the pot-value is set correctly.

Now I've identified the coils on the stepper motor and connected everything with an 12V power supply, Arduino Uno, 100uF capacitor as described in the Pololu schematic. I couldn't find the current specification for the stepper motor but if my calculations are correct with 5V / 30 Ohm it should be 160 mAmp so per another calculation I've set vRef value for the pot-meter to 0.160 * 0.4 = 0,064

The code I run on the Arduino is;


#define PIN_DIR 1
#define PIN_STEP 3
#define PIN_ENABLE 5

void setup()
{
    pinMode(PIN_DIR, OUTPUT);
    pinMode(PIN_STEP, OUTPUT);
    pinMode(PIN_ENABLE, OUTPUT);

    digitalWrite(PIN_ENABLE,LOW);
}

void loop()
{
    digitalWrite(PIN_DIR,HIGH);

    // 20 pulses of 18 degrees should make one full rotation
    for(int i = 0; i < 20; i++)
    {
        digitalWrite(PIN_STEP,HIGH);
        delayMicroseconds(500);

        digitalWrite(PIN_STEP,LOW);
        delayMicroseconds(500);
    }

    delay(1000);
}

When running the above code, the shaft is harder to move compared to a disconnected motor so there is resistance between the coils what should indicated that they are powered. But when running this the only thing the motor does is make a whirring noise and struggle/tick when I try to rotate it with my fingers.

I have tried multiple configurations of the wires in different positions, where some are creating resistance between the coils and some are not and even tried multiple of the same type motors and drivers but all yield the same result.

I have also tried to increase the pot-meter values with increments of 0.1, so 0.16, 0.26 up until 1.0 but all values have the same result, although at the higher values the motors get way hotter.

I have a feeling I am overlooking something very obvious but I have no idea what, or am I being a complete idiot trying to combine the Pololu A4988 and the PM15S-020-SKH4?

Robin2

You are starting with a very high step rate with this code
Code: [Select]
for(int i = 0; i < 20; i++)
    {
        digitalWrite(PIN_STEP,HIGH);
        delayMicroseconds(500);

        digitalWrite(PIN_STEP,LOW);
        delayMicroseconds(500);
    }


Change it to
Code: [Select]
for(int i = 0; i < 20; i++)
    {
        digitalWrite(PIN_STEP,HIGH);
        delayMicroseconds(10);

        digitalWrite(PIN_STEP,LOW);
        delay(500);
    }


and you should be getting 2 steps per second. if that works you can reduce the interval between steps for faster speeds.

And note that I used the code button </> to show your code

...R
Stepper Motor Basics
Simple Stepper Code
Two or three hours spent thinking and reading documentation solves most programming problems.

EyesT

I have tried this after you suggested it, but it appears the result is the same though this time with some strange effects of the pot-meter. Again tried several different coil configurations, multiple motors, multiple drivers but nothing appears to fix the problem.

One time when I increased the pot-meter value to 1.0 the engine started running really fast and really hot for a very short period.


(Ps.  Didn't know about the </> code block formatting option)

Robin2

Your Reply #2 mentions lots of different tests without enumerating them case by case with the results of each - hence it is impossible to know what were the circumstances in which the motor moved.

And you say "increased the pot-meter value to 1.0 " but you don't say what the 1.0 means.

Assuming the smoke did not escape when the motor moved it sounds like you nearly had things right. But if you were using the code I suggested I don't see how it could have been moving fast.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

TomGeorge

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

MarkT

I know the driver isn't originally meant for low-voltage stepper motors but I had some lying around and from what I understand it should not be a problem as long as the pot-value is set correctly.

Steppers are current driven.  The voltage doesn't enter into this, other than as a limit to the
maximum performance you'll get.

Try AccelStepper to ramp the speed up and down at a finite rate, rather than expecting the laws
of physics to not apply to your motor.

Its always good to check with a multimeter the pin out and resistance of a motor's windings
before connecting up.  Most motors are available in multiple winding variations and normally
you cannot tell from the main part number nor the wiring colours.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up