Navigation

    Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Newbie question: Sensor feedback from Duet 2?

    General Discussion
    3
    4
    25
    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.
    • Rocketmagnet
      Rocketmagnet last edited by

      Hi,
      I am considering using a Duet 2 board to control a machine which is not a 3D printer, but is driven by a bunch of stepper motors. G-Code commands will be sent in real time from a PC to the Duet 2 to move the steppers. It will not be running a pre-defined program.

      The machine has several sensors (switches), which the PC will need to be able to read.

      My question: Is the Duet 2 capable of reading the state of sensors and feeding those back to the PC somehow? Is there a G-code command to read back the state of sensors connected to it?

      Many thanks
      Hugo

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

        A little bit, but not a lot. Specific G code commands can read the state of an IO pin, and "triggers" can be preset that will invoke a macro when in the defined (high, low, etc) state.

        Independent of the Duet, G-code is really not from a heritage of two-way communication.

        Have you considered using an Arduino or ESP8266 or ESP32 to read the sensors and report back to the PC?

        1 Reply Last reply Reply Quote 0
        • Rocketmagnet
          Rocketmagnet last edited by

          Thanks for the reply. Well, some basic IO is a good start, and triggers could also come in useful. Yeah, I'll probably use some other electronics to sample the other more complex sensors. I was just wondering if I could do it all with a Duet 2.

          Thanks

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

            When running RepRapFirmware 3.01 all sensors connected to the Duet can be read via the object model. This information can be retrieved by the M409 Gcode command and by the rr_model HTTP call.

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