• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

Using GPIO on duet 3

Scheduled Pinned Locked Moved
Duet Hardware and wiring
3
11
534
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    jordna.le1299
    last edited by 10 Jul 2020, 23:57

    I wanted to know how to hook up a switch to the GPIO on a duet 3. In theory I am trying to nozzle probe and bed probe as two separate probes. With bed probing I am using an inductive sensor, for nozzle probing, I am experimenting with a simple push button.

    Hardware wise when the nozzle pushes on the push button it shorts the 5V pin to the Input of the GPIO. This will send a voltage high triggering the z-probe saving the height.

    As for firmware I have the following code in my config.g
    ; Z-Probe
    M558 K0 P8 C"io8.in" H4 F5000 T18000 I1 A3 ; Set Z probe type to switch and the dive height + speeds
    G31 K0 P950 X-20 Y-1 Z0.4 ; Set Z probe trigger value, offset and trigger height (lowering number raises nozzle)
    M557 K0 X20:380 Y40:430 S60 ; Define mesh grid

    ; Nozzle Offset
    M558 K1 P5 C"io1.in" H0 F5000 T18000 I1 A3
    G31 K0 P950

    Right now on the duet it triggers both z-probes as i trigger the inductive and nothing happens when I push the switch. Does anyone have any insight on how to tacklet this?

    ? 1 Reply Last reply 11 Jul 2020, 00:06 Reply Quote 0
    • ?
      A Former User @jordna.le1299
      last edited by 11 Jul 2020, 00:06

      @jordna-le1299 said in Using GPIO on duet 3:

      I wanted to know how to hook up a switch to the GPIO on a duet 3.

      preferred method is usually a normally closed switch between ground and the input pin with pull up enabled.

      Right now on the duet it triggers both z-probes as i trigger the inductive and nothing happens when I push the switch. Does anyone have any insight on how to tacklet this?

      could you try to reformulate this? also see this thread https://forum.duet3d.com/topic/12457/connecting-multiple-z-probes-for-multiple-independent-z-axis/2 and in particular the link https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors

      1 Reply Last reply Reply Quote 0
      • undefined
        jordna.le1299
        last edited by jordna.le1299 13 Jul 2020, 17:59

        could you try to reformulate this?

        464f96d0-1698-4553-90f2-6169b08bf636-image.png

        This is what shows up currently config file. However, when I trigger the inductive probe and only the inductive probe this is what shows up

        3283cae4-e951-4c77-a99d-896aa7ac13cf-image.png

        It acts as the same probe even though they are seperate K's when declaring. And the switch does nothing to the z-probe itsef.

        preferred method is usually a normally closed switch between ground and the input pin with pull up enabled.

        as for this could I use a normally open switch and invert it in the config file making it
        C"^!io1.in"

        Finally with the links it doesn't seem to address how to declare the separate probes. With my current code am I doing it correctly or should something be changed?

        Thanks

        1 Reply Last reply Reply Quote 0
        • undefined
          dc42 administrators
          last edited by 13 Jul 2020, 18:52

          Which firmware version are you using?

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • undefined
            jordna.le1299
            last edited by 13 Jul 2020, 18:59

            @dc42 I am currently using RRF 3.1.1

            undefined 1 Reply Last reply 13 Jul 2020, 19:39 Reply Quote 0
            • undefined
              jordna.le1299 @jordna.le1299
              last edited by 13 Jul 2020, 19:39

              @jordna-le1299
              Ok so I got the z-probes to work independently now. However, now when I probe and store into a point (P0) where can I use this value to put it into my nozzle offset?

              1 Reply Last reply Reply Quote 0
              • undefined
                dc42 administrators
                last edited by 13 Jul 2020, 20:46

                See the G30 S-2 command at https://duet3d.dozuki.com/Wiki/Gcode#Section_G30_Single_Z_Probe.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                undefined 1 Reply Last reply 13 Jul 2020, 20:55 Reply Quote 1
                • undefined
                  jordna.le1299 @dc42
                  last edited by 13 Jul 2020, 20:55

                  @dc42 if I wanted to store the offset and use it as a variable instead how would I do so. The reason why is because rather than the button being at the bed it would actually be at some known height above it. Therefore I would be able to use that number and offset it from the true height.

                  undefined 1 Reply Last reply 13 Jul 2020, 21:31 Reply Quote 0
                  • undefined
                    dc42 administrators @jordna.le1299
                    last edited by 13 Jul 2020, 21:31

                    @jordna-le1299 said in Using GPIO on duet 3:

                    @dc42 if I wanted to store the offset and use it as a variable instead how would I do so. The reason why is because rather than the button being at the bed it would actually be at some known height above it. Therefore I would be able to use that number and offset it from the true height.

                    You could specify the button height as the trigger height of the probe, then it would be taken into account automatically.

                    I don't think the Z probe last stop height is currently stored in the OM, but I could add it.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    undefined undefined 2 Replies Last reply 13 Jul 2020, 21:38 Reply Quote 0
                    • undefined
                      jordna.le1299 @dc42
                      last edited by jordna.le1299 13 Jul 2020, 21:38

                      @dc42

                      You could specify the button height as the trigger height of the probe, then it would be taken into account automatically.

                      would this be done through the G31 command in config? Also to trigger it would I use the single z-probe command (G30)

                      I don't think the Z probe last stop height is currently stored in the OM, but I could add it.

                      Through a firmware update?

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        dc42 administrators @dc42
                        last edited by 13 Sept 2020, 09:45

                        @dc42 said in Using GPIO on duet 3:

                        @jordna-le1299 said in Using GPIO on duet 3:

                        @dc42 if I wanted to store the offset and use it as a variable instead how would I do so. The reason why is because rather than the button being at the bed it would actually be at some known height above it. Therefore I would be able to use that number and offset it from the true height.

                        You could specify the button height as the trigger height of the probe, then it would be taken into account automatically.

                        I don't think the Z probe last stop height is currently stored in the OM, but I could add it.

                        I have added last stop height to the Z probe object model in the forthcoming RRF 3.2beta.

                        Duet WiFi hardware designer and firmware engineer
                        Please do not ask me for Duet support via PM or email, use the forum
                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA