3 pin pc fan control via mosfet

Confusion.

For relay approach you need one BC337, one relay, one diode, independently how many fans you have.

For transistor option you need BC337 plus 2-8 BC327 for 3-15 fans.

For mosfet option you need one BC337, one P-channel mosfet, but the mosfet needs to have characteristics to saturate well with -12V gate voltage.

Confusion indeed :slight_smile: Can you help me on setting this up?

Also this looks ok.

No problem.

Awesome. Can you tell me which relay and diode I need? I’ll do my best to set it up and come back with that!

Whatever 12V >8A spst (or spdt) relay is fine. Why 8A? I like to have 3x margin for relays that are not rated for inductive load.
https://www.aliexpress.com/item/33037376542.html
https://www.aliexpress.com/item/1005003128290617.html
Obviously some brand like Omron offers more reliability, but costs 5 times more (or is fake).
Also whatever diode rated >20V/200ma, for example the same 1N4007 you use for flyback.

All right… first go

  • Fans should be off by default now as relay connector 2 is connected to the fans (NO)
  • Added diode D2. Not sure why, but most examples use a diode/resistor here. I guess to prevent a surge when the relay switches
  • Diode D3 is still in place to prevent a surge when the Fans are spinning down
  • very unsure if connectors 1, 4, and 5 of the relay are correct. But, this kind of seems to make sense.

Black = 12v
Blue = ground
Green = data (from/to ESP)

It’s there for the same purpose as flyback diode.

And in short… again…

In fact they are incorrect.
-12V directly to 1

  • GND switched by BC337 to 4
    or other way around, polarity shouldn’t matter for relay coil(except if it has internal diode). To verify.
    This is 5V relay, but the idea is same:
    image

D3: Ah… in the previous version, the POS and NEG of the fan connector were reversed. Fixed that, but forgot the reverse the diode. Fixed now.

I switched to a SRA-12VDC-CL 5Pin relay, as (as far as I understood) these can take a bigger load. So the pin numbers have changed:

Relay pin 3 directly connected to 12v
Relay pin 4 is connected to the BC337
Relay pin 5 (that’s COM?) is connected to 12v ← is that correct?
Relay pin 1 is connected to the POS of the fan connector.

This is the relay: https://nl.aliexpress.com/item/4000535932953.html?spm=a2g0o.productlist.main.1.395e31d07y7aVj&algo_pvid=c648c84f-ab43-4992-a0fa-ac6923ac3db7&algo_exp_id=c648c84f-ab43-4992-a0fa-ac6923ac3db7-0&pdp_npi=4%40dis!EUR!2.55!2.44!!!2.63!2.52!%402103850917329787587763856e827e!10000002750755043!sea!NL!196988290!X&curPageLogUid=vqb0MW6K3FxS&utparam-url=scene%3Asearch|query_from%3A

I see no internal diode in the specs, so should be OK.

Correct.
D2 is not correct, it has to be between relay coil (3/4).

Check!

Like that.
Relay documents don’t give polarity for coil, so that’s ok.
If you don’t need NC pin for anything, pick the 4 pin version.
1K base resistor is working, but I prefer R500 (R470).

Ok…

  • Switched to a 4 pin relay
  • replaced R2 with a R470 (now R3)

Image presents 300mOhm

Yes, I noticed… That’s just descripion (Easyeda)

https://nl.aliexpress.com/item/1005006119571104.html?spm=a2g0o.productlist.main.1.1b4653d3LRPQnc&algo_pvid=8a74ab91-8ad8-45ea-9188-7df0cdf5145c&algo_exp_id=8a74ab91-8ad8-45ea-9188-7df0cdf5145c-0&pdp_npi=4%40dis!EUR!1.97!1.79!!!14.69!13.35!%40211b819117329816288826891e582d!12000035840040365!sea!NL!196988290!X&curPageLogUid=3lYHqKVUvYoQ&utparam-url=scene%3Asearch|query_from%3A

I don’t like it. And why would you use 2W resistor there in a first place

so… 2512 is just the size?

https://nl.aliexpress.com/item/1005005483255647.html?spm=a2g0o.cart.0.0.19f761d76N4O3s&mp=1&gatewayAdapt=glo2nld

has 1K, just like the inital one… If this one is not right either, than please help!

I have no idea why there are no resistors between 100ohm and 1000ohm…
So leave it 1K if you don’t find 500…

Are these the ones you mean:

50pcs 2512 1%SMD resistance,470K Amazon.nl

no, those are 470k. 470000ohm.
Leave it like it was with 1K, it’s fine.