Electronic – Why is there voltage out of the gate of the transitor

mosfettransistors

I'm a big beginner in electricity 😀 I just discovered the "Circuit wizard" tool and I'm drawing a circuit with a "MOSFET n channel" transistor. As I understand, when there is voltage on the gate, the transistor is "open" and the current can flow "through" it. So I did the following schema:

Switched open

Behind the tooltip, there is a switch, open. Thus, I expected 0V on the wire between the gate and the switch… And I expected that if the switch was closed, the voltage would be 5V.

Only the second assumption is correct. Indeed, I really don't understand why there is 3.33V on the gate of my transistor. As the switch is open, the wire is like… not connected to anything so where does this voltage come from ?

The answer is surely obvious but I don't know what to look for on the internet to find it :p

Best Answer

All MOSFETs contain diodes. In the case of an N-channel MOSFET as you have drawn here, the diode goes from source to drain. So what you really have is this:

schematic

simulate this circuit – Schematic created using CircuitLab

So, it doesn't really matter what you do with SW1: there is still a path for current through the body diode of Q1 and your LED (D1) no matter what you do with the gate. This is why N-channel MOSFETs are most usually used with the drain attached to ground and the source connected to the load. That is, what you have here is "upside down" from the most usual application.

Also, the gate of a MOSFET is essentially a capacitor. When you close the switch it will be charged, and when the switch is opened, it will only be discharged by very small leakage currents. (This is the basis of flash memory.) Thus, the transistor may remain on for a very long time after SW1 is opened. The cheap, simple, and common solution to this is to add a pull-down resistor.

With those two changes, your circuit should look something like this:

schematic

simulate this circuit