Heeyheeyho,
I have a problem, first of I am a newbie to programming and electronics with MCU, so some questions might have been answered in other topics but I didn't understand the answer. I might also have placed this topic in the wrong Category, but it seemed the one to fit best.
The other problem is that my Nema 23 Stepper Motor only jerks instead of driving, making a clicking noise.
Specs of the setup:
Stepper motor: Nema23 Stepper motor 23HS8430 Stepper Motor 3.0A 76mm 1,9Nm
Stepper motor driver: TB6600 Stepper Motor Driver SKU: DRI0043
Power source: 36V 3A
MCU: WeMos D1 MINI - ESP8266 ESP12 NodeMcu
The program I have been running is:
int PUL=14; //define Pulse pin D5
int DIR=12; //define Direction pin D6
int ENA=13; //define Enable Pin D7
void setup() {
pinMode (PUL, OUTPUT);
pinMode (DIR, OUTPUT);
pinMode (ENA, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, LOW);
for (int i=0; i<32000; i++) //Forward 5000 steps
{
digitalWrite(DIR,LOW);
digitalWrite(ENA,HIGH);
digitalWrite(PUL,HIGH);
delayMicroseconds(50);
digitalWrite(PUL,LOW);
delayMicroseconds(50);
yield();
}
digitalWrite(LED_BUILTIN, HIGH);
for (int i=0; i<32000; i++) //Backward 5000 steps
{
digitalWrite(DIR,HIGH);
digitalWrite(ENA,HIGH);
digitalWrite(PUL,HIGH);
delayMicroseconds(50);
digitalWrite(PUL,LOW);
delayMicroseconds(50);
yield();
}
}
The circuit diagram is the same as it is on this website and also conected like it says,triple checked TB6600_Stepper_Motor_Driver_SKU__DRI0043-DFRobot
I did find out, that the pins of the Wemos MCU are named differently from the Arduino Pins, so thats why the programm says Pin 14; Pin 13 and Pin 12
Thanks beforehand for the answers