Digital odometer with flash/RAM memory for car

P

princo coasters

Guest
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!
 
Oh........

P.S.

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

Thanks!



"princo coasters" <princo@makesgoodcoasters.com> wrote in message
news:466e5e7c$0$6213$afc38c87@news.optusnet.com.au...
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!
 
On 14/06/2007 23:51 princo coasters wrote:
Anyone?????????????
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
 
Bob Parker wrote:
On 14/06/2007 23:51 princo coasters wrote:
Anyone?????????????


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
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.
 
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!


"swanny" <blahgswan3blah@blahbigpondblah.comblah.blahau> wrote in message
news:c_jci.14049$wH4.3983@news-server.bigpond.net.au...
Bob Parker wrote:
On 14/06/2007 23:51 princo coasters wrote:
Anyone?????????????


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


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.
 
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?

"swanny" <blahgswan3blah@blahbigpondblah.comblah.blahau> wrote in message
news:c_jci.14049$wH4.3983@news-server.bigpond.net.au...
Bob Parker wrote:
On 14/06/2007 23:51 princo coasters wrote:
Anyone?????????????


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


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.
 
"Gingre" <not@here.com> wrote in message news:46738bcb@dnews.tpgi.com.au...
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?
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.
 
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:
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?

"swanny" <blahgswan3blah@blahbigpondblah.comblah.blahau> wrote in message
news:c_jci.14049$wH4.3983@news-server.bigpond.net.au...
Bob Parker wrote:
On 14/06/2007 23:51 princo coasters wrote:
Anyone?????????????

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

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.
 
Seems like a big project but FYR the procedure for reading and writing
the on-chip EEPROM is described in the manual for the chip. For instance
the good old 16F84 manual
(http://ww1.microchip.com/downloads/en/devicedoc/35007b.pdf) has the
EEPROM procedures in section 3.1 in assembler. If you were to use
Hi-Tech C, its got EEPROM_READ and EEPROM_WRITE macros. I expect other
compilers for PIC would have similar macros.

princo coasters wrote:
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!
 
ER <ugn@hotmail.com> wrote:

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.
But, that backing up probably involves writing to some locations many
times.


Andy Wood
woodag@trap.ozemail.com.au
 
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.....



"ER" <ugn@hotmail.com> wrote in message
news:1377g1hjnnn212a@corp.supernews.com...
Seems like a big project but FYR the procedure for reading and writing
the on-chip EEPROM is described in the manual for the chip. For instance
the good old 16F84 manual
(http://ww1.microchip.com/downloads/en/devicedoc/35007b.pdf) has the
EEPROM procedures in section 3.1 in assembler. If you were to use
Hi-Tech C, its got EEPROM_READ and EEPROM_WRITE macros. I expect other
compilers for PIC would have similar macros.

princo coasters wrote:
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!
 
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.

"Mr.T" <MrT@home> wrote in message
news:46739ee3$0$29662$afc38c87@news.optusnet.com.au...
"Gingre" <not@here.com> wrote in message
news:46738bcb@dnews.tpgi.com.au...
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?

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.
 
That's better. Will just about do. I thought it was 10,000.

"ER" <ugn@hotmail.com> wrote in message
news:1377fk8jmj9il78@corp.supernews.com...
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:
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?

"swanny" <blahgswan3blah@blahbigpondblah.comblah.blahau> wrote in message
news:c_jci.14049$wH4.3983@news-server.bigpond.net.au...
Bob Parker wrote:
On 14/06/2007 23:51 princo coasters wrote:
Anyone?????????????

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

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.
 
Why's that?

"Andy Wood" <woodag@trap.ozemail.com.au> wrote in message
news:4673dbb8$0$22413$5a62ac22@per-qv1-newsreader-01.iinet.net.au...
ER <ugn@hotmail.com> wrote:

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.

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


Andy Wood
woodag@trap.ozemail.com.au
 
Gingre wrote:

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.
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
 
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.

"Don McKenzie" <look@mysig.com> wrote in message
news:467431c9$0$29662$afc38c87@news.optusnet.com.au...
Gingre wrote:

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.

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
 
Gingre wrote:

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.
:)

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
 
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...)

"Don McKenzie" <look@mysig.com> wrote in message
news:46745dbd$0$24918$afc38c87@news.optusnet.com.au...
Gingre wrote:

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.

:)

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
 
"Gingre" <not@here.com> wrote:

Why's that?
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
woodag@trap.ozemail.com.au
 

Welcome to EDABoard.com

Sponsor

Back
Top