4
\$\begingroup\$

I am new to EE but I see that FETs such as the FQP30N06L have an input capacitance of 800pF. Can that be used to store a charge for some time?

The goal is to push a momentary button to power on a Raspberry Pi and after about 60 seconds detect on a Pi GPIO input that the power button was pushed. And because it is solar-powered, a requirement is to minimize the current in use when the Pi is not powered. Power on events could be hours apart.

The circuit powers on a power control latch via a FET gate. This latch starts the Pi booting. The circuit also feeds voltage into the gate of another FET which would start current flowing. After the Pi is booted, I want it to read the state on the second FET to determine if the power button was pressed. (The Pi could be started via other means so I need to be able to determine what started it.)

Is this doable? Is there a better FET for the job? Is there a better way to meet the goal?

It doesn't work on Falstad, but I'm not sure if that's because of a limitation there; they don't have a parameter on FETs for input capacitance.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Or you could just use a timer. Hint: 555 \$\endgroup\$ – ammar.cma Mar 31 '17 at 11:27
  • 3
    \$\begingroup\$ @ammar.cma not sure that's really great advice. component tolerances aren't that large for MOSFETs, and generally, OP doesn't need a timer. And the 555 is a power consuming monster of olde lore, so I don't really think this would be an optimum use case. \$\endgroup\$ – Marcus Müller Mar 31 '17 at 11:35
  • 2
    \$\begingroup\$ A simple CMOS flip-flop would solve the problem more directly, without having to rely on esoteric low-leakage charge storage circuitry. \$\endgroup\$ – Dave Tweed Mar 31 '17 at 13:03
  • \$\begingroup\$ @ammar.cma as Marcus noted, because it is solar-powered, a requirement is to minimize the current in use when the Pi is not powered. Power on events could be hours apart. I have edited the original post to reflect that. \$\endgroup\$ – SlowBro Mar 31 '17 at 14:14
  • \$\begingroup\$ @DaveTweed that's an intriguing solution. I like it. Also how about another solution: A dedicated capacitor that stores a voltage until the Pi can read it? Would just need to be big enough. \$\endgroup\$ – SlowBro Mar 31 '17 at 14:18
8
\$\begingroup\$

Why don't you just forget the fet and charge a 100 nF capacitor up? It seems that M1 is bringing nothing to the party but complication. Once charged via the diode, it will hold that charge for long enough to read then, you switch the GPIO to an output and discharge it ready for next time. Why all the complexity and uncertainty of the fet?

If you are worried about the cap charging to 5 volts and hurting the lower voltage GPIO then use a charge potential divider before the diode and maybe a 1 kohm in series to the GPIO line.

\$\endgroup\$
  • \$\begingroup\$ That actually was my first solution, and I even soldered it up last night, complete with the voltage divider. But I measured it with the meter and only showed 110mV. (Hadn't connected it to the Pi yet.) So I thought of this instead. The concern also was discharging the cap into the GPIO. But your suggestion to use a 1k in series should work great. I just realized why my meter probably didn't show it -- likely because it isn't fast enough. It refreshes every few hundred milliseconds. Just a standard handheld meter. I'll try it on the Pi later with the 1k resistor and report my results. Thanks! \$\endgroup\$ – SlowBro Mar 31 '17 at 14:25
  • \$\begingroup\$ I also have an Xprotolab Plain scope that I've not figured out how to use. This would be perfect for measuring the peak and time delay of the discharge spike. Maybe I'll make it my project to figure out how to use the if I can't get anywhere connecting it to the Pi. \$\endgroup\$ – SlowBro Mar 31 '17 at 14:40
  • 3
    \$\begingroup\$ @SlowBro: If your voltmeter has 1MΩ input resistance it will discharge a 100nF capacitor in about 0.5s. τ=R*C=1MΩ*100nF=0.1s. The raspberry’s input leakage current will hopefully be much lower (can’t find any data). I’d still use at least 1μF. \$\endgroup\$ – Michael Mar 31 '17 at 17:56
  • 2
    \$\begingroup\$ @Michael: I thought the standard/common input resistance was 10 MΩ, not 1 MΩ(?) \$\endgroup\$ – Peter Mortensen Mar 31 '17 at 20:20
  • \$\begingroup\$ @PeterMortensen: Ah, yes, apparently it is. But 1s for going down to 37% charge (and 5s for <1%) is not that much time either. \$\endgroup\$ – Michael Apr 1 '17 at 8:46
4
\$\begingroup\$

You will need a low leakage diode to have a good chance of achieving this. Ballpark wise, assuming the 1N4148 to the gate leaks ~8nA consistently around 5V and down we can make a ballpark calculation using the capacitor equation and the parameters of the MOSFET. $$ I(t)=C \frac{dV}{dT} $$ If we set I=8nA, Vd=0.7 (diode drop), Vgs=2.5 we can calculate that once you remove the switch the MOSFET will be on while the gate voltage discharges from 4.3V to 2.5V or over a span of 1.8V.

Solving for dT we get dT=0.18 seconds. Not alot, so you will need to find a lower leakage diode. Even then this will be highly dependent on temperature and device variations of both the diode and the MOSFET. So dont do this if you want accuracy. But you might find something that leaves you ballpark around 60 seconds at room temperature with the correct component choices.

As someone pointed out, for this to work the design would need to be converted to ground the source and use it as a inverter.

\$\endgroup\$
  • \$\begingroup\$ He should include the current sinking into Pi GPIO for this calculation \$\endgroup\$ – Marcelo Espinoza Vargas Mar 31 '17 at 12:05
  • \$\begingroup\$ It'll be outdoors so temperature swings can be a big factor. I'll take this into consideration, but I'm favoring @Andy aka's solution. \$\endgroup\$ – SlowBro Mar 31 '17 at 14:29
  • \$\begingroup\$ But that isn't how the OP's source-follower circuit works! The gate never charges to more than Vgs to begin with. To get the effect you're talking about, the source would have to be grounded, and the output taken from the drain terminal. \$\endgroup\$ – Dave Tweed Mar 31 '17 at 14:39
  • \$\begingroup\$ Dave Tweed is right, and i agree that Andys solution would be preferrable. The solution you had would need to be modified to ground the source, and convert it to a inverter, in order for my suggestion to work. \$\endgroup\$ – Stonie Mar 31 '17 at 14:42
3
\$\begingroup\$

Can I use FET input capacitance to store a charge for some time?

Yes. The length of time will depend on the circuitry, the leakage, the construction, and factors that impact those conditions. You can easily try it with real parts.

\$\endgroup\$
  • \$\begingroup\$ Indeed, you can even test this with just a multimeter and a bare MOSFET. Charge up the gate with the diode test mode, then test the continuity between source and drain, then discharge the gate again and test again. Be careful not to zap the FET with ESD though. In my experiments with this (just holding the FET in my hand and probing with the meter, you can get the gate to hold a known state for several minutes at least. And it's a neat party trick :) \$\endgroup\$ – Wossname Mar 31 '17 at 12:45
  • \$\begingroup\$ @Wossname "And it's a neat party trick" Haha \$\endgroup\$ – SlowBro Mar 31 '17 at 14:38

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.