# How not to waste power with digital inputs?

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?

• 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. – R Drast Jul 22 '15 at 17:13
• 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? – The Photon Jul 22 '15 at 17:17
• @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. – Jashaszun Jul 22 '15 at 17:17
• @ThePhoton 2N7000. – Jashaszun Jul 22 '15 at 17:18
• For future readers, very similar question here – The Photon Jul 24 '15 at 21:14

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

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:

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.

• 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? – Jashaszun Jul 22 '15 at 17:41
• 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. – Jashaszun Jul 22 '15 at 17:49
• 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. – The Photon Jul 22 '15 at 17:55
• Again, sorry if I'm just misunderstanding, but it seems that if the load is above the drain, it is linear, – Jashaszun Jul 22 '15 at 18:20
• yet if the load is entirely below the source then it is actually saturated (which is what I want, correct?). – Jashaszun Jul 22 '15 at 18:21