P channel mosfet with esp32

I'm attempting to control the P-FET by toggling the ESP32 pin IO13 between HIGH and LOW.

However, I'm encountering an issue where the P-FET remains constantly ON, even though I'm changing state of IO13 coz I'm measuring 42V on the terminal block every time

With or without load?

Right. A voltage near 42V is required to turn the P-channel MOSFET off. A MOSFET driver is required.

i tried insteand of 42v to add 12v but is same, i still see 12v on terminal block

i measure therminal block without load

In order to turn off the P-MOSFET, you need to make the gate voltage and source voltage the same.
So if you are using 42V then the gate also needs to be 42V
Do you understand?
However when you turn it on the gate voltage should not be less than 42V-20V = 22V or you will burn out the MOSFET.
You will need a transistor to connect to the MOSFET gate so it can be controlled by the ESP

can anyone post a schematic

See answer #3 in this thread:

And change R1 to 1k for the 42V supply.

@arpa123
Here you go
image

1 Like

I prefer the zener version as it guarantees the PFET's gate is protected, but a resistor divider will work too. R2 can be 22k if you only have E12 resistor values...

Study this page.
Diagram 4 explains high voltage, high side switching.
Change the 330 ohm resistor to 220 ohm for 3.3volt-logic.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.