Help Needed choosing the right MOSFET for my Arduino project

Thread Starter


Joined Apr 3, 2023
Hey Everyone, I hope you're all doing great.

I'm still new to the world of Arduino, Shift Registers and MOSFETs. Hence, your help would be very much appreciated.

I have a project in which I have to control 170 PIN diodes of type SMP1345-079LF according to a certain pattern. Those PIN diodes, according to their datasheet, have a forward voltage of 0.89V. Also, to be properly biased, they need a current of 10 mA flowing through them.

This said, I am using Arduino MEGA along with shift registers and MOSFETs to do the job.


In the diagram above, you can see a sample of how I am planning to do the connections.

When the PIN diode should be turned ON, the Shift Register will give a voltage of 5V to the gate of the MOSFET and, after that, a current Id=10mA should flow into the diode. (I'm pretty sure I need to add a series resistor with the diode here. Again, your help would be extremely appreciated).

I have previously thought about using the NPN transistor 2N3904 instead of the MOSFET, but since its gain (beta) varies between 100 and 300 at Ic = 10 mA. I decided not to opt for it.

Please, can you help me choose the appropriate MOSFET for my circuit?

Also, please do not hesitate to guide me if there is anything wrong with my circuit.

Thank you so much in advance for your time, efforts, and help!


Joined Feb 24, 2006
You have drawn the N-channel MOSFET upside down. With the configuration shown you will never be able to turn them on.



Joined Jul 10, 2017
It is much simpler to use a NPN transistor (2N3904). All you need is 4.7K resistor from the digital output pin the the base of the transistor. The beta will be high enough in the worst possible case, to allow the transistor to saturate at 10 mA collector current..
The size of the sreies resistor will depend on what kind of LED you are using. Different colors have different voltage drop. Subtract the voltage drop across your LED + 200mV drop across the saturated transistor from the supply voltage. The series resistor value needed will be the resultant voltage / 0.01A


Joined Sep 9, 2010
I agree with @KeithWalker that a transistor is a simpler (and cheaper) solution here. Not a big deal either way, and learning to use a MOSFET properly sets you up for controlling higher current loads than typical LEDs. So you're fine if you want to continue with a MOSFET. You need to be sure to use a "logic level" MOSFET. That means it switches fully on at a gate voltage of 5V or less. A "regular" MOSFET requires 10V or more. Even that would work for a small load such as an LED, it's just that the "on" resistance will be a little higher than when fully turned on. That's of little concern since you have to have series resistance for the LED anyway.

If I understand you correctly, you're going to have 170 identical transistor switches? In that case you should look into transistor arrays. That's multiple transistors in the same package. I think getting the right array is more important than the choice of NPN versus MOSFET.


Joined Aug 21, 2008
What is the purpose of the diodes?

I believe that if it is to switch RF you need to switch the diode between being reverse biased (mostly off) and forward biased (mostly on).


Joined Mar 14, 2023
Maybe you could try a 2N7000 mosfet to do the job, they work well for logic level applications and are cheap as borscht and are available in the SOT23 for factor just to keep consistent with your surface mounting board design, I'd also get rid of the 1k resistor. But quite honestly I'm not hugely familiar with Arduino, so take this with a grain of salt, if you have extra I/O pins on your Arduino that are just doing nothing and you want to minimize your board complexity then you could just use 8 I/O pins from your Arduino to direct drive these 2N7000 mosfets with the thought of creating your own shift register within the Arduino.