Writing to BS2 EEPROM on power failure
Gerry Shand
Posts: 45
Hi All:
Working on a project where I need to write 6 pieces of data to the EEPROM after a power failure is detected. Then when power returns, the BS2 restarts its program and reads the data from the EEPROM to carry on with its duties.
I have the software for this working on the test bench - that part was pretty easy.
Here is the challenge: I need a circuit to detect the power failure at the 12 VDC input level to the stamp. The problem is: the 12 VDC is regulated with a lot of capacitance so a power failure is tough to detect. By the time the 12 VDC level drops sufficiently low enough to trigger something like an optocoupler, the 5 VDC level also drops and I do not get the data to write into the EEPROM.
I have a fairly big program whose loop execution time is 0.25 seconds so what I really need is a power supply configuration that keeps the 5 VDC alive for about a second after the 12 VDC has completely died. Trying 1.5 F supercaps is not working. I have tried a bunch of different power supply circuit configurations including isoation diodes between the 12 VDC system and the 5 VDC regulator and not use the on board BS2 supply.
No luck so far. Does anyone have any further suggestions or ideas?
Thanks,
Gerry
Working on a project where I need to write 6 pieces of data to the EEPROM after a power failure is detected. Then when power returns, the BS2 restarts its program and reads the data from the EEPROM to carry on with its duties.
I have the software for this working on the test bench - that part was pretty easy.
Here is the challenge: I need a circuit to detect the power failure at the 12 VDC input level to the stamp. The problem is: the 12 VDC is regulated with a lot of capacitance so a power failure is tough to detect. By the time the 12 VDC level drops sufficiently low enough to trigger something like an optocoupler, the 5 VDC level also drops and I do not get the data to write into the EEPROM.
I have a fairly big program whose loop execution time is 0.25 seconds so what I really need is a power supply configuration that keeps the 5 VDC alive for about a second after the 12 VDC has completely died. Trying 1.5 F supercaps is not working. I have tried a bunch of different power supply circuit configurations including isoation diodes between the 12 VDC system and the 5 VDC regulator and not use the on board BS2 supply.
No luck so far. Does anyone have any further suggestions or ideas?
Thanks,
Gerry
Comments
'
Its a jpeg so you'll have to resize it.