Stepper motors randomly start and stop

Hi, I am working on project using NEMA 17 steppers and TMC2209 drivers. As a start I have been getting familiar with the steppers and drivers and just getting them to turn at different speeds by manually sending HIGH and LOW pulses to the step pin.

I am having an issue where the motors start, run and stop, seemingly at random. Sometimes there is a delay before they start moving, I have been able to turn the shaft manually (no resistance) and then it seems to "click" and starts turning again.

I cannot figure out what is causing this and am looking for any advice. My best guesses so far are (a) the stepper I got off amazon was cheep and simply doesnt work very well, or (b) the driver may be overheating and shutting down to protect itself as it is quite hot to the touch.

This is my code as of right now:

constexpr uint8_t PIN_DIR {1};
constexpr uint8_t PIN_STEP {2};
constexpr uint8_t PIN_PDN1 {3};
constexpr uint8_t PIN_PDN2 {4};
constexpr uint8_t PIN_MS1 {5};
constexpr uint8_t PIN_MS2 {6};
constexpr uint8_t PIN_EN {7};
constexpr uint8_t PIN_LED {8};

unsigned long stepInterval = 1000;

void setup() {
  //set output pins from Teensy to TMC2209 driver
  pinMode(PIN_DIR, OUTPUT);
  pinMode(PIN_STEP, OUTPUT);
  pinMode(PIN_PDN1, OUTPUT);
  pinMode(PIN_PDN2, OUTPUT);
  pinMode(PIN_MS1, OUTPUT);
  pinMode(PIN_MS2, OUTPUT);
  pinMode(PIN_EN, OUTPUT);
  pinMode(PIN_LED, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);

}

void loop() {
  digitalWrite(PIN_PDN1, HIGH);
  digitalWrite(PIN_PDN2, HIGH);
  digitalWrite(PIN_MS1, LOW);
  digitalWrite(PIN_MS2, LOW);
  digitalWrite(PIN_EN, LOW);
  digitalWrite(PIN_DIR, HIGH);
  
  digitalWrite(PIN_STEP, HIGH);
  digitalWrite(LED_BUILTIN, HIGH);

  delayMicroseconds(stepInterval);

  digitalWrite(PIN_STEP, LOW);
  digitalWrite(LED_BUILTIN, LOW);

  delayMicroseconds(stepInterval);
}

How are you powering your project?

Two topics, same subject

Two topics, same subject

Whoops the other one said it was removed for spam so I made it again and removed the links. Just deleted the previous post, thank you.

Hi, @confused_but_eager
What model Arduino controller are you using?

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.

Please not a Fritzy cut and paste image.

constexpr uint8_t PIN_DIR {1};
constexpr uint8_t PIN_STEP {2};

If you are using pins 1 and 2, they are also the programming pins and IDE monitor pins.

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

How are you powering your project?

I have an old charger, its 12v and 2.5a max, which is a little overvolted for the steppers but the current is capped in the driver.

@TomGeorge
I am using the Teensy 4.1 controller

This is my circuit, apologies if labeling isnt the best I can redraw clearer if need be.

Using these NEMA 17 steppers

These TMC2209 drivers

Power supply is an old charger I had laying around, its output is 12v 2.5a.

This is the Teensy 4.1 pin layout.

Not at all. 24V and 36V motor power supplies are common, and more efficient. Make sure that you have set the current limit on the driver to 1A per winding or less.

@jremington I have Vref set to 0.83, which should give me 0.9A limit as per this resource suggests using the formula, with Rsense of 100 mohms:

image

Hi,
Stepper Specs.

17HS3401

Tom... :smiley: :+1: :coffee: :australia:

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