k3ng / k3ng_rotator_controller

K3NG Arduino Amateur Radio Rotator Controller
http://blog.radioartisan.com/yaesu-rotator-computer-serial-interface/
GNU General Public License v3.0
169 stars 122 forks source link

Support for TMC2209 / TMC 5160 spi / uart mode drivers #104

Open jrsphoto opened 1 year ago

jrsphoto commented 1 year ago

Hey Ron,

Any chance you could look into the TMC22xx and TMC5160 stepper driver support? These new TMC drivers are so much more flexible than the old DRV8825 or A4988 drivers. There are a lot of really great TMC stepper motor drivers available with the added benefit of being able to support higher current motors and SPI control. Probably the two most popular are the TMC2209, and its brother, the TMC5160. These two drivers are similar, but the TMC5160 can support more powerful (in terms of current) stepper motors. And there is a single Arduino library to support the main ones

Minimally, for SPI / UART support, you only need one UART TX port from Arduino. This allows you to send commands to one or more TMC motor drivers at different addresses. If you want to read the status and other data, you would also need an RX pin from the Arduino but in this post , the post author mentions that you only really need the RX pin for Stallguard, which I don't think has any application in the rotator.

For libraries, I'd look at this one: https://github.com/teemuatlut/TMCStepper - this library supports all the most recent TMC stepper drivers. It's the same driver used in the link I posted above.

-John