# ESP (ESP8266/ESP32) Mosfet switch problem

My aim is to automatically power off the ESP by turning off the pinout.

When I test the circuit I get the out voltage 1.6 V when I assume to get 3.3 V.

What I'm doing wrong?

• Yeah, we are done. The circuit work as expected. My R2 resistor value had a typo, I was meaning value 100 not 100k. My circuit started to work after I changed the Q2 fet. @andy-aka you are making a great work, thank you! Jan 13, 2022 at 8:12

The IRF4905 is no-way suitable for such low voltage supplies. The $$\V_{GS(THRESHOLD)}\$$ value is typically about -3 volts and could be as high as -4 volts. At this sort of drive level, the MOSFET can only really supply about 250 μA and this sounds like it is too low for any reasonable load you are trying to switch on or off. If you read the data sheet you'll see that at about -4.5 volts, you might be able to supply a load with a current of around 2 amps with a volt-drop of about 0.1 volts: -
You need to find a P channel MOSFET with a $$\V_{GS(THRESHOLD)}\$$ voltage closer to 0 volts. Maybe something like -1.5 volts. Maybe try Alpha and Omega Semiconductor. Maybe this one but it's still not that great on heavy currents with a 3 volt gate drive.
• @Vellu if we're done here maybe you'd like to understand why folk give their time for free. Please take the 2 minute tour to understand this vexing question LOL. Look for this bit The person who asked can mark one answer as "accepted". Accepting doesn't mean it's the best answer, it just means that it worked for the person who asked. Jan 5, 2022 at 16:49
• @Vellu to whom are you addressing your comment. If me @andy aka then I would make R2 much lower, maybe 4k7. If you want Q2 to turn off real quickly then I'd make R1 possibly 1 kohm but, 10k is probably all right. Are we done here? Jan 5, 2022 at 17:49