1
\$\begingroup\$

I have application which need a push button on/off switch feature. But i need to do something buy which it can remember or store in memory the previous status after power failure. same like home air conditioner which save previous status if power cut and return. One of my suggest do it with IC 555 but i don't think it can remember the previous status if power cut... please give me a cheap solution.. my application consume only 12V and 2A.

Edited: Purpose of this solution is to power on/off remote application which dose not have a UPS or power backup. I am using Arduino with Ethernet module to remotely on/off system power but the problem during long power outage.. application shutdown and i am needed to power on it again.. I looking for a Solution to store state of application even if power reset.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ A mechanical toggle switch is cheap and stores state across power outages. Otherwise use an MCU with EEPROM, a latching relay, a motor-driven cam. \$\endgroup\$
    – Neil_UK
    Commented Aug 28, 2016 at 5:29

5 Answers 5

1
\$\begingroup\$

Offhand, I'd say that an EEPROM is the obvious solution for this kind of thing. They store state even in the face of a total power failure. They're fairly inexpensive, as little as $0.29 each in small quantities (ex: https://www.jameco.com/z/24C01-Major-Brands-2-Wire-Serial-EEPROM-1K-128-x-8-DIP-8_276592.html). The biggest downside is that it means adding extra circuitry to the system, to read/write the EEPROM. I'm pretty sure you could get by without adding a full fledged micro-controller, but it would definitely require at least a few extra components.

Using an SD card could also be an option, but I think this would be even more complicated and more expensive, which might make it less than ideal.

\$\endgroup\$
4
  • \$\begingroup\$ can arduino with ethernet send any signal to EEPROM to power ON/OFF a Relay and store the previous status if power cut.. \$\endgroup\$ Commented Aug 28, 2016 at 8:25
  • \$\begingroup\$ One doesn't "send a signal to EEPROM to power ON/OFF a relay" but rather the EEPROM is a memory device that can store the current on or off state of your device. A microcontroller would power-up and read the EEPROM to get the state of the device when the power was cut and restore that state (i.e. turn on the device if it was on before). Why did you specify ethernet in this comment? Are you also looking for a remote on/off solution? as @Transistor has said, please edit your question to provide more specific information about your needs. \$\endgroup\$ Commented Aug 28, 2016 at 9:09
  • \$\begingroup\$ yes it will be remote on/off solution... i have already done it but problem is that during power outage every things goes off when power restore. \$\endgroup\$ Commented Aug 28, 2016 at 9:14
  • 2
    \$\begingroup\$ @MegahostzoneSantu The Arduino is based on Atmel microcontrollers. They have an EEPROM right on the chip that you can use. Just coding. For example, the ATMega328 has 1K bytes of EEPROM so it can hold 8192 states. Enough that you can easily add redundancy such as majority logic. But there is a write lifetime of only 100,000 cycles so don't go writing to it continuously or it will wear out. \$\endgroup\$ Commented Aug 28, 2016 at 11:20
2
\$\begingroup\$

A latching relay is designed for this very purpose.

"A latching relay is a two-position electrically-actuated switch. It is controlled by two momentary-acting switches or sensors, one that 'sets' the relay, and the other 'resets' the relay. The latching relay maintains its position after the actuating switch has been released, so it performs a basic memory function."

Unlike ordinary relays the latching relay has two sets of coils which move the contacts into one of two positions. In a power outrage they stay in the last position set.

A simple toggle circuit could be used to enable the use of a single push switch to operate both coils (first push ON (coil 1), second push OFF(coil 2))

e.g. http://www.azatrax.com/latching-relay-circuits.html

\$\endgroup\$
1
  • \$\begingroup\$ Something to keep in mind if using say EEPROM is if it is critical or not for the contact to stay the exact same, as say when a circuit is powered back up and the EEPROM is read then the correct relay state is set. Consider if this brief period where the contact state may be incorrect is inconsequential or a potential issue. Most applications are fine, some could be catastrophic. So this is a potential consideration in favour of a latching relay. \$\endgroup\$
    – D-on
    Commented Aug 28, 2016 at 12:38
1
\$\begingroup\$

I have application which need a push button on/off switch feature. But i need to do something buy which it can remember or store in memory the previous status after power failure.

enter image description here

Figure 1. A typical toggle switch.

A toggle switch, instead of a push-button switch, meets all your stated requirements and more.

  • Infinite memory duration.
  • Independent of supply voltage.
  • Status can be read even with power disconnected.
  • Very high reliability.
  • Low cost.
  • Multiple suppliers.
  • Tactile feedback during switching.
  • Uses no power.
  • Available in a wide variety of voltage and current ratings.
  • No electronics required.

Edit after remote control requirement explained.

enter image description here

Figure 1. The Digital Loggers series of devices is an example of a web-controlled power switch (for the North American market).

There are a range of devices which perform the functions you require. These are used in a variety of applications such as server rooms where they are particularly useful in forcing a reset of an unresponsive device by cycling the power. The device above has switched and unswitched sockets and power status memory.

Search for "web-controlled power switch" and you should find something suitable for your country (India) at a good price.

\$\endgroup\$
4
  • \$\begingroup\$ a manual switch is not my solution.. \$\endgroup\$ Commented Aug 28, 2016 at 8:26
  • 2
    \$\begingroup\$ Why not? You're using a manual button. Please edit your question to explain because you must have some other constraint that you are not telling us. \$\endgroup\$
    – Transistor
    Commented Aug 28, 2016 at 8:29
  • \$\begingroup\$ I have edited check \$\endgroup\$ Commented Aug 28, 2016 at 9:22
  • \$\begingroup\$ See the update. \$\endgroup\$
    – Transistor
    Commented Aug 28, 2016 at 9:39
1
\$\begingroup\$

Maybe your Arduino version has a "brown-out" detection feature, as some others microcontrollers do. In which case, an interruption would be fired, so in your ISR you could store that event and more data, from where to read when the Arduino boots up again. Regards.

\$\endgroup\$
0
\$\begingroup\$

Arduino Uno has 1KB of EEPROM which is prety enough to store status of 1024 devices.

There is no need to use external EEPROM for this.

Here is the link to examples and tutorials.

I suggest you to write the code in a such a way to execute minimum read/write operation from EEPROM, since EEPROM has a life time depend on number of read/write cycles.

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