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

    I2c external hardware

    Scheduled Pinned Locked Moved
    Third-party add-ons
    4
    8
    1.4k
    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.
    • Robocopundefined
      Robocop
      last edited by

      Re: i2c and external hardware

      Hi. We have a simple hardware module (single PCB with a few buttons and things + an i2c interface). We want to use our PCB to send and receive G-code commands and data to and from a Duet board.

      We don't want to do anything too complicated -- just move a few motors and read some basic status info from the Duet. Is this capability already implemented in the Duet firmware, and thus a simple exercise to get working, or do we need to modify firmware and ugly things like that?

      Ideally I would like to simply plug in our PCB and have full G-code command capability. Here's hoping.....

      Thanks in advance,

      Rob

      Cataundefined 1 Reply Last reply Reply Quote 1
      • Robocopundefined
        Robocop
        last edited by

        As an alternative, I could use the 2-wire async port (URXD0, UTXD0) that is designed to connect to the PanelDue touchscreen...

        https://duet3d.dozuki.com/Wiki/Connecting_an_LCD_control_panel#Section_Connecting_a_PanelDue

        Does this serial port use pure G-code or is there some other protocol being used to communicate? I'm thinking that we could plug our module onto that 4-wire (incl. power) port and use pure G-code to do everything.

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

          The PanelDue port accepts GCodes. By default it requires received GCodes to have line numbers and checksums, but this can be changed using the M575 command in config.g. The signal levels are 3.3V.

          There is currently no support in the firmware for receiving GCodes over I2C.

          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
          • Robocopundefined
            Robocop
            last edited by

            Thanks dc42 ! The PanelDue seems to be the best option then.

            Are you able to point me to any documentation relating to the PanelDue hardware interface and serial comms? Is it simply an async SCI port on the SAM uController? Will I need to use the ribbon cable box-header?

            Sorry, I am new to the Duet devices, so not quite sure where to start.

            Thanks in advance.

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

              Yes it's just serial async with 3.3V signals levels. You can use either the 10-way box connector or the 4-way PanelDue connector. You can get 5V power form the same connector, if your board needs 5V and not too much current. If your board is 5V then don't forget to level-shift the TxD pin from your board down to 3.3V before feeding it into the URxD pin on the Duet.

              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

              Robocopundefined 1 Reply Last reply Reply Quote 0
              • Robocopundefined
                Robocop @dc42
                last edited by

                @dc42 Perfect -- I will place an order for one ASAP. Does documentation for the async bit rates and G-code commands come with the Duet PCB?

                T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                • T3P3Tonyundefined
                  T3P3Tony administrators @Robocop
                  last edited by

                  @robocop check out the M575 command:

                  https://duet3d.dozuki.com/Wiki/Gcode#Section_M575_Set_serial_comms_parameters

                  You can set the baud rate for the serial comms and send any gcode that the Duet supports over that serial link (the page I linked to has all of them!)

                  www.duet3d.com

                  1 Reply Last reply Reply Quote 0
                  • Cataundefined
                    Cata @Robocop
                    last edited by

                    @robocop Please post when you have the module. I have some similar in the todo list, maybe using a esp8266 and the 4x4 key pad for arduino.

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