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.
    • chrishammundefined
      chrishamm administrators
      last edited by chrishamm

      @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
      • arhiundefined
        arhi @FelixH
        last edited by

        @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.

        dc42undefined 1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @arhi
          last edited by

          @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

          arhiundefined 1 Reply Last reply Reply Quote 0
          • FelixHundefined
            FelixH @dc42
            last edited by

            @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
            • arhiundefined
              arhi @dc42
              last edited by

              @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
              • FelixHundefined
                FelixH
                last edited by

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

                dc42undefined 1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @FelixH
                  last edited by

                  @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
                  • FelixHundefined
                    FelixH
                    last edited by FelixH

                    Well, just finished soldering cables here and there, I connected the TX/D0 pin of the Nano via a Logic Converter to the PanelDue port... the Duet does not boot if I connect the Pendant. The Nano and the logic converter seem to boot up, since the leds are lit up. If I start up with the display plugged in, and then I change for the pendant, the Duet shuts down. I can also see that on the web interface... not sure what could be wrong. I'm pretty sure the connections are sound

                    If I connect it to the computer and start the serial monitor, only a M112 command shows up continuously. No matter what I do, it doesn't show anything else

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators
                      last edited by dc42

                      I've just got my pendant working. I've updated the code and changed the wiring slightly (STOP now goes to A0, and LED+ goes to D13). Latest files are on github now.

                      Here's how I wired it. I soldered the black, orange/black, blue/black and white/black wires to the cable shield and ran a single black wire from them to ground on the Arduino. I used 6K8 and 10K for the output resistors.

                      2020-05-16 15.28.30.jpg

                      I configured the code so that on the x1 setting, each step is 0.1mm.

                      Next step is to design a printable enclosure for the Nano. I found a generic one on Thingiverse but it looks like it doesn't hold the Nano securely.

                      It would be nice to do a version that includes a PanelDue passthrough, but that would require a microcontroller with two serial ports, whereas the Arduino Nano has only one.

                      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

                      FelixHundefined 1 Reply Last reply Reply Quote 2
                      • FelixHundefined
                        FelixH @dc42
                        last edited by

                        @dc42 said in CNC style Pendant:

                        Next step is to design a printable enclosure for the Nano. I found a generic one on Thingiverse but it looks like it doesn't hold the Nano securely.

                        I was thinking on fixing the nano inside the pendant.

                        dc42undefined 1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators @FelixH
                          last edited by dc42

                          @FelixH said in CNC style Pendant:

                          I was thinking on fixing the nano inside the pendant.

                          I didn't realise it would fit, but I've now taken the back off, and it will! Here's one possible place for it.

                          2020-05-16 15.50.02.jpg

                          Now I need to re-do all the wiring 🙁 You and your bright ideas!

                          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

                          FelixHundefined 1 Reply Last reply Reply Quote 1
                          • FelixHundefined
                            FelixH @dc42
                            last edited by

                            @dc42 said in CNC style Pendant:

                            Now I need to re-do all the wiring 🙁 You and your bright ideas!

                            Sorry...?? on the plus side, everything is much tidier...

                            By the way, would the +5V of the PandelDue be able to supply enough current for: the PandelDue, the Nano and a ESP32 used as a splitter (to be able to use both the PanelDue and the Pendant simultaneously). I want to use an ESP just because it has more convenient pinout with Rx/Tx ports

                            A Former User? dc42undefined 2 Replies Last reply Reply Quote 0
                            • A Former User?
                              A Former User @FelixH
                              last edited by

                              @FelixH said in CNC style Pendant:

                              By the way, would the +5V of the PandelDue be able to supply enough current for

                              probably - but it comes down to how much overall current the Duets 5v supply has to deliver to itself, and other peripherals. But the 0.5mm trace to the PanelDue port is good for 1 amp and some change.

                              1 Reply Last reply Reply Quote 0
                              • dc42undefined
                                dc42 administrators @FelixH
                                last edited by

                                @FelixH said in CNC style Pendant:

                                By the way, would the +5V of the PandelDue be able to supply enough current for: the PandelDue, the Nano and a ESP32 used as a splitter (to be able to use both the PanelDue and the Pendant simultaneously). I want to use an ESP just because it has more convenient pinout with Rx/Tx ports

                                If you keep the wireless function of the ESP32 turned off then I don't think it should be a problem.

                                Why use the Nano at all? It looks to me that the ESP32 has enough pins to do everything.

                                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

                                FelixHundefined 1 Reply Last reply Reply Quote 0
                                • FelixHundefined
                                  FelixH @dc42
                                  last edited by

                                  @dc42 said in CNC style Pendant:

                                  Why use the Nano at all? It looks to me that the ESP32 has enough pins to do everything.

                                  yes, I know. But if I don't do it step by step, I'll be lost. I'm not that good at coding. A colleague of mine took a look at the SMuff project above and has simplified a lot to act only as splitter. No WiFi, no nothing... I will try to put everything together and publish it on GitHub someday...

                                  1 Reply Last reply Reply Quote 0
                                  • Danalundefined
                                    Danal
                                    last edited by

                                    We can help with the ESP32 coding. I'm going to use one in my pendant. Planning on doing PanelDue "pass through" and wireless.

                                    I'm probably about a week away from coding this; so run the Nano now, and see if you want/need this later.

                                    P.S. Planning on wireless config via having the ESP32 initally act as its own AP and Network. Use your phone to join, fill out a simple form with three fields: Your network SSID, password, and name or IP of Duet printer. It then swaps itself over to those settings.

                                    And have a reset button to go back to "not configured" AP mode.

                                    Delta / Kossel printer fanatic

                                    1 Reply Last reply Reply Quote 2
                                    • dc42undefined
                                      dc42 administrators
                                      last edited by

                                      I rewired the pendant with the Arduino Nano inside. I found a youtube video about how to make cable curly with a heat gun, so I did that with some of my standard 4-core PanelDue cable. The result:

                                      2020-05-16 21.40.37.jpg

                                      I've realised that I can implement passthrough for PanelDue on the Nano, because the Nano doesn't need to see the responses that the Duet sends to PanelDue. So the UTXD or IO_0_OUT pin on the Duet can be connected directly to DIN on the PanelDue, and DOUT on PanelDue can be connected to RXD on the Nano. I'll add this feature to the firmware next.

                                      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

                                      FelixHundefined 1 Reply Last reply Reply Quote 2
                                      • FelixHundefined
                                        FelixH @dc42
                                        last edited by

                                        @dc42 said in CNC style Pendant:

                                        I've realised that I can implement passthrough for PanelDue on the Nano, because the Nano doesn't need to see the responses that the Duet sends to PanelDue. So the UTXD or IO_0_OUT pin on the Duet can be connected directly to DIN on the PanelDue, and DOUT on PanelDue can be connected to RXD on the Nano. I'll add this feature to the firmware next.

                                        Does it mean there won't be the need for a Splitter to have the PanelDue and the Pendant simultaneously?

                                        dc42undefined 1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators @FelixH
                                          last edited by

                                          @FelixH said in CNC style Pendant:

                                          Does it mean there won't be the need for a Splitter to have the PanelDue and the Pendant simultaneously?

                                          Yes. However, it may be necessary to change one of the resistors on the Arduino Nano from 1K to 10K so that the PanelDue can override the RxD signal coming from the USB interface chip.

                                          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
                                          • dc42undefined
                                            dc42 administrators
                                            last edited by dc42

                                            I've got the pass through facility working and committed the new code to github.

                                            To use the pass through facility, you need to connect the PanelDue and CNC pendant cables to the Duet like this:

                                            • Join all three +5V connections together
                                            • Join all three ground connections together
                                            • URXD or IO_0_OUT on Duet goes to PanelDue DIN
                                            • PanelDue DOUT goes to RX0 on the Nano in the pendant (but see below)
                                            • TX1 on the Nano goes through the 2 resistor (voltage divider) network to URXD or IO_0_IN on the Duet

                                            I joined the 3 cables using solder sleeves. Here is the join before I put the heatshrink sleeving over it:

                                            2020-05-17 12.27.41.jpg

                                            It's necessary to either feed the DOUT signal from the Duet through a 3.3V to 5V level shifter and connect the output of that to the Nano RX0 pin, or you can connect it directly without a level shifter if you make one or two modifications to the Nano. The modifications are:

                                            • Replace the 1K resistor between the USB-to-serial output and the RX0 pin by a 10K resistor. If you use the Arduino Nano clone that uses a CH340G USB-to-serial converter, it's this 0603 resistor:

                                            8f584839-567d-490e-b7f9-f9ab44d41f8d-image.png

                                            • On Arduino Nano clones using the CH340G chip, you must also remove the resistor in series with the RX LED (or you could remove the LED):

                                            36e5215c-22aa-4cfb-af32-ea7e01cee11e-image.png

                                            When programming the Nano over USB, you must disconnect the PanelDue. If you use a level shifter to feed PanelDue DOUT to RX0 instead of modifying the Nano, then you will need to disconnect the level shifter from RX0 to program the Nano.

                                            I put Kapton tape over the upper two magnets in the back of the case, to make sure they don't short anything on the Nano:

                                            CNC-pendant.jpg

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