Transistor & MOSFET's are so complicated

I wonder if anyone can help me here?

I'm shiny new to Arduino and electronics but have several projects on the go to help me learn this magic!

MOSFETS and Transistors... these are complicated (to me anyway) and I was wondering if anyone could provide a good resource for learning what I should be looking for when buying these?

For example, how I calculate the base voltage needed to switch what source voltages etc.

I understand I can use these for switching higher voltages, for example, providing 5v from Arduino to the base and then switching a 12v supply to power LED's for example; but I have no idea how to choose the correct component(s).

I'd really appreciate any advice you could offer.

Thank you!!

When using MOSFETS and transistors as a switch you don’t have to worry very much about what you buy.

For MOSFETs you have to make sure that they can use a low voltage for the gate like this one:

You will most likely never need a P MOSFET.

For transistors you can use pretty much anything, but these one will do: 2N3904 (NPN) and 2N3906 (PNP).

Things to look out for: What voltages are you using? Your component have to be able to work at the voltages you’re using. Note that inductors (motors) can have large overshoots so plan for at least 2 times higher voltages than you plan to use. Also look out for how much current and how much power you use. Your components have to fit within those specifications as well. Cooling (heat sink) is important as soon as you have more than 1 A.

I would personally but such items at Most transistors are 2 cents and shipping is fast and cheap.

This is superb!

Thank you for your quick reply.

One other question if I may?

I see sometimes a resistor between the 5v source/Arduino and the MOSFET/Transistor base - what is this for?

Thank you again!

There is a limit to how much current you can draw from a pin on the Arduino (about 20 mA). That isn't much and this is the reason that you consider using a MOSFET or transistor in the first place.

In order to limit the current you insert a resistor between the pin on the Arduino and base on the transistor. Transistors are current controlled so some current has to enter through the base when the transistor is supposed to let current through from emitter to collector (for a NPN transistor).

MOSFETs are voltage controlled so you really don't need a resistor when controlling a MOSFET.

I find this a useful site; in particular, the transistor page may help you with choosing- there's a table there about half way down.

Here is a page from another site, showing how to use a transistor to switch a load like a motor. This site gets my vote for the best photos and cool schematics....

BTW, not to be pedantic, but MOSFETs are transistors, that's what the "T" stands for.

Do you know Ohm’s Law? When it applies, and when it doesn’t?

Kirchoff’s current and voltage laws?

Do you understand diode junctions?

You need the basics, first.

This is brilliant - thanks guys! :)

look for ebooks online many free on transistors and semiconductors theory and circuits pdf downloads

larsgregersen: MOSFETs are voltage controlled so you really don't need a resistor when controlling a MOSFET.

Except of course - that you do!

Perhaps not for a "small signal" MOSFET, but the large power switching ones have considerable gate-source capacitance and that will transiently require significant current to charge which can be - very briefly - more than that 20 mA or so quoted for the Arduino outputs.

Now for this very brief period, it may not actually damage the MCU chip, but that brief high current may well - possibly only intermittently - interfere with the normal operation of the MCU and leave you scratching you head as to what is happening and why it happens only sometimes. So be warned. :)

a very basic difference is that a MOSFET is switched by voltage and the transistor is switched by power.

the base on a transistor will consume power. with a limiting resistor it is almost like a short to ground. so, you must use a resistor.

for the MOSFET, they use voltage. on the small signal ones, you should not have any problem. on the higher power one, you must make sure they will operate with 3.3 or 5volts. Many times there is an L in the part number for low voltage.

one of the most notable differences is that the FET is much more sensitive. think gossimer contacts. very low resistance, so it does not get as hot. works with voltage so it does not consume much power to operate. however, the big problem is that if you have static on your hands when you pick one up, the gossimer smoke is so small that it may not leave the package and your olfactory sensor may not detect that the smoke has been released.

MOSFETs are voltage controlled so you really don’t need a resistor when controlling a MOSFET.

You don’t need a resistor, but that output will last longer if you do. As Paul__B already stated, a FET gate looks like a capacitor to the Arduino. Without any current limiting resistor, the Arduino is potentially asked to supply in excess of its rated 20/40 mA.

If this is very frequent, you will eventually damage that output, so it’s ALWAYS a good idea to put a current limiting resistor between the gate and the Arduino output. To limit the current to 20mA, use 5V/.02=250 or 270 ohms. If you go higher, the circuit will still work, but will be slowed down by the rc time constant. That’s why you keep the value low.

You will most likely never need a P MOSFET.

Any switching you do in a car is generally done by switching “high side”, so you would definitely use a P-Channel here unless you want to go to the trouble of providing a supply of Vcc+5 to turn on an N-Channel’s gate.