I implemented the below latching power circuit (can be found here https://circuitcellar.com/resources/quickbits/soft-latching-power-circuits/) that has 1 button to turn the circuit on and is turned off programatically by pulling MCU_LOGIC_POWER pin low. The circuit battery is a Lipo battery and VIN goes to the voltage regulator portion of the circuit. As soon as the MCU is powered on it sets the MCU_LOGIC_PWR pin as an input pullup.
This is how the latch circuit components are layed out on the board
There are two ways to turn off the circuit: directly by software or by pressing the power button for some time - this will also trigger a software shutdown. Note that both ways end up pulling the pin low to turn it off. Everything works fine until the temperature rises to about ~40 degrees Celsius under normal circuit operation - the circuit has a rf antenna that heats up the board and thus also heats the power circuitry, since it is a small board. When such temperature is reached, the circuit turns off normally by either of the 2 ways described eariler, but as soon as it turns off, it won't turn on again until the temperature goes down (putting it in the freezer for ~30 seconds is enough for it to start working again). While it is hot, there is a low but audible buzzing sound coming from the board. This sound goes away while I press the power button, altough the board does not power on. Also worth mentioning that this circuit's MCU is an ESP-12F that has a built-in LED. While the circuit is in this non working state (where I cannot turn it on), the LED will be turned off and pressing the power button will do nothing (at least nothing visible). If I let the circuit cool down withouth putting it in the freezer, I noticed that the MCU LED will blink very fast right before the circuit enters the working state where I can power it on again. This is very likely a design problem since I have 20 of these boards and all present this behaviour. Does anyone have a clue about what I am doing wrong?
Disclaimer: I am not an electrical engineer, I only have basic knowledge of electronics.
Here are the components used:
- Schottky diodes: https://jlcpcb.com/partdetail/Nexperia-BAT54C215/C37704
- AO3400A: https://jlcpcb.com/partdetail/Alpha_OmegaSemicon-AO3400A/C20917
- AO3401A: https://jlcpcb.com/partdetail/Alpha_OmegaSemicon-AO3401A/C15127
- Button: https://jlcpcb.com/partdetail/Dgbz-YTSA020A0341802B/C967799
While this maybe disregards the heating problem cause, i just realized that I can probably drop the entire latch circuit and use the chip enable pin of my voltage regulator to do the same job and probably eliminate the heating problem, since I strongly believe it lies on the latch circuit components. Here is my idea:
While the button is pressed it enables the regulator powering the MCU. The MCU sets MCU_LOGIC_PWR as an input pullup on startup. To turn it off the MCU pulls the power pin low. Am I missing something? (Other than the missing resistor from the CE pin to ground)