I have a project to control 2 LEDs with ATTiny13A with 2 buttons.
The goal is: when is not in use, the consumption has to be zero(close enough to zero).
To accomplish this task I decided to make a software latching ON/OFF button (2btns[SW1 and SW2] either one of them should start the power for the controller.) I end up with this schematic, but surprisingly for this simple task I have to put a lot of elements to make it work. I am new in electronics, and I am wondering if I can make it simplier - I mean not just remove some of the elements, but redesign it to use less elements.
A1 and A3 are INPUTS for the status of the 2 buttons, D2 is OUTPUT to latch the power to the controller. D0 and D1 are the PWM OUTPUTS to power the 2 LEDs.
The J1 button is optional (but needs to be there) for remote power ON. The power is 3x1.5V batteries = 4.5V.
The other question is: how efficient is for the consumption-when is OFF there is consumption of 0.03uA which is practically 0, but when is ON. It needs to consume as little as possible
EDIT: I should have mentioned that I cannot use the sleep mode. I simplified the task the ATtiny is doing so as not to complicate the question. There are so many things to be programed that I have no more space for extra programming to put it in sleep mode and even more to program interrupts to wake it up. So let say the program limit of the MCU is reached and there is no more space for a software solution - need to be done through hardware (excluding the ATTiny13A- I can not change it has to be ATTiny13A.)
EDIT2: Please comment if you have any suggestions for the design of the schematic. I do not ask for solution or the way how to do it...i asked how to improve the design of the schematic-it is just electronic's question for somebody good with electronic.