PWM Fan with 3 pins?

Hi everybody,

I just rescued this fan from a PC that was to be thrown away. It is a Titan TFD-8025L12S DC 12V 0.16A fan.

So far, I had only worked with 2 pin fans (pwr and gnd). I assume this is a PWM fan.

I tried searching for esphome PWM fan and found a few projects, but they were all about 4 pin fans.

This one has only three pins. I have no experience with PWM in ESPHome… Can I just connect what I assume to be the control fan (yellow) to a pin on my ESPHome, connect gnd to both ESPHome ground and 12V ground, and red to 12V power?

And if so, what values would I need for min_power, max_power, frequency, etc.?

I am not at home atm, so I cannot just try it. As I am currently traveling, I thought I’d ask here before stuffing this in my bag and carry it around just to realize I cannot use it with ESPHome at all when I return home. (it’s small, but every little bit of space counts)

Thank you in advance for your help :slight_smile:

No, third pin is usually just RPM information. With it you can only read current fan speed, nothing more. You can leave that pin floating or use it as rpm reading, but if you want PWM you’ll need 4-pin fan, as you already figured it out.
You can control speed on 3-pin fan, too, but you’d need MOSFET (or NPN transistor) to regulate it’s power supply.

2 Likes

Hello,
This is a part of my working config:

 - platform: homeassistant
    entity_id: sensor.system_monitor_processor_temperature
    id: server_temp
    accuracy_decimals: 1
    on_value_range: 

      - below:  38.0
        then:
              - logger.log: "Set fan level 33 over 30C"
              - output.set_level:
                  id: rack_fan_speed
                  level: 0%
      
      
      - above: 38.0
        below:  40.0
        then:
              - logger.log: "Set fan level 50 over 40C"
              - output.set_level:
                  id: rack_fan_speed
                  level: 50%
      

      - above: 50.0
        then:
              - logger.log: "Set fan level 100 over 50C"
              - output.set_level:
                  id: rack_fan_speed
                  level: 100%                                                                                                                                                                                                    
    


output:

type or paste code here

  - platform: esp8266_pwm
    id: rack_fan_speed
    pin: 4

                                                                                                                                                                             
    frequency: "30000 Hz"

                                                                                                                                                                         
    min_power: 1%
    max_power: 100%


fan:
  - platform: speed
    output: rack_fan_speed
    name: "Override Enable"
    id: rack_fan_toggle
    on_turn_on:
     - output.set_level:
          id: rack_fan_speed
          level: !lambda |-
             return id(fan_speed_override).state/100.0;
    on_turn_off:
      - logger.log: "Power of Fan turned OFF"
      - delay: 1s
      - output.set_level:
          id: rack_fan_speed
          level: !lambda |-
            if (id(server_temp).raw_state > 50){
              return 1;}
            else if (id(server_temp).raw_state > 40){
              return 0.66;}
            else if (id(server_temp).raw_state > 30){
              return 0.33;}
            else
              return 0  ;