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.

Save state permanently

Status
Not open for further replies.

funky_guy13in

New Member
Hi,

I am trying to create a circuit. Now my requirement is that I want to save a state of a bit permanently in that circuit. For example: If a state is 1 and the power is removed, and applying power again to the circuit that state should remain 1.

I heard JK flip flop can be used for this. My state toggles depending on the input pulse. Please also tell me the chip number.

Regards,

Piyush.
 
What you describe is called non-volatile memory. Flip flops won't work. You need something like flash memory or MRAM. Which means you either need a parallel data bus like a microprocessor, or you need to use SPI or I2C.

If your circuit uses that toggle state directly to control something else (ie. no reading from a processor to execute instructions or something like that) and you have no microcontroller, it's probably best just to have a small battery or supercapacitor backup and use flip flops.
 
Last edited:
You heard wrong. Any normal logic circuit requires power to retain a state. But CMOS requires essentially no power when it is in a static condition and not changing states, so you can use a button cell to maintain the state for several years when the rest of the power is off.

If you don't want the battery, then you need a device such as an EEPROM or FLASH memory to retain states with no voltage applied.
 
Hi All,

Thanks "dknguyn" and "crutschow" for your inputs.

I am trying to create tray mechanism like we see for DVD players. I am not using a stepper motor, so in my circuit there is no microcontroller. Now there are two positions, tray and tray out. Now say if my tray is out and the power is shut down to the circuit then it would remain outside. When I provide power to the circuit it would assume that the tray is inside and would push the motor in outward direction. So I want to save the state so that i can use it to identify if the tray is out or in. Can you precisely tell me which chip I should be using to store the state permanently. I need a cheap and affective solution.

Regards,

Piyush.
 
Hi All,

Thanks "dknguyn" and "crutschow" for your inputs.

I am trying to create tray mechanism like we see for DVD players. I am not using a stepper motor, so in my circuit there is no microcontroller. Now there are two positions, tray and tray out. Now say if my tray is out and the power is shut down to the circuit then it would remain outside. When I provide power to the circuit it would assume that the tray is inside and would push the motor in outward direction. So I want to save the state so that i can use it to identify if the tray is out or in. Can you precisely tell me which chip I should be using to store the state permanently. I need a cheap and affective solution.

Regards,

Piyush.
Real DVD players just use a sensor to tell whether the tray is in or open.

Your proposed solution also has loopholes:
If the power is off with the tray out and the user pushes it in manually and then powers up? Same problem.
 
Last edited:
Hi dknguyen,

The tray wont go in if it is manually pushed in as there are many gears which makes it impossible to move.

To be precise I would tell you my project. You might have seen car In-dash single DIN DVD player with 7 inch screen. Now i have the hardware. Now my requirement is that, when I click a button first the tray should come out and then flip up and when I again click the button the tray should flip down and go inside. Now there are chances that i switch off my car keeping the screen unfolded. Since the motors are not a stepper motors I am not using a microcontroller. By changing the polarity of the motors I can make the motors rotate in different directions.

How can I achieve it? The circuit might be a bit complicated. How can we make a sensor? What would happen if we provide equal voltage (say 5V) on both terminals of a motor?

Regards,

Piyush.
 
Providing an equal voltage on both sides of the motor is the same as shorting it's terminals out. It will act like a drag break (not lock up like friction breaks).

The sensor can be as simple as a little micro-lever switch, or an IR pass through sensor. I think a microswitch would be simpler for you- just use that 1/0 it generates and plug it into wherever you had planned to use your original memory bit.
 
Hi Dknguyen,

I am software engineer and have little knowledge about electronics. Can you please explain in detail what exactly means drag break? Will it spoil the motor?

Can you please help me with a solution including the circuit diagram and the logic that i have to use? And regarding sensor I couldnt understand anything. :)) Can you please explain it?

Regards,

Piyush.
 
No it won't. Drag brake just kind of means it will resist motion. THe more you try and spin the motor, the more it will resist. BUt it won't ever actually clamp to a stop. Sort of like a paddle in the water. It won't spoil the motor. I don't know what the rest of your circuit is like...a switch is just a switch.
 
Thanks.

My requirement is that, on a click of a button first one motor should move in one direction. After a limited time it should stop and another motor should work for some time. Now when i again click the button then the second motor should work for some time in opposite direction and then the first motor again in opposite direction.

Can you please help me to design a circuit?

Regards,

Piyush.
 
I'm actually a bit lost, but thought I'd mention that latching relays exist. Those of you who can actually understand this conversation can decide if a latching relay has any use here.
 
I'm actually a bit lost, but thought I'd mention that latching relays exist. Those of you who can actually understand this conversation can decide if a latching relay has any use here.

Actually I have no idea about latching relays? My requirement is as stated above. I wanted to save the state just in case if I switch off my car keeping the screen outside.

Can anybody help me to design the circuit as per my requirement?

Regards,

Piyush.
 
I think DK gave you the solution already. Sensors and switches is what the industry uses.
 
Last edited:
Just make the mechanics strong enough so you can drive it to a stop and then at power up drive it to one end. Knowing where it is supposed to be is not going to help, there may be a power failure half way thorough the cycle.

Mike.
 
If you don't want the battery, then you need a device such as an EEPROM or FLASH memory to retain states with no voltage applied.

How about using a gold-cap instead of a battery?
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top