Closing the loop w/ integrated TMC5160 drivers on Duet 3
-
TL;DR: Does the Duet3d Duet 3 Mainboard break out the ENCA, ENCB, and ENCN pins of the integrated TMC5160 drivers?
Thanks in advance for the input!
Context/Long version:
I was checking the hardware overview and wiring diagram for the "Duet 3 Mainboard 6HC " and have not been able to find break-outs for the ENCA, ENCB, and ENCN pins present on the TMC5160.
More specifically, I'm referring to pins 23, 24 and 25 on TMC5160-TA, and pins 23, 24 and 26 on TMC5160-WA.
Detailed in the "TMC5160 DATASHEET(Rev. 1.10/ 2019-FEB-05)" present on the driver's manufacturer's website, page 106, the section titled "20ABN Incremental Encoder Interface" talks about how one can use a 32-bit encoder along with standard stepper motors in a hybrid setup similar to a servo.
I'm aware that these drivers have a feature called StallGuard2 that provides load feedback/sensing (potentially using back emf from the third/unused phase during a step), my question is not in regards to this load detection. I'm interested in upgrading my printer, and currently considering the motherboard with integrated TMC5160s, or to go with a different board for which I'd provide my own TMC5160s.
-
There has been talk of using encoder inputs at a later time but I'm not sure thats part of the driver as that feature has previously only been meant for running at a fixed speed like a regular dc motor, and not like a stepper for closed loop positioning. (mind you I haven't studied the 5160 datasheet in detail)
-
I see, in this case I believe the closed-loop stepper is the intended function of this feature. Specifically, section 20.3 titled "Closing the Loop" (page 108 of the pdf linked on the op), I added the text below for ease of reference.
Depending on the application, an encoder can be used for different purposes. Medical applications often require an additional and independent monitoring to detect hard or soft failure. Upon failure, the machine can be stopped and restarted manually. Use ENC_DEVIATION setting and interrupt to safely detect a step loss failure / mismatch between motor and encoder.
Less critical applications may use the encoder to detect failure, stop the motors upon step loss and restartautomatically. A different use of the encoder allows increased positioning precision by positioning directly to encoder positions. The application can modify target positions based on the deviation, or even regularly update the actual position with the encoder position. -
Still think any future encoder support will be handled by the Duet and not the TMC driver, as the motion planner would have to coordinate all axes step by step, and getting a flag for a lost step after the fact wouldn't be the same as having the next step pending until the current position is reached if that make sense?
In any case the encoder pins are not broken out on the current main board, prototype or production version afaik. the add on board should be the same. the production version will use drivers with exposed pins so you could technically solder to the pins you need, but you'll also need to adapt the firmware to make use of the encoder.
-
@slashfoo no not at this point. There are issues with how this would work in a 3d printer. When we close the loop it will be at a system level.