0
\$\begingroup\$

I'm trying to build a simple IOT push-button with the ESP-01. My goal is to have it powered by 2 coin-cell batteries (3v), so I want it to power up when I push the button, and then power itself down.

I was advised on reddit to use a P-channel mosfet to allow the ESP to power itself by holding the gate low via a GPI0 pin, then setting it high to power it down. I'm struggling to get this working. I have it wired up like so:

enter image description here

But as soon as I release the button, the ESP shuts off immediately (it doesn't seem to draw any power through the mosfet). I tested my code by hooking ESP's 3v3 pin directly to battery+, and used a voltmeter to measure at the mosfet's drain pin. When it boots up, the voltmeter almost immediately reads ~3.3v, my code makes a successful HTTP request, and then voltmeter drops ~0v, as expected.

However, when I wire the ESP's 3v3 pin back where the voltmeter was (on the drain pin), the ESP shuts off as soon as I release the button.

What am I missing? I've seen other schematics for "soft-latching" circuits that include an additional NPN transistor, but I'm not sure whether or not that applies to my situation.

\$\endgroup\$
  • \$\begingroup\$ Your circuit doesn't make sense. Battery negative isn't connected to anything. There is a dot part way along the wire between battery positive and S1, is it supposed to connect to the wire going between CH_PD and FET Source? To avoid confusion join wires with t intersections, not crosses! \$\endgroup\$ – Bruce Abbott Mar 13 '17 at 5:45
  • \$\begingroup\$ Sorry, the diagram is probably a bad representation of my circuit (and I'm still a bit new to all this). The battery is of course connected to common ground. I made the diagram late last night on schematics.com, which I probably won't use again. Not sure why the dot ended up being disconnected in the export. \$\endgroup\$ – Ben Davis Mar 13 '17 at 19:56
3
\$\begingroup\$

The ZVP3306A is designed for 10V Gate drive. Its threshold could be as high as 3.5V at 1mA, which means it probably won't turn on hard enough to power the ESP8266 at 3V.

enter image description here

You need a FET which is designed for 2.5V Gate drive, eg. IRLML6402.

\$\endgroup\$
  • 1
    \$\begingroup\$ Thanks. I guess I'm still struggling to comprehend all the parameters on the datasheet. My mistake was thinking that since Vgs was max 3.5, 3.3 would be enough to "switch on" and feed 3.3v to the ESP. When looking for a mosfet for this type of application, what should I be looking for in Vgs min/max? Are there any other parameters I should be paying close attention to? \$\endgroup\$ – Ben Davis Mar 13 '17 at 20:35

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.