• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    theolodian
    last edited by 25 Feb 2022, 13:03

    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.

    undefined 1 Reply Last reply 25 Feb 2022, 13:42 Reply Quote 0
    • undefined
      dc42 administrators @theolodian
      last edited by dc42 25 Feb 2022, 13:42

      @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

      undefined 2 Replies Last reply 25 Feb 2022, 15:34 Reply Quote 0
      • undefined
        theolodian @dc42
        last edited by 25 Feb 2022, 15:34

        @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
        • undefined
          theolodian @dc42
          last edited by theolodian 27 Feb 2022, 13:19

          @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

          undefined 1 Reply Last reply 27 Feb 2022, 14:06 Reply Quote 0
          • undefined
            theolodian @theolodian
            last edited by 27 Feb 2022, 14:06

            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

            undefined 1 Reply Last reply 27 Feb 2022, 15:18 Reply Quote 0
            • undefined
              Stephen6309 @theolodian
              last edited by 27 Feb 2022, 15:18

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

              undefined 1 Reply Last reply 28 Feb 2022, 13:34 Reply Quote 0
              • undefined
                theolodian @Stephen6309
                last edited by 28 Feb 2022, 13:34

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

                undefined 1 Reply Last reply 1 Mar 2022, 11:37 Reply Quote 0
                • undefined
                  theolodian @theolodian
                  last edited by 1 Mar 2022, 11:37

                  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. 🙄

                  undefined 1 Reply Last reply 1 Mar 2022, 13:15 Reply Quote 0
                  • undefined
                    theolodian @theolodian
                    last edited by 1 Mar 2022, 13:15

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

                    M950 P6 C"!Out6"

                    Gives the same behaviour in the OM as without the !

                    undefined 1 Reply Last reply 3 Mar 2022, 13:56 Reply Quote 0
                    • undefined
                      theolodian @theolodian
                      last edited by 3 Mar 2022, 13:56

                      @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

                      undefined 1 Reply Last reply 4 Mar 2022, 07:54 Reply Quote 0
                      • undefined
                        dc42 administrators @theolodian
                        last edited by 4 Mar 2022, 07:54

                        @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

                        undefined 1 Reply Last reply 4 Mar 2022, 09:59 Reply Quote 0
                        • undefined
                          theolodian @dc42
                          last edited by theolodian 3 Apr 2022, 10:00 4 Mar 2022, 09:59

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

                          undefined 1 Reply Last reply 4 Mar 2022, 10:56 Reply Quote 0
                          • undefined
                            dc42 administrators @theolodian
                            last edited by 4 Mar 2022, 10:56

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