Notifications
Clear all

GPIO control based on printer hotend temp?  

  RSS
jurassic73
(@jurassic73)
Estimable Member
GPIO control based on printer hotend temp?

Is there any way to monitor printer status info to switch GPIOs based on values? That is, can I check the temp of the extruder and when it goes down to say 40C, turn off a GPIO output? Thinking of my enclosure fans which are run off a power strip which has a relay to switch it on and off. Once a print finishes it will needs some time to continue to exhaust.

Also, can I control the state of a GPIO output with a GPIO input? That is I have two input pins. One would be a button press to set a GPIO pin to high, the other to set low. This way I can turn something on and off.

This topic was modified 3 weeks ago by jurassic73

MK3s / My IKEA Lack enclosure

Posted : 14/10/2024 5:55 pm
unclej84
(@unclej84)
Member
RE:

For the buttons you can simply put 2 gcode files (btn_x.gcode where x is the input) into the "macros" folder on the USB stick - one only contains the code for setting your output to high and the other contains setting your output to low (M262 + M264 - see here).

Regarding temperature  I don't think this is possible as all control structures (if else ..) is evaluated in the slicer. But what you could do, is connect the output pin of a different micro-controller with temperature sensor to the input and then also call the gcode file for setting the output.

This post was modified 3 weeks ago 2 times by unclej84
Posted : 15/10/2024 2:44 pm
TravisWilder
(@traviswilder)
Active Member
RE: GPIO control based on printer hotend temp?

There is a gcode to set the hotend temp and wait. This you can add to the end of print and after it the gpio gcode

Posted : 19/10/2024 8:18 pm
Share: