5
\$\begingroup\$

Storing an LED's previous state even if power is removed

I want to build a simple circuit that consists of 2 push buttons and an LED. I want the LED to turn on when one pushbutton is pressed and off when the other is pressed. I am pretty sure this can be done with a flip-flop. But this is not the only part. I also want the circuit to keep its previous state even if power is removed. So if the LED is on, and power is removed, I want it to be on when the power is added. Same with if the LED is off and the power is removed I want it to stay off when power is added. I think that NAND gates or something are used to store flash data, but I am not sure. I want this circuit to be only consisting of transistors and other common parts like capacitors resistors diodes crystals inductors ect... I don't want to use any uncommon integrated circuits (I only have 555 timers and some dual flip flops and some buffers and a few other really odd ic's.

This may be impossible (especially with only transistors) but any information is helpful  and I'm only 14 so I'm still a beginner in this stuff.

Edit: I want to figure out a semiconductor way to do this. I know I don't have the parts but what would I need?

\$\endgroup\$
6
  • \$\begingroup\$ Strap a cap to a MOSFET gate? \$\endgroup\$ Commented Nov 1, 2012 at 3:34
  • 2
    \$\begingroup\$ Practically, the easiest way to do this is just use a toggle switch instead of two push-buttons. Then the switch itself will "remember" its state, without needing power to be maintained. \$\endgroup\$
    – The Photon
    Commented Nov 1, 2012 at 3:45
  • 1
    \$\begingroup\$ How long do you need it to hold state without power? 1 minute? 1 year? \$\endgroup\$
    – The Photon
    Commented Nov 1, 2012 at 4:10
  • 1
    \$\begingroup\$ A day should be good \$\endgroup\$
    – skyler
    Commented Nov 1, 2012 at 4:14
  • 1
    \$\begingroup\$ A bi-stable relais is one option. \$\endgroup\$ Commented Nov 1, 2012 at 7:55

3 Answers 3

5
\$\begingroup\$

A bi-stable switch as Dave Tweed mentioned will certainly work. Another way is to use a tiny microcontroller that has EEPPROM built in. There are some PIC 12 available with EEPROM. The micro reads the two switches, drives the LED, and stores the last state in EEPROM, which it then recovers on powerup.

\$\endgroup\$
6
\$\begingroup\$

You need one of these:

image of dual pushbutton switch
(source: vandykes.com)

A bit retro, but meets your requirements exactly!

The point is, there are only a few ways to remember the state of an electric circuit with no power applied, and mechanically is one of the most common. The other ways can't be done with the types of components you've listed.

\$\endgroup\$
1
  • \$\begingroup\$ Looks like a collector's item. I wonder if the OP's 2 switch requirement is in the same location or far apart? \$\endgroup\$ Commented Nov 1, 2012 at 21:08
3
\$\begingroup\$

If the flip-flop uses only a tiny bit of current, such as if it's CMOS, you could supply power for a day or more to the flip-flop with a battery. Keep the battery trickle-charged with the external power. A super-capacitor might work as well as a battery. Use only external power (not the battery/supercap) for the LED and its driver, and any other circuitry. A diode can keep the the memory-keeping low-current circuitry separated from the power-hungry LED.

BTW "NAND" in regards to flash memory isn't really the same as the basic logic gate. Flash memory involves shoving charges across an insulator to an island of semiconductor or metal, and nand gates are involved in some manner to read/write the data, but I'm no expert on that. Plain old NAND gates in TTL, NMOS or CMOS chips can't hold data at all.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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