Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Non-volatile flip-flop

Status
Not open for further replies.

jack0987

Member
Is it possible to build a non-volatile (retains it's state when power is removed) flip-flop that will accept 3V to 5V DC from simple parts?
Prehaps use a small non-volatile memory chip. Is there such a thing?
What would the circuit look like so I can build it?
 
If you can program pics then the 10F320 is a 6 pin, 40 cent, single chip implementation. The only problem is the write time is 2mS so power would have to remain for that time for it to be remembered. Saying that a diode and capacitor will supply power for a long time after power down.

Mike.
 
I like the pic idea with the diode and cap. Speed is not an issue for me. Could the state be changed just using a momentary manual switch and no clock?
 
A momentary switch would be ideal. The 10F320 has an internal clock and built in pullups so all you would need is the push button. Debounce can be done in software.

Mike.
 
Hello there,

This question comes up from time to time.

A simple solution is to use a latching relay. That's a relay that when energized one way it latches in one direction, and when energized another way it latches in another direction. This holds the state for as long as the relay is not energized in the opposite way. The output contacts could be used to show the state, with a pullup resistor for example.

I like the microcontroller idea too. Many uC chips these days have non volatile EEPROM memory, so you could simply write instructions that program ONE bit in one EEPROM memory register, then later look it up to see what state it was. Since the number of writes might be limited to around 10K, that would mean that you should also use a counter to count the number of times the bit was written to, and switch to a different bit or different byte after say 5K writes. The counter would also take two bytes however, so you'd have to switch that after 5K writes too. So with a 128 byte EEPROM that would mean 320K operations would be possible. If that's not enough you might move to an external EEPROM with a huge number of bytes and that should get you up to millions of write cycles.
A little bit of an overkill though :)

Another idea is to build a cell that takes very very little battery power to keep alive. This is possible today with low power CMOS. A small battery like a 9v alkaline battery could keep the data stored for years in that one bit or multiple bits.
This is also possible with the microcontroller, where the uC is put into sleep mode and woken up only once every 10 seconds (or whatever) just to check for a change in input. The average power needed for this is extremely small and AA alkaline batteries (at least 2 to get at least 2.5v) last for 2 years.
 
Thanks Al and mike. I can see where this may be an often asked question but am surprised how little I can find on it. Unless I have a circuit, I do not have the electronic knowledge to design one. My last little pic project, if passed my hand to close to it the clock stopped.

If I use a pic I'd like to add some more functions and a six pin pic may not be enough.

Ultimately, I'd like something like this:
https://www.amazon.com/Amico-Latching-Trigger-Channel-Module/dp/B00BLZ850U/ref=sr_1_2?ie=UTF8&qid=1379435327&sr=8-2&keywords=latching relay#productDetails

The latching relay will hold it's state but I would like push on/ push off operation and be able to read its condition and operate it remotely. I could buy the above device for less than the parts to build it but may not be able to get more of them in the future for one thing.

I should do a functional diagram of what I am thinking and post it.

I do have a mplab icd3 programmer but not much else. I should get into it so please suggest some basic tools to go along with it. A prototype board of some sort may be a good start. Price is an issue as, being mostly retired, a church mouse has more money than me. ( property taxes take a huge chunk.)
 
Hi,

You could look at the Microchip site as they have a lot of programmers that come with a chip or two to start with. Look toward at least the 12F675 or better chips.

If you do use a latching relay you can get them in more places im sure.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top