Need help with switch circuit - all 3.3v - mofset(s)?

I have the following circuit. I know a p channel MOSFET can do it (to switch the peripheral on/off from ESP32 logic) but I am looking for a variation. Looking for least amount of parts, smallest in size for surface mount assembly that can go in the middle - I would like to have +3.3v at source so that can feed through drain to power the peripheral. A p-channel MOSFET requires LOW/0v at source to turn on this switch and I would like to have HIGH/+3.3v to turn it on. (I also know that n-channel would turn on the peripheral with +3.3v at gate but then I need 0v at source which I don't want). I am handy and a quick learner but I am new to transistors and MOSFETs to calculate the values correctly to chose from thousands out there. What are my options for circuit and parts please?

switching-circuit

My goal is to switch +3.3v as grounds are connected together everywhere already. And as ESP32 goes in deep sleep, don't want to keep sending +3.3v/current out of GPIO5 to Gate to keep peripheral off.

Check this list of MOSFETs I use.
Pick a P channel MOSFET that works with a gate voltage of 3v3.

2 Likes

As far as I understand it (with my knowledge and skills limitations), a gate voltage of +3v3 will turn off the p-channel MOSFET (as in turn of the peripheral). I would like +3v3 at gate to have +3v3 at drain so the peripheral turns on. May be I need 2 - a p-channel and a n-channel to achieve this.

Yes, you need your GPIO pin to drive an N-channel mosfet (or NPN transistor), which in turn drives the gate of the main P-channel mosfet. Below is an example.

In Deep-sleep mode: digital GPIOs (GPIO6 ~ 21) are in a high impedance state.
So maybe a simple pull-up resistor would do the trick.

The GPS module seems to have an ON/OFF pin, so why not use that.
Leo..

Try a pull up resistor from gate to source, from your 'schematic' you put the port LOW to turn on the MOSFET. Your schematic leaves a lot of information missing. For switching MOSFETs you need to remember they are finky and always use the source as a reference for the gate. For a P channel device to be on the gate needs to be at least Vgs rating negative to the source. If it is a N channel device the gate needs to be at least Vgs rating positive to the source. A pull up/down resistor can be used. I do not know the processor so when going to sleep put it into the input mode if it does not go to a high impedance mode.

Good point for the GPS module, and I may do that. However, I think the concept applies still to other 3v3 modules on the board when the whole board is 3v3 powered with 3v3 processor - whats the easiest way to switch power for these components on/off.

Perfect, I think this might do it! Just saw there are dual mosfets with p and n channel built in one - looking at those.

Depends on the component.
A single P-channel fet is enough to switch a 3.3volt supply to a 3.3volt component off.
But you need a second (level shift) fet if the supplies are different.
This page has the basic circuits.

You also can't just turn the power off without turning the data lines off.
If you don't, the device will still be powered through the data lines, which is bad for the chip.
Leo..

The clamping diodes in the output pin will limit the pin (and with it the MOSFET gate) to Vcc+0.5V, so 3.8V in a 3.3V MCU. You can't switch off the MOSFET that way. You really need that second n-channel MOSFET (or NPN transistor) to control the gate.

Hi, @matrixIII

What is the application?
What is your project?

Thanks..Tom... :grinning: :+1: :coffee: :australia:

+3.3V on the source, +3.3V on the gate ...
https://forum.arduino.cc/t/p-channel-mosfet-sanity-check/474169
https://www.gammon.com.au/motors

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