Hi!
Me and my little startup are building a device that uses a Duet 2 Ethernet (v1.04) to develop a type of object scanner. It looks a lot like a 3D printer, but instead of a nozzle we move a light source, and instead of creating a print there's an existing object (for us: camera lenses) that we're mapping using machine vision.
We've loved working with the Duet. Frankly, I've been amazed at how well it's adapted to our purpose. One of the best technology choices we've made in our ~8 months so far!
I'd like to propose a small firmware addition to help with our use case. If you like it I'd be happy to attempt also putting up a GitHub PR.
In our case, we don't need a Z Probe for bed leveling, but we'd like to use it as a safety switch to ensure our moving light source arm never accidentally touches the object being scanned.
Specifically, I'd like to be able to select the Z Probe as an input in M581
(Configure external trigger), so that when the trigger value configured in G31
(Set current probe status) is exceeded it can trigger an emergency stop.
I suggest that M581
could take a new input parameter, e.g. N
(meaning Z Probe), in addition to existing X
,Y
,Z
,E
selectors. Hopefully intuitively, the S1
modifier could be interpreted as "rose above trigger value", and S0
as "dropped below trigger value".
(The N
is arbitrary; alas the names T
(would have matched G31
) and P
(for Probe) are already taken.)
For example:
; Configure Z Probe to be safety switch; emergency stop if we come too close to object.
M558 P1 I1 ; Use analog Z probe, signal falls as object is closer.
G31 P980 ; Z probe is triggered when its value is >980.
M581 N S1 T0 C0 ; Emergency stop if Z probe ever exceeds trigger value.
In our specific case we plan to use a MaxBotix EZ ultrasonic range finder; using its analog signal I have it successfully hooked it up as a Z Probe.
Cheers!
RJ.