I was wondering if anyone has a recommendation for a P channel and N channel logic level (specifically looking for a PNP at the moment) MOSFET that will fully turn on (Vgs) with the ESP32's 3.3V output.
I have a few FQP27P06 laying around, but I used those with the ATMega controllers.
I use these primarily as switches, and usually well below 5-10A.
27A
Vgsth : -2.0 -- -4.0 V : not logic level at all
If you look for an equivalent thru hole logic level PMOSFET, the TO-251A package is OK for you.
I don't know any TO220 PMOSFET, except SUP90P06.
I am not against using any SMD components, all the MOSFET is doing is acting as a switch for a LiIon battery (at Drain 4.2V to 3.0V) to a voltage divider measurement circuit. There should be no load into that branch. I prefer the TO-220 or a larger package SMD. I remember using the the FQP and it worked, but that was a much older project, I just found them sitting in my parts box. Since I'm just getting voltage, I wonder if one of the low-current BJT or TO-92 parts may work...
Looking thru some of the recommendations, it looks like the AO3407 may be my man. Alot of these are SOT23, which are difficult to solder, but I can do it with my HA station (I really need to tackle one of those toaster ovens as a reflow oven project!). Digikey doesn't stock it, and Mouser takes me to a page for IRLML9301TRPBF.
It'll work OK for the application you describe, but it's overkill. 2n7000 or 2n7002 would do fine as well, as a low-side switch. The junction of the resistor divider feeds into an ADC input which is high enough impedance not to worry about power draw anyway.
But really, just use high value resistors and a small capacitor at the junction of the divider, and forget about the whole MOSFET for the battery measurement application. The couple of nA's of leakage current through a high impedance divider won't hurt a thing. Just give the ADC sufficient time to settle if you only turn on the ADC periodically (which I assume you do, with an eye on energy preservation).
3 pin SOT23 is really easy to solder with a regular soldering iron and a fine tip. 5 and 6 pin sot23 are a little trickier. Many MOSFETs and BJTs use the 3 pin sot23 package.
If this is to measure the battery level, you can use another digital pin at the bottom (ground side) of the voltage divider to disconnect it.
To take the measurement you set the bottom pin low. And to disable it set both pins high.
You will still have a small current between Vbat and the central pin at 3.3V, but with high value resistors it will be very small.
But as said, you probably don't need neither it nor a mosfet. With big resistors and a capacitor, the current drawn by the simple voltage divider will be a few nA. In anything you do, you should have less leakage than that.
And so it's known - there is a thermal fuse on the + rail at the battery, one input measures the battery voltage after the fuse when needed for general voltage info, and the other input will be before the fuse - if we have two disagreeing numbers, we have a blown fuse and trip a trouble. The + rail is also connected to an Adafruit 259 charger, and a INA260 (the INA260 is setup to measure voltage at load).
I'll need to take a look into the high value resistors/etc. - as long as it is drawing nA of current and will last 248 years or something I could transition to that I suppose.
The self-discharge rate of your battery will be a fraction of this. Which is to say: start by drafting realistic requirements instead of randomly highballing.
I'm sorry, but I don't have the deep experience with, or a degree in, electrical engineering as you guys do - like any amateur, that's why I post, to receive either an idea for what I thought I needed, solution, or corrections and training. And even with a solution, I go back and try and understand the how, why and what of things, drilling down.
It irritates me to no end admonishing people - it is a exact reason I try to stay away from forums... You jumped to a conclusion instead of asking what I meant - I did a calculation the other day just looking at different parameters and solutions, and it showed something like ~248 years to be drained to a certain voltage with quiescent, that is what I was referring to - not that I expect that - that would be completely unrealistic. If it could be made to deplete no more than 0.3-0.5V or better in a week that is ideal, honestly.
Please ask for clarification - and that is a two way street for both of us - I need to be more clear, and you ask for clarity if not understood or seems out of ordinary or incorrect.
Why would this specific range be ideal? What does your application require? Heck, what is your circuit and component choice in the first place?
Anyway, I stick with what I said earlier. Sorry you took it the wrong way. Good luck with your project; I'm sure others will be happy to help out. Ciao.
Provided that the resistors are high, 500KΩ or 1MΩ, the ESD protection of the pins will be fine with a few µA.
And better sense VBAT after the main switch, so when the MCU is off, VBAT is also disconnected. During boot the ESD protection should be fine.
But it's true that is not worth the trouble. Anything like mosfets or even caps will have a leakage similar or higher than a normal voltage divider with high value resistors.
This is a bad idea.
The ESD diodes, as the name implies are there for one purpose, to protect against ElectroStatic Discharge events. They are not there to be used as clippers or clampers.
If you read the ESP datasheet you will see that 4.2V exceeded the maximum voltage you can apply to any pin under any conditions and there is nothing that implies that forcing a few uA into a pin is "fine"
Why not just do things the right way and be safe.
In the ESP datasheet, in the absolute maximum ratings don't mention voltage limits for the GPIO pins. Neither in the power recommendations. Only mention the power pins.
In the DC logical levels yes, because the current usually is higher.
But I agree that it's not necessary play with the limits even just at booting, and even when the ESD protection can handle up to a few mA.
When I used it was with a MCU with the VDD equal to VBAT. Then VBAT is never above VDD. But yes, here is different.