1
\$\begingroup\$

I found this heavily downvoted question about how to implement a non-volatile switch (i.e. a switch that remembers its last state even when power is removed). While the OP asked the question in a weird way, attempting to incorporate chemical processes, I am simply interested in creating a solid-state switch that remembers its last state when power is removed.

I understand that this feature can be easily achieved with an impulse/latching relay. However, I am seeking to implement the switch without any mechanical components (fully solid-state).

The helpful respondent Dave Tweed stated that floating gate MOSFETs can be used to achieve this feature, much like flash memory is implemented. However, I am having a hard time finding actual schematics showing such a circuit.

I found "latching SSRs" but these appear to only hold the state while power is applied. Once load power is removed, it appears they go back to the default "OFF" state.

I am looking for the following switch characteristics:

  • Switches 24VDC up to 5 amps.
  • Momentary input pushbutton toggles switch state with each press.
  • Switch resumes last state when power is removed and restored (no time limit).
  • No microcontroller required
  • Bonus feature: the ability to toggle the switch with a low voltage pulsed input (i.e. 3.3VDC from a microcontroller)

I would be grateful for any pointers toward schematics or examples.

Here is a design note from 2009 for such a switch. Note how complex this is, in relation to a mechanical latching relay, and also that there are a limited number of power cycles before the memory wears out (50,000 minimum), whereas a relay can easily exceed 1 million cycles.

\$\endgroup\$
14
  • 1
    \$\begingroup\$ You're not going to be able to turn an FGMOS on or off with 3.3 V. FGMOS devices usually require much higher voltages to program (generated on-chip for most ((E)E)PROMs today, but old ones required a programming supply of somewhere in the vicinity of 15 to 20 V). You need to induce Fowler-Nordheim tunnelling through the gate oxide to get charges to the floating gate, and that requires much higher voltages than you normally use for logic devices. \$\endgroup\$
    – Hearth
    Oct 4, 2023 at 15:11
  • \$\begingroup\$ @Hearth ok so that blows out my bonus feature... but can it be done with the 24V supply without needing a microcontroller? i.e. with just a momentary pushbutton that toggles the switch on and off? \$\endgroup\$ Oct 4, 2023 at 15:15
  • 1
    \$\begingroup\$ Please do not edit a question after it's been answered in such a way as to invalidate existing answers; I'm pretty sure that's against site rules. \$\endgroup\$
    – Hearth
    Oct 4, 2023 at 15:24
  • 1
    \$\begingroup\$ @RyanGriggs you need a physical bistable state. Core memory requires a very peculiar type of hysteresis. And such cores are more difficult to find today. But they are very fast and would work. For a modern design you may be on your own, though. \$\endgroup\$ Oct 4, 2023 at 16:41
  • 1
    \$\begingroup\$ @RyanGriggs If you do decide to learn and push though something like a core memory cell (single tiny toroid) then look up square loop ferrites as a keyword/phrase. They are still being sold. You may also want to skim this paper at NASA's site for a long discussion about how to understand and then design around them. Like others, I may use an MCU -- selecting an FRAM MCU if things need to be fast (microsecond or faster) or anything with NV EEROM or FLASH if okay with multiple millisecond timings. \$\endgroup\$ Oct 4, 2023 at 17:47

3 Answers 3

1
\$\begingroup\$

You're asking for quite a bit there, for one thing "no time limit" is going to have to be quantified, as nothing lasts forever.

One possible solution is using programmable voltage references as memory as shown in this article, the basic idea is it's set on or off by programming the voltage reference high or low, then when power is removed it retains the last programmed state.

There's a limit to how long something like this will work though as they can only be reprogrammed a limited number of times, but the article states a minimum of 50,000 so it may be enough depending on your application.

\$\endgroup\$
2
  • \$\begingroup\$ Whoops, I saw your link after posting the same one as an update to my question :D The limitation of 50,000 cycles is what bothers me, whereas a relay can achieve millions of cycles without problems. I did not realize this type of solid-state switch was so difficult to achieve in relation to adding a latching relay to the system! Thanks for this info. \$\endgroup\$ Oct 4, 2023 at 18:16
  • \$\begingroup\$ I think this solution is the closest to what I had in mind, although I was hoping for something much simpler (i.e a MOSFET and some passives). Thank you for your input! \$\endgroup\$ Oct 4, 2023 at 18:18
3
\$\begingroup\$

The easiest way to do this doesn't use an FGMOS at all, but simply an electromechanical device known as a latching relay.

Most relays are not latching, and use a spring to return the contacts to the initial position when coil power is removed. But latching relays latch into either state just like a lightswitch.

They come in one-coil and two-coil versions, where the one-coil type needs a positive coil voltage to actuate and a negative coil voltage to reset, and the two-coil type actuates with a pulse on one coil and resets with a pulse on the other. You could probably arrange a handful of logic gates and a 555 or two to convert sequential pulses into alternating pulses to the set and reset coils. I'll leave that as an exercise to the reader.

\$\endgroup\$
2
  • \$\begingroup\$ This is the answer.... en.wikipedia.org/wiki/Relay#Latching_relay \$\endgroup\$
    – D Duck
    Oct 4, 2023 at 15:22
  • \$\begingroup\$ Apologies for the confusion: I modified my question apparently while you were writing this response. I would like to create a true "latching" relay but without mechanical components (solid-state only). I understand that this would be easy to achieve with an electro-mechanical latching relay, but I am interested in a fully solid-state solution. \$\endgroup\$ Oct 4, 2023 at 15:24
1
\$\begingroup\$

This answer suggests: connect a capacitor to the gate of a FET with some way of charging and discharging it

My understanding is that you basically set up something like this. In real life the switches would likely to be mosfets. You have to organise it so that the capacitor leaks as little charge as possible, through the mosfet or anywhere else. You might consider having a pair of capacitors and use a comparator, not a level-sense.

The devil will certainly be in the detail!

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
2
  • \$\begingroup\$ This looks promising. If C1 leakage could be minimized may we achieve at least "days" or "weeks" of hold time? Also I need the momentary pushbutton SW2 to toggle the output on or off with each press. This particular circuit would require toggling SW1, then pressing SW2 in order to toggle the output state. \$\endgroup\$ Oct 9, 2023 at 18:21
  • 1
    \$\begingroup\$ @RyanGriggs This was intended to be explanatory of the concept, no more. SW1 and SW2 would be replaced by whatever is convenient. Keeping charge for a week is certainly possible, but these kinds of sensitive circuits are not my area of expertise. I'd use an ATTiny or similar, 8 pins, £0.40. \$\endgroup\$
    – jonathanjo
    Oct 10, 2023 at 8:53

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.