power fails, save eeprom value

Status
Not open for further replies.

vicky29

Member level 4
Joined
Feb 5, 2005
Messages
75
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
750
Power failure detector

Hi friends,

i'm making a project in which i need to detect power failure. I think basically i need a brown out circuit. I tried a circuit given below, it's working but misses to detect power failure sometimes. Is the circuit fine or any improvements are required.

actually, what i'm trying to do is, i'm making a 5-digit counter. if the power fails the system should save the last couter value, in eeprom. as there is no battery backup i need to utilize condensor power to save the value. but sometimes i feel the register of eeprom gets damaged, as, when power supply resumes there isn't any value shown on display except "99999" and the system hangs permanently. i have to change to a new eeprom then it works.


Thanks
 

Re: Power failure detector

In situations as you described circuits with R-C tanks do not work very well.
Start using proper µC power supervisory IC such as DS1232, DS1810, M<AX690, 691 or 700 series, or similar.
For power problem senesing (and I assume you don't want a reset signal for µC to be issued before you save data) connect the Low-active output to INT0 or INT1 pin and write subroutine to service that interrupt ..
Regards,
IanP
 
Reactions: kalbun

    kalbun

    Points: 2
    Helpful Answer Positive Rating
Power failure detector

thanks for replying one more thing i wanted to ask that the circuit which i have drawn has eeprom with zener diode ...my circuit is working between 5-6volts according to some requirements...is theer any problem with current handling of the zener diode ..will it burst out if the current drwan by the circuit is more...and also how much current can this zener diode bear...
 

Re: Power failure detector

Zener diodes are rated for certain powers: starting from 200mW up to 20W and more ..
With 47Ω resistor fitted the maximum current (without EEPROM) through this diode is ≈20mA so the zener's power rating should be ≈2mW, so it looks like any zener can do this job ..
For max 6V supply I would decrease the value of this resistor from 47Ω to 10Ω and add a 100nF capacitor in parallel with the zener diode ..
Regards,
IanP
 

Power failure detector

thanks again but the same power supply is going to uC also ...so should i put this zener diode,10ohm resistor and 100nF capacitor for uC
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…