# Analog Bistable Memory

I am looking for a device which I do not know exists.

I would like to store the state of a number of analog switches, perhaps driven by a D Type Flip Flop.

I'd like to drive the flip flop and set values with a momentary toggle switch.

What I am looking for is a type of analog switch, which could store memory and survive power downs without relying on some sort of constant power source like a small battery. Basically a parallel accessed EEPROM with direct access to each of the bits through a single pin, or something that behaves in a similar fashion.

Can anyone think of a solution to this problem? Does something like this exist? My research came up with bistable multivibrators, but I could not find information that indicates if those would survive a power down or not. Cost and size are of concern to the design, of course.

• How many bits are we talking about? You could do something with latching relays, but you are probably going to have a cheaper/easier time with a small micro and EEPROM – pgvoorhees Sep 9 '18 at 23:20
• @pgvoorhees im talking about something in the order of 128 bits or so. I think you might be right, but I was hoping there was an elegant solution that would not require a micro and the manufacturing step of programming that micro – cosmikwolf Sep 9 '18 at 23:24
• @cosmikwolf I think pgvoorhees is asking how many bits of precision your analog measurements are. I imagine that it's not 128 – BeB00 Sep 9 '18 at 23:30
• Should the pass channel through the switches work at power-down? – Janka Sep 9 '18 at 23:35
• @BeB00, cosmikwolf and I understood each other, but thank you for making a clarifying remark. These aren't analog measurements he's looking to store, but the states of analog switches. – pgvoorhees Sep 9 '18 at 23:36

The easiest solution by far is going to be to use a microcontroller with built-in EEPROM and some analog switches.

For example, you could use a micro with a hardware SPI interface and 16 MAX335 analog switches. There are many small micros you could use. Something that supports your digital supply and has on-board EEPROM would be simplest. You should also make sure it has a good reset circuit or provide an external one.

When power is applied, or is interrupted, the micro resets, reads 16 bytes of data from the EEPROM and shifts it out to the serially controlled switches.

You can also get crosspoint switches which may be easier to use, if that is your end goal.

• I (ab)used non volatile register of MCUs normally used for RTC few times to store few bytes. So you don't need MCUs with specific mention of EEPROM – Rokta Sep 10 '18 at 12:16
• @Rokta Then you need battery backup. EEPROM (or flash controlled to emulate same) doesn't need a battery. Or FRAM based MSP430. Lots of options. Certainly the few seconds to program the micro in production is nothing to worry about if there are 128 switches.. cost will not be low. – Spehro Pefhany Sep 10 '18 at 14:14

Look for bistable reed switches. They are available "naked" and with a coil winding to make a bistable relay. Small and relatively cheap. About $1 a piece. If the pass channel should be conducting though the device has no power, there's no way around such switches. The only reasonable alternative without using a battery is using a Gold Cap for the power source and ultra-low-power CMOS circuits. • These reed switches are quite large and expensive when considering an SMD PCB design. 128$1 is quite cost prohibitive. – cosmikwolf Sep 11 '18 at 19:49
• You have to go with a gold cap then. This should be much simpler than any µC based solution. The switches may be as simple as an open CMOS transmission gate either put to +3V or GND via a 10kΩ resistor. They retain the state they had been put to if the gate is left unconnected, as long there is at least a bit power in the cap. About \$0.50 for 4 switches. – Janka Sep 11 '18 at 20:11