# Why is there voltage out of the gate of my transitor

I'm a big beginner in electricity :-D 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:

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

• This circuit won't work as intended - you have chosen an N channel FET and you are using it like a P channel FET. You will find that this circuit conducts all the time irrespective of gate charge problems as highlighted in the answer you accepted. As a tip for this site it's better to wait till you get a couple of answers before you decide to accept one of them. There's no hurry to accept an answer and it's better that you accept the correct answer rather one that only explores half the reasons why your circuit is incorrect. Nov 9, 2013 at 21:50
• I agree that the schematic is badly formed as well, the bulk to source connection is there and it defines the source in the schematic, I'll edit my answer to include that. Nov 10, 2013 at 0:08

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:

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:

simulate this circuit

• Mmmmmh. How would the circuit look like with the correct configuration ? Nov 10, 2013 at 13:36
• @ssougnez see edits. Nov 10, 2013 at 20:06
• Hello. Thanks for your answer. I understand the pull down resistance. But I don't understand why the LED wouldn't be "on" like in my circuit. Indeed, you said that there is a diode in the transistor that allows the current to go through it. So here, no matter what we do with the switch, the current will go anyway through this body diode and the LED will be "on". I guess I'm wrong but why ? :p Nov 10, 2013 at 21:01
• @ssougnez because compared to the first circuit, the second circuit has the transistor flipped top for bottom. Now the body diode is reversed biased, and does not conduct. Nov 11, 2013 at 0:48
• Indeed, I didn't notice that. A last question and then everything will be clear for me. Is that important that the LED is "before" the transistor ? If the LED was placed after the transistor, it would have work, no ? Nov 11, 2013 at 13:50

There are two culprits at work here:

If you charge the gate of a MOSFET using a voltage source and then disconnect the voltage source by a switch, the gate will not go back to 0V. There is a charged capacitaor at the gate and that capacitor will retain it's charge indefinitely (except in real life, where there is a phenomenon called gate leakage). So, you can charge turn on this circuit, and it will most probably stay turned on forever.

However, if in the initial condition, the 3.3V is still there, this is a shortcoming of the simulator you're using. Floating nodes are basically impossible for the simulator to solve, so generally, what is done is that it is connected to the circuit ground by using a very large resistor (denoted by gmin in SPICE like simulators). This sets the initial value of the floating node to 0, and you may have other options to use to actually set the initial value of the floating node depending on your simulator. This may not be implemented correctly in your simulator of choice.

I'd advise you to try and learn a better SPICE based simulator. LTspice from Linear Technologies is a great freeware circuit simulator that is beyond the capabilities of a toy.

• Mmmmh. Your explanation makes perfect sense indeed. I'll take a look at LTspice. Thanks a lot for this answer. Nov 9, 2013 at 21:42
• @PhilFrost they definitely exist, but most are lateral devices with an internal source-body short, or a vertical device which is by definition asymmetrical.
– W5VO
Nov 10, 2013 at 4:38
• No this isn't correct. Flipping the device will not work as suggested. This answer is totally misleading to the questioner and is still wrong. I think you need to do some research on this because I'm not about ro start teaching dude. Nov 10, 2013 at 7:46
• I generally work with MOSFET's in the IC design context and use 4-terminal devices for the most part, where the body is most usually grounded (not connected to the source). This is not the case here so I removed that bit from my answer. Nov 10, 2013 at 10:22