Hotend Fan RPM Monitoring?

Basic Information:

Printer Model: Ender 3 v2
MCU / Printerboard: SKR mini E3 V3

Hi all,

My MCU is SKR mini E3 V3. I was following this guide: Hotend Fan RPM Monitoring | Ellis’ Print Tuning Guide to implement PWM fan monitoring on my hotend. I use Klipper.

I ran into an issue where once I connect the 3rd wire (techometer) the fan will get a constant 20.4v making it hot to the touch and smelly. This voltage is supplied even if the hotend is cold.

This is the board diagram: BIGTREETECH-SKR-mini-E3/BTT E3 SKR MINI V3.0_PIN.pdf at master · bigtreetech/BIGTREETECH-SKR-mini-E3 · GitHub

I connected the 2 pins to the FAN 1 header and the 3rd PWM wire to the Z-endstop PC2 pin.

It seems that no matter which PWM pin I choose, I either get ADC error min/max temp out of range or this constant 20.4v to the fan while it’s not spinning.

Is there any other way I can kill the heaters if there’s a fan failure of the temp near the heatbreak is rising?

You need to put a diode on the tach pin. The fan’s circuit is trying to complete itself through the tach pin. You may have already damaged the GPIOs.

Alternatively you can use a PWM fan, but there aren’t many of those in 24v.

If you only have a 3 pin PWM fan then there is no RPM signal and I doubt you can monitor RPMs in this way.
My CoreXY uses a 4 pin PWM fan with tacho signal and is configured like this on a BTT SKR2:

[fan]
pin: !EBBCan: PA0
enable_pin: PB3
cycle_time: 0.01
kick_start_time: 0.200
shutdown_speed: 0
hardware_pwm: false
tachometer_pin: ^EBBCan: PB7 
tachometer_poll_interval: 0.0005 # will support up to a 30.000 RPM fan with 2 pulses per rotation.

If you only have a PWM fan then try different cycle times and if your board supports it hardware PWM.

Would also be nice in any way to have your klippy.log attached!
What exact fan are you using?

1 Like

klippy.zip (1.6 MB)
I used this fan:
Brand: SUNON
Model: MF40102VX-Q00U-GAD
Size: 40 * 40 * 10mm
Voltage: 24V
Current: 1.44W

I also ordered this fan https://vi.aliexpress.com/item/4000582229294.html
109P0424H7D28

For Sanyo
Model : 109P0424H7D28
Size : 40 * 40 * 15mm
Voltage : 24V
Current : 0.08A
Wire : 3pin
Features: stall alarm

If I use a 4-pin PWM fan, can I use the +/- on the fan header and the other two wires on the 2-pin Z-endstop?

I assume you refer to the GPIOs of the SKR mini, right?
how can I test that they are damaged?

1 Like

Nope.

4 wire fan is

  • Vcc
  • GND
  • PCM
  • Tacho

Fan header is

  • Vcc
  • GND

Z-Endstop is

  • Sig in
  • GND or Vcc depending on used logic
1 Like

It seems that there is some confusion regarding 2-wire, 3-wire and 4-wire fans. Below is my understanding but I happily stand corrected

2-Wire Fan

  • Pins
    • GND
    • VCC
  • Can be controlled by PWM on the VCC pin
    • Needs a pin supported by a MOSFET as the entire fan’s load is driven via this pin
  • No feedback of the fan speed or fan failure

3-Wire Fan

  • Pins
    • GND
    • VCC
    • Tacho signal
  • Can be controlled by PWM on the VCC pin
    • Needs a pin supported by a MOSFET as the entire fan’s load is driven via this pin
  • Feedback via the Tacho pin BUT only during the “on phase” of the PWM signal → Essentially only usable for fans running on continuous DC

4-Wire Fan

  • Pins
    • GND
    • VCC
    • Tacho signal
    • PWM input
  • Can be controlled by PWM on the PWM pin
    • Essentially any pin can do it (software PWM)
  • Feedback via the Tacho pin independent of the PWM input
2 Likes

I’m very interested, how to check GPIOs with Klipper.
Can somebody give me a hint, where to look?

I agree with your explanation.