MOSFET: everything you need to know about this type of transistor


There are several types of transistors. These electronic devices are very important for today’s electronics, and they represented a great advance in moving from vacuum tube based electronics to solid state based electronics, which are much more reliable and consume less energy. In fact, the MOSFET are the ones used in most chips or integrated circuits, although you can also find them in printed circuit boards for many other applications.

Well, since it is such an important semiconductor device, I will present you everything you need to know about this work of science and engineering that allows us to make so many circuits and that have improved our lives in many ways.

What’s a transistor?

The word transistor comes from transfer-resistor, and was invented in 1951, although in Europe there were already patents and developments before the Americans presented the first design, although this is already another story… At that time there was a search for a solid-state, semiconductor-based device that could replace the crude and unreliable vacuum valves that made up the computers and other electronic devices of the time.

The valves or vacuum tubes has a similar architecture to conventional light bulbs, and therefore also melted. They had to be replaced frequently to keep the machines running. In addition, they were heated, which means that they were wasting large amounts of energy in the form of heat due to their inefficiency. Therefore, they were not practical at all and needed to be replaced urgently.

Well, in the Bell Labs of AT&T, Williams Shockley, John Bardeen and Walter Brattain got to work creating that semiconductor device. The truth is, they had a hard time finding the key. The project was kept secret because it was known that something similar was being developed in Europe. But World War II was on, and the protagonists had to go into battle. On their return, they had mysteriously found the solution.

The first prototype they created was very rough, and presented serious design problems. Among them, it was complex and complicated to mass produce. In addition, it used gold parts that made it more expensive, and the tip sometimes stopped making contact with the semiconductor crystal, so it stopped working and had to be pushed back into contact. The truth is that little by little they had solved with this invention, but little by little they improved and new types appeared.

They already had a smaller solid-state electronic component to reduce the size of radios, alarms, cars, computers, televisions, etc.

Parts and operation


The transistor consists of three pins or contacts, which in turn make contact with three different semiconductor zones. In bipolars these zones are called emitter, base and collector. On the other hand, in the unipolar ones, as it is the MOSFET, they are usually called source, gate and drain. You must read the datasheets or catalogs to identify their pins and not confuse them, as it will depend on the operation.

The door or base acts as a switch, opening or closing the current path between the other two ends. This is how it works. And according to this, it can be used for two basic functions:

  • Function 1: can act to let pass or cut electrical signals, i.e. as a switch for digital electronics. This is important for the binary or digital system, because by controlling the door (with 0 or 1), you can get one value or another at its output (0/1). That way you can form logic gates.
  • Function 2: can also be used, for analog electronics, as signal amplifiers. If a small intensity reaches the base, it can be converted into a larger one between the collector and emitter that can be used as an output.

Transistor types

MOSFET symbols
MOSFET symbols N and P


Once seen the basic operation and a little of its history, over time have been improving and creating transistors optimized for a particular type of application, resulting in all these two families that in turn have several types:

Remember that the N-zone is a type of semiconductor doped with donor impurities, that is, pentavalent compounds (phosphorus, arsenic,…). This will allow them to yield electrons (-), since the majority carriers are the electrons, while the minority are the holes (+). In the case of a P zone it is the opposite, the majority ones will be the holes (+), that is why it is called like that. That is, they will attract the electrons. To achieve this, it is doped with other accepting impurities, that is, trivalent (aluminium, indium, gallium,…). Normally the base semiconductor is silicon or germanium, although there are other types. Dopants are usually in very low doses, on the order of one atom of impurities per 100,000,000 atoms of the semiconductor. Sometimes heavy or highly doped areas can be formed, such as P+ or N+ which have 1 impurity atom per 10,000.

  • BJT (Bipolar Junction Transistor): is the bipolar transistor, the most conventional one. A base current must be injected into it to regulate the current of the collector. There are two types inside:
    • NPN: as its name indicates, it has a semiconductor zone doped to be N-type to act as an emitter, another P-type as a base, and another for the collector, also N-type.
    • PNP: in this case it is the other way around, the base will be of type N, and the two remaining ones of type P. This will totally alter its electrical behavior and the way it is used.
  • FET (Field Effect Transistor): the field effect transistor, and its most notable difference from the BJT is the way it operates with its control terminal. In this case, the control is done by applying a voltage between the gate and the source. Within this type there are several subtypes:
    • JFET: The FET junction ones are of exhaustion, and have a channel or semiconductor zone that can be of one type or another. According to that they can be in turn:
      • N-channel.
      • P channel.
    • MOSFET: its acronym comes from Metal Oxide Semiconductor FET, so called because a thin layer of silicon dioxide is used under the door contact to generate the necessary field with which to control the passage of current through its channel so that there is flow between the source and emitter. The channel can be P-type, so there will be two N-wells for source and drainer; or N-type, with two P-wells for source and drainer. They are somewhat different from the above, in this case you can have:
      • Deplection or exhaustion:
        • Of channel N.
        • Of P channel.
      • Enhanced or improved:
        • N-channel.
        • P-channel
      • Others: TFT, CMOS, …
  • Others.

The differences are based on the internal architecture of the semiconductor zones of each .


A MOSFET allows you to manipulate large loads, which can be useful for certain circuits with your Arduino, as you will see later. In fact, its advantages make it so useful in modern electronics. It can act as an amplifier or as an electronically controlled switch. For each type of MOSFET you buy, you know you should read the datasheet to see the properties, as not all of them are the same.

  • The difference between one of N-channel and P is:P channel: to activate the P channel to let the current through, a negative voltage is applied to the door. The source must be connected to a positive voltage. Note that the channel on which the gate is located is positive, while the wells for the drain and source are negative. This “pushes” the current through the channel.
  • Channel N: In this case, a positive voltage is applied to the gate.

They’re very cheap items, so you can buy a good handful of them at no great cost. For example, here are some commercials that you can buy in specialty stores:

If you’re going to use it for higher powers it’s going to get hot, so it would be good to use a ‘strong’ to cool it down a bit…

Integration with Arduino

scheme with Arduino

A MOSFET can be very practical to control signals with your Arduino board, so it can serve similarly to how the relay module was used, if you remember. In fact, MOSFET modules are also sold for Arduino, such as the , one of the most popular. With these modules you already have the transistor mounted on a small PCB and it is easier to use.

But it’s not the only one you can use with Arduino, there are also quite common ones like the IRF520, IRF540, which allow nominal intensities of 9.2 and 28A respectively, as opposed to 14A for IRF530.
If you use the IRF530N module, for example, you can connect the connector marked GIS on the board with one of the pins of the Arduino UNO board, such as the D9. Then connect GND and Vcc to the corresponding ones on the Arduino board, such as GND and 5v in this case to power it.

As for the simple code that would regulate this simple scheme would be the following, that what it does is to let pass or not load at the output every 5 seconds (in the case of our scheme it would be a motor, but it can be what you want…):

onst int pin = 9; //Pin where the MOSFET is connected
void setup() {
  pinMode(pin, OUTPUT); //Define as output to control the MOSFET
void loop(){
  digitalWrite(pin, HIGH); // Sets it to HIGH
  delay(5000); // Wait 5 seconds or 5000ms
  digitalWrite(pin, LOW); // Sets it to LOW
  delay(5000); // Wait another 5s before repeating the loop

Leave a Comment