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

    Do Duet 3 board have a serial interface?

    Scheduled Pinned Locked Moved
    General Discussion
    3
    6
    381
    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.
    • zaptaundefined
      zapta
      last edited by

      I would like to attach a microcontroller to a Duet 3 board (e.g. Mini) and send it short messages (e.g. 5-20 chars text message) using gcode commands. Is it possible? What interfaces and commands are available?

      I found the M260 I2C command and wonder

      1. How to identify the I2C pins on, let's say, Duet 3 Mini?
      2. Are there other protocols available such as serial/uart or SPI.

      https://forum.duet3d.com/assets/uploads/files/1610230359113-duet3_mini5_wiring.png

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

        @zapta Duet 3 main boards have two serial interfaces. However the firmware doesn't yet provide a mechanism similar to M260 to perform general sensing and receiving of data. You can however configure them as input channels that receive GCode commands, return the appropriate responses, and can also output text strings in M118 commands.

        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

        zaptaundefined CNCModellerundefined 2 Replies Last reply Reply Quote 0
        • zaptaundefined
          zapta @dc42
          last edited by

          Thanks @dc42, this is very useful.

          I did more research and the requirements are clearer now. The board I will use will be Duet 3 Mini 5+2, and the communication will be in one direction with the Duet sending only (e.g. a short text messages "start.aaa_bbb_ccc\n"). I have a choice between Serial, I2C and SPI (in that order of preference, due to the numbers of lines involved).

          With the serial option, and a Mini board + PanelDue , what is the TX output pin of the auxiliary Serial? (and the RX pin, in case I need to reserve or pull it up).

          zaptaundefined 1 Reply Last reply Reply Quote 0
          • zaptaundefined
            zapta @zapta
            last edited by zapta

            Ok, it seems to work. I freed connector IO1 (was x stop on my printer). io1.out is the serial output, and the input io1.in left unconnected and is pulled up internally to 3.3V. (This is on a Duet 3 Mini with RRF 3.4.0). Thanks @dc42. Supporting the \n is a nice touch.

            echo "Serial init"
            M575 P2 B115200 S2
            
            while iterations < 10
              M118 P5 S"Hello World\n"
              echo "Hello World"
              g4 P500
            
            1 Reply Last reply Reply Quote 0
            • CNCModellerundefined
              CNCModeller @dc42
              last edited by

              @dc42 said in Do Duet 3 board have a serial interface?:

              @zapta Duet 3 main boards have two serial interfaces. However the firmware doesn't yet provide a mechanism similar to M260 to perform general sensing and receiving of data. You can however configure them as input channels that receive GCode commands, return the appropriate responses, and can also output text strings in M118 commands.

              Hi @dc42 Can custom gcode commands be triggered via this method too?

              If so is there any delay in responding to such commands if the board is executing a print file when the gcode command is sent over the serial interface?

              I'd assume it's similar behaviour to using a panel due during a print?

              Any thoughts would be much appreciated.

              All the best
              Barry M

              Polar Duet3 Mini + 1HCL
              https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
              Wanhao D4S: Duet2
              https://forum.duet3d.com/post/296755
              K40 Laser, Duet2
              https://forum.duet3d.com/post/312082
              Wanhao D5S
              https://www.youtube.com/CNCModellerUK

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

                @CNCModeller yes it's similar to sending a command from PanelDue during a print.

                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