I’m no engineer but a curious hobbyist who likes to play around with electronics. So, please bear with me.
I have an ATTiny13 here and want to put it to good use. I thought about using it to start/stop an ESP8266 chip when a button is pressed. The ESP will post something and then signal the ATTiny via GPIO12 / PB3 (green wire) that he is done. The attiny will then stop current supply.
Please have a look at the attached circuit.
The button is connected to PB1 (=INT0), pulled to GND. When button is pressed, PB1 is HIGH, INT0 should be triggered. The ATTiny will than compare the time since last trigger. If x seconds have passed, start the ESP.
Now the part I’m not sure that it is working that way.
I want to use an NPN (AFAIK gain 100) on PB4 to activate the power supply for the ESP8266. 1k Resistor on NPN base should be sufficient (3V/1000Ohm=3mA, with gain 100 of the NPN there should be enough current for the ESP8266 peaks). Because the GPIO of the attiny13 can supply up to 40 mA I could use a lower resistor just in case the NPN I will use is not saturated (or has a lower gain at all).
Will this work? Any further suggestions to optimize it? I do have plenty 1k resistors and some PNP and a few low voltage P-MOSFET. Just in case that could be used to improve my circuit.
Thanks & Best!