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

CNC style Pendant

Scheduled Pinned Locked Moved
Hardware wishlist
28
155
17.9k
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
    dc42 administrators
    last edited by 10 May 2020, 05:56

    It's a special emergency stop code recognised by the input buffer code on the Duet, so that the emergency stop command bypasses the command buffers.

    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 2 Replies Last reply 10 May 2020, 06:04 Reply Quote 1
    • undefined
      arhi @dc42
      last edited by 10 May 2020, 06:04

      @dc42 great, good to know 🙂

      1 Reply Last reply Reply Quote 0
      • undefined
        arhi @dc42
        last edited by 10 May 2020, 06:10

        @dc42

        int distance = encoder.getChange() * distanceMultiplier;
        if (axis >= 0 && distance != 0)
        {
        whenLastCommandSent = now;
        Serial.write("G91 G0 ");
        Serial.print(distance);
        Serial.write('\n');
        }

        seems to me axis is missing from the G0 ?

        1 Reply Last reply Reply Quote 0
        • undefined
          dc42 administrators
          last edited by 10 May 2020, 07:21

          That's because I failed to complete a recent change. Change the line:

          Serial.write("G91 G0 ");

          to:

          Serial.write(MoveCommands[axis]);

          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
            arhi
            last edited by 14 May 2020, 05:41

            @dc42 do you think it's better for wireless pendant to telnet to the RRF and send G-codes or to exec g-codes trough http://rrf/rr_gcode ?

            undefined 1 Reply Last reply 14 May 2020, 13:21 Reply Quote 0
            • undefined
              gtj0 @arhi
              last edited by 14 May 2020, 13:21

              @arhi said in CNC style Pendant:

              @dc42 do you think it's better for wireless pendant to telnet to the RRF and send G-codes or to exec g-codes trough http://rrf/rr_gcode ?

              If you use http, you can use the pendant with either a Duet in standalone mode or via the DSF (with a slight change to the URL).

              undefined 1 Reply Last reply 14 May 2020, 13:32 Reply Quote 0
              • undefined
                arhi @gtj0
                last edited by 14 May 2020, 13:32

                @gtj0 that's the reason I'm asking. HTTP approach looks better but dunno if there are penalties. I went forward last night and since I need a "send g-code" function in one place only it's not a big deal to have few different ones (one for telnet, one for http, one for - whatever...) as it will not be affecting the code.

                I took a 2stick module from some broken game controller, that gives me 2 buttons + 4 axes with limited speed control (2k2 pots on the axes are not very precise, I can safely detect 2 speeds, maybe 3 especially as I added 4k7 in series so the swing is even lower, I might remove the 4k7 but 4x2k2 in parallel on the 3v3 rail is 6mA constant drain on the battery), attached to ESP32+BMS.

                Telnet works for now but I'm still thinking if I need to add more buttons 😄 and leds.

                1 Reply Last reply Reply Quote 0
                • undefined
                  Danal
                  last edited by 14 May 2020, 14:09

                  Somewhere in all the above I ordered a pendant a few weeks back. JUST after I ordered it, Dave published his code. Which is great, not having to write it... so I haven't done much since then.

                  I have received the pendant now.

                  I'm thinking about an ESP32 (massive, massive, overkill, but they are $5 each...!) setup to do Serial or Network, including RRF2 or RRF3 printers. And just experimenting to see if it "feels" right when hooked up by various methods.

                  And a battery and an "off the shelf" USB charger/manager for the battery.

                  Going back and forth on having a small display, XYZ.

                  IMG_0502 (1).jpeg IMG_0503 (1).jpeg

                  Delta / Kossel printer fanatic

                  undefined 1 Reply Last reply 14 May 2020, 18:31 Reply Quote 0
                  • undefined
                    gtj0 @Danal
                    last edited by 14 May 2020, 18:31

                    @Danal Lock picking for fun and profit?? 🙂

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      Danal
                      last edited by 14 May 2020, 19:07

                      Ooops... need to move that.

                      You nailed the goal. That is my practice set, they get progressively harder. Keep the 'ol fingers skilled up.

                      Delta / Kossel printer fanatic

                      undefined 1 Reply Last reply 15 May 2020, 01:02 Reply Quote 0
                      • undefined
                        gtj0 @Danal
                        last edited by 15 May 2020, 01:02

                        @Danal The LockPickingLawyer is my hero.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          FelixH
                          last edited by 16 May 2020, 09:12

                          Arduino Nano to Duet PanelDue connector connections:
                          Nano Duet
                          +5V +5V
                          GND GND
                          TX1/D0 Through 5K6 resistor to URXD, also connect 10L resistor between URXD and GND
                          */

                          I don't have any 5K6 resistor at home, and I don't feel like driving 75 km to get one. Is there any way to make this connection possible? My 2 ideas are:

                          • Using a 3.3 to 5 v logic converter
                          • Using a 3.3v board to drive the pendant (I have some overkill ESP32 on stock)

                          Also, I'm guessing that 10L means to be 10K, right?

                          undefined 1 Reply Last reply 16 May 2020, 09:18 Reply Quote 0
                          • undefined
                            dc42 administrators
                            last edited by dc42 16 May 2020, 09:15

                            Yes 10L should be 10K. You need 2 resistors with a resistance ratio of 2:1 or a little less. For example, 10K and 18K. Or 6K8 and 10K. Or, if you have lots of 10K resistors, 5K (i.e. 2 of them in parallel) and 10K. Even 10K and 10K will probably work. The idea is to reduce the 5V output from the UART on the Arduino Nano to somewhere between 2.5V and 3.3V.

                            The sheet that came with the pendant says it needs a 5V supply for the rotary encoder. Maybe it will work on 3.3V, maybe not.

                            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 16 May 2020, 09:26 Reply Quote 0
                            • undefined
                              chrishamm administrators
                              last edited by chrishamm 16 May 2020, 09:16

                              @gtj0 mine too! 😄

                              I made my CNC pendant sketch available on a new branch of the same repository, AFAIR that worked quite well with an AtMega8. It may need some more customization though.

                              Duet software engineer

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                arhi @FelixH
                                last edited by 16 May 2020, 09:18

                                @FelixH said in CNC style Pendant:

                                Is there any way to make this connection possible?

                                Most of atmega's can work on 3v3 so instead of powering nano from 5V, power it from 3v3 and USART levels should be ok.

                                undefined 1 Reply Last reply 16 May 2020, 09:20 Reply Quote 0
                                • undefined
                                  dc42 administrators @arhi
                                  last edited by 16 May 2020, 09:20

                                  @arhi said in CNC style Pendant:

                                  Most of atmega's can work on 3v3 so instead of powering nano from 5V, power it from 3v3 and USART levels should be ok.

                                  Yes, if the encoder in the CNC pendant will work on 3.3V. Or alternatively, if it has open-drain or open-collector outputs so that t can be powered from 5V without feeding 5V to the A and B outputs.

                                  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 16 May 2020, 09:29 Reply Quote 0
                                  • undefined
                                    FelixH @dc42
                                    last edited by 16 May 2020, 09:26

                                    @dc42 said in CNC style Pendant:

                                    The idea is to reduce the 5V output from the UART on the Arduino Nano to somewhere between 2.5V and 3.3V.

                                    So I could also use a logic converter there, right?. I have a bunch of "3.3 to 5 Bidirectional Bus" mini boards

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      arhi @dc42
                                      last edited by 16 May 2020, 09:29

                                      @dc42 never tried but IIRC from the DS atmega is 5 V tolerant when running from 3 V so powering encoder with 5V and Atmega with 3V should be safe. The major possible problem is if it will run properly on 16 MHz on 3V (iirc 4.5 minimum for 10+ MHz) but I never had issue myself, they always worked ok.

                                      @FelixH as you mentioned logic level converter, if you have one that would for sure work safest

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        FelixH
                                        last edited by 16 May 2020, 10:39

                                        Z and 4 Pendant cables are together to pin D6? or is Cable 4 to pin D7?

                                        undefined 1 Reply Last reply 16 May 2020, 10:59 Reply Quote 0
                                        • undefined
                                          dc42 administrators @FelixH
                                          last edited by 16 May 2020, 10:59

                                          @FelixH said in CNC style Pendant:

                                          or is Cable 4 to pin D7?

                                          Yes.

                                          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
                                          71 out of 155
                                          • First post
                                            71/155
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA