0
\$\begingroup\$

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!

\$\endgroup\$
  • \$\begingroup\$ Can you use any 555 timers? Your title says no, but the body of the question says maybe. \$\endgroup\$ – Samuel May 3 '14 at 7:34
  • \$\begingroup\$ A push button charging a capacitor could be used to toggle a flip flop, which in turn could be used to bias a switching transistor. This will draw micro amps of power at idle, which it sounds like you want to avoid. If it really has to draw no idle power, I'm pretty sure a physical switch will be needed so you can avoid the logic chip's quiescent current. You might be as close as you can get. \$\endgroup\$ – Sean Boddy May 3 '14 at 8:02
2
\$\begingroup\$

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).

\$\endgroup\$
  • \$\begingroup\$ Thanks, these are great insights. Self-programming flash may open up more uC possibilities as well as deep power down modes. If my battery is 80mAH at a drain of 220nA, I calculated that's 41 years [(80 * 10^-3 / (220 * 10^-9)) / 24 / 365]. \$\endgroup\$ – eex May 3 '14 at 20:17
  • \$\begingroup\$ I also found there are DC-DC step-up converters that can allow me to target higher voltage microcontrollers that have EEPROM, so the microcontroller shutting itself off and maintaining state is also viable. \$\endgroup\$ – eex May 6 '14 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.