You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all,
I've been trying to connect a stepper motor driver to a Nema 17 and a Wemos D1 (ESP8266) for several days now.
I now have a sketch where the motor turns and is also very very quiet. (not audible).
The motor draws 400mA at 12V and gets very very warm.
Can anyone help me with this? Why does the motor get so warm?
On my 3D printer, for example, it stays completely cold. :/
#defineEN_PIN13
#defineDIR_PIN0
#defineSTEP_PIN2
#defineCS_PIN5
#defineMOSI_PIN12
#defineMISO_PIN4
#defineSCK_PIN14bool dir = true;
#include<TMC2130Stepper.h>
TMC2130Stepper driver = TMC2130Stepper(EN_PIN, DIR_PIN, STEP_PIN, CS_PIN, MOSI_PIN, MISO_PIN, SCK_PIN);
voidsetup() {
Serial.begin(9600);
while (!Serial);
Serial.println("Start...");
driver.begin(); // Initiate pins and registeries
driver.rms_current(300); // Set stepper current to 600mA. The command is the same as command TMC2130.setCurrent(600, 0.11, 0.5);
driver.stealthChop(1); // Enable extremely quiet stepping
driver.microsteps(32);
driver.chopper_mode(1);
driver.random_off_time(1);
digitalWrite(EN_PIN, LOW);
Serial.print("DRV_STATUS=0b");
Serial.println(driver.DRV_STATUS(), BIN);
}
voidloop() {
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(150);
digitalWrite(STEP_PIN, LOW);
delayMicroseconds(150);
uint32_t ms = millis();
staticuint32_t last_time = 0;
if ((ms - last_time) > 10000) {
if (dir) {
Serial.println("Dir -> 0");
driver.shaft_dir(0);
} else {
Serial.println("Dir -> 1");
driver.shaft_dir(1);
}
dir = !dir;
last_time = ms;
}
}
The text was updated successfully, but these errors were encountered:
Hello all,
I've been trying to connect a stepper motor driver to a Nema 17 and a Wemos D1 (ESP8266) for several days now.
I now have a sketch where the motor turns and is also very very quiet. (not audible).
The motor draws 400mA at 12V and gets very very warm.
Can anyone help me with this? Why does the motor get so warm?
On my 3D printer, for example, it stays completely cold. :/
The text was updated successfully, but these errors were encountered: