Hotend Fan RPM Monitoring
Macros are compatible with Klipper only.
This macro polls your hotend fan RPM and executes custom gcode if a fan failure is detected.
Macro located here. Written by alch3my.
I highly recommend implementing this. It can save your printer from some pretty catastrophic failures.
Info
This macro set requires a 3-wire fan with tachometer_pin configured.
- If yours is a two-wire fan, I would still recommend replacing it.
- For a 4010 fan, I recommend the Sunon
MF40101VX-1000U-G99
or the DeltaAFB0412VHA-DU48
.- Note that these are both 12V fans. I tend to prefer 12V fans because there is much more choice.
- On boards with a selection jumper, make sure to set your fan output to 12V.
- Otherwise, connect the positive wire to a 12V supply or buck converter.
- The negative lead should still go to the fan header’s control pin.
- Good 24V alternatives are the NMB
04010SS-24N-AT-00
and the OrionOD4010-24HB01A
. - These are far from the only fans available. If they’re out of stock, use Digikey’s search for 3-wire fans.
- Preferably avoid sleeve bearings - they work fine, but they’re less suited to elevated (chamber) temperatures, and I’ve personally had more fail on me.
- DigiKey 24v search
- DigiKey 12v search
- Note that these are both 12V fans. I tend to prefer 12V fans because there is much more choice.
- I recommend using this guide’s pause/resume macros with this. They will automatically turn the hotend off for a pause and automatically return it to temperature for resume.
Setup
1. Connect your hotend fan’s RPM/tach wire to a spare endstop port.
- On the input pin, not the 5V or gnd pins. Refer to your board’s pinout diagrams.
2. Set tachometer_pin
in your [heater_fan hotend_fan]
section.
- Don’t forget a pullup (^) on the tach pin (example:
tachometer_pin: ^P1.29
)- Get your pin number from your board’s pinout diagram.
- See here for further tachometer config reference.
3. Place fan_tach_monitor.cfg
in the same directory as your printer.cfg
.
4. Add [include fan_tach_monitor.cfg]
to your printer.cfg
.
5. Change min_rpm
and max_consecutive_stops
in the HOTEND_FAN_CHECK
macro to your desired values.
6. Place your desired hotend fan failure g-code in FAN_STOPPAGE_ROUTINE
.