Electronic – Simple transistor circuit with unconnected gate pin acts strangely

groundmosfettransistorsvoltage

My brother and I were playing around with some new transistors we ordered (2n7000 n-channel MOSFETs), trying to make a simple switching circuit: connect a switch, LED turns on; open the switch, LED turns off. Here's a link to the circuit we were attempting to make.

enter image description here
Here's a picture of what we implemented in a breadboard. There's one difference from the above circuit: the switch is not actually complete. We just have a single wire connected to the n-MOSFET's gate. So this is what we actually have in the breadboard.

As far as we can tell, from our limited electrical engineering experience, the LED should never be on, since there is no connection from the +5V power to the transistor's gate; the transistor should not let any current through. However, there were two interesting things: first, the LED turned on as soon as we powered on the circuit, even before we connected the transistor's gate to power. Also, whenever we touch/tap the wire connected to the gate (labeled by "??" in the circuit), the LED randomly switches between three different levels of brightness (on, medium, off), and will even "stick" at a brightness setting, even between power cycles of the entire circuit. The single transistor appears to act as a flip-flop!

So, the question is: why does touching the unconnected wire change the LED's state?

And, secondarily, how is the LED on, even if the transistor has no voltage source attached to the gate?

Best Answer

A floating gate has a voltage. Any wire has a voltage. Until you put it in reference to something else, that voltage can be anything. Don't expect it to be 0V or any other known voltage.

That gate also has a capacitance. Your body is a capacitance. Every time you touch that gate, you're connecting two capacitors and a charge balance will occur. This will alter the voltage on the gate. Ergo, you've created a simple transistor capacitor memory scheme not terribly different than DRAM. Pretty nifty huh?

I'm surprised a little that the brightness remains the same between power cycles, but maybe that's attributable to having a high quality mosfet with a high gate impedance?

Lastly, although this is a great lesson, don't design a circuit like this with a floating node expecting it to be a specific voltage.