Stepper motor vibrating, rocking back and forth, not turning

Hi,

I have been working on a DIY project, I'm new to this so I'm learning along the way.
I want to use an Arduino Uno to turn a small turntable using the Easydriver and a Nema 17 bipolar stepper motor, I use a 12V 2A adapter to power things. I'm using this instructables article as a guide.

the wiring is done this way (only stepper connections are shown for simplicity):

I assembled everything and from the first time I tried to test if the thing works it only vibrates with some clicking sound, sometimes it rocks back and forth, if I touch it it feels like the motor is pulsating but I haven't found any solution anywhere...
I searched a lot online, and most times the problem is with the wiring or a dead driver. everything I have is brand new, and I was careful not to disconnect the motor leads while the driver was connected to power...

The code I'm using to test it is this basic one, but I tried other codes too, with the same result.

void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}

void loop() {
digitalWrite(3, HIGH);
delay(1);
digitalWrite(3, LOW);
delay(1);
}

What could be the issue here? is there any way I can fix this? I'd appreciate all help and advice.

here is a small video showing the problem: video 2021 12 13 09 07 49 - YouTube

I have also attached the datasheet here:

How much current can your 12V supply provide?

Increase the delay until the motor starts rotating properly.

its 12V, 2A.

arduino-12v_600x

here's the link to the product page:

The easydriver is a current driver, thats needs a supply voltage that is significantly higher than the rated voltage of the motor. And it has a bipolar output stage with a voltage loss of nearly 3,5V ( 2x1.7V) . That means your power source has too low a voltage. Use a stepper with a lower rated voltage, or a power source with a higher voltage, e.g. 24V.
And you must adjust the current setting of the driver.

Good video on motor connection testing here.......

https://www.youtube.com/watch?v=hHe4Fc6uuBs

Thanks for the reply, I read on the description that 12V is the rated voltage for the motor and it can be driven at a lower voltage, but the torque will drop... It is going to turn a very lightweight turntable that doesn't need much effort to turn, ... shouldn't it turn normally but with lower torque if the issue is only voltage? the problem is it is twitching, not normally turning at all, even when adjusting the current setting pot, only this twitchings gets stronger or weaker...

Probably if you use a simple H-bridge to drive your stepper. But the easydriver isn't a simple H-bridge...

So all your connections are correct then........??

As far as I could check based on the diagram the connections are ok, I tested continuity to check the correct wire pairs, also I tested with swapping different orders but nothing changed, same behaviour ...(everything was powered off first each time)

The problem with that code is it assumes the motor can accelerate instantly to 500 steps/second, which it definitely cannot as it obeys the laws of physics, not wishful thinking :slight_smile:

This usually leads to the motor stalling and squealing, not rotating, but somethings even more odd things happen.

You have to ramp step rate up and down with all but the tiniest stepper motors, which is why I always advise starting with the AccelStepper library and modest speed and accelerations settings.

Alternatively try a much more modest step rate like 10/second.

Hi,
Try;

void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}

void loop() {
digitalWrite(3, HIGH);
delay(200);
digitalWrite(3, LOW);
delay(200);
}

But as @MarkT has advised AccelStepper library would be easier.

Tom.. :grinning: :+1: :coffee: :australia:

@ashiimashi : How did you wire the M1 and M2 pins of the driver? If they are open, the driver defaults to 1/8 Microstep, and with this configuration the motor should normally start with 2ms per step. But with your 12V power source the torque may even be too weak for this stepping.
If you look at the torque curve at the bottom right of the data sheet you see that the stepper is operated at 24V. And the torque decreases very rapidly with higher steprates.

These are not connected (the instructables project I linked above also didn't use these)

Nevertheless, try a slower steprate, as suggested above. This is the easiest to test at first.

If connections are exactly as the picture attached, probably you are not driving correctly the two coils of stepper motor.

In relation to the 6-pin JST connector of the stepper motor, usually coils A/B are connected to pin 1-4 / 3-6
If you have the wire version, as it seems from datasheet of motor, check coils continuity with a multimeter (30-50 ohm each coil)

Edit:
Sorry I've missed you have already done this kind of checks.

I tried this code, didn't fix the problem, just the twitching gets farther apart, more like clicking sounds every second, if I change the value to something smaller like 10-20 the clicks get more closer together

That will not always guarantee correct rotation which was why I posted the video for you to check your wiring.
Using a breadboard is also a bad idea.

I checked the wires with a multimeter to make sure the datasheet is correct, and it was.

I also suspected a bad connection first so I soldered the motor wires on the board and tested, just in case the connection was faulty but nothing changed...
a lot of projects, including the Instructables for this one, use breadboard and it works fine, so probably the issue here is something else...

Hi,
Can you please post picture(s) of your project so we can see your component layout.

What size protoboard are you using?

Do you have a DMM?

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

Hi Tom, after facing the problem I described, I ended up detaching everything for debugging so it's not really a project at the moment, it's only the Uno, Easydriver, and the stepper motor that's left...

Here is a picture, the Uno board is not making any connections to breadboard underneath.

I have a small basic multimeter if that's of any use.