Linear guide rail jamming problems

Hi -
Looking for some feedback from folks. I'm using AccelStepper with a Nano clone to work with some linear guides. I want to emphasize, these linear guides were going to go in the garbage at work, and I took them home because they looked to be in good shape, but I don't know all their history etc. It's possible they got thrown around while in storage.

Here are two videos, in both videos you can see the stepper motor start turning and then something gets jammed. I'm not too experienced in working with these, but I brought them home to learn so here I am.

If I lower the speed from 4000 to 2000, here is a video where it doesn't outright jam but you can hear it clicking as i moves between two positions:

My feeling is it isn't the stepper itself, but wondering what others think. Here is my code:

Briefly - the code moves the cart/platform back and forth between the 0 position and the 15000 steps position. The stepper motor driver is the DM542 configured with 400 pulse/rev.

Curious to hear what others think. Do I need to disassemble the cart and clean/replace the bearings?

#include <AccelStepper.h>
#include <elapsedMillis.h>

//Defining pins
int Stepper1Pulse = 5;  // Pulse or step pin
int Stepper1Direction = 6;  // Direction pin

int speedmax = 4000;  //pulses per second

AccelStepper step1(1, Stepper1Pulse, Stepper1Direction);

elapsedMillis printTime;
long pos = 15000;

void setup() {               
  Serial.begin(9600);

  pinMode(Stepper1Pulse, OUTPUT);
  pinMode(Stepper1Direction, OUTPUT);

  digitalWrite(Stepper1Pulse, LOW);
  digitalWrite(Stepper1Direction, LOW);

  int pulses = calc_steps_for_distance(10);
  step1.setMaxSpeed (speedmax);
  step1.setAcceleration(2000);
  step1.moveTo(pos);
}

void loop() {
  
  if (printTime > 500) {
    printTime = 0;
    float mSpeed = step1.speed();
    int mDir = digitalRead(Stepper1Direction);

    Serial.print(mDir);
    Serial.print("   ");
    Serial.print(mSpeed);
    Serial.print("   ");
    Serial.println(step1.currentPosition());
  }



  if (step1.distanceToGo() == 0){

    if (step1.currentPosition() == pos){
        step1.moveTo(0);
    }
    else if (step1.currentPosition() == 0){
      step1.moveTo(pos);
    }
  }

  step1.run();

}

Reduce the speed/acceleration for the first videos. That is the sound steppers make if you drive them too fast.

Raise the baud to 115200 to fix the third video problem.

Sounds like the stepper shaft coupler is slipping when the rider jams.

You might have to take apart the (ball screw?) rider and clean it, or at least check for damage. Check for damaged threads on the rod, as well.

+1 to substantially reduce the stepper speed while testing.

@DaveX The motor spec (https://www.amazon.com/FUYU-Actuator-Motorized-Stepper-50-1000mm/dp/B07CYT75HZ?th=1) says it can run at 1200 RPM. At 400 pulse/rev, I take that to mean I can run it at 8000 steps/sec. Is my calculation incorrect?

Could you elaborate a bit on what increasing the baud rate would do? I did raise it at your suggestion, but it had no effect.

@jremington Reasonably speaking, how fast should I expect to be able to run the stepper? Is running at 4000 steps/sec not reasonable?

For testing, 10 to 100 steps/second is reasonable.

You may actually be inflicting additional damage on that expensive linear actuator mechanism. That is, if it is not already so trashed as to be worthless.

I would remove the screw and run the trolly along the bearing by hand, force it Clockwise then CCW then up then down. See if it binds somewhere.
Are there adjustments in the trolly?

Got it, ok I lowered it to 100, then increased it to 500 steps/sec. Around 500 I start to hear a little bit knocking like in the 3rd video. I can't quite figure though, is that knocking noise coming from the stepper or from the ball screw?

Sounds like a resonance phenomenon that depends on motor speed. Continued operation in the presence of excessive vibration may damage the system.

I would very closely examine the lead screws, the second video seems to have a slight imperfection on one thread near where the jam occurs. Turn it manually by hand and see if you can find exactly where the problem occurs.

From AccelStepper.h:

/// \par Performance
/// The fastest motor speed that can be reliably supported is about 4000 steps per
/// second at a clock frequency of 16 MHz on Arduino such as Uno etc.

Hi, @curiousgeorge123

How are you powering the stepper and what driver?

Have you got a current limit on the driver?
If so is it setup correctly?

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

For this assembly you need at least 36V, better 60V, otherwise you won't never get anywhere.

The max speed can depend greatly on loading, power and acceleration. If you accelerate the signals faster than the motor can physically keep up, they get out of step and you start losing steps. If you underpower it, it is hard for the motor to accelerate. If you overload it it also makes it hard to accelerate. If you disconnect the motor from the loading, does the motor make it to your full 8000 steps/sec? (4000 steps/sec on an Uno/Nano?)

Your code prints a line of text every 500ms, which seems a similar period to period of the ticks on the video. If the serial reporting at the relatively slow 9600baud is causing a periodic pause, increasing the baud rate could reduce the pause. Maybe before fiddling with the baud rate, I should have suggested checking if the printing is actually causing the pause by changing the period between printing or disabling it.

Totally overlooked this. Most likely your steppers will work just fine when you remove these lines - or better use MoBaTools instead of AccelStepper.

Hi @zwieblum,
The stepper driver is 20V to 50V, so my assumption is that with a good enough power supply it will drive the current I need as long as my voltage is in that range. What makes you say I need atleast 36V? I do agree, the symptom does seem to be under current but I'm not sure how to get it more current. The benchtop power supply is set to supply 2A, but the stepper is only drawing .3-.5A in the video (this can be seen in the power draw on the benchtop supply in the videos).

@TopGeorge
I have set the limit on the driver to be "full current". Here's a pic I did really quickly this morning before heading to work.

@DaveX I removed the stepper from the rail, here is a video of the stepper running at 4000 steps/s and not moving smoothly:

I'll try this when I get home tonight.

Still skeptical this is the issue, as it doesn't quite seem to be an issue at the lower speeds or accelerations, however thanks for point this out as a potential culprit. Will report back in the evening.

Remove the Serial.XXX lines, they do bad things when you do not have a decent way (aka library) to do the step generation in parallel.

That video shows that it isn't the guide rail jamming up.

That's a bad assumption. The stepper drivers limit average current with a PWM chopper, but can take a high voltage to deliver high torque at high speeds. Set your driver switches to limit to 2A and crank up the voltage on your bench supply. You'll see your 20.00V & 0.5A current go proportionally down as the supply voltage goes up while the driver's chopper kicks in, and the top speeds increase.

At 4000 steps/sec there's only 0.25ms/step to deliver the energy needed to torque the motor. The driver needs higher voltages to deliver the energy to the motor.

Per your sales spec link:

...it really doesn't say much about the motor specifications.