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.

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?



simulate this circuit – Schematic created using CircuitLab

  • 1
    Just going for the bonus: A resistor on the digital pin and the gate is still a good idea, but not because the PFET needs it. The digital pin will have some limited current drive capability and the gate pin will initially look like a an empty capacitor. So the gate will suck in a large amount of current for a short period of time. The resistor will help limit that initial current surge. A small value will work, 100 ohms or so. – Dan Laks Jun 3 '16 at 19:52
up vote 4 down vote accepted

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).

  • Thanks. How did you calculate 7.5K for the base resistor? I calculated ~29K using Vbe=0.65, Vce=0.25, hFE=100, resistance load (RL)=1000, Vcc and Vi=3.3 using this calculator: petervis.com/GCSE_Design_and_Technology_Electronic_Products/… Datasheet: sparkfun.com/datasheets/Components/2N3906.pdf – John P. Jun 3 '16 at 23:37
  • Ic/Ib=10 (as shown on the data sheet) so I multiplied 10*1K*(3.3-0.7)/3.3 = 7.8K and round to the next lower E24 value 7.5K. – Spehro Pefhany Jun 4 '16 at 0:04
  • I apologize, I must be missing something trivial. Doing this by hand: Ic=~0.0033A (3.3V/1000K). Using a β of 30 (the lowest on the datasheet) Ib=0.00011 (Ic/30). Rb=21,363K ((Vcc-Vbe)/Ib). Vbe=0.95 as listed in datasheet. I'm following the calculations posted here: electronics.stackexchange.com/a/83691/66757 – John P. Jun 4 '16 at 1:20
  • 1
    Forced beta is 10. This is a choice to make the saturation voltage low, and is the same as the forced beta at which the saturation voltage is guaranteed in the datasheet. The beta of 30 is at a high Vce, so we drive the transistor harder to make it turn on well. – Spehro Pefhany Jun 4 '16 at 1:23

Good choice. The P-channel FET will switch on when the gate is pulled down to ground, and the on resistance will be negligible compared to your 1K if you choose the right FET. Choose one with a low on resistance (<1 ohm is common) and a low gate threshold voltage so you can switch it cleanly (1-2 volts). You won't need a gate resistor in this application. I would not use the one you selected because of its high on resistance.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.