Hello dear Forum!
i´m trying to drive a Nema 17HS15-1704S with a TMC 2209 - V1.2 silentstepstick driver connected to an ESP8266 Nodemcu v3. (the attached shematics say WeMos D1 mini because i could not find the ESP8266 shematic in Kicad)
I already fail at the really simple approach where i simply pull the "step_pin" HIGH and LOW to do single steps with the motor.
I connected the step_pin of the driver to the D4 Pin of the ESP 8266 wich is bound to the onboard LED so i really see if there is something happening at the pin.
The Problem is:
the motor does not turn.
I can feel and hear some kind of torque in the rythm of the led/Step_pin at the shaft if i touch it (when the code is running) but it definetly not moves.
The strange thing is:
when i upload code (via Arduino IDE - USB) to the ESP8266 the onboard LED blinks from time to time. Everytime the onboard LED (linked to the step_pin) is blinking during the upload process the shaft of the stepper motor IS doing a clean step.
When i connect the step input of the driver to the D3/GPIO0 of the ESP8266 which is according to this:
connected to the FLASH button its even turning pretty smooth during the upload process (i imaginge that this pin is going high low in a fast frequency during the upload prozess)
The ESP is powered by the usb port of my PC but shares common ground with the 12V power source for the stepper motor. (VM at the driver)
What i tried:
- 3 different ESP8266 Nodemcu v3 and a ESP32 Minikit V2.0 (the ESP32 didn´t show the behaiviour during the upload prozess)
- Different Power sources for the Motor 12V and 5V (atm its 12V with max 2A)
- 3 differet TMC2209 driver
- A Nema17 17HS08-1004S motor instead of the bigger one
- every pin on the ESP while the code is running
when i connect it to the S2,S1,SC Pin the motor is stuttering and turning in a strange way. Definetly not how it should. (Maybe there are some strange high and lows on that pins) - Measuring the HIGH and LOW of the D4 Pin (its 3.25V and 0V)
- Using a levelshifter to raise the HIGH to 5V (TMC should do both, 3.3V and 5V logic)
- supply TMC with 5V & 3.3V logic level (VDD)
- adjust the current with that tiny screw on the TMC2209 to different possible scre postitions
- different delays between HIGH & LOW from 1ms - 200ms
- Pull the EN Pin of the TMC2209 to LOW or HIGH (when its LOW/enabled the motor shaft is fixed and can´t be moved by hand anymore)
- all possible permutations of the Motor Inputs to the stepper driver outputs
Since the motor IS turning/stepping during the upload (but not in any other configuration i tried) i asume, that the wiring ist right.
I don´t know what i could try/is wrong
My code:
int step_Pin = 2; //GPIO2---D4 of Nodemcu--Step of step_Piner motor driver
int dir_Pin = 4; //GPIO4---D2 of Nodemcu--dir_Pinion of step_Piner motor driver
void setup() {
Serial.begin(115200);
delay(10);
pinMode(step_Pin, OUTPUT); //Step pin as output
pinMode(dir_Pin, OUTPUT); //Direcction pin as output
digitalWrite(step_Pin, LOW);
digitalWrite(dir_Pin, LOW);
}
void loop() {
Serial.println("right");
digitalWrite(dir_Pin, HIGH);
for(int i=1;i<=50;i++){
digitalWrite(step_Pin, LOW);
delay(50);
digitalWrite(step_Pin, HIGH);
delay(50);}
Serial.println("Done");
Serial.println("left");
digitalWrite(dir_Pin, LOW);
for(int i=1;i<=50;i++){
digitalWrite(step_Pin, HIGH);
delay(50);
digitalWrite(step_Pin, LOW);
delay(50);}
Serial.println("Done");
}
my Shematics:
this is my really first post and i´m hoping that the format is right and i gave sufficient information. Please be patient and thanks for your help
