I have design where a P channel mosfet is used as a switch
The source is 4.2v and the gate is held up by a resistor (100k) to this line
The gate though when it needs to be turned off is being given 3.3v and its not turning it off.
I cannot easily give it the full 4.2v
The circuit is a control for the on/off of a pic, basically when power is attached the battery charger chip pulls a pin low to indicate charging, this pin pulls the base of the mosfet low and this puts a high onto the switch input of the regulator bring the pic to life.
However this reg switch input is also used as part of a button on off system and I need to identify which signal is powering the reg switch.
So the idea is I have the pic line porta.5 floating and then when I do a test I pull the line high which should turn the mosfet off but as I have found out it's not.
hi,
One of the problems is the 10K0 to 'button ON/OFF' switch, if its closed you are trying to pull the Gate up to 4.5V,
from a 3.3V driving source, with the 10K to 0V, the diode will not help in this case.
When the 'button ON/Off' switch is open, with a diode in circuit, the Gate will pull up to about +4V.
From the datasheet for the Pfet, it states that 0.45V is the minimum guaranteed to switch OFF the fet, so 0.2V should do it.
How much leeway do you have in changing/adding components???
This isn't the same as you originally described.
Wish you could have told us before that the PIC supply was turning off.
Yes you must put a transistor on the gate of the MOSFET (use an NPN like the BJT Q?). You need these driver transistors for both Q? and the other Q?. Just like you did for the Q? on top. You need base resistor from RA3 to the BJT Q?. You will need to invert the sense of RA5.
When the PIC is off, its output is not 3.3V. The protection diodes inside the PIC pull it towards ground.
Why is the transistor needed? the mosfet is logic level, in reality the driver on the other mosfet is probably not needed they run at 10hz max
When the pic is off there is no voltage from it, so the 100k resistor is pulling the gate on the mosfet high ensuring it is off. This is the case on all the mosfets
The pin RA5 will need to be driven low to turn on the mosfet and will float when testing is not done, the 100k will pull the line high again to the 3.7 to 4.2v that it will swing between. As its all code driven its a couple of lines in the prog.