Question @ multiple steppers #32
-
Thank you so much for developing this and putting it up on github, it's really interesting to look at and helps those of us who normally have to rely on circuit python to run drivers -> and therefore needing to look for another library to run this great driver I wanted to ask you if you could help elaborate what are the limiting factors to running mulitple steppers simultaneously, and is there any possible work around you've considered? I understand there is only a single UART pair of pins on the pi GPIO so would a second UART pair of pins make the pi usable if that were somehow possible? Or is the limiting factor transmitting messages to two UART devices? I've never run a multi UART device otherwise in my experience with Arduino and CircuitPython. I think my plan as-is is to utilize an Arduino with the AccelStepper library and then just send serial commands over a movement API for the robot I'm building. I want to use the Raspberry Pi to make integrating a camera and running some inferencing easier and had initially planned on having it directly drive the motors for the wheels but given there doesn't seem to be a feasible way I will probably just solve this using a microcontrollers capable of communicating with the pi over serial. Thanks so much for your time and consideration, and again thanks for publishing this great library. It's really educational reading through it. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hello and thanks for the feedback, running multiple drivers/motors is possible depending on your plans. Please also have a look at: There are two things to consider: 1. UART-Interfacethis is described in chapter 4.3 UART Signals in the datasheet. 2. STEP/DIR-InterfaceTo accuractly position a driver/motor you need to use the STEP/DIR-Interface on the TMC2209. If you want to run multiple driver/motor, each driver needs to have their own STEP/DIR-Interface (2 GPIO-Pins) on the Raspberry Pi. The Problem here is to run the motors simultaneously. I hope this helps. If you have further questions feel free to ask ;) |
Beta Was this translation helpful? Give feedback.
-
Hey @Chr157i4n thanks so much for this answer, my apologies for not checking the Issues section of this library so thank you for restating some things. |
Beta Was this translation helpful? Give feedback.
-
in case a RPi is using multiple steppers, are multiple DIAG traces to separate GPIOs needed, or can one daisy-chained DIAG trace be used? |
Beta Was this translation helpful? Give feedback.
Hello and thanks for the feedback,
running multiple drivers/motors is possible depending on your plans.
Please also have a look at:
test_script_06_multiple_drivers.py
Can I use two TMC2209 with one Raspberry Pi board with this lib? #3
There are two things to consider:
1. UART-Interface
this is described in chapter 4.3 UART Signals in the datasheet.
if you have <= 4 drivers, you can use the built in addressing of the driver trough the MS1_ADDR0 and MS2_ADDR1 pins.
You can use this to communicate with up to 4 drivers via UART with only one UART Interface on the Raspberry Pi. This is also already implemented in this library.
If you have more drivers, you either need more UART-Interfaces or…