A Quick P-MOS MOSFET Driver Board

A quick P-MOS MOSFET Driver Board


A driver is needed to switch a P-Channel MOSFET because the gate of a P-Channel MOSFET needs to be driven to a voltage that is more negative than the source in order to turn it on. This can be difficult to do with low-voltage logic, such as 5V or 3.3V. A driver can provide the necessary voltage and current to turn on the P-Channel MOSFET, even when the logic voltage is low.

Here are some of the benefits of using a driver to switch a P-Channel MOSFET:

  • Increased switching speed: A driver can provide the necessary current to charge and discharge the gate capacitance of the P-Channel MOSFET quickly, which results in faster switching speeds.
  • Reduced power consumption: A driver can help to reduce power consumption by providing the necessary current in a short pulse, rather than a continuous stream of current.
  • Improved noise immunity: A driver can help to improve noise immunity by providing a clean and isolated signal to the gate of the P-Channel MOSFET.

If you are using a P-Channel MOSFET in your circuit, it is a good idea to use a driver to switch it. This will help to ensure that the MOSFET is switched quickly and efficiently and that it is protected from noise.

Here are some of the different types of drivers that can be used to switch P-Channel MOSFETs:

  • Logic level drivers: These drivers are designed to work with low-voltage logic, such as 5V or 3.3V. They typically have a high output voltage, which can be used to drive the gate of a P-Channel MOSFET.
  • High-side drivers: These drivers are designed to provide a high voltage to the gate of a P-Channel MOSFET. They are often used in circuits where the P-Channel MOSFET is used to switch a high-voltage rail.
  • Isolated drivers: These drivers provide an isolated signal to the gate of the P-Channel MOSFET. This is useful in circuits where it is important to prevent noise from entering the circuit.

Why did I decide to design this prototype?

The Story behind the prototype

This driver PCB is part of a solution for a project involving a set of 6v LED lights.
Each of the LED lights requires +/- 300mA @ 6v to operate efficiently.
I want to control these from a Microcontroller, either an ESP32 or even the XIAO RP2040 or similar. The current sink capability of an individual GPIO pin on these microcontrollers is limited, in the case of the RP2040 it is limited to 3mA per pin.

This prototype is an attempt to test out some basic driver ideas that might perform correctly for my particular needs, being

  • To stay within the limitations of the particular microcontroller GPIO current specifications
  • To be able to use any of the particular microcontrollers, without having to design a specific solution tailored to a specific device

The Schematic

I decided to keep things extremely simple to start with, using a very simple circuit consisting of only 4 components per channel. These are :
– an S9013 NPN BJT Transistor, capable of switching up to 500mA of current
– a SI2301 P-Channel Logic Level MOSFET, capable of switching up to 2.3A
– 10k pullup-resitor
– 1k resistor on the base of the BJT

The theory of operation is as follows:
The pullup resistor, R8, keeps the gate of the MOSFET (Q4) positive, thus ensuring that Q4 stays turned off when T4 is turned off. A HIGH signal at B4 will turn on T4, which will in turn pull the gate of Q4 to ground, turning Q4 on in the process.
That will in turn turn on the load ( connected at 4+ and 4- ).

It is important to note here that the value of R8, 10K at the moment, is not finalised, and may change to increase the performance of the circuit.


The board was made to fit on a standard breadboard or be used as a standalone module, depending on the position of the male header pins.


The PCB for this project was sponsored by PCBWay.

Clicking on the PCBWay link will take you to the PCBWay website. It will enable you to get a $5.00 USD voucher towards your first PCB order. (Only if you sign up for a free account).
I shall also receive a 10% commission AT NO COST to you if, and only if, a paid order is generated from the click on this link.


The assembly of the PCB does not require any special tools, and can be done completely by hand if you choose. A very fine-tipped soldering iron should be perfect.

I chose to go the hot-air and solder-paste route, as it is faster, and looks neater in the end. The use of a stencil was not required.

The total assembly took about 5 minutes in total.


Testing the completed PCB module was performed with one of the LED light modules connected to each MOSFET Channel in turn, and then applying a voltage signal, or ground, to the control pin ( marked A to D on the picture above)

That was followed by connecting an Oscilloscope and Signal Generator to the control pins, as well as the outputs, and observing the waveforms during operation. A square wave output from the signal generator provided the switching signal.


The module works as expected, but the pullup resistor value needs to be fine-tuned to provide a better switching response on the MOSFET at high frequency.
I am however happy with the initial performance, and can now move on to improving the circuit to perform to my specifications.

Interesting and well-done project.

I have struggled for some time with my CNC spindle driver to reproduce the incoming PWM.
As a result, the motor is not running at the programmed RPM i.e. S value.

It seems that the MOSFET turns on correctly during the on-time of the PWM signal, turns off at the start of the off cycle for a time, and then for no obvious reason turns back on again. The off time changes with the DF but of course does not reproduce the PWM signal at the motor.

Every commercial driver I have tested does this. I assume, just as I do, folks are adjusting the program speed to get the actual spindle speed they want by creating an error map. When I set the RPM in the cad program I adjust RPM using an error function I created so that the spindle is running at the speed I expect.

I wonder if there is some kind of invisible dv/dt effect that causes the gate to turn back on. This phenomenon does not occur driving small motors just my 48V spindle. I wonder if it has something to do with driving highly inductive loads at large currents. I continue to test various circuits to drive the gate harder but nothing has made an improvement.

Have you experienced anything like this and do you have any insights into the problem?



I think the scope trace above corresponds to the schematic of this commercial driver. I modified this driver multiple times during testing as I did not need the high voltage capability.

1 Like

Hmmm… From that scope trace, it looks very much like an overshoot issue… I have a similar “problem” on my 3018 “TOY” CNC machine, where the Laser burned out two control boards already… From what I can see ( on my own damaged boards ) there were no proper MOSFET Drivers installed on the board… MOSFETs are difficult little animals, especially the P-Channel sort… That gate current and parasitic gate capacitances are finicky… Drivers are also quite expensive…

I would be interested in taking a look at your driver board circuit, if you have it, to try and get to the bottom of this. It will ultimately also be to my own benefit too ha ha as I have been wanting to upgrade the 3018 to a more powerful spindle etc for a while now, but, due to the dubious performance of the controllers, I did not dare yet…

As to the circuit that you did send me ( the RIO Rand Motor Speed controller )…
That circuit basically forms a 12v Voltage regulator ( Q42 is controlled by Zener D25 in a pass-through configuration… I can not see any PWM generation part there so I am assuming that it is in a later part of the circuit…

Please get in touch, lets look at the schematics that you have and try to get to the bottom of this… I do believe it is do-able :slight_smile:


There are tabs at the bottom of the schematic page.
The driver is Q44.
There is a PWM tab that uses a 555 to generate PWM but instead, I used the output of the tinyG for PWM.

1 Like

Okay… Did not see rhat lol, was about 23:00 at night… Will take a closer look later today…

Funny that it turns on again like you say…

I can confirm that my spindle also does not really run at the set speed on the stock 3018… That is a 24v motor FYI…

For interest sake, and this assuming you run a grbl setup, have you ever tried a stock Arduino with a cnc shield or similar, obviously one that can handle 48v at 10a…

I had a similar thing while designing that p-channel driver… The Arduino PWM would turn the mosfet on an off perfectly up until about 200khz, but then, it will start with random stay on, random on, random off isdues… Since i am only interested in using the driver for led cob lights, 200khz id fine for me though…

Your problem is really interesting, and frankly it kept me awake last night, due to the simple being interesting factor of it …

Will get back to you later today…

Hi @donkjr

As promised I had a look…
I found something on the schematic…
R64 and R68 form

a VOLTAGE Divider

I have made this mistake before. That configuration will in effect LOWER your gate voltage to 11.348v ( That is assuming that you actually get a full 12v input there, which with PWM can be as low as 3v at 25% duty cycle… (i.e 2.83v at the gate)

Change the position of R64 so that it connects between the top of R68 and the top of D15

Then, according to the datasheet of the MOSFET VGS is 10v, so it will not reliably switch at anything below that…

I suggest that maybe you implement a TOTEMPOLE Driver using two transistors, PNP and NPN on that MOSFET GATE , keeping VGS at below 20 v …

Maybe a voltage divider from the HV DC to get it in the 15 to 18v range, just to drive the gate??

What do you think of that?

1 Like