Restoring the state of a soft switch after power down

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Ilya

Well-known member
Joined
Feb 25, 2005
Messages
750
Location
Moscow
I wonder if there are any clever ways of "remembering" the state of a flip-flop output before power down.
I have a momentary toggle switch (type (on)-off-(on)) that drives two flip-flops that control two relays. Obviously, after powering the circuit down and then back up the state of these flip-flops resets.
Are there any ways of "remembering" the state of such circuit (apart from using a microcontroller)?
 
@JohnRoberts pretty much. I've been working on a project with latching relays and ran into the same thing. Writing the last state to memory is the only way i've found to reliably do it. While the latching relay may stay in its current state in the event of loss of power or communication, it still runs the risk of resetting state if whatever is controlling it resets itself... depends on the code and if theres anything that can check the state before assigning a "hi/lo" to it.

i was playing with these:
sparkfun latching relay and my arduino

Edit:
might as well... one way to do this, is if you're using only one side of a DPDT relay is to use the other side as a state indicator to see if you're in a hi or lo position. Having the controller read that first before assigning it can allow its last position to be re-written on powerup or reconnection depending on how you have it setup.
 
Last edited:
@JohnRoberts pretty much. I've been working on a project with latching relays and ran into the same thing. Writing the last state to memory is the only way i've found to reliably do it. While the latching relay may stay in its current state in the event of loss of power or communication, it still runs the risk of resetting state if whatever is controlling it resets itself... depends on the code and if theres anything that can check the state before assigning a "hi/lo" to it.
You should be able to design a controller that powers up without changing state
i was playing with these:
sparkfun latching relay and my arduino
my quick search only turned up big dog hundred amp relays. That little sparkfun latching relay may satisfy the OP's need.
Edit:
might as well... one way to do this, is if you're using only one side of a DPDT relay is to use the other side as a state indicator to see if you're in a hi or lo position. Having the controller read that first before assigning it can allow its last position to be re-written on powerup or reconnection depending on how you have it setup.
micros provide a lot of options but I feel bad about suggesting them for everything.

JR
 
Some 40 years ago we used dual state latching relays made by Teledyne. They came in a TO5 can, handled 1A, provided 2 form C contacts and were pricey as heck even then. Our stock room had them at $28 each in 1983. I saw them on Digikey or Mouser maybe 5 years ago while looking for something else and didn't pay any attention to them. They are well beyond anything I can afford.
Now, for less than a buck, you can buy an 8 pin microcontroller, write about 30 lines of code and write the state of the relay to E-squared. The problem, of course, is that the relay will be in the de-energized state for half a second or so while the part boots up. If you can live with that it will be your cheapest solution. Atmel or PIC will do nicely. No doubt TI has something as well.
 
The quiescent current of gates is tiny. You could use a coin cell battery to just keep on indefinitely. It would literally last years. Use 3V gates if you can for even lower power. You could probably find a PCB mount battery the size of an electrolytic cap.
 
Thanks gents. Given current chips shortages I'm reluctant to include any microcontrollers that are not absolutely necessary. Since I have just two functions on a toggle, I think I'm going to get rid of one function and leave a single control operated via a switch or a pushbutton.
This was going to be a pad and polarity switch, so I'm going to throw away the polarity since it can be easily done in almost any DAW.
 
Back
Top