Controlling 4 bed-fans 24V with G-Code
-
Hello community,
I am trying to Control 4 Fans for cooling the Bed after printing for an E3D closed Printer with tool changer.
Now I am using a SSR-Relay -DC-DC connected to a Magnetic-Sensor on the Door of the Printer, when the Door is open then the Relay will be opened and Power the Fans.
First, every fan needs 24 V DC, so I have to supply them from the Power supply, that because of the max. voltage output from I/O connectors on Duet 3 6HC is 12 V
SO, i am trying to control the Fans with I/O connectors by opening and closing the Relay:
1- How to control the 24V fans with g-code, I know that the M106 is responsible for that, but where should i write it?? (Config.g?? or Macro??)2- if i want the Fans to start cooling after finishing Printing for a certain period let’s say 3 min,
OR
3- If I want to start cooling, if the Printer has finished printing and the Bed Temperature is above 30 C.
So how to express 2 and 3 in g-code??? And am I able to control that Relay with I/O connector?
I appreciate your help! And I am sorry for my Bad English
-
@tim-0 I would use M106 and G4 "Wait" commands in the slicer end gcode.
M106 P2 S255 ; set bed fans to 100% to cool bed G4 S180 ; wait 3 minutes M106 P2 S0 ; turn off bed fans
G4 S180 will wait for 180 seconds before the next command.
As for your 3rd question. I'm not sure how to have an "if" command for temperature, hopefully someone else can help with that.
Out of curiousity, when would your print bed be under 30°C at the end of a print?
Another possibility if you have fans under the bed and a sealed chamber, you can use the fans to move heat around the chamber and increase chamber temperature! Importantly If you do this, run another PID tune for the bed before heating it!
-
@threepwood Thank u for ur Reply
there is Meta commands on Duet 3D Documentation u can check it out: https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commands
I appreciate the Code but what if someone wanted to Print using another Slicer, so it (the Code) must be written again in the new Slicer, this Printer is connected to another production machines and a Server with many PCs, and it should able to receive a print command from any PC, so it should control the Fans even if that Code not Written on the Slicer. (so maybe Macro/Sub-Program!!!???)
for the Temperature we have done some Tests (without fan takes 29 min to cool to Roomtemp.. with one Fan 9 min and 56 sec) and have calculated some numbers using an long Equation and we came up with 3.4 min (3min 24 sec) using 4 Fans when Roomtemp 20 C (in the Equation 20 C) it means to reach to 20 C need 3 mins and 24 sec.
to reach 30 C need like 2 min and 20 seci tryed to Upload Images for the Equation and the Test but it gives me an Error
-
@tim-0 There are Print_end.g and Print_start.g, which you could put the fan code in, but as I understand it, you will still need to edit the slicer start gcode to call the files. This will make it slightly easier to change between slicers.
I've not tried using meta commands, but it looks interesting.