Mode toggling circuit using only transistors, resistors, and capacitors

analogcontroldigital-logicmicrocontrollertransistors

I’m trying to build a circuit that:

  1. Does not draw power when in an idle state (when it’s not lighting up
    an LED).
  2. When the user momentarily presses a button, the circuit keeps an LED
    on for either 1 second or for 10 seconds.
  3. If the circuit is in “short duration mode”, it keeps the LED on for
    1 second after a press.
  4. If the circuit is in “long duration mode”, it keeps the LED on for
    10 seconds after a press.
  5. Initially, the circuit is in either “short duration mode” or “long
    duration mode”.
  6. 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:

Circuit design meeting all requirements except #6

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.

Thanks!

Best Answer

You might be surprised how little current modern micro-controllers can draw when programmed appropriately (switching itself off most of the time), think of 1 uA or less.

My first idea would be to use a relay switch in series with the power of a micro-controller, with your switch in parallel with the relay switch. The relay can probably be replaced with a mosfet. The state can be stored in internal eeprom memory (if the uC has this), or maybe in flash (self-programming).

My beloved LPC810 has a few bytes of RAM that are preserved in the deepest power down modes. If you switch starts the LPC810 it can switch itself to deep power down mode (typ. 220 nA).