Closed loop duet.
-
Hello everyone ! I've read a lot of posts about closed loop duet on here and i think i might be ready to take this route, i have a couple of technical questions.
- is the duet using uart to talk to the on-board tmcs or is it only step/dir ?
- can i use a tmc5160 breakout board like the one from bigtechtree as an external driver ?
- will this stepper encoder already integrated on the stepper work with before mentioned driver ? since it has 4 encoder wires but the stepper encoder has 4 two positives and two negatives can i jump the negatives together ?
driver link : https://fr.aliexpress.com/item/32958721863.html?spm=a2g0o.detail.1000014.27.b8ad1ad4fl1CZF&gps-id=pcDetailBottomMoreOtherSeller&scm=1007.13338.128125.0&scm_id=1007.13338.128125.0&scm-url=1007.13338.128125.0&pvid=ed811afe-951f-4237-b275-e9f85519f8f0
stepper link : https://fr.aliexpress.com/item/4000261255937.html?spm=a2g0o.cart.0.0.2fdc3c00ZA5OoU&mp=1
Thanks a bunch !
-
Do you intend to close the loop "at the motor"? Or all the way back to Duet/RepRap firmware?
As far as I know, the second is not a realistic choice. Therefore, looking at the first, you can attempt to build your own motor / encoder / controller that never skips a step because it is closed loop 'at the motor'. Or, you can just buy a servo. Which is your intent?
-
Oh, and I am 99% certain that Duet/RepRap uses SPI to configure the TMCxxxx driver, and step/dir pins to move it once it is configured.
-
@Danal said in Closed loop duet.:
99% certain that Duet/RepRap uses SPI
if you make that "serial interface" you'll be at 100% and future proof for any potential 2209 or similar
-
i'm closing the loop at motors so the duet only gives the command to move to the external driver and they manage the loop, can i connect the new tmc5160 to the duet spi and configure them from there ? or would it be easier to connect the to an arduino to configure them ? and to they save the settings or do they have to be configured every time they're turned on ? thanks !
-
The Duet Ethernet and WiFi configure and monitor the TMC2660 drivers via SPI and use the step and direction inputs to perform movement. Likewise the Maestro uses the UART interface to configure and monitor the TMC2224 drivers, and Duet 3 uses SPI to configure and monitor the TMC5160 drivers.
The encoder input on TMC5160 drivers can only be used in conjunction with the built in ramp generator. Unfortunately, the built in ramp generator does not appear to be well suited to the types of motion needed in 3D printers.
I recently looked at how to close the loop. Reading quadrature encoders at the required speeds required for 3D printing required dedicated hardware, which only a few microcontrollers include. But we have worked out a solution, and we are planning some closed loop solutions for Duet 3. The first will probably be a CAN-connected single TMC2160 driver with encoder input. The encoder could be built into the motor, or it could be a linear encoder on an axis. We plan to make a variant for BLDC motors after that.
-
@dc42 said in Closed loop duet.:
et Ethernet and WiFi configure and monitor the TMC2660 drivers via SPI and use the step and direction inputs to perform movement. Likewise the Maestro uses the UART interface to co
thanks a lot for the info and quick response ! may i ask what do you mean by saying that the built in ramp generator is not suited for 3d printing ? so the duet2 is not using the built in ramp generator on the tmc2660 (if there is one) ?
i'm pretty sure you know better but the tmc2160 doesn't seem to have encoder input.
i'm very excited about the duet 3 i'm pretty sure i'll pick one up soon !
with all that being said do you think a closed loop can still be integrated on the duet 2 with the before mentioned tmc5160 and steppers in external driver mode ? or would it just be a waste of money, effort and time ? thanks again -
@gz said in Closed loop duet.:
what do you mean by saying that the built in ramp generator is not suited for 3d printing
Per the Trinamic data sheets, their ramp generators will ensure a motor does not stall, and will slow that motor down down (thus increasing torque) as necessary to achieve that goal.
Having a given axis change its speed (really its ramp/unramp profile) is directly contrary to the concept of "coordinated linear motion". In turn, coordinated linear motion is the foundation of G-Code.
So, yeah, the Tranamic built-in ramp generators are not just '... not well suited ...' they are diametrically opposite of the motion profiles necessary for a G-Code based device. Even if we move away from G-Code itself, the requirement to have axis coordinated with each other still remains. Otherwise, it is physically impossible to make anything but a pure x or pure y move work properly.
-
@gz said in Closed loop duet.:
with all that being said do you think a closed loop can still be integrated on the duet 2 with the before mentioned tmc5160 and steppers in external driver mode ? or would it just be a waste of money, effort and time ? thanks again
You could use any of several Trinamic driver chips to build a "servo motor" that takes ONLY step/dir from a Duet (2 or 3). The servo motor would self-assure that steps were never missed (by correcting any misses that do occur). This architecture completely bypasses the driver chips soldered onto the Duet 2/3 board. Only step/dir would be brought to the servo motor.
And, again, you can develop this yourself, or just purchase it. The concept of a step/dir servo has already been developed and debugged by others.
Only you can say if that is a waste (or productive used) of money/effort/time.
IMHO, it is solving a non-problem. 3D printers do not skip steps unless something is very wrong, like a jam or similar (that will still jam a servo).
Phrased completely differently: 3D printers are (almost all) open loop because it works quite well.
-
Thanks a lot for all your answers it's much clearer now, guess i'll just add beefier steppers ... the only reason i wanted a closed loop system is because i thought that having a closed loop would give me better repeat-ability any advice on how to improve that ?
-
@gz said in Closed loop duet.:
any advice on how to improve that ?
Rigid frame, quality belts and pulleys, quality linear motion hardware. A servo won't solve for a lack of those things either.