I'm helping a friend build a mailbox notifier, and am working on the power supply for the ESP8266. I have no experience with ESP8266, but understand they use a good bit of power. I would appreciate it if before I order the parts someone experienced with this could take a look at the attached schematic and tell me what you think, particularly the choice of parts for the mosfet and regulator.
The idea is that the circuit would be completely powered down almost all the time. When the mailbox door is opened, the gate of the P-channel mosfet will be gounded, which turns on the power. After booting, the ESP8266 will set the I/O pin to OUTPUT, HIGH, which will keep the power on even if the door is closed. Then after the notice has been sent the processor will turn the I/O pin off, which will turn off power if/when the door is closed.
C1 is there to keep the gate low if the door is closed before the boot process has completed. I'm not sure it is needed, but have no feel for how long after powerup it takes before the 8266 starts executing user code.
It has a Chip Enable pin. If you connect that to ground, the chip draws virtually no power. Connect it to a PIO pin via a 10k resistor. Connect it also to your battery positive via the switch. When switched on, your code pulls the PIO high and the ESP8266 keeps on working. When it wants to shut down, it simply pulls the PIO low.
It has a Chip Enable pin. If you connect that to ground, the chip draws virtually no power. Connect it to a PIO pin via a 10k resistor. Connect it also to your battery positive via the switch. When switched on, your code pulls the PIO high and the ESP8266 keeps on working. When it wants to shut down, it simply pulls the PIO low.
Oh, I notice the regulator.
Just use two alkaline "AA" cells.
Well obviously I need to do more reading about the ESP8266. The concern I would have about using two AAs is that they might not last very long if the minimum voltage required is really about 3V to allow for the current spikes from wireless activity.
I also need to look at the various modules. I had just assumed he would use the basic -01 module, but looking at it just now, I'm not sure it provides a usable I/O pin. Something like the D1 Mini comes with its own regulator, but doesn't bring out CE. Maybe the 12-E would work.
How does the 8266 come up when CE goes high? Is it like a reset? The datasheet doesn't say anything about that.
Anyway, maybe others who have tried using two AAs will comment on their experience with that.
I would think the two alkaline AAs would last very well indeed if it only operates for a few seconds each day.
This is based on an enhancement to "the button" project. I have had bits and pieces for ages, just haven't built them yet.
The ESP-01 provides four I/O pins. Two nominally are UART Rx and Tx but completely usable in any form. One other pin must be pulled up at start-up. CE is a total power control, so it is a power-on reset.