Keeping track of running kilometer

Hi all,

I am creating a GPS Tracker to track vehicle movement. A key requirement is to keep a track of the running KM. I can calculate the KM for every GPS reading and accumulate it, but the question is if the devices loses power, the running KM value will be reset and obviously it is not possible to write the KM value to ROM every time I calculate it from GPS reading (as memory generally have a write threshold value. I am looking for some suggestion on this.

One option is FRAM - effectively infinite write cycles.

Alternatively you can use a capacitor (or even supercap) to keep the Arduino powered long enough at power failure to write to EEPROM.

Hi @wildbill , thanks for the suggestions. FRAM won't be possible as this costs a lot. I was thinking of the supercap, I think that is the best way to do it keeping the cost it mind. So I'll have to monitor the power source and if it is gone, I'll have to write the accumulated value to ROM immediately, before the supercap discharges.

What is FRAM? Thank you

Can't you Google that?

Are we talking about the same thing? Adafruit sells them for six bucks.

Hi @wildbill 6 bucks is costly as well in relation to the project I am talking about. You know that generic GPS Trackers are sold for 10 bucks in market, which is damn chip. I don't target 10 bucks though. But I'll definitely try to use it if the device's final cost permits it.. Also if you know some low price chips, please send me the chip numbers...

OK, how much is a DS1307 module?

56 bytes BBRAM.

I did but found nothing connected to this topic. Do you have a link?

The clue is here .. some memory you can use to store your distance .
If you making a “ product” then you’ll need to make on a PCB and you might find individual chips cheaper

If every peripheral device had to be connected to some single application, most of the hardware support ecosystem for the Arduino wouldn't exist. If you Googled "FRAM" and didn't find anything about interfacing with Arduino, Google "FRAM Arduino".

Thanks for explaining and yes with "FRAM Arduino" it had worked fine. Thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.