Those are really cheap relays.would this really be cheaper than $6.07 ? (which is the price for the 4 relays?)
Are they reliable devices?
But after some conjuring, I came up with a fairly simple circuit to convert a single, dual coil, DPDT latching relay into a toggle flip-flop that will remember the setting when the power is removed without a backup battery.
It also requires only about 120μA of quiescent operating current.
The circuit is shown below:
Momentarily pressing the PB switch (S_PB) causes the circuitry to turn on one of the MOSFETs, enabling current through the respective relay coil, and causing it to change stages.
The coil signal pulse-width is determined primarily by the time-constants R3C1 and R4C2.
The PB signal is routed through the closed relay contact to energize the opposite state relay coil, flipping the relay state.
This leaves one SPDT contact to use as desired.
One important characteristic of this circuit is that the coil pulse width is independent of the trigger pulse width (as long as it's sufficient to start the relay contacts opening), so even through the PB pulse is routed through one of the contacts, the contact changing states doesn't affect the coil pulse width and the relay is always reliably switched.
This is shown in the LTspice simulation below where the coil pulse-widths (red and green traces) are longer (≈350ms) than the input 100ms pulse width (blue trace).
The simulation shows the relay alternating states (yellow trace) for each push of the button.
I didn't calculate the parts cost, but all the parts are quite inexpensive and I'm quite sure would cost less than 4 relays.
Last edited: