1
\$\begingroup\$

I am trying to make simple gates with n-MOSFETS, yet I'm not sure how to actually do physical gate inputs correctly.

At first, I tried this (a single-pole, single-throw switch from +5V to gate). However, as I learned recently, this is bad because when the switch is open the gate has a floating voltage.

So then, I thought that I should use a pull-down resistor from gate to ground, and then have a switch from +5V to gate, like this. However, this is undesirable because the pull-down resistor always draws 25mW and has a constant current of 5mA, which seems to me like a huge waste of power and current (especially as I am using USB power, and thus have a max current of 500mA for the entire circuit, which will consist of many more transistors and inputs). Note that I cannot have a very large pull-down resistor, or the transistor stops working correctly, which means that I need to have a small resistor, and thus a large current and power draw.

My next thought was to not use a pull-down resistor, and instead use a single-pole, double-throw switch between power, ground, and gate, like this. This seems to me like the best way to have digital inputs, because there is no constant power drain. However, I would need to buy some of these switches since I don't have any right now.

My question is the following: how do existing circuits (such as those found in my computer) do physical digital inputs? Do they have pull-down or pull-up resistors and waste power and current, or do they even follow any of the methods that I thought of? Is there a better way of doing this that I haven't thought of?

\$\endgroup\$
  • 1
    \$\begingroup\$ You don't need to use such a low value pull-down, as long as it can bleed the charge off of the attached input gate. For physical inputs, you generally aren't worried about ultra high switching speeds either, so see what happens with a 100k or more pull down. \$\endgroup\$ – R Drast Jul 22 '15 at 17:13
  • 1
    \$\begingroup\$ RE: "Note that I cannot have a very large pull-down resistor, or the transistor stops working correctly," The solution to this is choose a different transistor. What transistor are you using now? \$\endgroup\$ – The Photon Jul 22 '15 at 17:17
  • \$\begingroup\$ @RDrast I did try higher resistances before (100k, 470k, 1M) but they all make the transistor not work correctly (i.e. instead of the LED switching between on and off, it switches between medium and on or between medium and off). I was told in the linked question (Simple transistor circuit with unconnected gate pin acts strangely) that this is because a large pull-down resistor makes the entire switch wire into a resistor-divider (with the drain-gate resistance as the upper resistor), thus causing the gate to only ever be at 0 or ~2V. \$\endgroup\$ – Jashaszun Jul 22 '15 at 17:17
  • \$\begingroup\$ @ThePhoton 2N7000. \$\endgroup\$ – Jashaszun Jul 22 '15 at 17:18
  • \$\begingroup\$ For future readers, very similar question here \$\endgroup\$ – The Photon Jul 24 '15 at 21:14
5
\$\begingroup\$

For the record, here's one of the circuits you tried:

enter image description here

Your problem is connecting the load to the source of the FET rather than the drain. Tie the source directly to ground, and connect the load between 5 V and the drain:

schematic

simulate this circuit – Schematic created using CircuitLab

Now nearly all of the supply voltage can be applied to the load. In your proposal, the FET is working as a source follower, in which the FET will operate in saturation mode rather than fully switched, and voltage at the load is likely to be 2 or 3 V below the supply voltage.

If you want to have a high-side switch instead of low-side, use a PFET instead of NFET.

\$\endgroup\$
  • \$\begingroup\$ Thank you for the response, but my question was specifically about the pull-down resistor using too much current and power. Apologies if I don't understand, but in your circuit you seem to have the same problem. Are you saying that if I move the load to the drain rather than the source, I can then have a much larger pull-down resistor, and thus less power waste? \$\endgroup\$ – Jashaszun Jul 22 '15 at 17:41
  • \$\begingroup\$ Also, can you explain your second-to-last paragraph? Specifically, what is a source follower, and what are linear and saturate modes? I'm sorry if these seem like simple questions. \$\endgroup\$ – Jashaszun Jul 22 '15 at 17:49
  • \$\begingroup\$ Source follower is the MOSFET equivalent of the BJT emitter follower circuit. Cut-off, linear, and saturation are the three main modes of operation of a MOSFET. \$\endgroup\$ – The Photon Jul 22 '15 at 17:55
  • \$\begingroup\$ Again, sorry if I'm just misunderstanding, but it seems that if the load is above the drain, it is linear, \$\endgroup\$ – Jashaszun Jul 22 '15 at 18:20
  • \$\begingroup\$ yet if the load is entirely below the source then it is actually saturated (which is what I want, correct?). \$\endgroup\$ – Jashaszun Jul 22 '15 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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