electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

write data in ram onto eeprom when there is a power outage


Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS -> write data in ram onto eeprom when there is a power outage
Author Message
dnarenderreddy



Joined: 02 Jan 2006
Posts: 26


Post09 Feb 2006 13:42   

how write data to ram


hello everybody, my name is narender, a b.tech final year degree.

iam doing my project on pre piad energy meter. i am facing a trouble with the design. brief about my project. there will be an energy meter ic which wil be converting the instantaneeous load into pulses and a microcontroller which will be counting those pulses and when ever the count becomes 1500 pulses then some counter is incremented and is written into the serisl eeprom chip. now when ever the counter is just to less than 1500 pulses and there is a power outage, then all the ram contents are lost. i,e a total of 1 kwh is lost. so for this i have to design a power back up unit(from batery) which will detect a power outage and swith on very quickly whenever there is power outage and i will write a interrup service routine to write the contents of the counter into the serial eeprom and after that my back up(from battery) unit also should shut down. and on power resumption i should take the values from the serial eeprom and then start counting from there.

how can this be done, a non volatile ram is not an economical one so i cant go for it. can anyone help me with some other low cost circuit and get my purpose solved.

sorry for my english.

thanks in advance.
Back to top
OlVi



Joined: 04 Dec 2003
Posts: 5


Post14 Feb 2006 18:07   

save data in eeprom before power shutdown


Simplest battery backup: use two diodes;
(Main power supply) -|>- (µC) -<|- (battery)

(µC) is your controller and EEPROM
-|>- and -<|- are diodes

Main power supply voltage should be little above battery voltage and diodes should be low drop out type.

You could also add charging for battery (if carefully designed battery side diode could be removed; battery is charged when main PS is online)
Back to top
Google
AdSense
Google Adsense




Post14 Feb 2006 18:07   

Ads




Back to top
dnarenderreddy



Joined: 02 Jan 2006
Posts: 26


Post15 Feb 2006 11:10   

how write kwh in eeprom


thank you sir, but my problem is not with the recharging circuit its with detecting the power outage at very faster rate. im my project iam using a clock frequency of 11.095 mhz clock. for this clock how fast i should detect the outage and how to detect so fast and switch on the battery supply and go to the interrrupt service routine and save my data into the eeprom and then switch on the battery also.

thanks
narender
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post15 Feb 2006 11:37   

power fail write data eeprom


Quote:
Early warning for shutdown routine
Critical systems often require an early warning when the power-supply voltage (VCC) begins to fall. The warning allows time for the µP to store vital data and perform "housekeeping" chores before the declining VCC causes the supervisor to issue a hard reset. If the raw dc input voltage is accessible, it can be monitored with an undervoltage or power-fail comparator, which in turn asserts a processor interrupt to indicate when the unregulated supply is collapsing.


Quoted from:
http://www.maxim-ic.com/appnotes.cfm/appnote_number/655
If you think an IC is worth trying in your design ask MAXIM for free samples ..

Regards,
IanP
Back to top
albert22



Joined: 20 Jul 2004
Posts: 95
Helped: 3


Post15 Feb 2006 14:24   

Re: write data in ram onto eeprom when there is a power outa


You only need to have power during the time it takes the uContr. to write into the eeprom and to shutdown. At worst case this would be a couple of seconds. This power can be taken from the power supply capacitors. Probably there is no need for a battery backup, just bigger capacitors.
To detect the outage you must sense the AC voltage. instead of the DC voltage that feeds the uC. In this way you can detect the AC outage very early when there is enough energy left on the power supply to save the data.
Hope this helps
Back to top
rajo



Joined: 03 Dec 2003
Posts: 17
Location: Belgrade, Serbia


Post13 Jun 2009 1:37   

Re: write data in ram onto eeprom when there is a power outa


Hello OlVi

Is there something about designing these crcuits on the net?
I am eager to read something more about it

Cheers
Back to top
Booleano



Joined: 09 Jun 2009
Posts: 11


Post13 Jun 2009 7:01   

Re: write data in ram onto eeprom when there is a power outa


Albert22 is right.
Depending on what you've to save in EEPROM residual energy is sufficient.
I've already done it using an H8S from Renesas and it works.
I'm using a FRAM to store more than 100 32 bit parameters in it at powerdown.
In the worst case you could use a supercap.

B.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS -> write data in ram onto eeprom when there is a power outage
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
write the data in ram of mcu into eeprom when power outage (12)
what is the use of eeprom when we already have a ram (2)
(Help)How to write a data into a EEPROM(AT28C256). (1)
how to record RAM data into PC like E/EEPROM bin/hex? (1)
post power-out eeprom write on PIC 18F452 (3)
How to restore initialized data value in RAM after power on? (4)
Coupling signals onto DC power lines (2)
eeprom write (5)
how to write into ram (3)
how to write into ram (4)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS