Advanced Search

Search Results (Searched for: )

  • 3404gerber
  • 3404gerber
01 Feb 2025 15:46 - 06 Feb 2025 17:38

Anyone figured out how to get Trinamic's TMC5160 drivers working with LinuxCNC?

Category: Driver Boards

I did some tests and ended up with a working comp. All it does is sending the registers to the drivers and then taking a velocity command as input and giving a position feedback as output. For now the settings are set by defining registers values as parameters, which isn't the easiest way to do it. It would probably not be too difficult to code a GUI to change the registers values according to more "readable" parameters. The comp also uses the bcm2835 library, which isn't compatible with RPI5 as far as I know. I'd like to change the code to directly write to spidev one day.

Here is a short video showing 3 motors moving: Link to youtube video
Edit: added a second video with physical axis attached to the drivers: Link to youtube video

The 4 drivers are connected in daisy chained mode and communicate with the Pi at 3.125MHz. All the read, write and PID stuff is done in the servo thread set at 1ms. Just using 4 pins for SPI and 1 as enable, there are plenty left for the other functions.

But there is more to explore; the TMC5160 has an encoder input and rather than reading the internal step counter, one could read the encoder counter as position feedback. There are also reference inputs that can be used directly on the board, and the possibility to do sensorless homing. A 50$ RPi, a couple of 15$ stepper driver and some cheap 3.3V->24V level shifter; could become a interesting poor man's closed-loop-stepper CNC controller.
Displaying 19711 - 19711 out of 19711 results.
Time to create page: 0.328 seconds
Powered by Kunena Forum