patrickcollins12 / esphome-fan-controller

ESPHome Fan Controller
363 stars 37 forks source link

Fan Connector Type Doesn't Seem Right #3

Closed gcortes closed 1 year ago

gcortes commented 2 years ago

I wanted to do this project to cool my electronics closet. I'm not an EE and haven't done electronics in ages so I could be wrong about this.

I bought the same Corsair fans as you specified (LM 120). In you image, you specify a JST connector. My research shows that the connector on the fan connects to a Molex 0470531000. It has a 2.54mm pitch as opposed to the 2.5mm of the JST connectors. There appear to be 4 different types, all 2.5mm. I'm going to go with the Molex as I'm going to build it on a solder breadboard.

The other confusing item is the pin out for the fan. Your wiring diagram shows using the first three pins. The third pin is Tach. In you description, you mention not using this. The web documentation I've found says pin 4 is control/PWM. I'm assuming that's the one you meant.

Thanks for posting this project. I've been thinking about how I could do something similar for quite some time. Now I have a solution.

wardy277 commented 2 years ago

I noticed this too, I think when you dont use the final fan pin it behaves like its a 3 pin fan. It seems the fan needs 5v for data, but the esp sends data in 3.3v. I used this other project to have it use all 4 pins, by using a level shifter https://github.com/nordeep/esphome_fan_controller

Using this, i moved fan pin 4 to what this project uses as pwm console_fan_speed, then i used pulse_counter to calculate the RPM from the 3rd fan pin. Took some trial and error to discover this :D

patrickcollins12 commented 2 years ago

Sorry for the delay. I must have got lucky and got 2.54mm jst. There is no standards for jst but if you buy it from an arduino shop they normally fit the 2.54mm (.1”) standard perfboard pin spacing.

I can’t recall which pin is tach but I left it unwired. The fan accepts 3.3v or 5v as PWM data no problem.