I wanna use gpiopins to turn on and off 4 devices via a mosfet-npntransistor circuit.
The Devices:
3x heatingelement 24V 1.25A
1x Pressurepump 12V 4A
See Screenshot
For 12V Pump, just change 24V to 12V and Heizin_3 to Pump_in
I wanna use this circuit so the mosfet doesnt get the 3V from the Gpio but 12V to fully close. If i output 3.3V on the NPN-Transistor the 12V will go to ground and the Mosfet will let the 12 or 24V through.
For the Mosfetresistor:
I=U/R= 12V/1000Ohm = 0.012A = 12mA
P= 12V*12mA = 144mW
NPN-Transistor-resistor for 12V pump:
-> 12mA
hFE: 300 at Ic (Datasheet PBSS4440D)
hFE/3.3(Safety): 300/3 = 100
Ib: 12mA/100= 0.12mA
(3.3V) 10% tolerance -> 2.97V - 0.8V(BE) -> ~2.17V
R=2.17V/0.12mA =18083.3ohm-> ~17500ohm
P = 3.3V*0.12mA = 0.396mW
data-mosfet:
BUK6Y14-40PX
40V VDS
64A ID
VGS 20V
data-npn-transistor:
PBSS4440D,115
I did it like this. If I connect the 12V and 24V to the curcuit
Even without putting 3V on the GPIO pins the heating elements turn on and the pump gets like 0.9V.
I hope you know, the MOSFET source and R2 positive bias, must be the same voltage for this to work... as you drew it, the MOSFET gate source voltage will be non-zero in quiescent mode.
You can't drive both 12V and 24V loads from the same circuit. I hope you are not trying to do that. It would be best if you could correct the drawing, and post it again. Specify which device we are talking about so there is no confusion about that.
If you're asking about the pump circuit, post only that.
So this is the whole curcuit, i wanna run
(didnt include the gpiopins(Heiz-3-3V,Heiz1-3V,Pump-1-3V) etc
3x Heatingelement(24A 1.25A, so a total of 3.75A) (heizin_1 to heizin_3)
1x pressurepump (12V,4A)
Your pump circuit is correct so it should work. The others are wrong, needs 24V to R1,2,3.
I suggest looking at your power and ground connections to the board. Are all grounds common? Including microprocessor ground?
Have you measured the voltage on the collector of T4?
Also, a pin header for 4A currents? Sounds a little inadequate.
Looking at this circuit; Remember this is a P-CH MOSFET.
When T3 is OFF, the gate will be at 12V and the source will be at 24V.
This means the gate will be at -12V with respect to the Source, so the Q1 will be ON.
When T3 is ON, the gate will be at GND, this will make the gate at -24V with respect to the Source so Q1 will be ON, or fail. WHY?
Because Vgs of -24V exceeds the spec Vgs of -20V.
At no time will Q1 be OFF.