1
\$\begingroup\$

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:

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

\$\endgroup\$
2
  • \$\begingroup\$ 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. \$\endgroup\$
    – Andy aka
    Commented Nov 9, 2013 at 21:50
  • \$\begingroup\$ 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. \$\endgroup\$
    – deadude
    Commented Nov 10, 2013 at 0:08

2 Answers 2

1
\$\begingroup\$

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

\$\endgroup\$
7
  • \$\begingroup\$ Mmmmmh. How would the circuit look like with the correct configuration ? \$\endgroup\$
    – ssougnez
    Commented Nov 10, 2013 at 13:36
  • \$\begingroup\$ @ssougnez see edits. \$\endgroup\$
    – Phil Frost
    Commented Nov 10, 2013 at 20:06
  • \$\begingroup\$ 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 \$\endgroup\$
    – ssougnez
    Commented Nov 10, 2013 at 21:01
  • \$\begingroup\$ @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. \$\endgroup\$
    – Phil Frost
    Commented Nov 11, 2013 at 0:48
  • \$\begingroup\$ 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 ? \$\endgroup\$
    – ssougnez
    Commented Nov 11, 2013 at 13:50
2
\$\begingroup\$

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.

\$\endgroup\$
4
  • \$\begingroup\$ Mmmmh. Your explanation makes perfect sense indeed. I'll take a look at LTspice. Thanks a lot for this answer. \$\endgroup\$
    – ssougnez
    Commented Nov 9, 2013 at 21:42
  • \$\begingroup\$ @PhilFrost they definitely exist, but most are lateral devices with an internal source-body short, or a vertical device which is by definition asymmetrical. \$\endgroup\$
    – W5VO
    Commented Nov 10, 2013 at 4:38
  • \$\begingroup\$ 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. \$\endgroup\$
    – Andy aka
    Commented Nov 10, 2013 at 7:46
  • \$\begingroup\$ 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. \$\endgroup\$
    – deadude
    Commented Nov 10, 2013 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.