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.

Hey there sorry for digging this thread up but I have the exact same setup and the exact same question:

@terra said that you need to put a diode in between the tacho-output and the tacho-pin, but what kind of diode? Do I not need a step down module 127V → 3.3V?

Also I had the issue that the PWM control didn’t seem to change the output voltage and therefore the actual rpm, any ideas why this might be the case?

A PWM output does not change the voltage, it changes the puls width.

What are you deal with? A mains running device (here fan) should not be connected to SBC or MCU. Not even with a step down module.

So this diode thing is obsolete too.

@EddyMI3D I know what PWM does but by changing the pulse width it lowers the effective voltage. But that was not my point. The point was that the actual rotation of the fan didnt change for different %-levels that I changed in Klipper.
Also normally if one would measure the voltage of a PWM driven output, the multimeter (or at least my multimeter) shows a ever changing value since it can’t keep up with the speed of the changing voltages.
In this case my multimeter showed a steady 12V output.
Could it be that this is the case because I put a step down converter between the fan and the output pins on the mainboard (the output is 24V)? I read somewhere that the PWM is realized by the GND pin, so maybe I need to plug the GND of the fan directly into the mainboard and only run the VCC pin through a step down module?

To your second question:
I want to get a tachometer signal to my motherboard, so I need to plug the cable into my mainboard somewhere. But the signal coming from the fan should have the same voltage as the operatin voltage of the fan which is 12V. The logic of the SKR Mini E3 v3.0 is running on 3.3V and as @terra already said, just plugging it in may damage the mainboard.