Stepper motor strange behavior (video included)

Hi everyone! Please watch this video: stepper motor weird behavior - YouTube

This stepper motor has been driving me crazy with its erratic behavior. Even if I change the code and tell it to go only clockwise it still does the same erratic spins.

This is the motor in question: https://www.moonsindustries.com/p/nema-23-powerplus-hybrid-stepper-motors/pl23hs8p4100-000004611110011410

It's a newly-bought motor.
For motor driver I'm using what I had in stock, it's just an old driver I found lying around. It's being provided with 12V and 1A.

This is the guide I followed (same code, same connections), I have the same motor driver as the instructions and Arduino Uno R3

Here are some pictures:

Now,
I tried switching the wires of the motor, I think I tried every possible wire combination... still didn't help. I also tried switching the N1-N4 connectors between the driver and the arduino...no success. Motor is rated for 7.6V DC so 12V should be more than enough, (although I realize it's on the low-end for this kind of motor if I wanted better speed/torque).

Any ideas why it behaves the way it does?

The ancient piece of crap L298 DC motor driver is a totally inappropriate driver for a modern bipolar stepper motor. You should acquire a proper current controlling stepper driver. Pololu has a good line of modern stepper drivers. Choose a driver that can handle the stepper supply voltage and supply the coil current required by the motor. The motor data sheet should list the max coil current. Set the coil current limit on the driver before connecting the motor.

NEMA23 only tells us the mounting dimensions, nothing of the current requirements of the motor or anything else.

If you want help here, post photos here so that we do not have to go and download them.

Please post the test code.
Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Thanks for the reply. Sorry for not posting inline everything, I guess in my mind's eye it's more appropriate to use links and not clutter the post but I shall amend my ways henceforth :slight_smile:

I suspect you're right, I figured that old driver was the main culprit.
What do you say about this driver?

It certainly stands the voltage/amper requirements, I know the DRV8825 is supposedly fancier/more accurate but for the price of A4988 it's good enough

A4988 is fine if you can get by with 1A of coil current ( 1.5A if a heat sink and fan cooling is used). The DRV8825 will allow up to 1.5A of coil current with no heat sink and fan cooling and up to 2.2A with heat sink and fan cooling.

What is the maximum coil current spec of your motor? You can certainly run the motor at less than max coil current if it will give the required performance. Added benefit is that the motor and driver will run cooler and last longer.

It is imperative that you set the coil current limit before connecting the motor. With the A4998 driver you must know the value of Rs (current sense resistors) on your modules. They can be 0.068, 0.05 or 0.100 Ohms. Most Chinese clones that I have seen are 0.100 Ohms (marked R100).

A4988 shunt resistors

So, I dug around the net and found data for your motor and it sure looks like the coil current is 1A per coil so the A4988 is a good choice for a driver and should not need a heat sink or fan. But if you do keep it cooler with a heat sink and moving air, it will last longer.

image

A 12volt supply could be borderline for your 7.6 ohm stepper.
If you want torque at higher speed, then change to a 24volt supply.
Leo..

Thanks @groundFungus , yes I knew my motor is rated at 1A. I also operate it at a low duty cycle so it shouldn't get heated. I will purchase the A4988, thanks for the help :slight_smile:

@Wawa - Yes I know, unfortunately the project I'm working on has a weird 12V limit, but I am aware of the loss of torque/speed :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.