Open tomassasovsky opened 1 week ago
I would assume, this is not a sw issue. Could you please check the cable ? Especially ground connections are often cause of unexpected behaviors.
Very well might be. Do I need to add any capacitors, resistors, etc. to my circuit?
I do not know your setup. Do you have an oscilloscope or similar to check, that the steps are generated properly ? Or just start without FastAccelStepper and control the stepper with a loop, which contains just a toggle of step pin and a delay ?
I don't have an oscilloscope, no. Could you provide an example snippet for that?
Something like:
// As in StepperDemo for Motor 1 on ESP32
#define dirPinStepper 18
#define enablePinStepper 26
#define stepPinStepper 14
void setup() {
pinMode(dirPinStepper, OUTPUT);
pinMode(stepPinStepper, OUTPUT);
pinMode(enablePinStepper, OUTPUT);
digitalWrite(dirPinStepper, LOW);
digitalWrite(stepPinStepper, LOW);
digitalWrite(enablePinStepper, LOW);
}
void loop() {
digitalWrite(stepPinStepper, digitalRead(stepPinStepper) == LOW ? HIGH:LOW);
delay(50); // => one step in 2*50ms, so 10 steps/s
}
I tried your code with a delay of 1ms which is closer to the speed I need, and it's very noisy.
https://github.com/user-attachments/assets/1ffbf29e-eb48-4f73-a4be-34a9379bf9a6Thanks for sharing the video. If this low level code does not work, then something is wrong with the hardware.: Ground connection, assignment of dir/step/enable to the gpio, cable from stepper to stepper controller - especially the pin assignment, is the power supply strong enough, are the cables not too long, is the uC constantly rebooting….? Good luck in your endeavor
Hey there! I'm trying to make simple movements with the motor, having it just move at a constant speed. I'm facing an issue where the motor makes a stuttering sound, sorta sounds like a locomotive. The motion is not smooth at all, it's very interrupted.
Running this with a TMC2209 V2.0 and ESP32-WROOM-32.
I'm using the code from the example: