I’m trying to build a circuit that:
- Does not draw power when in an idle state (when it’s not lighting up an LED).
- When the user momentarily presses a button, the circuit keeps an LED on for either 1 second or for 10 seconds.
- If the circuit is in “short duration mode”, it keeps the LED on for 1 second after a press.
- If the circuit is in “long duration mode”, it keeps the LED on for 10 seconds after a press.
- Initially, the circuit is in either “short duration mode” or “long duration mode”.
- If the button is held down for longer than 3 seconds, the circuit toggles from one mode to another.
I believe requirement #1 rules out most microcontrollers, since they draw continous power. I also cannot use a microcontroller that shuts itself off after lighting up the LED by using EEPROM to store the mode persistently. (This is because I’m in a low voltage environment, and the available microcontrollers don’t have EEPROM).
Thus, I’m thinking this circuit can only be implemented with capacitors, resistors, and transistors.
There are also some non-requirements:
- The LEDs can dim over time while they are on.
- The exact durations I mentioned don’t matter- they are just for illustrative purposes.
- I'm not concerned about the exact parts and values in the circuit right now, just the conceptual design.
- It’s ok if the mode isn’t retained in “memory” truly persistently. For example, if the mode is “stored” in a capacitor, and the capacitor discharges very slowly on its own over time, that’s fine.
I’ve designed a circuit that implements most of the requirements except #6. It uses a toggle switch to store the mode. Requirement #6, holding down the button for a while to switch modes, seems like the tricky part here:
Any thoughts regarding this problem would be greatly appreciated. Also, please let me know if you think this is a path of madness, and this kind of circuit really needs a microcontroller to be feasible.