Digital odometer with flash/RAM memory for car

G'day!!

After having built sucessfully a digital speedo and various other guages (fuel/tacho/EGO) for a vehicle, I was wondering if anyone has come accross a circuit/kit for a digital odometer with battery backed or preferrably flash storage of the reading?

I've seen ones that go onto a bike etc, but I want to interface to a display of choice and stores the data when powered off - just like a real car! Something that gives the reading as a serial output so I can interface it to a nice VFD would be fantastic too if possible?

For the speedo, I am using a VDO trans-axle hall effect sensor which gives

1000 pulses per km (or close enough) and can feed those pulses into the odometer circuit as long as it is PIC/uP based and it allows for some tinkering :)

I'm not all that experienced with PIC's etc, but can get around OK - except when it comes to storing data in flash or storing large values (cant work out how its done)

Any help would be appreciated!!

Thanks!

Reply to
princo coasters
Loading thread data ...

Oh........

P.S.

It needs to store at least 7 digits.......... ie. 123456 and 7th digit is 10/ths km

Thanks!

a

flash

display

to

except

Reply to
princo coasters

Anyone?????????????

Reply to
princo coasters

You need a PIC expert, which I'm not one of. :) There must be someone here who could advise you about how to do this....

Bob

Reply to
Bob Parker

Use the 1000 pulses per km to drive either an interrupt or counter input on the PIC. Increment your main counter every 100 pulses (for 1/10th km). Then maintain the count across 3 bytes (24 bits) which will give you counts up to 1677721.5.

The tricky part will be keeping the value during power down. Flash won't support enough rewrite cycles to be reliable. It's endurance is only typically 10,000 cycles. EEPROM might be better, and most PICs come with a small eeprom memory in them (128bytes in the case of PIC16F628). It's endurance is typically 10 million cycles. Even so, you probably want to keep the circuit powered all the time from the car battery (should draw only a few mA) and have the PIC write the eeprom once a minute or so, provided there has been some change that requires writing.

Reply to
swanny

Thanks for the replies.....

Yeah, I know i need to store the data across a few bytes, but therein lies my problem - i have no idea how to do that.....

Any PIC'sperts who have some example code for storing large numbers in EEPROM ?

Thankyou!

Reply to
princo coasters

Reply to
Gingre

If you're very lucky. But does anyone really think they won't have thrown it in the tip about 20 years before that? In 27 years we will probably have Exa byte memory keys, or Yotta Byte, we certainly won't be using Gigabyte ones. But of course the USB interface will be well and truly obsolete by then as well.

MrT.

Reply to
Mr.T

I am under impression that current flash memory is rated for at least hundred thousand write cycles, maybe more. So, assuming a case of say,

100000 write cycles and you back> Can I query a piece of this, Swanny? Does that mean that my USB memory key
Reply to
ER

But, that backing up probably involves writing to some locations many times.

Andy Wood snipped-for-privacy@trap.ozemail.com.au

Reply to
Andy Wood

Hi!

Thanks for the ongoing discussions.......

It looks like I can write to an EEPROM in "page" mode to acheive a longer than one byte storage solution (allows 16-256k data to be written with one command).....well, at least thats what I am interpreting from my recent google discoveries.

Keep the ideas coming!

Thanks to all.....

Reply to
princo coasters

Don't think you're quite right, though I get your drift. They still (just about) use floppy disks... though perhaps they've shrunk in size. My first was 8 inches.

Reply to
Gingre

That's better. Will just about do. I thought it was 10,000.

Reply to
Gingre

Why's that?

Reply to
Gingre

how things change!

can you remember the last time you used a floppy, or had a product come with drivers on floppy?

I can't remember when I used a centronics printer cable last either.

I'm still using a serial cable label printer, but the drivers are that outdated, I decided to get a USB one, as I always have trouble installing onto a new system, and getting 100% response out of the old RS-232 config. When the lables finish, out it goes.

And let's face it, RS-2332 was great and is still used, but when I look back at all the handshaking we had to take care of, I can see why the average user was very confused, and why config experts made a quid.

USB around in 20 years? Maybe, but it would be more likely another super version. No doubt a wireless LAN for all peripherals. Get rid of the cables, that would be nice.

Don...

--
Don McKenzie

Site Map:            http://www.dontronics.com/sitemap
E-Mail Contact Page: http://www.dontronics.com/email
No More Damn Spam:   http://www.wizard-of-oz.com

USB Flash Drive interface for existing products.
http://www.dontronics-shop.com/product.php?productid=16654
Reply to
Don McKenzie

Reply to
Gingre

:-)

Anyone who knows me well, will know I have been up and working between

04:00 and 05:00 for about the last 8 years now.

Only difference is I better lay off the biccies this time around. :-)

Don...

--
Don McKenzie

Site Map:            http://www.dontronics.com/sitemap
E-Mail Contact Page: http://www.dontronics.com/email
No More Damn Spam:   http://www.wizard-of-oz.com
Reply to
Don McKenzie

Best time of the day. My record is 1am, normal is 3.30 am. Go to bed about

7.30pm though (and miss all that >
Reply to
Gingre

Well, it would depend on all sorts of things. If you just copy a whole lot of files to a typically FAT-formatted disk, some sectors in the FAT and directory would get updated over and over again as each file is created.

Some makers of the flash disks claim that they avoid this problem by not simply mapping logical sectors to physical locations in the flash (ask Mr Google about "wear leveling").

Andy Wood snipped-for-privacy@trap.ozemail.com.au

Reply to
Andy Wood

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.