Stepper Drive Confusion

Hello,

Im very new to this so please excuse me for being a lemon.

Im trying to run a simple code (found online) on a stepper driver MKS TB67S109 yet dont understand what im doing wrong. The wiring diagram shows the enable function to the Uno but nothing in the code switches it on or off. i cant seem to find much info on the driver.

What am i doing wrong? I see on some videos, peeps dont connect this at all but im lost and cant get my head around what im doing wrong!!

Thank you…

run_stepper.ino (566 Bytes)

CONFIG.PNG

Images from Original Post so we don't have to download them. See this Simple Image Posting Guide

CONFIG.PNG

Code from Original Post so others don't have to download it. See How to use the forum

// Stepper motor run code with a4988 driver
// by Superb

const int stepPin = 3; // define pin for step
const int dirPin = 4;  // define pin for direction


void setup() {
  pinMode(stepPin,OUTPUT); 
  pinMode(dirPin,OUTPUT);

}

void loop() {
 digitalWrite(dirPin, HIGH); // set direction, HIGH for clockwise, LOW for anticlockwise
 
 for(int x = 0; x<200; x++) { // loop for 200 steps
  digitalWrite(stepPin,HIGH);
  delayMicroseconds(500);
  digitalWrite(stepPin,LOW); 
  delayMicroseconds(500);
 }
delay(1000); // delay for 1 second
 
}

...R

Please make a pencil drawing showing exactly how YOU have everything connected and post a photo of the drawing.

Try connecting ENABLE on the driver to either 5v or GND - one of them should work.

Try a much slower step rate to start with - perhaps 10 or 20 times slower.

My Googling for that driver got a lot of hits.

...R
Stepper Motor Basics
Simple Stepper Code

Hi, I managed to solve this. It was a bad connection after all the frustration. I did not need to enable to the driver so its just using the DIR and STEP connectors to run.

Thanks for the update. Good to hear you have a solution.

...R