Go Down

Topic: 3-5v micro stepper connected to A4988 driver not moving and makes whirring noise (Read 633 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 ]

EyesT

I have given up on trying to get this to work and switched to a servo. I have hooked up the setup to a NEMA17 stepper motor (with alterations to the current) and it works fine. I have tried the small stepper motor wires in many, if not all configurations and I just can't get them to work.

Robin2

I have given up on trying to get this to work and switched to a servo. I have hooked up the setup to a NEMA17 stepper motor (with alterations to the current) and it works fine. I have tried the small stepper motor wires in many, if not all configurations and I just can't get them to work.
This is very like your Reply #2 - hints about lots of things and details about none of them.

If you want help you need to provide full details of the case you want help with.

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

EyesT

My apologies for not having provided much detail, I was heavily frustrated by just not getting this to work. I have put way too much time in trying to get this to work. With configurations I meant something like this;

Config 1:
A1 - Coil 1 in
A2 - Coil 1 out
B1 - Coil 2 in
B2 - Coil 2 out

Config 2:
A1 - Coil 1 in
A2 - Coil 2 in
B1 - Coil 1 out
B2 - Coil 2 out

And so on.

I could find almost no good specifications for the PM15S-020-SKH4 and I suspect there is just a small thing that could be clarified by specs to get it to work. Maybe once I have more free time I will try it once again and post the details here, but for now servos will do the trick.

Robin2

Config 2:
A1 - Coil 1 in
A2 - Coil 2 in
B1 - Coil 1 out
B2 - Coil 2 out
This makes no sense. The pair of A connections are for one coil and the pair of B connections are for the other coil.

I presume you have identified the wires for the coils using your multimeter.

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

TomGeorge

Hi,
Basic stepper specs, note it even recommends L293D as the driver.
They aren't 3 - 5V, they are 12V.
18Deg is not microstepper,  Amazon? ? ?


Use DMM to check coil  resistance.

Also attached pdf file

Tom.. :)
I just googled         PM15S-020-SKH4
and all this popped up.
Everything runs on smoke, let the smoke out, it stops running....

TomGeorge

Hi,
Please a diagram of how you have the stepper, power supplies and the Arduino connected together.

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

Robin2

Basic stepper specs, note it even recommends L293D as the driver.

That does not inspire confidence :)

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

Go Up