Best component to switch on output using 3.3V arduino output

Hello - I have a device which I want to switch on using a 3.3V output from an arduino. The device needs about 100mA at 3.3V and therefore cannot be directly connected to the output pin of the arduino.

What I'm reading is that TO220 Mosfet is ideal as a switch, but only works at 5V. Is there any similar mosfet (or other electronic component like transistor) I can use that would work? There are so many things out there that I have no idea how to spec what I need.

Thank you for in advance for your help! Any guidance here is appreciated!

TO-220 is a package style and NOT a part number. It means Transistor Outline number 220 and happens to have three pins of a particular size and spacing, plus a heat sink of a particular size.

To answer your question: I am sure that a good solution exists but I do not know the answer off the top of my head. Sorry.

For 100mA, you just need to find a 3.3v logic level mosfet, which is one with low resistance (RDSon) at a Vgs of 3.3V. Something like the PMV16XNR appears to be one of those. It’s an N-channel mosfet that could be used on the low (ground) side of the device you are switching. For switching the high side, a P-channel mosfet like the IRLML6401 should work.

Almost all of these are going to be in a surface mount package or a TO220 package. I’ve never seen one with “very low” RDSon in a TO-92 package.

Mosfets that work well at 3.3V may not be easy to find because you don’t find that specific parameter in things like Digikey listings. Hopefully others who have found ones that work well will post those part numbers. Or you could Google for 3.3V logic level mosfet and see what shows up.

A PNP BJT will do the job well (high side switching 100mA), much easier to find a PNP switching transistor in TO92... It'll need about 5 to 10mA on the base, so a 330 ohm base resistor is about right.

Would your device happen to be an ESP8266?

As MarkT suggested I would just use a 2N3906 or similar PNP transistor with a base resistor of about 330 Ohms. Simple and common. Just about any low power PNP switching transistor should work fine.


Thank you everyone for your input. I’m going to go the easy route and purchase the 2N3906 as suggested. BTW My application is a bare-bones ATMEGA328 running off of a 3.3V supply.

One last question: My issue here is a lack of understanding about how to spec out Mosfets/transistors. Are there any online links that you can point me to? For example, how did you arrive at 2N3906? Is there a table or something that you referenced to get this? Thanks again.

Well when you mentioned, "The device needs about 100mA at 3.3V" many here have been using transistors in switching applications a long time It was really great you described your application and included the voltage and current. After years of looking at data sheets especially for common switching transistors when most see a current like 100 mA for a PNP the 2N3906 just comes to mind for high side switching and the 2N3904 npn for low side switching. Had you said 500 mA I would have likely mentioned the 2N2907 PNP or the 2N2222 NPN. The correct method would be to figure you want a switching transistor, that is you are using the transistor as a switch. Your current is low so you would start by looking at data sheets for low power switching transistors. Then you work from there finding one that will do what you want it to do. :)


Thanks for the feedback Ron! I have some homework to do and what you describe is exactly the path I need to take. My experience has been that the more standard transistors supplied in Arduino kits are fine for switching at 5V but don’t open completely at 3.3V. Thus my motivation for reaching out to everyone.

Just from these comments my mind has gone from thinking about mosfets to needing to research “switching transistors”. Thank you for pointing me in the right direction. :slight_smile:

Gentlemen - thank you for your help. I have one additional question I am having trouble with. I purchased a transistor kit and even had a PCB board fabbed based on the suggestion to use a 2N3906 transistor, so I’m pretty committed to this design.

Here is my issue. The transistor is (as I understand it) in a high-side configuration relative to the load, with the atmega output feeding the base through a 330Ohm resistor. What I’m finding is that when the ATMEGA output goes HIGH, the transistor does not allow current to flow. When I ground the base (or have the ATMEGA pin go LOW), current flows fine! This is the opposite of what I was expecting.

The good news is that using a 2N3904 in the same configuration seems to work fine, with output HIGH on the ATMEGA toggling my load on very nicely. I’m just flummoxed because this was not what I was expecting. Can anyone comment on this?

my circuit.png

The 3906 is working exactly as it's supposed to. You turn on a PNP transistor by bringing the base low relative to the emitter - by at least .6V when current starts to flow. So low = On, high = Off. PNPs work well on the high side because in this configuration there is no material voltage drop across the emitter/collector when the transistor is on, and the full 3.3V is supplied to the load.

You say the NPN 3904 works in this circuit, but I would bet that closer examination will show that there is a .6V drop across the collector/emitter junction, and the volltage supplied to the load is only about 2.7V. That's because no current will flow through the base unless the base/emitter voltage is at least .6V. So the emitter voltage can never rise above 2.7V if any current at all is to flow. You would have to put 3.9V on the base to supply 3.3V to the load.

NPN transistors work (and PNP's don't work) on the LOW side. An NPN only needs .6V on the base to turn it on and provide a no-drop path to ground. A PNP would need -.6V at the base to draw its emitter to ground.

So PNPs and P-channel mosfets are used to switch the high side, and NPNs and N-channel mosfets switch the low side. The control voltages are opposite - high-side switches need a low input to switch them on, but low-side switches need a high input.

NPN and PNP are opposites - whereever there is a positive voltage or charge for one, you swap it to a negative voltage or charge for the other, and vice versa.

You pull the base resistor up towards +ve rail for NPN, so you pull is down towards ground for the PNP.

Internally in a PNP holes carry the main current, and holes are +ve charges, in NPN electrons carry the main current and are negative charges.

What is your load?

The good news is that using a 2N3904 in the same configuration seems to work fine, with output HIGH on the ATMEGA toggling my load on very nicely. I'm just flummoxed because this was not what I was expecting. Can anyone comment on this?

my circuit.png
Really? With the emitter connected to the 3.3 V supply and the collector to the load which goes to ground?

After spending a long time studying everyone's comments I think I have a better idea about how PNP/NPN transistors work.

To Paul, Mark, and Sherman's point my circuit is working, but I would guess that it is suffering a .6V drop across the transistor because it is an NPN in high side configuration. The way I understand it is with the .6V voltage drop across the transistor I've essentially created an inefficient circuit which is undersupplying voltage to my load.

Thank you all for your help here. I'm (slowly!) starting to understand things.