I'm trying to use a p-channel MOSFET (FQP27P06) to multiplex four large common-anode seven-segment displays. I'm using a TPIC6B595 high voltage high current shift register to sink the segments for each digit.

I'd like to use the MOSFET to multiplex and control brightness of the four digits by giving the common anode 18 V.

Here is a simple schematic for driving the MOSFET. My concern is when the MOSFET is 'open' I'm seeing the 18 V on the pin which would be hooked up to the microcontroller.

Enter image description here

Is the NPN transistor even necessary?

The second schematic has an extra resistor forming a voltage divider to limit the voltage going to the gate of the MOSFET. I don't think it is necessary with this MOSFET.

I have put the circuit together on a breadboard, but I am hesitant to hook it up to the Arduino.

  • \$\begingroup\$ Please share the datasheet for TPIC656 (can't find such a part on TI.com). \$\endgroup\$ Commented Aug 15, 2013 at 4:06
  • 1
    \$\begingroup\$ @PeterMotesensen please stop making absurdly trivial edits to ancient questions - it just adds noise to the site for no possible benefit at all. \$\endgroup\$ Commented Sep 28, 2017 at 2:58

1 Answer 1


Correct: The voltage divider will not be necessary with the particular p-channel MOSFET, since its gate-source voltage is rated at +/-25 volts.

The NPN transistor is necessary, because you would not want to expose the Arduino GPIO to 18 volts.

What is even more necessary is a base resistor on the BJT. This is useful to ensure that the base-emitter current does not exceed the recommended operating current of the GPIO pin - 25 mA is my personal preference, and 40 mA is the datasheet maximum rating for the ATmega328. Other microcontrollers used in various Arduino models have different ratings.

Assuming the Arduino being used is a 5 volt model, the base resistor should be sized for 25 mA maximum, thus: R = (5 - 0.7) / 0.025 = 172 ohms, so a 180 ohm resistor between GPIO pin and Q1's base would serve well enough.

One would also want to ensure that the collector current of Q1 does not exceed 200 mA, the rated maximum for the 2N3904. Even with a 100 mA current across R1, the resistor's current dissipation when Q1 is conducting will be an unhealthy 1.8 watts. Hence limiting the collector current to around 10 mA would be best: R1=1.8k, 180 mW power across resistor.

  • \$\begingroup\$ Sorry about part number. High power shift register. TPIC6B656. Thanks you very much for reply. I must have something backwards on the breadboard, I'm still seeing 18v on the base of the BJT. Is this just a result of a sensitive high impendence DMM? \$\endgroup\$ Commented Aug 15, 2013 at 12:49
  • \$\begingroup\$ @TravisMcgee I can't figure out why you are seeing a base voltage equal to the supply voltage - are you sure you have the BJT pins correctly identified? If the supply were feeding the base, then yes, both collector and emitter could show nearly the supply voltage, as the base junction would act as a diode. \$\endgroup\$ Commented Aug 15, 2013 at 13:45
  • \$\begingroup\$ Thanks, removed everything from breadboard and started over. Circui is working as expected. \$\endgroup\$ Commented Aug 24, 2013 at 0:52
  • \$\begingroup\$ The NPN transistor is necessary because you would not want to expose the Arduino GPIO to 18 Volts.. This point is explained in greater detail in the video SparkFun According to Pete 3-5-12: Mosfets, starting at 16:16 \$\endgroup\$
    – hlovdal
    Commented Feb 22, 2015 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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