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

    DUET 2 WIFI, RELAY CONTROL VIA GPIO

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    5
    15
    1.9k
    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.
    • DIY-O-Sphereundefined
      DIY-O-Sphere @Gianluca
      last edited by

      @gianluca
      You can control that typ of relay with the PS_ON pin.

      (UTC+1)

      Gianlucaundefined 1 Reply Last reply Reply Quote 0
      • Gianlucaundefined
        Gianluca @SIam
        last edited by

        @siam I tested the relay with the raspberry PI 4 and it works perfectly powered at 3v

        1 Reply Last reply Reply Quote 0
        • Gianlucaundefined
          Gianluca @DIY-O-Sphere
          last edited by

          @diy-o-sphere said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

          @gianluca
          You can control that typ of relay with the PS_ON pin.

          Interesting... could you give me some additional information on this solution?
          I found the PS_ON pin, but what configuration could I use men config.g?

          DIY-O-Sphereundefined 1 Reply Last reply Reply Quote 0
          • Gianlucaundefined
            Gianluca @cosmowave
            last edited by

            @cosmowave said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

            @gianluca said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

            I added the command M950 F4 C "exp.heater7" Q500 in config.g and I wanted to switch the relay on and off through M42 P7 S1 and M42 P7 S0.

            With M950 F4 you have created a fan#4.
            So you have to use M42 P4 S1 afterwards, for switching on the relay.

            Correct, I try this evening...

            dc42undefined 1 Reply Last reply Reply Quote 0
            • DIY-O-Sphereundefined
              DIY-O-Sphere @Gianluca
              last edited by

              @gianluca said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

              could you give me some additional information on this solution

              You can switch the pin with M80/M81.
              Check the option for M81 maybe it is useful in your case.

              In RRF3 "pson" is available as a pin name for the 6HC . So configurable with M950.
              But for the other boards the pin is not listed here.
              I would have expected that this is uniform in RRF3, maybe @dc42 can confirm that.
              I can't get why for those boards PS-ON is hard wired in the firmware.

              (UTC+1)

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

                @gianluca that relay should work if you connect the relay connection labelled +5V to +5V on the Duet, instead of to +3.3V.

                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

                DIY-O-Sphereundefined 1 Reply Last reply Reply Quote 0
                • DIY-O-Sphereundefined
                  DIY-O-Sphere @dc42
                  last edited by DIY-O-Sphere

                  @dc42
                  So the gpio pin is cappable to take 5V?
                  I thought since the logic runs on 3.3v no higher voltage should be applied. What is the limit?

                  Edit:
                  Talking about expansion port....

                  (UTC+1)

                  dc42undefined 1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators @DIY-O-Sphere
                    last edited by

                    @diy-o-sphere said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

                    So the gpio pin is cappable to take 5V?

                    No, it isn't. However, the schematic for that relay module shows that the SIGNAL input is used to feed a transistor and LED, and the 5V input provides the power to the relay, which is switched by the transistor.

                    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

                    DIY-O-Sphereundefined 1 Reply Last reply Reply Quote 0
                    • DIY-O-Sphereundefined
                      DIY-O-Sphere @dc42
                      last edited by DIY-O-Sphere

                      @dc42
                      Ok. That makes sense....

                      (UTC+1)

                      1 Reply Last reply Reply Quote 0
                      • Gianlucaundefined
                        Gianluca @cosmowave
                        last edited by

                        @cosmowave said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

                        @gianluca said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

                        I added the command M950 F4 C "exp.heater7" Q500 in config.g and I wanted to switch the relay on and off through M42 P7 S1 and M42 P7 S0.

                        With M950 F4 you have created a fan#4.
                        So you have to use M42 P4 S1 afterwards, for switching on the relay.

                        I have tryed with:
                        M950 F4 C"exp.heater7" Q500 in config.g
                        and M42 P4 S1 to turn ON on console.
                        But pin 31 (heater7) is always on 0,0Volt.

                        I also powered the relay at 5v (not at 3.3V as in the picture ) but nothing changes...

                        1 Reply Last reply Reply Quote 0
                        • Gianlucaundefined
                          Gianluca @DIY-O-Sphere
                          last edited by

                          @diy-o-sphere said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

                          @gianluca said in DUET 2 WIFI, RELAY CONTROL VIA GPIO:

                          could you give me some additional information on this solution

                          You can switch the pin with M80/M81.
                          Check the option for M81 maybe it is useful in your case.

                          In RRF3 "pson" is available as a pin name for the 6HC . So configurable with M950.
                          But for the other boards the pin is not listed here.
                          I would have expected that this is uniform in RRF3, maybe @dc42 can confirm that.
                          I can't get why for those boards PS-ON is hard wired in the firmware.

                          Tested, all working good ... thanks.
                          Now I just have to work the relay with the GPIO on heater7

                          1 Reply Last reply Reply Quote 0
                          • Gianlucaundefined
                            Gianluca
                            last edited by

                            Note, the solution for correct run of relay is:
                            M950 F4 C"exp.heater7" Q500 (create a fan4)
                            M4106 P4 S1 (to turn ON the fan or relay).

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