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

    Creating a general purpose input and checking it

    Scheduled Pinned Locked Moved Solved
    General Discussion
    5
    12
    322
    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.
    • Exerqtorundefined
      Exerqtor
      last edited by Exerqtor

      I'm trying out a simple filament switch i'm working on, and I just found out that i've never created a general purpose input in RRF before lol. And i'm having a hard time getting a reading from the switch.

      The switch is a "AH3364Q-P-B" hall sensor which i've connected to IO-0 on a 1LC v1.2.

      I've configured it like this M950 J1 C"121.io0.in", but no matter what i do it still responds as "Active: true" when i send M950 J1

      Do i need to deploy more or different codes to make that type of hall sensor talk nice with RRF, or should it work with this config (and the hall sensor is dead)?

      A Former User? 1 Reply Last reply Reply Quote 0
      • A Former User?
        A Former User @Exerqtor
        last edited by

        This post is deleted!
        Exerqtorundefined 1 Reply Last reply Reply Quote 0
        • Exerqtorundefined
          Exerqtor @A Former User
          last edited by

          @Herve_Smith
          Yeah i'm aware of that. But i'm not deploying it as a filament sensor yet, now to start off i want to check that it functions correctly and logg how it works. Hence why i want to configure it as a GPIO switch first.

          A Former User? 1 Reply Last reply Reply Quote 1
          • A Former User?
            A Former User @Exerqtor
            last edited by

            This post is deleted!
            Exerqtorundefined 1 Reply Last reply Reply Quote 0
            • Exerqtorundefined
              Exerqtor @A Former User
              last edited by Exerqtor

              @Herve_Smith
              Oh your one of those, bye.....


              EDIT 17/8:

              Found the issue, the issue was that I had managed to use a 304SS washer to actuate the sensor, and a steel screw to hold down the sensor.

              Swaped for a steel washer for actuation and a 304ss screw to fasten the sensor, now it's working 👌

              1 Reply Last reply Reply Quote 2
              • A Former User?
                A Former User
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • Exerqtorundefined Exerqtor marked this topic as a question
                • Exerqtorundefined Exerqtor has marked this topic as solved
                • machinemarkundefined
                  machinemark
                  last edited by

                  Yes I am having the same problem

                  1 Reply Last reply Reply Quote 0
                  • machinemarkundefined
                    machinemark
                    last edited by

                    I have been trying to create an input on io6 using
                    M 9 50 J 1 C " i o 6 . i n in the config.g file
                    Then tried to check the status from the console with;
                    M950 J1
                    But always get - P i n i o 6 . i n , a c t i v e , t r u e

                    I tried changing the state of the input by tying the pin to GND and 3.3V but the message never changes. Also tried to check the status of the input using
                    M409 K"inputs" but the output is not clear which input I should be looking at on the list.

                    Any help would be appreciated,

                    Thanks Mark

                    jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                    • jay_s_ukundefined
                      jay_s_uk @machinemark
                      last edited by

                      @machinemark you don't use 3.3v and ground. if you did that you have a chance of shorting the board. Any switch on the input should be connected with the io6.in pin and gnd

                      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                      1 Reply Last reply Reply Quote 0
                      • machinemarkundefined
                        machinemark
                        last edited by

                        To be clear, I am tying the input to GND, running the commands to try and 'see' the state of the input. Then removing the input from the GND and connecting it to 3.3V and running commands again to check if there has been a change of state. ie GND and 3V3 shall never meet for it may release that precious smoke!

                        1 Reply Last reply Reply Quote 0
                        • machinemarkundefined
                          machinemark
                          last edited by

                          I must be missing something??? No matter what I do, I have never seen a change of state from the duets point of view.

                          A Duet3 6XD board.

                          I am changing the input ( i o 1 . i n ) (IO6 Plug between the SBC plug and USBC plug) by switching between GND and 3.3 Volt (even tried 5 volt out of desperation)

                          Created the input in the config.g file;
                          M 9 5 0 J 0 C " i o 6 . i n "
                          Save the file and restart

                          Then run M409 - Waste of time

                          Then run M950 J0 - Always responds with Pin io6 . in, active true - This never changes despite the electrical change at the input.

                          Then created a macro to try and give a message that reflects the state of the input

                          if sensors.gpIn[0].value != 0
                          M117 "Output should be on"
                          else
                          M117 "Output should be off"

                          But...........................

                          I also tried with the optoisolated inputs and variations on the pin naming.

                          I have checked the voltage at the input and that it is the correct input with the documentation several times.

                          I am ready to throw this thing across the room, how hard can it be to check the state of an input ????

                          Please tell me I am an idiot and what I have missed.

                          And why am I having to put spaces between (i o . 6) to post, They are NOT links.

                          Phaedruxundefined 1 Reply Last reply Reply Quote 0
                          • Phaedruxundefined
                            Phaedrux Moderator @machinemark
                            last edited by

                            @machinemark I think you should start a new thread for your issue instead of piggy backing on an old solved thread.

                            Z-Bot CoreXY Build | Thingiverse Profile

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