Welcome! Log In Create A New Profile

Advanced

Need Help: Choosing the rigth stepper driver (tmc) for a low cost 32-bit board design

Posted by DocRaptor 
Need Help: Choosing the rigth stepper driver (tmc) for a low cost 32-bit board design
February 17, 2020 08:56AM
Hi everyone,
I am designing a low cost 32-bit board. It will have the atsam3x8e to be programmable with the arduino IDE without the need of "plugins" unlike the stm32f103. It also should be usable with the marlin-firmware and the reprapfirmware. It will have four stepper driver on board (should be expandable to three more to run potentially an idex corexy printer). Now there is a problem. I want to use the stepper driver from trinamic, but I don't know witch one. 2160 and 5160 are out, they need external mosfets. This is not bad for big steppers, but extra mosfets cost extra and need extra space on the board. The 2130 is not compatible with the reprapfirmware, so it is out. That leaves the 2208, 2209, 2224 and 2660. The 2660 use spi, but it doesn't has stealthcop. The Ohters have steahlchop. The 2660 and 2009 have stallguard. The 2208, 2209 and 2224 uses UART. So the Choice is between the 2660 and 2209. On the 2209 four can run on one UART-Channel like in a bus. What I heard Marlin support it (Uart Bus style), but does it also the reprapfirmware support this style. What I saw it uses multiplexing. If they both support the "uart bus", it will need a second uart for the extra stepper, when more than four stepper are in the system. How to configure the frimwares? Or is there something like the 2209 with spi out there supported by both firmwares? Do you have any tips?

Edited 1 time(s). Last edit at 02/17/2020 12:03PM by DocRaptor.
Re: Need Help: Choosing the rigth stepper driver (tmc) for a low cost 32-bit board design
February 17, 2020 01:00PM
Quote
DocRaptor
Hi everyone,
I am designing a low cost 32-bit board. It will have the atsam3x8e

"low cost" and "atsam3x8e" are mutually incompatible. There are better chips than the atsam3x8e at much lower prices available now, for example atsam4e series (with Ethernet) and atsam4s series (no Ethernet). Also the newer atsame51 (Ethernet) and atsamd51 (no Ethernet), but they don't have the built-in bootloader that makes uploading to the same3x/4e/4s so easy.

Quote
DocRaptor
to be programmable with the arduino IDE..

Arduino is great for novices learn how to program microcontrollers, but it is an awful IDE for developing anything complicated like 3D printer firmware. Even Marlin has moved on now (to Platform I/O and Visual Studio Code).

Quote
DocRaptor
I want to use the stepper driver from trinamic, but I don't know witch one. 2160 and 5160 are out, they need external mosfets. This is not bad for big steppers, but extra mosfets cost extra and need extra space on the board. The 2130 is not compatible with the reprapfirmware, so it is out.

The TMC5160 driver in RRF could be adapted to drive the TMC2130. However, TMC2209 is much better value than the TMC2130. If it supported SPI, it would be perfect in most respects.

Quote
DocRaptor
That leaves the 2208, 2209, 2224 and 2660. The 2660 use spi, but it doesn't has stealthcop. The Ohters have steahlchop. The 2660 and 2009 have stallguard. The 2208, 2209 and 2224 uses UART. So the Choice is between the 2660 and 2209. On the 2209 four can run on one UART-Channel like in a bus. What I heard Marlin support it (Uart Bus style), but does it also the reprapfirmware support this style. What I saw it uses multiplexing. If they both support the "uart bus", it will need a second uart for the extra stepper, when more than four stepper are in the system. How to configure the frimwares? Or is there something like the 2209 with spi out there supported by both firmwares? Do you have any tips?

RRF could be adapted fairly easily to support four TMC2209 drivers on a bus. But if you want to support more than 4 drivers, then why not use TMC2209 and a multiplexer, like we do on the Duet Maestro with up to 7 TMC2208 drivers? I'm sure Marlin could be adapted easily to support this style.

HTH David

Edited 1 time(s). Last edit at 02/17/2020 01:01PM by dc42.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Need Help: Choosing the rigth stepper driver (tmc) for a low cost 32-bit board design
February 18, 2020 08:06AM
@DocRaptor,
I am also working on something similar. Quite agree with dc42 about the MCUs, for multi firmware support: atsamd51 is supported by Marlin, Repetier, Kilipper. If you do not need RRF support probably there are other options like STM32F407. STM32H750 looks quite promising and inexpensive solution, but the Marlin firmware support seems in development.

TMC2208/9 can be used with single wire software UART look at:

- [Marlin] TMC2208 UART on BigTreeTech/BIQU SKR V1.1 and V1.3 Controllers
- [Marlin] Initial TMC2208 support #6345
- [Klipper] Support TMC2208 configuration at runtime via UART #542

@dc42, Noticed some comments that RRF is missing some features for CNC operations. Would you say that Marlin might be better choice for CNC ? Also, does RRF support mixed stepper motor drivers ? For example 3xTMC2660+4xLV8729 or TMC2209 ?

Edited 1 time(s). Last edit at 02/18/2020 10:24AM by Dev00.
Re: Need Help: Choosing the rigth stepper driver (tmc) for a low cost 32-bit board design
February 18, 2020 02:18PM
Quote
Dev00
@DocRaptor,
I am also working on something similar. Quite agree with dc42 about the MCUs, for multi firmware support: atsamd51 is supported by Marlin, Repetier, Kilipper. If you do not need RRF support probably there are other options like STM32F407. STM32H750 looks quite promising and inexpensive solution, but the Marlin firmware support seems in development.

TMC2208/9 can be used with single wire software UART look at:

- [Marlin] TMC2208 UART on BigTreeTech/BIQU SKR V1.1 and V1.3 Controllers
- [Marlin] Initial TMC2208 support #6345
- [Klipper] Support TMC2208 configuration at runtime via UART #542

@dc42, Noticed some comments that RRF is missing some features for CNC operations. Would you say that Marlin might be better choice for CNC ? Also, does RRF support mixed stepper motor drivers ? For example 3xTMC2660+4xLV8729 or TMC2209 ?

I think you'll find that the CNC support in RRF is more advanced than in Marlin, but perhaps not as advanced as in Smoothieware.

RRF supports a mixture of smart (i.e. SPI or UART controlled drivers) and dumb (step/direction/enable) drivers, but currently only one type of smart driver support can be compiled into a single binary. So you couldn't support a mixture of TMC2660 and TMC2209.



Large delta printer [miscsolutions.wordpress.com], Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
If ReprapFirmware would run on stm32 mcu's I would choose the stm32f103 or stm103f407. But it need to be ported. With the Arduino IDE the guys at Arduino know the IDE is not suited for big projects. Thats why they develop a new IDE (https://blog.arduino.cc/2019/10/18/arduino-pro-ide-alpha-preview-with-advanced-features/). But the nice thing about the Arduino IDE is that it's simple and "powerfull" enough for modifing and updating the firmware for the 3D-printer and that is sometimes needed (And for boards based on the atmega2560 or atsam3x8e doesn't need any seting up in the IDE ["idiot proof"], so less mistake in setting up [or needing to setting everythink up everytime I start the IDE because it deleted everything {thanks code::blocks on my t60}]). There are still 3d-printer for sale with Marlin 1.0.0 (and deactivated thermal run away protection). But developing the firmware itself I agree Arduino is not the best.

Edited 1 time(s). Last edit at 02/18/2020 04:05PM by DocRaptor.
Just a thought... if you're making the board expandable to allow 3 extra stepper motors to be controlled, make those extras plug-in stepper drivers. In which case, choose the embedded drivers to be the same as something that's currently available. I don't know whether that narrows down your selection or not.
Sorry, only registered users may post in this forum.

Click here to login