Karosm
(Karosm)
November 29, 2024, 2:53pm
82
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.
beurdy
November 29, 2024, 2:56pm
83
Confusion indeed Can you help me on setting this up?
beurdy
November 29, 2024, 4:27pm
85
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!
Karosm
(Karosm)
November 29, 2024, 6:13pm
86
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.
beurdy
November 30, 2024, 8:35am
87
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)
Karosm
(Karosm)
November 30, 2024, 9:42am
88
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:
beurdy
November 30, 2024, 3:14pm
89
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.
Karosm
(Karosm)
November 30, 2024, 3:32pm
90
Correct.
D2 is not correct, it has to be between relay coil (3/4).
Karosm
(Karosm)
November 30, 2024, 3:42pm
92
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).
Karosm
(Karosm)
November 30, 2024, 4:02pm
96
I don’t like it. And why would you use 2W resistor there in a first place
beurdy
November 30, 2024, 4:09pm
97
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!
Karosm
(Karosm)
November 30, 2024, 4:28pm
98
I have no idea why there are no resistors between 100ohm and 1000ohm…
So leave it 1K if you don’t find 500…
beurdy
November 30, 2024, 5:36pm
99
Are these the ones you mean:
50pcs 2512 1%SMD resistance,470K Amazon.nl
Karosm
(Karosm)
November 30, 2024, 8:34pm
100
no, those are 470k. 470000ohm.
Leave it like it was with 1K, it’s fine.