Stepper Motor Holding Torque

Hello, I am rather new to arduino coding and stepper motors, so bear with me here.

I have an Arduino Uno hooked up to a Big Easy Driver which is then hooked up to my 68 oz.in stepper motor. I’ve managed to get it to rotate only for a set amount of revolutions and it’s great, but I cannot seem to make it hold. It is near impossible to stop the motor while it is turning (showing it does have a great amount of torque) but when it is “stopped” or on a delay() it seems very easy to turn the motor by hand. Is there any way to make the motor use it’s holding torque and just lock? I am guessing it has something to do with my code. I have attached it:

int Distance = 0;  // Record the number of steps we've taken

void setup() {                
 pinMode(8, OUTPUT);     
 pinMode(9, OUTPUT);
 digitalWrite(8, LOW);
 digitalWrite(9, LOW);
}

void loop() {
 digitalWrite(9, HIGH);
 delayMicroseconds(17);          
 digitalWrite(9, LOW); 
 delayMicroseconds(17);
 Distance = Distance + 1;   // record this step
 
 // Check to see if we are at the end of our move
 if (Distance == 7200)
 {
   Distance = 0;
   
   
   delay(1000000);
 } 
}

My setup is attached as well, although instead of the Easy Driver shown, I am using the Big Easy Driver. I have a 7.2 V rechargeable battery hooked up to the driver.

Thanks!

Please use the “</>” button to encapsulate your sketch.

What is the voltage rating of your stepper motor?

EDIT:
What is the voltage and amp rating of your power supply?
OK, I see that you are using a 7.2v battery.

When you have stopped turning, have your turned OFF all coils in the Stepper?
If you have then you will have no torque.

mrsummitville:
Please use the “</>” button to encapsulate your sketch.

What is the voltage rating of your stepper motor?
What is the voltage and amp rating of your power supply?

The motor, driver, and arduino are all meant to work with each other, as they are all in SparkFun’s guide.

The motor is rated for 3V.

The power supply is 7.2V (as i said above I think) and puts out i believe 3A.

The motor, driver, and arduino are all meant to work with each other, as they are all in SparkFun's guide.

The motor driver, motor, Arduino AND Stepper library are meant to work together. Why are you not using the Stepper library?

Measure the voltage at the pins while the delay() is happening. What is it?

Sending 30000 steps a second from standstill is rather ambitious - how much microstepping
are you using? Have you tried the AccelStepper library?

For a stepper motor to remain in position when stopped, you must leave it powered. With no power, it will turn fairly easily. How you do that depends on the exact driver you're using.

Regards,
Ray L.

PaulS:
The motor driver, motor, Arduino AND Stepper library are meant to work together. Why are you not using the Stepper library?

Measure the voltage at the pins while the delay() is happening. What is it?

Well, I tried using the Stepper library as well as many other setups with the driver, arduino, and motor. Maybe I can use it, I just don't really know how. How would that help?

Also, measure the voltage where? At the coil pins going into the driver? I'm not sure what you are referring to.

MarkT:
Sending 30000 steps a second from standstill is rather ambitious - how much microstepping
are you using? Have you tried the AccelStepper library?

30000? Where do you see that? Are you referring to the microsecond delay maybe? Idk haha

Also, yes I have tried the AccelStepper library. How would that help though? And when I did use it, it will vibrate while it accelerates and decelerates.

@InfiniBro, post a link to the datasheet for your stepper motor. Without that we are all flying blind. The important parameter is the current the motor requires - not the voltage.

What have you set the current limit on your BigEasydriver at?

There is a lot of background info in Stepper Motor Basics

You should also try this Simple Stepper Code for testing. It is very simple and does not need any library.

...R

Use the Stepper Library!

InfiniBro:
The motor is rated for 3V.

No, that kind of stepper is rated for current, not voltage. You would normally be
using a high voltage supply like 24 or 36V to get performance out of it.

30000? Where do you see that? Are you referring to the microsecond delay maybe? Idk haha

Of course - your code in loop() is running at about that rate. Or have you posted the wrong code?

You need the AccelStepper library, not the Stepper library to drive a step+direction stepper
driver, the Stepper library supports only unipolar and H-bridge drive, not step+direction. (Well
the version I have is like that, it might be out of date).

Robin2:
@InfiniBro, post a link to the datasheet for your stepper motor. Without that we are all flying blind. The important parameter is the current the motor requires - not the voltage.

What have you set the current limit on your BigEasydriver at?

There is a lot of background info in Stepper Motor Basics

You should also try this Simple Stepper Code for testing. It is very simple and does not need any library.

...R

Here is the link to the datasheet
This is the link to the product page for the motor: Stepper Motor - 68 oz.in

MarkT:
No, that kind of stepper is rated for current, not voltage. You would normally be
using a high voltage supply like 24 or 36V to get performance out of it.Of course - your code in loop() is running at about that rate. Or have you posted the wrong code?

You need the AccelStepper library, not the Stepper library to drive a step+direction stepper
driver, the Stepper library supports only unipolar and H-bridge drive, not step+direction. (Well
the version I have is like that, it might be out of date).

I believe it is 1.7A per phase. I didn't use any library and I am able to accurately control the steps and direction. I have found a way to make the motor hold it's torque for a second or two after it turns the given number of steps, but it does not hold.

InfiniBro:
I have found a way to make the motor hold it's torque for a second or two after it turns the given number of steps, but it does not hold.

That 1.7 amp motor is close to the limit for a BigEasydriver even with a heat sink and fan-cooling. I wonder if the problem is caused by the driver going into thermal shutdown when there is a constant current while the motor is stationary.

As a test reduce the allowed current to (say) 1 amp and see if the problem goes away. I do realize that this will not give full motor torque but it may help to isolate the cause of the problem.

...R

Robin2:
That 1.7 amp motor is close to the limit for a BigEasydriver even with a heat sink and fan-cooling. I wonder if the problem is caused by the driver going into thermal shutdown when there is a constant current while the motor is stationary.

As a test reduce the allowed current to (say) 1 amp and see if the problem goes away. I do realize that this will not give full motor torque but it may help to isolate the cause of the problem.

...R

Are you sure the reason it only holds the torque for a second is because of my code? I will try changing the pot on the driver to adjust the current.

InfiniBro:
Are you sure the reason it only holds the torque for a second is because of my code?

I never said it was ? ? ?

…R

Robin2:
I never said it was ? ? ?

...R

My bad I was just assuming. I tried changing the current and it seemed to handle it a little better. Thank you!

The Big Easy Driver has an Enable input, a Sleep input and a Reset input. Check if those are active high or active low and make sure you haven't disable the board. This will keep current going to the stepper coils even without stepping pulses being sent; that's your holding torque.

InfiniBro:
My bad I was just assuming.

Don't worry. If I had noticed a problem with the code I would have said so.

By the way just because I did not notice a problem does not mean the code is perfect - others are better at spotting problems quickly.

...R