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

    Control a solenoid? Not working

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    13
    632
    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.
    • theolodianundefined
      theolodian
      last edited by

      I have set up a 24V solenoid on Out4 on a 6HC. The voltage jumper is set to Vin. The solenoid is wired across pins 2 and 4.

      In config.g: M950 P4 C"Out4"

      M42 P4 S1 doesn't work? I don't get any voltage to the solenoid. I also can't seem to see anything via the object model?

      Advice please, thanks.

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

        @theolodian :

        1. When you say "pins 2 and 4", which end of the connector are you counting from?

        2. Have you tried running M98 P"config.g" to check that the command is not provoking an error message?

        3. In the OM browser you should see the port in state.gpIo.

        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

        theolodianundefined 2 Replies Last reply Reply Quote 0
        • theolodianundefined
          theolodian @dc42
          last edited by

          @dc42 Not ground and not the tach. I tested them all with a meter and none of the pins changed state with M42 P4 S1 or S0.

          I'll test the rest later today. Still learning about the OM.

          1 Reply Last reply Reply Quote 0
          • theolodianundefined
            theolodian @dc42
            last edited by theolodian

            @dc42 Well, on the spare test system with RC2 in SBC mode the solenoid works as expected, however...

            ac74e41b-644a-49ec-8fcc-4e0ba4b7102a-image.png

            theolodianundefined 1 Reply Last reply Reply Quote 0
            • theolodianundefined
              theolodian @theolodian
              last edited by

              The M584 error has a mind of its own. Goes away for multiple reboots, then stays for multiple reboots.

              Also, trying to change the machine name from Duet3 refuses to work?

              M550 P"TestSys" ; set printer name

              34cea038-1159-4dcc-9e03-d625e506138f-image.png

              Stephen6309undefined 1 Reply Last reply Reply Quote 0
              • Stephen6309undefined
                Stephen6309 @theolodian
                last edited by

                @theolodian You have to into the OS on the PI and change the host name to get rid of the error. Use sudo raspi-config to do that via PuTTY or the menu item for rasberry config in VNC.

                I have a G4 S1 before any usage of addon boards in config.g, which helps with that.

                theolodianundefined 1 Reply Last reply Reply Quote 0
                • theolodianundefined
                  theolodian @Stephen6309
                  last edited by

                  @stephen6309 Thanks. I gave up on the name thing, but the rest is working for now. Cheers.

                  Now just need to try the M42 on the system on the machine. It is currently 3.4B7+2 in standalone mode, may have to try RC2.

                  theolodianundefined 1 Reply Last reply Reply Quote 0
                  • theolodianundefined
                    theolodian @theolodian
                    last edited by

                    And it all works when you don't have a copy paste error in your config.g that defines P4 as Out4 and then redefines it as Out6 later. 🙄

                    theolodianundefined 1 Reply Last reply Reply Quote 0
                    • theolodianundefined
                      theolodian @theolodian
                      last edited by

                      @dc42 Inverting the output doesn't seem to work?

                      M950 P6 C"!Out6"

                      Gives the same behaviour in the OM as without the !

                      theolodianundefined 1 Reply Last reply Reply Quote 0
                      • theolodianundefined
                        theolodian @theolodian
                        last edited by

                        @theolodian said in Control a solenoid? Not working:

                        @dc42 Inverting the output doesn't seem to work?

                        M950 P6 C"!Out6"

                        Gives the same behaviour in the OM as without the !

                        @dc42 in case this is a simple fix. Cheers

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

                          @theolodian this is intentional. The OM reports the value you commanded in the M42 command.

                          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

                          theolodianundefined 1 Reply Last reply Reply Quote 0
                          • theolodianundefined
                            theolodian @dc42
                            last edited by theolodian

                            @dc42 OK, confusing but yes it works.

                            It is not effective on reboot, I had to put an M42 P6 S0 in the config.g file.

                            Speaking of which, on 3.4RC2 in SBC mode the M584 error comes up consistently on changing the config.g file. An emergency stop sorts it out though. I have a G4 S5 on boot up to wait for the expansion boards.

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

                              @theolodian said in Control a solenoid? Not working:

                              Speaking of which, on 3.4RC2 in SBC mode the M584 error comes up consistently on changing the config.g file. An emergency stop sorts it out though. I have a G4 S5 on boot up to wait for the expansion boards.

                              There has been a fix to RRF since RC2 that addresses this.

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