Hi!
Been trying to practice electronics after a long time, and found this tutorial https://randomnerdtutorials.com/lat...auto-power-off-circuit-esp32-esp8266-arduino/ on how to do a power latch which lets you turn off an MCU when its job is done.
So to practice a bit, I decided to make a similar circuit, with the difference that instead of activating the MCU when a switch closes, it should activate it when a switch changes state. The requirements I set for it are:
This is the current circuit I have: https://tinyurl.com/ywvbywpn which has three problems:
a- Main problem: the circuit always transmits voltage to the MCU Vcc PIN (represented with a LED). I'm not sure what's the way to make the circuit stop transmitting current after ~1 second.
b- Despite the 5V input, it transmits only 2V to the MCU, how could I make it so there's less voltage drop? I guess the resistor on top of the switch should be changed?
c- When the switch changes to closed it takes a while to turn the circuit on. I guess this could be fixed by changing the capacitor next to the XOR?
Note that the 0V input on the left represents the GPIO of the MCU to reset it.
Any pointers will be appreciated, even if they are small easier circuits I can look at that would help me understand some basic concepts for this circuit. Specially when it comes to how to stop transmitting electricity to the MCU after X seconds, so it doesnt stay ON all the time.
I'm really newbie when it comes to this kind of circuits, and most of the tutorials I find online don't really explain the process of thought behind placing each component. Either they give you a full circuit or they are generic tutorials on how components work. That's why I decided to challenge myself to modify that circuit, with not much luck so far.
Thank you!
Been trying to practice electronics after a long time, and found this tutorial https://randomnerdtutorials.com/lat...auto-power-off-circuit-esp32-esp8266-arduino/ on how to do a power latch which lets you turn off an MCU when its job is done.
So to practice a bit, I decided to make a similar circuit, with the difference that instead of activating the MCU when a switch closes, it should activate it when a switch changes state. The requirements I set for it are:
- When the switch changes state, the circuit should transmit ~170mA and 3.3V to the MCU during around 1 second (so it has time to initialize, and set a GPIO to HIGH, which will hold the MCU on until the task is done).
- When the MCU's task is done, it will set GPIO to LOW and it should turn off the MOSFET and the MCU should turn off (no power on its VCC pin). Please see the randomnerdtutorials link if this is not clear.
- The MCU should receive ~170mA during startup (after startup it's okay to receive around 100mA).
This is the current circuit I have: https://tinyurl.com/ywvbywpn which has three problems:
a- Main problem: the circuit always transmits voltage to the MCU Vcc PIN (represented with a LED). I'm not sure what's the way to make the circuit stop transmitting current after ~1 second.
b- Despite the 5V input, it transmits only 2V to the MCU, how could I make it so there's less voltage drop? I guess the resistor on top of the switch should be changed?
c- When the switch changes to closed it takes a while to turn the circuit on. I guess this could be fixed by changing the capacitor next to the XOR?
Note that the 0V input on the left represents the GPIO of the MCU to reset it.
Any pointers will be appreciated, even if they are small easier circuits I can look at that would help me understand some basic concepts for this circuit. Specially when it comes to how to stop transmitting electricity to the MCU after X seconds, so it doesnt stay ON all the time.
I'm really newbie when it comes to this kind of circuits, and most of the tutorials I find online don't really explain the process of thought behind placing each component. Either they give you a full circuit or they are generic tutorials on how components work. That's why I decided to challenge myself to modify that circuit, with not much luck so far.
Thank you!