Raspberry Pi circuit for N channel Mosfet switch

I just received my order of N channel Mosfets

FQP30N06L Datasheet here

Unfortunately my novice skills don’t yet extend to interpreting the data sheet and I’m trying to check if my Raspberry Pi GPIO 3.3 volt signal will be sufficient to open the gate fully.

I’m also struggling to find a good tutorial on the wiring of this circuit. In particular I’m confused about the connection of the GROUND.

Several of thecircuit diagrams I’ve seen show the negative connection from the battery connected not only to the device being powered but also to the GROUND pin of the microcontroller.

I’m a novice and concerned that connecting the -12 volt output of my power source, will be damaging to my RPi.
Any suggestions appreciated

1 Like

Hey Nigel,
Just to be clear, you will need to connect all the Grounds of your circuit (Pi & 12V Supply) together. Additionally the RPi GPIO should fully open the gate on this MOSFET.

This won’t supply -12VDC to the GPIO Pins on your Pi, so you don’t need to worry about that. There’s plenty of in-depth guidance available here.

Thanks Aidan,

I got it working but I was holding my breath when I connected the “negative” output from my 12v supply to the Pi. I’ve struggled to find a simple tutorial on the subject but now I am starting to think that the negative is simply the ground for the battery.

I do wonder what would be the scenario if, for instance I wanted to operate two different voltage devices from my GPIOs… say a 24 volt device and a 12 volt one?

I’ll follow the link you kindly supplied and seek the answer there.



For reliable operation, everything needs a common ground. For example:

Just to piggy-back off the existing discussion. If I were trying to switch a 5V @ ~1A load, would the reduced Vds mean that this MOSFET (the P30N06LE) is not suitable without a gate driver?

Hi Alex,

Welcome to the forum :slight_smile:

If you’re trying to switch a 5V @ ~1A load the parameter that determines how hard the MOSFET turns on will be Vgs.
The threshold voltage where the MOSFET starts to turn on is between 1 and 2.5V
Looking at the plot in the datasheet the MOSFET is able to pass around 20Amps with a Vgs around 3.3V so it is well and truly on and able to switch your load using the Pis lower voltage logic levels.


Hi All
Don’t forget about 1kΩ resistor in series with the gate which that circuit does not show. Reason is the gate will be a short circuit to ground immediately at switch on and the resistor is to prevent damaging current flow from the I/O port.
Cheers Bob


Thanks so much Trent (and thanks also Bob)

I’ve breadboarded this and wasn’t able to get my load to work with gate supplied by the 3.3V output from the Pi, but was able to with a 5V direct supply. I will have to investigate further, I must have missed something!

Hi Trent, Alex
Re your graph from the data sheet. You have not mentioned that the Source/drain voltage for that test is 25V.
Now at 3V gate voltage the current look like about 14A (@25V) so the resistance of the device is approx 1.8Ω. So it is quite possible that Alex sees nothing happening with a source drain voltage of 5V whereas at a gate voltage of 5V the Mosfet is approaching saturation which looks like occurring at about a gate voltage of 7V which (from the data sheet) would be a resistance of 0.045Ω, quite a difference. Actually from the graph the resistance with a gate voltage of 5V looks like it would be about 0.4Ω to 0.5Ω so a better chance of seeing something happening.

Alex: You did put a 1kΩ resistor in series between your 3.3V source and the Mosfet gate didn’t you. Without that you could have killed the 3.3V pulse as this would have a modest current capability and may not like the short circuit presented by the Mosfet at switch on whereas the raw 5V supply would be much more robust and able to keep up the 5V and allow the Mosfet to switch.
Cheers Bob