Digital odometer with flash/RAM memory for car

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View


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!



Re: Digital odometer with flash/RAM memory for car


Oh........

P.S.

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

Thanks!



Quoted text here. Click to load it
a
flash
display
to
except


Re: Digital odometer with flash/RAM memory for car


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


Re: Digital odometer with flash/RAM memory for car


Quoted text here. Click to load it

    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


Re: Digital odometer with flash/RAM memory for car


Quoted text here. Click to load it

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.


Re: Digital odometer with flash/RAM memory for car


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!


Quoted text here. Click to load it


Re: Digital odometer with flash/RAM memory for car



Quoted text here. Click to load it

google piclist

You are not storing a single large number but a series of digits.

Pics and other similar chips are 8 bit so  values per register
are 0 - 255 or 0 - FF in hex.

So use a register to store each digit (0 - 9).

For a long term solution I'd recommend storing the values into a serial
eeprom or other chip
on power off. A decent sized cap would give power for long enough to
write the latest value.

1. first step try the pic eprom

2. serial eeprom/flash chip attached to the pic

3. sd card - let you store a lot of other info as well

few circuits
http://www.gedanken.demon.co.uk/gps-sd-logger /
http://www.gedanken.demon.co.uk/thermometer-recorder/ for serial eeprom
circuit
http://www.techdesign.be/projects/020/020.htm

Doesn't have to be a pic , could use atmel avr or other micro.

Do you know any programming language ?

Dontronics.com sell some cheap pic boards(and avr and others) from olimex.

http://www.winpicprog.co.uk/pic_tutorial.htm is quite a nice tutorial using
asm.

http://www.microchipc.com/ examples for the hitech and microchip c
compilers for pics.

If you use an 18f or 24f or 30f pic , microchip have  c compilers for them.

See 3rd and 2nd last projects on this page
http://www.microchipc.com/sourcecode /


Alex



Re: Digital odometer with flash/RAM memory for car



Quoted text here. Click to load it
What a pity about that speckled background, which makes it much harder to
read IMHO



Re: Digital odometer with flash/RAM memory for car


Can I query a piece of this, Swanny? Does that mean that my USB memory key
has a limited life? ie 27 years once a day backups?

Quoted text here. Click to load it



Re: Digital odometer with flash/RAM memory for car



Quoted text here. Click to load it

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.



Re: Digital odometer with flash/RAM memory for car


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.

Quoted text here. Click to load it



Floppies, was: Digital odometer with flash/RAM memory for car



Quoted text here. Click to load it

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
We've slightly trimmed the long signature. Click to see the full one.
Re: Floppies, was: Digital odometer with flash/RAM memory for car


Ahah Don! You are revealing your time in hospital! Up this early and on a
Sunday too. It's my habit anyway but if it hadn't been hospital would have
sorted it out. How I loved that first coffee and biscuits.

Quoted text here. Click to load it



Re: Floppies, was: Digital odometer with flash/RAM memory for car



Quoted text here. Click to load it

:-)

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
We've slightly trimmed the long signature. Click to see the full one.
Re: Floppies, was: Digital odometer with flash/RAM memory for car


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 intelligent stuff on the TV...)

Quoted text here. Click to load it



Re: Floppies, was: Digital odometer with flash/RAM memory for car



Quoted text here. Click to load it

But at least the abc and others but some of the good stuff onto their
websites
like
http://www.abc.net.au/science/crude /

Alex



Re: Digital odometer with flash/RAM memory for car


Quoted text here. Click to load it

It will depend on the type of flash, however eeprom has a significantly higher
endurance than flash memory (several orders of magnitude).
I quoted the endurance (write cycle) figure for the flash and eeprom in the PIC
micro. The endurance of your memory stick and camera card may be the same, but
it also may be less. It is probably anticipated that you won't be writing to
this piece of hardware in 10 years time, let alone 27. Micros on the other hand
have a tendency to sit in a piece of equipment for a bit longer (20 or so years
in some cases).

Since the odometer value is only 3 bytes, it makes more sense to save it into
the on-board eeprom in the PIC.

Re: Digital odometer with flash/RAM memory for car


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 backing up once a day you would get 273
years out of your stick. I think you're OK.

Gingre wrote:
Quoted text here. Click to load it

Re: Digital odometer with flash/RAM memory for car




Quoted text here. Click to load it

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


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

Re: Digital odometer with flash/RAM memory for car


Why's that?

Quoted text here. Click to load it



Site Timeline