I have a number of data loggers using the PIC 18LF4620 powered off a 3.6 volt Lithium Thionyl battery. There is no voltage regulator. In normal operation these wake up, note the time and temperature from a DS1629 RTC, record ten seconds of analog waveform data, store all that to ST M25P64 long term flash memory as a 2048 byte record, then go back to sleep for ten minutes.
Usually I get the back loggers before the battery goes flat and I can extract the data by loading a dump program via the MCS+ Bootloader. This last lot did not come back in time and the batteries are all flat, reading less than 0.5 volts. It looks like the bootloader has been corrupted and after removing the batteries and supplying 3.6 volts, I cannot read any data back. Six units in a row show exactly the same problem.
Are there any 'zero component' tricks that I can use to measure battery voltage when the system has no voltage reference to compare against? Is there a simple RC oscillator that varies with battery volts that I can tap into? If I can find a way to measure battery volts I can put a branch in the code to stop logging when the battery falls below 2.5 volts.
I realise that normal code operation is out the window with a flat battery but has anyone got any suggestions or strategies on how to preserve the bootloader in a low voltage scenario?
Brian
Bookmarks