1
\$\begingroup\$

I often come across battery powered items that store their state when switched off, particularly 'simple' items like LED bicycle lights (e.g. flash or solid light, changing each time it is switched on).

How is this usually done? Do they charge a capacitor or capacitors when on to store a few bits of 'memory', or use a small amount of battery power to remember the state in a flip-flop, or store charge on the gate of a FET?

I'm very familiar with more complex items storing data in EEPROM, FLASH etc, but guess there is a common alternative for simple/cheap battery powered products.

This is a little bit like another question, but it is asking about shorter term storage, my bicycle light 'remembers' its state for at least a couple of weeks (after that, it's me who can't remember!) and battery life when off is much more than a year.

\$\endgroup\$
4
  • 2
    \$\begingroup\$ It probably depends on the actual device, even some low power devices will have eproms. A good way to check is if they remember it when removing the batteries for a significant time. \$\endgroup\$
    – PlasmaHH
    Commented Mar 26, 2015 at 14:44
  • 1
    \$\begingroup\$ And even if they use SRAM a few microamperes is all you'd need to keep a cell or two alive. \$\endgroup\$ Commented Mar 26, 2015 at 14:49
  • 1
    \$\begingroup\$ Simple low cost products probably maintain the state in a low-power RAM of some sort. This RAM may only consume 10 or 20 uA. Sometimes they have a capacitor to hold up the voltage rail for that RAM. But if you remove the battery for an extended period, they will forget. EEPROM and Flash would only be used on more expensive products. But if the device can remember its state for months without batteries installed, then it must have some type of non-volatile memory. \$\endgroup\$
    – user57037
    Commented Mar 26, 2015 at 14:53
  • 1
    \$\begingroup\$ @IgnacioVazquez-Abrams I recently converted a 29 year old device from a battery-backed SRAM chip to one which doesn't require a battery. The device was still retaining all its settings fine on the original 29-year-old coin battery (soldered to the circuit board!). \$\endgroup\$
    – Kaz
    Commented Mar 27, 2015 at 2:28

1 Answer 1

3
\$\begingroup\$

Many (most?) of these items have a small microcontroller inside to supply the functionality the device requires. Some small microcontrollers have a small amount of EEPROM built into them. The Microchip PIC10F322 is one such but there are many others now available.

Another method uses a capacitor to keep a few SRAM cells alive within the controller. However, this method is not used much any more because it is more expensive than using a controller with built-in EEPROM.

\$\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.