I am working on several home-brew automation projects using Marlin and the TMC2209 StallGuard4 feature. I have gotten the sensorless homing feature working using G28, but this does not provide a collision detection feature. The Original Prusa (TMC2130 drivers) has a crash detection which detects lost steps, homes the axes, and resumes print. I was able to find in the Original Prusa firmware the related sections by searching for "crash", which gives a function "crashdet_stop_and_save_print()". However on the Prusa Mini (TMC2209 drivers) "Buddy" firmware, the sensorless homing is enabled, but crash detection is not available.
YouTube: Prusa MK3 Crash Detection
These are the applications/features that I am working on:
A. Part Gripper which drives a single/dual jaw and uses G28 (sensorless homing) to detect the part and stop. After detecting the part, I then move the jaws a small additional amount to apply a squeeze pressure. It would be nice to be able to monitor/specify the amount of squeeze force for delicate objects (an egg?).
B. Part or Solder Paste Dispenser which drives a specific amount for each dispense. A motor jam will indicate that the resevoir is empty and needs to be refilled/replaced. After detecting the jam, the controller should stop, BEEP, and then wait for the operator to fill the resevoir before resuming or re-starting.
C. Machine Motion contact/force detection, as a Safety Feature. A similar feature on industrial robots "Cobots" allows them to detect contact with an operator based on monitoring the servo motor current.
The first example (Part Gripper) does work using G28 sensorless homing (X,Y,Z) but is not enabled for other axes (E0,E1,...). The second example is not currently possible with standard Marlin because the sensorless homing impact trigger is not enabled in G0/G1 moves - the motor will happily slam into an obstacle and continue to grind until the "move" is complete.
Requesting assistance to add TMC2209 crash detection feature to G0/G1 (X,Y,Z,E0,E1,...). Or to create a custom G-Code move with crash detection enabled, and then do something (alarm, wait for operator, resume).
Thanks! Bill Trondsen