What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

EBB36 & 3-wire fan speed

I'll try to clarify my question. I just learned last night that some fans have a tachometer output and this can be useful to alert Klipper that the fan has stopped. This can prevent serious damage to the toolhead, in the case that 4010 fan stops. The information for this was found in a Reddit post - Posted by u/RegularTrade7651 on 11/9/2022. Here are a couple of links from the commenter
u/MajorAd4596.

Just order a 3 wire fan and follow Ellis guide to monitor RPM, what you are asking is possible, just need to do it
3 wire fan: https://www.digikey.com/en/products...4?s=N4IgTCBcDaIPIBEAsAGAjCgtGJAJAQugIIgC6AvkA
Ellis guide: https://github.com/AndrewEllis93/Pr...ul_macros.md#warninghotend-fan-rpm-monitoring

The following link provides a good description of the "3-wire" fan
https://orionfans.com/resourcecenter/pdf/special_function_circuits.pdf
 
Are you asking about a hardware PWM? No I don't think that is an option and depending on the fan a software PWM might not work.
I wasn't at all clear in my original question. I tried to clarify in a reply on this thread.

I thought I knew what PWM (Pulse Width Modulation) was, but your reply made me question my understanding. I'm pretty sure that you can vary the speed of your fans via the EBB36. Isn't that done with PWM?
 
Most fans today are speed controlled via PWM of the power to the fan without using a dedicated PWM wire. The EGG36 supports that method. Certain fans have either a tachometer output wire that reads speed or an alarm if the fan stops. The EBB 36 has multiple I/O pins that could likely be repurposed to be inputs for that purpose but if the fan comes with 3-wire connections they will have to be re-wired.
 
To be clear a tachometer (RPM) and PWM are not the same thing.

PWM:

There are two types of PWM a hardware based and a software based.
Software PWM is controller through the OS scheduler, in this case klipper/linux. Hardware pwm uses a dedicated source like a DMA. Not all devices are designed to tolerate a software PWM especially when timings can vary based on the host controllers load, servos are a good example of not generally being tolerant of software pwm.

If you are looking to change the speed you can do that depending how you are calling out the hotend fan with in your klipper config.

If you label your hotend fan as a [heater_fan my_fan_name] then the best you can do is define fan_speed variable 0.0x to 1.0 to make it a constant speed. The max_power variable in my experience can only be 1.0 or the klipper sanity check stops start up. I am not a config guru.

I can't remember if you must define a heater_fan for your hotend. I know you can do some fancy stuff with klipper like call out a dummy pin and then mirror whatever input/output the dummy pin is getting to a different pin/fan type, my water cooled printer does something similar on it's forked version of klipper, but I haven't investigated that much, no need yet.

TACH:

For a tachometer yes, that is possible I used it (past tense it's borked right now) on my setup. You will need to use one of the spare pins and set it for a pull up or pull down and connect your fan's tachometer (RPM) wire to it.

I have an issue where my tachometer sense wire connected to a pin (PB3) on the EBB36 (I2C port) stopped listening to the tach pulse and back fed voltage spinning the fan even when off Or at least I assume that's what happened). I need to look at the schematic for the EBB again and double check which pins I should be using for the 2 different fans, I might have picked one that is feeding voltage. So YMMV! Maybe someone with electrical engineering experience can tell me what I did wrong. Now I don't get a tach signal showing in mainsail. I haven't revisited this.

When I do revisit this next week I will be using PB8 the sensor pin for the probe port to do the tachometer sensing as it has a 4.7k resistor and is 3.3v...

To use the tachometer you need to attach that fan wire to whatever pin you are going to use and then define it in the klipper config for that fan like below. You might need to define a resistor, and figure out if your pulling up with a ^ or pulling down with a ~ , etc.

tachometer_pin: ^EBBCan: YourPinHere
# Tachometer input pin for monitoring fan speed. A pullup is generally
# required. This parameter is optional.
tachometer_ppr: 2
# When tachometer_pin is specified, this is the number of pulses per
# revolution of the tachometer signal. For a BLDC fan this is
# normally half the number of poles. The default is 2.
tachometer_poll_interval: 0.0015
# When tachometer_pin is specified, this is the polling period of the
# tachometer pin, in seconds. The default is 0.0015, which is fast
# enough for fans below 10000 RPM at 2 PPR. This must be smaller than
# 30/(tachometer_ppr*rpm), with some margin, where rpm is the
# maximum speed (in RPM) of the fan.

Attached is the 1.1/1.2 schematic showing the bltouch, i2c and endstop ports that seemed easiest to tap for a tach. signal.
 

Attachments

  • Screenshot 2022-11-19 112005.jpg
    Screenshot 2022-11-19 112005.jpg
    205.3 KB · Views: 61
To be clear a tachometer (RPM) and PWM are not the same thing.

PWM:

There are two types of PWM a hardware based and a software based.
Software PWM is controller through the OS scheduler, in this case klipper/linux. Hardware pwm uses a dedicated source like a DMA. Not all devices are designed to tolerate a software PWM especially when timings can vary based on the host controllers load, servos are a good example of not generally being tolerant of software pwm.

If you are looking to change the speed you can do that depending how you are calling out the hotend fan with in your klipper config.

If you label your hotend fan as a [heater_fan my_fan_name] then the best you can do is define fan_speed variable 0.0x to 1.0 to make it a constant speed. The max_power variable in my experience can only be 1.0 or the klipper sanity check stops start up. I am not a config guru.

I can't remember if you must define a heater_fan for your hotend. I know you can do some fancy stuff with klipper like call out a dummy pin and then mirror whatever input/output the dummy pin is getting to a different pin/fan type, my water cooled printer does something similar on it's forked version of klipper, but I haven't investigated that much, no need yet.

TACH:

For a tachometer yes, that is possible I used it (past tense it's borked right now) on my setup. You will need to use one of the spare pins and set it for a pull up or pull down and connect your fan's tachometer (RPM) wire to it.

I have an issue where my tachometer sense wire connected to a pin (PB3) on the EBB36 (I2C port) stopped listening to the tach pulse and back fed voltage spinning the fan even when off Or at least I assume that's what happened). I need to look at the schematic for the EBB again and double check which pins I should be using for the 2 different fans, I might have picked one that is feeding voltage. So YMMV! Maybe someone with electrical engineering experience can tell me what I did wrong. Now I don't get a tach signal showing in mainsail. I haven't revisited this.

When I do revisit this next week I will be using PB8 the sensor pin for the probe port to do the tachometer sensing as it has a 4.7k resistor and is 3.3v...

To use the tachometer you need to attach that fan wire to whatever pin you are going to use and then define it in the klipper config for that fan like below. You might need to define a resistor, and figure out if your pulling up with a ^ or pulling down with a ~ , etc.

tachometer_pin: ^EBBCan: YourPinHere
# Tachometer input pin for monitoring fan speed. A pullup is generally
# required. This parameter is optional.
tachometer_ppr: 2
# When tachometer_pin is specified, this is the number of pulses per
# revolution of the tachometer signal. For a BLDC fan this is
# normally half the number of poles. The default is 2.
tachometer_poll_interval: 0.0015
# When tachometer_pin is specified, this is the polling period of the
# tachometer pin, in seconds. The default is 0.0015, which is fast
# enough for fans below 10000 RPM at 2 PPR. This must be smaller than
# 30/(tachometer_ppr*rpm), with some margin, where rpm is the
# maximum speed (in RPM) of the fan.

Attached is the 1.1/1.2 schematic showing the bltouch, i2c and endstop ports that seemed easiest to tap for a tach. signal.
Thanks so much for all the effort that you put into your reply. You've answered questions that I didn't even know I had yet. I'll be sure to refer back to this thread as I Incorporate a fan with tach feedback into a Stealth Burner.
 
Most fans today are speed controlled via PWM of the power to the fan without using a dedicated PWM wire. The EGG36 supports that method. Certain fans have either a tachometer output wire that reads speed or an alarm if the fan stops. The EBB 36 has multiple I/O pins that could likely be repurposed to be inputs for that purpose but if the fan comes with 3-wire connections they will have to be re-wired.
Thanks for the reply. The rewiring doesn't scare me even though I don't enjoy working 30 awg wire (or what ever tiny size it is).
 
To be clear a tachometer (RPM) and PWM are not the same thing.

PWM:

There are two types of PWM a hardware based and a software based.
Software PWM is controller through the OS scheduler, in this case klipper/linux. Hardware pwm uses a dedicated source like a DMA. Not all devices are designed to tolerate a software PWM especially when timings can vary based on the host controllers load, servos are a good example of not generally being tolerant of software pwm.

If you are looking to change the speed you can do that depending how you are calling out the hotend fan with in your klipper config.

If you label your hotend fan as a [heater_fan my_fan_name] then the best you can do is define fan_speed variable 0.0x to 1.0 to make it a constant speed. The max_power variable in my experience can only be 1.0 or the klipper sanity check stops start up. I am not a config guru.

I can't remember if you must define a heater_fan for your hotend. I know you can do some fancy stuff with klipper like call out a dummy pin and then mirror whatever input/output the dummy pin is getting to a different pin/fan type, my water cooled printer does something similar on it's forked version of klipper, but I haven't investigated that much, no need yet.

TACH:

For a tachometer yes, that is possible I used it (past tense it's borked right now) on my setup. You will need to use one of the spare pins and set it for a pull up or pull down and connect your fan's tachometer (RPM) wire to it.

I have an issue where my tachometer sense wire connected to a pin (PB3) on the EBB36 (I2C port) stopped listening to the tach pulse and back fed voltage spinning the fan even when off Or at least I assume that's what happened). I need to look at the schematic for the EBB again and double check which pins I should be using for the 2 different fans, I might have picked one that is feeding voltage. So YMMV! Maybe someone with electrical engineering experience can tell me what I did wrong. Now I don't get a tach signal showing in mainsail. I haven't revisited this.

When I do revisit this next week I will be using PB8 the sensor pin for the probe port to do the tachometer sensing as it has a 4.7k resistor and is 3.3v...

To use the tachometer you need to attach that fan wire to whatever pin you are going to use and then define it in the klipper config for that fan like below. You might need to define a resistor, and figure out if your pulling up with a ^ or pulling down with a ~ , etc.

tachometer_pin: ^EBBCan: YourPinHere
# Tachometer input pin for monitoring fan speed. A pullup is generally
# required. This parameter is optional.
tachometer_ppr: 2
# When tachometer_pin is specified, this is the number of pulses per
# revolution of the tachometer signal. For a BLDC fan this is
# normally half the number of poles. The default is 2.
tachometer_poll_interval: 0.0015
# When tachometer_pin is specified, this is the polling period of the
# tachometer pin, in seconds. The default is 0.0015, which is fast
# enough for fans below 10000 RPM at 2 PPR. This must be smaller than
# 30/(tachometer_ppr*rpm), with some margin, where rpm is the
# maximum speed (in RPM) of the fan.

Attached is the 1.1/1.2 schematic showing the bltouch, i2c and endstop ports that seemed easiest to tap for a tach. signal.
I had a similar issue hooking up the tachometer pin (with pullup) to the PB6 pin or the PB3 pin on a BTT EBB36 board. It would run the fan constantly and using the PB6 pin killed the board.

Checking the schematics, there is a 10k pullup resistor on the endstop pins (https://github.com/IconoclastXYZ/Voron/blob/main/images/EBB36 Voron wiring 2022-12-29 15_43_52.png), but even hooking up to them was enough to constantly run the hotend fan.

When I check the current, it would draw 7.8mA when the fan was off, and -0.2mA when it was on and providing a signal through the hall effect tachy circuit.

I tried putting a further 5k ohm resister inline, which dropped the current but also stopped it sensing.

It now works with a signal diode (1N4148) inline, drawing no current when the fan is off (so it is no longer spinning) and still detects the RPM correctly when on. The signal diode has the cathode (black line) towards the fan.

Hope this helps the next person avoid killing their EBB36.
 
I probably approached the matter a little too naively. but maybe someone can help me. I have an EBB SB2209 CAN and the two fans attached. Is it possible to use this setup and what is the correct wiring?
 

Attachments

  • Screenshot 2024-04-10 095803.jpg
    Screenshot 2024-04-10 095803.jpg
    162 KB · Views: 3
  • Screenshot 2024-04-10 095901.jpg
    Screenshot 2024-04-10 095901.jpg
    120.3 KB · Views: 3
Top