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

    DIY a dispensing machine

    Scheduled Pinned Locked Moved
    Laser Cutters
    3
    10
    505
    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.
    • NO1NOKAOundefined
      NO1NOKAO
      last edited by NO1NOKAO

      I want to DIY a dispensing machine, using PWM Fan0 to control the switch of the air pump. What do I need to write in the configuration file? The manual says to use the M950 to configure a tool. I would appreciate your providing specific examples or any detailed description.
      By the way, my control panel is Duet2 wifi and Duex5.

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

        Sounds like you want to use a combination of M950 to define the pin and M42 to switch it.

        https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m42-switch-io-pin

        https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m950-create-heater-fan-spindle-or-gpioservo-pin

        In config.g:
        M950 P0 C"fan0" ; create output port 0 attached to fan 0 pin
        
        In your control macro:
        M42 P0 S0 ; turn pin off
        or 
        M42 P0 S1; turn pin on
        

        Z-Bot CoreXY Build | Thingiverse Profile

        NO1NOKAOundefined 2 Replies Last reply Reply Quote 0
        • NO1NOKAOundefined
          NO1NOKAO @Phaedrux
          last edited by

          @Phaedrux Thanks bro,I'll read it carefully.

          1 Reply Last reply Reply Quote 0
          • NO1NOKAOundefined
            NO1NOKAO @Phaedrux
            last edited by

            @Phaedrux And one more question by the way, does control macro means my G-code files?

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

              @NO1NOKAO said in DIY a dispensing machine:

              does control macro means my G-code files?

              It means where ever you want to activate the device from.

              Z-Bot CoreXY Build | Thingiverse Profile

              NO1NOKAOundefined 1 Reply Last reply Reply Quote 0
              • NO1NOKAOundefined
                NO1NOKAO @Phaedrux
                last edited by

                @Phaedrux
                Thanks buddy, it really worked well.
                Now I'm facing another new problem that the pump-switching voltage does not match the panel-output-voltage. Because when I send G1 P0 S0 command, the control panel outputs 1.13V voltage and when I send P0 S1, it outputs 24V voltage. It's really difficult to adjust the voltage to 5V. Do you have any suggestions for that?
                Finally, please allow me to express my thanks once again.

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

                  What is your M670 command?

                  Z-Bot CoreXY Build | Thingiverse Profile

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

                    @NO1NOKAO if the pump requires 5V switching voltage at low current then I suggest you use one of the five PWM outputs on the DueX board.

                    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

                    NO1NOKAOundefined 1 Reply Last reply Reply Quote 0
                    • NO1NOKAOundefined
                      NO1NOKAO @dc42
                      last edited by

                      @dc42 If I use a duex5 expension board, should I make some definition in config.g file to make sure both of the duet2 wifi and duex5 are enabled? I mean that changing the C parament of M950 command is needed and what else?

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

                        @NO1NOKAO the DueX will be enabled automatically when the firmware on the Duet detects it. If you send M115 then the response should mention the DueX.

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