DIY a dispensing machine
-
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. -
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
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
-
@Phaedrux Thanks bro,I'll read it carefully.
-
@Phaedrux And one more question by the way, does control macro means my G-code files?
-
@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.
-
@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. -
What is your M670 command?
-
@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.
-
@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?
-
@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.