Extruder (Hot End) Fan Control

What is the problem?
Not really a problem, more of a feature request. My extruder (Hot End) fan runs constantly, using energy and making noise, even when not printing and the nozzle is cool.

What did you already try to solve it?
Neither Octorpint nor Marlin offers this capability, as far as I can determine. I am running Octoprint version 1.3.9 on a Raspberry Pi 3 B+ and the current TH3D Unified Firmware version of Marlin on a Creality Ender 3.

The only way I can find to turn off the fan is to turn off the printer. I print frequently, but not constantly, and would rather not have to turn the printer off between prints.

It would be nice if Octoprint could detect when the hot-end is cool and automatically turn off the extruder fan, restarting it when the heater is turned on. I am not suggesting variable fan speed control, only off and on. Perhaps this could be added to the current fan control plugin.

This feature would be very beneficial to my workplace environment. Any thoughts?

Thanks for your consideration.

If you have a reprap/Marlin sort of firmware, you ought to be able to do an M107 to turn off the fan(s).

Combine this with a custom Control tab button and you're all set.

Thanks for the suggestion Guru. I added the Custom Control, but it has no effect. I'll explore that further. It would be nice if this happened automagically,

The TH3D Unified Firmware is Marlin with added features.

Reddit is down so I can't finish researching, but check to see if it's even possible to turn it off with gcode. Many low-end printers have an always-on extruder.

On my little MP Delta there's a power supply fan on the bottom. I had to rewire it so I could switch it on/off with the Pi.

This suggests that you're not the only one with this problem.

Not sure if this is your board but if it is, then the fan needs to be connected to the Controlled Fan connection rather than to just +5, for example. Sometimes they swap that and the case fan by accident.

If your extruder fan, as most of extruders fans are, is connected directly to the power supply, just as mine is, you can´t do that if you don´t turn-off the power supply or connect it other way.

In my case, that´s what I´ve done:
I have a relay board controlling when the power supply turns on or off, and with PSU Control plugin, I can use G code to turn-on the power supply when starting a print, and turn it off automatically when the print ends. So, not only the parts fan turns off, but the power supply fan, that is noisy, too.
As long as the printer is connected to the USB, it gets enough power to keep connected to octopi and to receive and issue commands, as long as you are not trying to move any motors or heat anything.

Most is possibly an overstatement here. Many cheap printers save a few cents by skipping the FET for the fan and hardwiring it, or don't assemble them correctly, but plenty of E3D-style hot ends with cooling fans are installed by printer manufacturers who wire things correctly or are aftermarket mods or on custom builds and are properly wired by their owners.

Please do not take the following as an attack, as it's not, but rather as the advice of someone who knows a bit about failure modes and is concerned for your well-being:

This may have worked so far in your case, but it's not a reliable solution to assume that powering a printer control board from an RPi, even when not heating, etc., won't cause a power event on the Pi or cause the controller to wind up in a dangerous state, especially since supervisors and watchdogs are often not properly implemented to ensure resets occur if a brownout condition causes a hang. Please keep in mind that brownout conditions can lead to pins in unreliable states, which may do something stupid that you'd never expect or intentionally experience, like turn on your power supply and heaters with no PWM or monitoring, in the case of your particular setup.

This setup is a fire hazard because it could cause heaters to turn on without thermal runaway protection, due to a hung MCU. The likelihood of this happening is high enough that similar failure modes have led to specific safety regulations to avoid them in industrial automation, automotive systems, aeronautics, etc. 3D printers and RPis are not designed to these specs and are far more susceptible to these failure modes than your average car (look up people being injured or killed due to problems with their automotive electronics/indicators - it happens, even with these standards, and leads to recalls to reprogram or replace ECUs, etc.; also look up posts on here where RPis and/or USB peripherals misbehave and it turns out to be a power issue - it's quite common).

Your printer power scheme, while creative, is unusual and contrary to good engineering safety practices. Get a Sonoff switch or similar for <$10 and prevent a sad story. If you don't believe me, read @foosel's posts about why OctoPrint checks if a printer's firmware has thermal runaway protection turned on and search the forums and follow the links to reports of houses that burned down.

Hack a Sonoff and save a life today!

1 Like

Supertaz, I will research for more information.

What I didn´t understand is how heaters could turn-on with power supply off.

I control printer´s power supply with a relay board attached to raspberry Pi. Raspberry in fact controls only if relay is on or off, and by default I use it in off position.

My printer´s firmware has thermal runaway turned on, and the way I´m controlling my PSU, it only turns off the fans after temperature drops under 50 degree celsuis, and turns off the PSU also.

I haven´t detail more, for a simplistic overview. My shutdown script also cuts USB ports energy, so printer is completely out of power. I just mentioned that with USB power the control board is energized, because sometimes I power only using USB to change simple things, like a Z offset, for example. Didn´t think It could harm anything.

Thanks for sharing your concerns. This kind of experience exchange makes us learn things. If you want to give more info, I´ll be very happy to make my printer safer. :slight_smile:

A couple of things here. My read of your description made it sound like the controller was switching the relay here, which would be bad with that power setup. The thermal runaway issue happens when the board isn't able to get enough current over USB and the chip gets into a bad state and becomes unresponsive, but flips a heater on. This isn't an issue if you use a separate relay off the RPi, it's just a misunderstanding of your explanation, and the lack of a diagram to clarify it let my brain keep processing it that way.

Mind you, poor board designs could potentially power things like heaters and steppers, even off USB. That's why unplugged machines with LCDs light up when you move the mechanics fast enough...the motors act as generators and poor board designs allow for that power to back feed into the system, lighting up the backlight. It rarely causes anything else, though, because the axes' travel is so short. A similar flaw could theoretically let a flipped bit turn on a heater, which then draws too much current, causing the RPi to flip a bit, turning the power supply on, and allowing for thermal runaway. Possible, but not likely. Still, a reason to be careful about powering a controller over USB with heaters plugged into it.

A Sonoff switch is line powered, so you don't have to worry about these issues, just how to flash it with an image and how to install mosquito on your RPi.

Thanks again for your explanation, my friend!
Maybe I´ve been to simplistic with my previous post. English is not my native language, so sometimes when I try to translate something I have difficulty with words.

More likely my brain was tired and I misread :slight_smile:

@Dewsweeper did you find a solutions eventually?

Just installed octoprint and my hot-end fan is making that whining noise. I just took a look at the board and it seems like the fan is connencted to the board directly but not trough a header but through a screw terminal. According to some creality documentation the terminal is called the almost on terminal so no way of turning it of using code.
To me it seems like the fan is getting the 5V from the usb.
I wonder if the same problem will arrise when using a different fan...

Sorry for reviving this topic btw

The hot end fan on the Ender 3 is connected to a JST connector on the main board.

My issue was that the hot-end fan ran whenever power was applied to the Ender 3. This is a 'feature' of the Marlin software on that controller. This annoys me because it makes noise even when the printer isn't warm.

To the best of my knowledge, the solution to that problem is a different controller board.

Thanks for replying.

My problem is that the fan gets power when the printers board is powered by the USB of the raspberry. It's not enough to turn the fan but enough to make it whine.
A different board seems like the best solution yes...
I've just ordered a noctua fan and I'll see if it makes a difference...

Be aware, as far as I know, the Noctua fan all use 12-volt power, where the Ender 3, and other printers use a 24-volt power supply. If that is your situation, be sure to adjust the voltage to the fan.

Yep I have a step down module just for that occasion. Thanks for the concern, it's a scary thing to mess with the electronics of a printer.