Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order
    1. Home
    2. rjh
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 1
    • Controversial 0
    • Groups 0

    rjh

    @rjh

    1
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    rjh Unfollow Follow

    Best posts made by rjh

    • Firmware proposal: Using Z Probe as external trigger

      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.

      posted in My Duet controlled machine
      rjh
      rjh

    Latest posts made by rjh

    • Analog threshold for M581 trigger

      This is a follow-up from https://forum.duet3d.com/topic/11535/firmware-proposal-using-z-probe-as-external-trigger

      I'm looking to make it possible for an analog Z Probe to act as an emergency stop when an object comes too close. I imagine that that'd happen via M581, with the Z Probe acting as a trigger when it exceeds a threshold value. From the previous thread I learnt that RRF V3.0 we can select the Z Probe pin in M581, so the one remaining obstacle is how to specify that analog threshold.

      For example, we could add an A parameter to specify the analog threshold?

      M581 P"zprobe.in" A980 T0 C0   ; Emergency stop any time the rangefinder detects an object too close (value >980).
      

      How does that sound?

      posted in Firmware wishlist
      rjh
      rjh
    • RE: Firmware proposal: Using Z Probe as external trigger

      Thanks @Danal and @T3P3Tony!

      @Danal: that's good out-of-the-box thinking there, I guess my background as a software engineer shows: I prefer to do as much as possible in software. 🙂 I see how your circuit solves the issue, yet I worry that it's an extra component for me to manufacture and calibrate for every device I want to ship. Hence my eagerness to do this in easy-to-reproduce software instead. 🙂

      @T3P3Tony cool, I had no idea the 3.0 firmware is in the works! I love how pin selection becomes so much more flexible and understandable. Yes, triggering on an analog threshold for M581 would exactly solve my issue, I'll post in the feature request sub forum!

      posted in My Duet controlled machine
      rjh
      rjh
    • Firmware proposal: Using Z Probe as external trigger

      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.

      posted in My Duet controlled machine
      rjh
      rjh