Electronic – P-channel MOSFET with variable resistance on the drain

bjtmosfetraspberry pi

I would like to switch a variable resistance using a P-channel MOSFET as a high-side switch. I asked a similar question here using PNP BJT; however, it appears as though a BJT would be inappropriate for my problem.

General information:
After doing research on using a PNP transistor to switch a load with an unknown resistance, it appears that a PNP BJT isn't appropriate. From my limited understanding, I need to know the resistance on the collector side of a PNP BJT in order to calculate the correct base resistor using the transistor's β value. In my circuit, the resistance of R4 can vary from 0Ω to infinity and will be read from an ADC (not shown). This means that the range of resistance on the collector side can go from 1000Ω to INF because of R3. This appears to cause issues with the BJT switching on and off correctly.

It appears as though MOSFETS do not require such base resistors. I've seen MOSFETS being pulled up if P-type and down if N-type such as in the answers to a similar question here and here.

The datasheet to the LP0701 MOSFET I found is here.

Questions:
My first question is, will the MOSFET (M1) be able to switch the circuit on and off as I have diagrammed it? I should note that the digital pin is 3.3V as well. Second, is my logic of choosing a MOSFET over a BJT correct in this case?

Bonus:
Should another resistor be added between the digital pin and the gate for added protection?

Thanks.

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

There's actually (perhaps) nothing wrong with using a PNP BJT in this application. You just use a resistor that corresponds to the maximum collector current (minimum resistance). In your circuit above, 7.5K would be fine. Typically the voltage drop would be in the 50mV range or less. If ~0.05V drop isn't a problem then the BJT is fine.

It's okay to use a lower base resistance than required by the collector current, just not larger (subject to other limitations, which don't apply here).