Send Gcode Depending on Rpis temp

What is the problem?

My Rpi 4 is contained in a closed box with printers mb and psu so box get hot enough to thermal throttle pi

What did you already try to solve it?

I have added a 12v 4020 fan in to the box
Fan is normally loud when it contained in a no airflow box it gets louder


So what I would like to do is connect fan to one of pwm ports on mb and control it according to rpis heat
Like if temp is higer than 70°C full power
if temp is around 50 %50 power
if temp is around 35 turn off the fan

As far as I know I can do this with rpi gpio and a mosfet but it would be bwtter if some kind of plugin do this

I have an Argon Fan Hat on my RPi 4B.

Looking really great
But no one selling this in Turkey and buying it internationally is too expensive for me I rather build the circuit myself
But anyway if I can use gcode
it is going to be better and cheaper

Thanks for the advice

If any of the plugins can do this, it might be the enclosure plugin. Not sure if it will read the RPi temp or not, but it can control fans & stuff.

If it does not, it should not be too difficult to create a plugin for your setup if you would like. If you know how to create a Python script, you could probably make it into a plugin.

1 Like

I am confused. You have a RPi 4B that needs cooling and you want to control that cooling based on the temperature of the RPi. Why do you need an OctoPrint plugin or gcode?

I believe there are numerous articles and/or videos on how to accomplish this. For example,

it have a pwm support but it can't read rpis temp also it is depracated I guess the owner is working on new version right now

here is why
the case contain all of the electronics is already a cable mess
And I dont want to add aditional transistor and a mosfet
my mb is capable of driving a pwm fan so it is as easy as hey temp is going up so m106 s255
of course if I cant find this kind of solution than I will use a mosfet like everybody
but this is going to make cooling easier for many others too

hey @vitormhenrique
it would be great if enclosure plugin v2 can read rpis temp too

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.