Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By RichardS
#47293 So I want to put the ESP8266 into deep sleep and have it wake itself with GPIO16 and when its asleep I need all the other parts of the circuit to be shutdown.

I was thinking of using a FET to do that, can I put a N channel on GPIO15 which has a pull down, so when the ESP is in deep sleep I assume GPIO15 will be pulled low and the N channel should be off, and when its awake I can put a high on the GPIO15 and the FET will pull low....

Now that said I am not a fan of controlling the grounds on external IC's... I would rather swtiching VCC....

That said I guess GPIO2 which has a pullup could be the opposite with a P channel...

Thoughts? Comments? Suggestions?

Thanks!
RichardS
User avatar
By martinayotte
#47300
RichardS wrote:Now that said I am not a fan of controlling the grounds on external IC's... I would rather swtiching VCC....

Effectively, controlling external ICs requires to control high side !
Indeed, you will need to use a P-channel for that, with PullUp on its gate. It can even switch different supply, such as 5V.
And to control it from ESP, simply add a N-channel to control the P-channel, this way you can still use GPIO15.
(MOSFETs like AO3401/AO3402 are so cheap and small)
User avatar
By RichardS
#47362 Right, what do you mean by can still use GPIO15? Meaning it can still be low at boot?

Richard.
User avatar
By martinayotte
#47364
simply add a N-channel to control the P-channel, this way you can still use GPIO15


P-chan gate needs to be bring to LOW to turn ON, so having a N-chan as an inverter on the P-chan gate make it still require a HIGH on the N-chan gate, therefore IDLE is still LOW, like GPIO15 is providing.