• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    Robocop
    last edited by 20 Aug 2018, 00:41

    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

    undefined 1 Reply Last reply 22 Aug 2018, 01:58 Reply Quote 1
    • undefined
      Robocop
      last edited by 20 Aug 2018, 02:17

      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
      • undefined
        dc42 administrators
        last edited by 20 Aug 2018, 07:18

        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
        • undefined
          Robocop
          last edited by 20 Aug 2018, 20:47

          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
          • undefined
            dc42 administrators
            last edited by 21 Aug 2018, 06:55

            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

            undefined 1 Reply Last reply 21 Aug 2018, 21:25 Reply Quote 0
            • undefined
              Robocop @dc42
              last edited by 21 Aug 2018, 21:25

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

              undefined 1 Reply Last reply 21 Aug 2018, 22:58 Reply Quote 0
              • undefined
                T3P3Tony administrators @Robocop
                last edited by 21 Aug 2018, 22:58

                @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
                • undefined
                  Cata @Robocop
                  last edited by 22 Aug 2018, 01:58

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