Skip to content
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

Arduino Due - examples don’t work #51

Open
Sommjo11 opened this issue Jan 8, 2024 · 8 comments
Open

Arduino Due - examples don’t work #51

Sommjo11 opened this issue Jan 8, 2024 · 8 comments

Comments

@Sommjo11
Copy link

Sommjo11 commented Jan 8, 2024

After loading TestCommunication on Arduino Due the script does not compile.

SoftwareSerial.h missing.

if I modify the .h file at line 13 to force SOFTWARE_SERIAL_IMPLEMENTED to false the software compiles but nothing is printed to screen.

The processor hangs during setup.

Any tips on how to workaround would be much appreciated .

@peterpolidoro
Copy link
Member

Interesting. I will add Arduino Due to the list of boards that do not have Software Serial.

Have you tried any other examples? I am seeing some warnings about "constrain" when I use an older Arduino IDE, but I do not know if that could cause the processor to hang up. Which version of the IDE are you using?

@peterpolidoro
Copy link
Member

I created a new version, 9.0.9, which adds Arduino Due to the list of boards without Software Serial and I also created a function to replace constrain to fix compiler warnings. These changes will probably not fix your issue, but can you try the new version and see what happens with several examples? Thanks!

@Sommjo11
Copy link
Author

Sommjo11 commented Jan 9, 2024 via email

@Schweyher
Copy link

Hello Peter,

I am trying to set up TMC2209 on Arduino DUE.
Therefore I have chosen Bidirectional Communication examples and found that the Arduino DUE freezes after:
stepper_driver.setup(serial_stream);
is put into the code - control LED is not blinking, Serial Monitor has no communication.
I have also tried the other setup examples, which do not work.

Is there any solution to run multiple TMC2209 on the Arduino DUE hardware?

Kind Regards
Holger Schweyher

@peterpolidoro
Copy link
Member

peterpolidoro commented Jul 15, 2024 via email

@Schweyher
Copy link

Hello Peter,

I am using: 3D Printer Accessories TMC2209 V4.0 Quiet Stepping Motor Driver 5.5-28V, purchased on Ebay.
The Arduino Due was in my stock and could be of Chinese origin.
The wiring is okay, I think the problem is in the UART communication during setup.

I have put a LED blinking command and text into the code to check the functionality visually and in the Serial Monitor.
It works until the command: stepper_driver.setup(serial_stream); is put into the code, thereafter the LED stays on and no message on the Serial Monitor.

Can you recommend another TMC2209 breakout board, which usually works?

Kind Regards
Holger Schweyher

@peterpolidoro
Copy link
Member

There may be some issue with the Due. Do you have another board you can try like a Teensy or Raspberry Pi Pico? There are several TMC2209 breakout boards. I do not know how big your motor is, but the SilentStepStick may work for you.

@ThorsAvenger
Copy link

I have a Due as well, and have the same issues. I think the problem lies within the constructor for the Serial object. The controller freezes during setup if you try to pass the HardwareSerial &Serial object, but it will continue if you create the serial object first using Serial.begin(BAUD_RATE); and then pas the Serial object in the setup. (In my case I use Serial1)

Then the driver will communicate, but won't be able to properly setup. getSettings() gives back 1 on communication but 0 on setup. Hope this sheds some light on the situation, I don't really know how to fix it from here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants