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.

Ce sujet a été modifié il y a 1 month par jurassic73

MK3s / My IKEA Lack enclosure

Publié : 14/10/2024 5:55 pm
unclej84
(@unclej84)
Membre
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.

Ce message a été modifié il y a 1 month 2 fois par unclej84
Publié : 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

Publié : 19/10/2024 8:18 pm
Partager :