3

I was wondering if it's possible to build a digital circuit without using mechanical relays or micro controllers to retain a state even after a power loss?

So a circuit would have a input and an output. The input could be, let's say, a rising edge detecting to toggle the output pin to high/low. When a power loss happens it would retain the last state.

If there are already prebuilt ICs for this, great! If not, is it even possible to build one?

Null
  • 7,448
  • 17
  • 36
  • 48
Jake quin
  • 1,884
  • 1
  • 20
  • 40

5 Answers5

3

Yes. One thing I have done is to use a very low current fuse as a one-time programmable bit. You may need to parallel some drivers or use a transistor to get enough current.

For example, connect one end of the fuse to ground and the other end to a pullup resistor. As long as the fuse is intact the voltage across it is (nearly) zero. Blow the fuse, and the voltage across it will be the power supply voltage forever more.

Elliot Alderson
  • 31,192
  • 5
  • 29
  • 67
2

Single D-Flip-Flop

Single D-Flip-Flop with Preset and Clear

What about a low power (900nA, 0.8 to 3.6V) d-flip-flop powered by a coin cell when your circuit loses power?

It even has the edge detection ready...

devnull
  • 8,447
  • 2
  • 15
  • 38
1

It gets better. You don't need ICs. Just capacitors. A decent electrolytic capacitor can act as memory cell that retains its state for months or even years. I've built thousands of bits of such memory for a relay computer - it's almost like core memory. You turn the thing off at the end of the day, power it on the next day, and all the data is still there. Those capacitors are charged to about 30V DC in my design, but that's only because they need enough energy stored to actuate 12V reed relays acting as read-out amplifiers - the circuit has no semiconductors.

Even with decades old FET/MOS op-amps acting as sense amplifiers, you can use tiny surface-mount capacitors (on the order of 0.1uF), and the main concern is self-discharge rate: this requires attention to cleanliness during assembly - gloves, mask, and an organic then ionic decontamination wash after assembly. With good capacitors, the state can be retained for weeks too. For storage on the order of hours, you don't even need op-amps. Plain old CMOS logic gates are excellent at sensing the capacitor voltage :)

0

Hint:Flash memoryFlash memory is a non volatile computer memory which can be electrically erased and reprogrammed.

Miss Mulan
  • 1
  • 1
  • 5
  • 11
-4

You can use a serial-in parallel-out shift register like 74hc595. It requires a clock pulse, with latch input, and the last you need to send data in form of high and low with each clock pulse.

Remember you need to connect the output Enable pin to the ground permanently. So it's always in output enable mode.

Now you don't need any backup power supply. you just use these shift resisters normally when you have a proper power supply. you can give outputs to different bits of the shift register and also if you need more output pins you can add multiple shift registers.

Now let say you have set a few pins of the shift register to High state and rest to low.

Now you cut the power supply. and when you power back it will restore the last shifted value until you send new serial data to the register.

I don't know all the fancy stuff from datasheets but I have personally tested this thing with Shift Registers I am using 74hc595 IC in my test circuit. And I am also attaching a test video to support my solution and if I am wrong then before saying that explain to me that how my test solution is working. https://youtu.be/Ee0cbzn1aLI

Thank you.

Dharmik
  • 74
  • 1
  • 5
  • 1
    This is 100% wrong. A shift register like the 74HC595 is a completely volatile device. If you cut power for more than a short period of time (much less than 1 second), it will lose all memory of its last state. When you power it up again, you cannot depend on the state of the register until you assert /SRCLR or clock through all new bits. – DoxyLover Mar 14 '21 at 07:14
  • 1
    This is wrong. What makes you think the 74xx595 retains its state when powered down? – StarCat Mar 14 '21 at 07:36
  • Please before saying that my solution is wrong can anyone explain to me that why my outputs are followed when I tested it in my circuit. watch the video in the solution. – Dharmik Mar 14 '21 at 12:00
  • 1
    If you can point me to a manufacturer’s datasheet that states the 74HC595 is a non-volatile device and it stores its state between powerups, I might consider the possibility that you are not wrong. Until then, my comment stands. I hope you understand that just removing power for a few seconds might not completely reset the device. Leave it off for a few hours and try again. – StarCat Mar 14 '21 at 16:21
  • @StarCat believe me went through 4-5 manufacturers datasheet it seems like no one has mentioned this. I have noticed this when I was working on one of my projects which has 16 LEDs controlled by 2 shift registers & I noticed that when I power OFF & when the power it back ON and the 16 LED pattern remained the same as when power OFF. I think you are right like leaving it OFF for few hours would erase everything. It's due to low power like max 80uA & min to 1uA & its working voltage range is -0.5 to 7v & I think even if we have few capacitors the IC will be wake even when no power for a while. – Dharmik Mar 15 '21 at 11:45
  • Back then I thought it may be a store kind of thing and due to this I have to change the entire circuit and go for the GPIO extenders and they are expensive than normal shift registers. Any idea how to stop this kind of behavior of shift registers. as it may happen that circuits have quite a lot of filters or storage capacitors. – Dharmik Mar 15 '21 at 11:53