Fan tachometer not giving any value for `[heater_fan]`

Basic Information:

Printer Model: Elegoo Orange Storm Giga
MCU / Printerboard: BTT Manta M8P, printhead: BTT EBB SB2209 CAN V1.0
Host / SBC: BTT CB1
klippy.log (2.4 MB)

Edit: reworked the original thread for clarity.

I’m using a Noctua 4 wire fan as the hotend fan connected to a BTT EBB SB2209 CAN (specifically the EBB SB0000 CAN) 4-wire fan header.

The configuration for the fan is as follows:

[heater_fan heater_fan]
pin: mcu1:PB14
max_power: 1.0
cycle_time: 0.00001
fan_speed: 1.0
hardware_pwm: False
heater: extruder
heater_temp: 50.0
kick_start_time: 0
off_below: 0.0
tachometer_pin: ^mcu1:PB15
tachometer_ppr:2
tachometer_poll_interval: 0.00004

The fan is running fine; switching ON and OFF when threshold is reached or the hotend is heating, but neither Fluidd nor Mobilraker show any RPM for the fan when it’s running.

I have tried the following to fix it, but no luck:
→ Changed values for tachometer_poll_interval (0.01 to 0.00001)
→ Deleted and added pull-up to tachometer_pin
→ New fan
→ New printhead board 2x
→ Re-crimped the connector 3x

Nothing I try seems to give me any RPM for the fan, which makes it slightly hard to see if it’s running at the 5000 1/min which it should, or if I need to change settings.

I have found the following multiple forum threads, were people have the same issue, where this thread says, it works with [fan] instead of [heater_fan].

Might this be a Klipper issue?

Maybe you can read here:

Hotend Fan RPM Monitoring? - General Discussion - Klipper

1 Like

I can guess you are talking not about “there is no data”, but about “I can’t see a number in the UI”.

So, if you try to implement a simple macro like:

[gcode_macro blink_led]
gcode:
  M117 { printer["heater_fan heater_fan"].rpm }

Can do the trick.

Thanks a lot for the reply.
Apologies, but I’m not sure how the discussion you shared is of relevance for this discussion. Or am I not seeing something obvious in the shared discussion?

I am using a 4 wire fan on a 4 wire header. There is no confusion on how to run the fan and everything seems to work except for the fan speed.

Oh, I’ve never thought about that actually. I assumed Klipper would automatically connect the tachometer data to the fan.
I will try as soon as I can and update the thread.

It was not clear that it works fine except the output and where you expected the output.
In my referenced link my printer showed the RPM next to the fan control slider in the Mainsail fan panel.
However I do not know what you are trying to do.

You’re right, I’m very sorry. The description of my issue is indeed pretty bad.

I will update and elaborate it later in the day, when I can take the time to actually describe it so others can understand.

2 Likes

I have tried to clarify what I’m having trouble with. I hope this makes it clearer.

2 Likes

This looks better now.

Though the fan is working it looks like you have the wrong pins in use.

Regarding to the official EBB SB2209 CAN config template this should be correct:

[fan_generic 4W_FAN0]
pin: EBBCan:gpio15
tachometer_pin: EBBCan:gpio12
#tachometer_ppr: 1

Did you use aliases for the pins or did you connect the fan to the main MCU? RP2040 only uses GPIO namings for its pins.
Sometimes it can be problematic when aliases are used.

I did make a test:

[heater_fan heatbreak_cooling_fan]
pin: ebb42:PA0 # FAN0
heater: extruder
heater_temp: 70.0
fan_speed: 0.5
cycle_time: 0.003

tachometer_pin: PG15 # I do have hardware pull-up here
tachometer_ppr: 2
tachometer_poll_interval: 0.0003

So, I remapped working tachopin from other fan, and well, it works:

[respond]
[gcode_macro TEST_TACHO]
gcode:
  ECHO { printer["heater_fan heatbreak_cooling_fan"].rpm }
$ TEST_TACHO
// Unknown command:"ECHO 5428.914217156571"

Your mobileraker screenshot clearly shows that UI is aware of the tacho pin.

So, I would guess there is an issue with detecting RPM, not ui or Klipper.

2 Likes

Probably it is the stm32 chip:

MCU 'mcu1' config: ADC_MAX=4095 BUS_PINS_i2c1_PA9_PA10=PA9,PA10 BUS_PINS_i2c1_PB6_PB7=PB6,PB7 BUS_PINS_i2c1_PB8_PB9=PB8,PB9 BUS_PINS_i2c2_PA7_PA6=PA7,PA6 BUS_PINS_i2c2_PB10_PB11=PB10,PB11 BUS_PINS_i2c2_PB13_PB14=PB13,PB14 BUS_PINS_i2c3_PA7_PA6=PA7,PA6 BUS_PINS_i2c3_PB3_PB4=PB3,PB4 BUS_PINS_i2c3_PC0_PC1=PC0,PC1 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1_PA6_PA7_PA5=PA6,PA7,PA5 BUS_PINS_spi1_PB4_PB5_PB3=PB4,PB5,PB3 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi2_PB14_PB15_PB13=PB14,PB15,PB13 BUS_PINS_spi2_PB2_PB11_PB10=PB2,PB11,PB10 BUS_PINS_spi2_PC2_PC3_PB10=PC2,PC3,PB10 BUS_PINS_spi2a=PC2,PC3,PB10 BUS_PINS_spi3=PB4,PB5,PB3 BUS_PINS_spi3_PB4_PB5_PB3=PB4,PB5,PB3 CANBUS_FREQUENCY=1000000 CLOCK_FREQ=64000000 MCU=stm32g0b1xx PWM_MAX=257 RECEIVE_WINDOW=192 RESERVE_PINS_CAN=PB0,PB1 RESERVE_PINS_crystal=PF0,PF1 STATS_SUMSQ_BASE=256 STEPPER_OPTIMIZED_EDGE=8 STEPPER_STEP_BOTH_EDGE=1

So probably it is the:

2 Likes

Ah that makes sense! Did not check the klippy.log as I’m in the phone.
Maybe the cable or connector is bad.

Yes, it’s the STM32 version.

Correct. The UI is aware of it, but no matter what I do, I can’t get any value for the RPM. I can test what you suggested, but if the Mobileraker UI isn’t detecting any RPM, I doubt a macro will.

I’m pretty sure the hardware is alright too, as I checked and double checked the crimped pin is sitting properly on the cable.

It could be, that the pull-up resistor build into the board is too small. I will try to add a hardware one.

Trust me, that was my fear as well. But on two different fans, 3 different boards and 6 different crimps?

If it is too small, it would not be able to detect high rpm or detect it correctly.
You could try reducing the power to some small value, like 0.2, to see if a slowly rotating fan will be detected.

2 Likes

So I have tried the things suggested here and unfortunately, nothing helped so far. The only thing left to check is the hardware pull-up, which I haven’t had the time to implement.

I also want to try to change to a 12V fan and see if that makes any difference.