1
\$\begingroup\$

I am trying to get high RPM output from my stepper motor, but no matter what I try I can't get it to spin more than 65,000 steps/sec.

I have tried many combinations of settings, drivers, power supply, accelerations, etc but the motor just won't go above 65000 steps/sec. It works fine at up to 65000 steps/sec but as soon as I increase like even by a 1000 steps/sec the motor just stalls (stops spinning and starts vibrating between single steps.) The motor also stalls at high microstepping but same steps/sec. That is even at low RPM it can’t take more than 65000 steps/sec.

I am sure that this is not an acceleration issue, because acceleration of even 100000 steps/sec^2 works fine when the maximum steps/sec is 65000 or below. But when maximum steps/sec is 66000 motor stalls even if the acceleration is 5000 steps/sec^2.

Also, I have checked the output of the waveform generated by the microcontroller. The oscilloscope shows a 5.4us of positive cycle. Stepper drivers are edge triggered. So, I can get stepping frequency of 150Hz.

Microcontroller used – Teensy3.6

Stepping library used – TeensyStep (https://luni64.github.io/TeensyStep/index)

The combination of stepper motor, drivers and setting are listed in the table below:

(Power source used for the following testing is 24V 3A)

Stepper motor used:

1.

  • IMPULSE IM86HS78-5504X-07J
  • Resistance/Phase: 1.16ohm
  • Inductance/Phase:6.8mH
  • Stepper Online 23HS45-4204S
  • Resistance/Phase: 0.9ohm
  • Inductance/Phase: 3.8mH

Driver & Current Settings:

  1. TB6600 (4.0A)

  2. DM542 (4.2A)

Microstepping:

  • 3200
  • 6400
  • 12800

With the above mentioned motor, driver and microstepping I have tried all the combinations and the maximum steps/sec achievable was 65000.

I have also tried DRV8825 and A4988 with couple of other motors also and with different power supply, but I still got the same result.

All the testing has been done at zero load.

Summarizing:

I just can’t get my stepper motor to go beyond 65000 steps/sec with different motors, drivers, settings combination where controller is Teensy3.6 and library TeensyStep.

also here's the code I used :

#include "TeensyStep.h"

Stepper motor(13, 11);
StepControl controller;

void setup() {
  Serial.begin(9600);
  
  motor.setMaxSpeed(66000);
  motor.setAcceleration(60000);  
}

void loop() {
  motor.setTargetRel(600000);
  controller.move(motor);
  delay(1000);

  motor.setTargetRel(-600000);
  controller.move(motor);
  delay(1000);
}

This program would make motor stall at any microstepping settings. But motor would not stall immediately, it would accelerate to approximately 65000setp/s and then immediately stalls.

\$\endgroup\$
4
  • 3
    \$\begingroup\$ The stepper is loosing torque at high RPM. Usually the 2.5kRPM is the usable limit of any stepper. Another aspect is the BEMF created and your supply voltage. Now find the torque VS speed characteristics of your stepper, add RPM units to the step/sec units, and write the supply voltage. \$\endgroup\$ – Marko Buršič Jun 2 at 20:07
  • 3
    \$\begingroup\$ 65000 is susplciously close to the maximum size of a 16 bit unsigned int: 65535. Perhaps you have a counter overflow problem? \$\endgroup\$ – Peter Bennett Jun 2 at 22:10
  • 1
    \$\begingroup\$ Since "the motor also stalls at high microstepping but same steps/sec. That is even at low RPM it can’t take more than 65000 steps/sec" I suspect something is wrong with your sketch (TeensyStep should be able to do up to 300'000 steps/sec on a T3.6). Can you add a minimal example showing the effect to your question? \$\endgroup\$ – luni64 Jun 4 at 13:19
  • \$\begingroup\$ @luni64 I have added the code on my question. I have read the TeensyStep documentations and had seen your videos too. I would love to see stepper motor go beyond even 200000steps/sec. (cause most driver has max. pulse limit). BUT the fact that the minimum positive pulse width is 5.6us, how can we even go more than 178.6kHz. The minimum it must take for a complete cycle will be 5.7us (approx.) which is 175.4kHz. How can we get more than that. Am I missing something? \$\endgroup\$ – Harsh Dobariya Jun 5 at 4:08
3
\$\begingroup\$

I have found the torque VS. speed chracteristics for one of your mototors.

You can see that using 36VDC supply and 4.1A per phase, this motor is usable until approx. 350 RPM. With lower voltage (24V) it's even less, approx 250 RPM. Speaking in pulses/sec for a number of 2000 microsteps per revolution, you see that at 40.000 pulses/sec it outputs very small torque. I guess that with 24VDC at 3200 microsteping and 65.000 pulse/s it stalls as you already discovered. So nothing wrong with your Teensy and your work.

enter image description here

\$\endgroup\$
2
\$\begingroup\$

Think about the inductance. You have a voltage of 24 volts, and voltage across the inductor is L*di/dt. So your peak phase current is reduced as you step more quickly. Your "no load" condition is actually loaded by the rotor's inertia, which must be accelerated from at rest to move to the next position before the next step arrives. If it doesn't get there, the rotor falls back and just vibrates. You must get adequate current, and your torque load is also increasing as the required acceleration increases to get you moving to reach the next position.

There are two means available to run a stepper faster. One is to apply a higher voltage (be sure to current limit). Steppers run in this fashion are prone to heating even with no load on the shaft because the acceleration and deceleration of the load requires energy.

The second approach is to use feedback and speed control to take advantage of the rotor's angular momentum. Many charts like the one supplied by @MarkoBursic which show a maximum stepper speed take advantage of the "sweet spot" at which little energy is lost between steps. This approach gives you higher speed, but at the cost of the added complexity. You also will have to accelerate and decelerate smoothly, adjusting your duty cycle to match the rotor speed.

Good luck!

\$\endgroup\$
1
\$\begingroup\$

Might be better to move this very specific library question/answer to the TeensyStep GitHub repo.

Anyway, I tested your code and didn't find any issues with it

66kHz:

enter image description here

Regarding your question in the comments about the minimal step pulse width: You can set it in the constructor of the controllers.

StepControl controller(1);

sets the pulse width to 1µs (minimum). Here a LA trace for 200kHz step frequency, acceleration = 400'000 steps/s^2 (T3.6 @240MHz, Step width 1µs)

enter image description here

However, this is quite borderline. Other interrupts might interfere in the pulse generation.

Regarding your stalling motors: Since you mentioned that the stalling does not depend on the actual motor speed but on the (micro) step frequency I assume something electrical. I recommend to consider/check the following:

  • The datasheet of your TB6600 states a max step frequency of 20kHz
  • I don't know if you are using the original DM542 from Leadshine or the stepper-online version. Here Driving step motors using microstep drivers with teensy 4 some information about this driver. Contrary to the Leadshine spec (200kHz) the shown driver uses EL817C optocoupler as input stage. The datasheet of those optocouplers states a rise/fall time of the output signal of 18µs (~28kHz).
  • Did you drive the TD6600 / DM542 with 5V? Output of the T3.6 is 3.3V. Best to use a 74HCT125/126 or a 74HCT245 etc.
  • You have the step output on pin13 (LED). Did you try to move it to another pin? Especially if you don't use a 3V3->5V shifter this might be problematic.
\$\endgroup\$
2
  • \$\begingroup\$ The data sheet of TB6600 I had was from Toshiba and it has chopping frequency of 60Hz. But the driver I had was Chinese make, so it might be the case. Also, I have tested my setup with both DM542 version (Chinese and Leadshine) but motor stalling at more than 65000steps/sec problem remains the same. On contrary the Leadshine setup with industrial controller can achieve aprox. 1550RPM on microstepping 3200 & 6400. But the similar setup with Teensy3.6 & TeensyStep library gets the motor stall at over 65000steps/sec at all microsteppings. \$\endgroup\$ – Harsh Dobariya Jun 6 at 9:35
  • \$\begingroup\$ I have directly connected 3.3V pin from Teensy to the drivers (though it requires minimum 5V input). I had this in mind but ignored it as I was getting very fine result from direct 3.3V pin below 65000steps/sec. But I will surely try converting 3.3V to 5V using appropriate components. Also, I am not sure if I have tried any other pins, I might have but I am not sure, but I’ll try it soon. Thanks for the help. \$\endgroup\$ – Harsh Dobariya Jun 6 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.