-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMC2209 configuration on start #204
Comments
Your first priority should be establishing working communication. You can start with something simpler like this. #include <TMCStepper.h>
// SW Serial so we can debug the responses
TMC2209Stepper driverX(2, 3, 0.11, 0b00);
TMC2209Stepper driverY(2, 3, 0.11, 0b10);
void setup() {
Serial.begin(115200);
driverX.begin();
driverY.begin();
}
void loop() {
auto versionX = driverX.version();
auto versionY = driverY.version();
if (versionX != 0x21) {
Serial.println("Driver X communication issue");
}
if (versionY != 0x21) {
Serial.println("Driver Y communication issue");
}
delay(2000);
} |
You are absolutely right of course. I uploaded your code and the communication seems fine - reports no errors. |
If your communication works fine, then you can monitor the stallguard values and determine the proper thresholds. |
Thanks for your work on this library! I've encountered similar issues as described here but the solution hasn't worked for me. I'm using an Adafruit HUZZAH32 for my microcontroller and want use the StallGuard feature. Here are the pinouts for the HUZZAH: And for the TMC2209: And here is how my circuit is actually wired up: I'm trying to use UART as shown above. Finally here is the code I'm running:
I can't see where I deviate from the solution described above and am starting to feel pretty stuck on this one. When I do the version check I get the error message, and SG_RESULT just prints 0. |
same problem, same error with the driver not even connect |
Something to try that worked for me: I swapped the pin which is directly connected to the uart pin, the data sheet for my step stick showed it connected to Tx but it worked when I connected it to Rx with the 1k resistor to Tx. Weirdly I could set microsteps and current but couldn't read the SG_RESULT before the pin swap. |
I still have the problem :/ |
Hi teemuatlut, you did a great job with this library!
I am having a little problem that I can't solve with your documentation (certainly because I am not much of a programmer)
I want to swap old A4988 drivers with TMC2209s and because the board that the drivers go in can't do it I want to cofigure them via UART externally. I have them connected pretty much like this but on the second (Y) driver the MS2 pin is pulled high.
And I want to set current for both of the drivers and also configure the Stallguard to be used as a homing feature.
I tried adjusting your example code but it doesn't seem to be working.
Can you please give me a hand on this? Also I am using arduino nano.
(Code)
(END of code)
Thanks a lot!
Tomas
The text was updated successfully, but these errors were encountered: