Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital Vehicle Speedometer Display

Status
Not open for further replies.

indecided

Member
Hi people,

I'm currently trying to bring another of my automotive creations to life.

The idea is simple = take the speed signal (square wave AFAIK), convert it into a voltage with the LM2907, and somehow interface it to a 7-segment LED driver which would then display the speed digitally.

What i'm unclear about is the interfacing between the voltage and the 7-segment LED display. What decoder do I need to get the voltage to correspond to a certain speed, or am I looking at the whole thing wrong? will a 4511 be any use? Should I be going somewhere else from the frequency instead?

<ok, after doing a simple search... the work involved seems gangaratungan the linear way..>

So using a PIC and with EPE's sourcecode as a guide (or maybe a clear-cut copy) **broken link removed**

I've never done PICs before.. Can anybody jumpstart me? :) or point me somewhere..
 
Hi Indecided,
Don't convert the speed signal's pulses to variable DC, use the pulses to clock a counter IC that feeds decoder/LED driver ICs.
How does the pulse rate compare with the speed? Hopefully it is 10 or 100 to one, or binary. :lol:
 
audioguru said:
Hi Indecided,
Don't convert the speed signal's pulses to variable DC, use the pulses to clock a counter IC that feeds decoder/LED driver ICs.
How does the pulse rate compare with the speed? Hopefully it is 10 or 100 to one, or binary. :lol:

I'm afraid it's not that simple, audioguru..

speed in km/h =((wheel diameter in km) x (tailshaft rotations per hour)) / differential ratio

so assuming the speedo pickup is magnetic/hall effect, this would be a real pain to calibrate..although the author of the belowmentioned site developed a good method to calibrate.

I actually came across a reference site providing clear-cut information on how to build a unit.

https://martybugs.net/electronics/speedo.cgi

Just a few questions.

In the example, the author used a 3-digit 7seg display. I'm using 3 single digit 7 segment displays. Does that mean i have to multiplex the 4511s?

I"m seriously contemplating using a PIC this time.. since the source code is readily available.

Not to mention the complexity - I'm building this on stripboard/vero, and while possible, it makes things a drag... Now to get somebody to help me work the PICs :)
 
The EPE project mentioned above does pretty well EXACTLY what you want, it can be calibrated (in software) for a huge assortment of wheel sizes and number of pulses.
 
Nigel,

can you recommend any websites for learner level tutorials on PICs?

Thanks!

I can figure out the programming bit and all,

but for this particular project no interface details are provided ; unless someone has a copy of the PIC-Agoras issue in EPE (April, May 1997) I am pretty blur on the i/o details, etc... one I/O from hall effect sensor and that's it?

If i wanted to incorporate a series of LED warnings for speed, that would be simply more programming and more serial lines?
 
indecided said:
Nigel,

can you recommend any websites for learner level tutorials on PICs?

You could try mine, but they aren't intended as 'idiots' guide (no disrespect intended).

I can figure out the programming bit and all,

but for this particular project no interface details are provided ; unless someone has a copy of the PIC-Agoras issue in EPE (April, May 1997) I am pretty blur on the i/o details, etc... one I/O from hall effect sensor and that's it?

Yes, it just uses a single input from a sensor, with the output to an LCD text module. I have the magazine at home!.

If i wanted to incorporate a series of LED warnings for speed, that would be simply more programming and more serial lines?

Yes, just a bit of programming and use some extra I/O lines (not serial lines).
 
Nigel Goodwin said:
indecided said:
Nigel,

can you recommend any websites for learner level tutorials on PICs?

You could try mine, but they aren't intended as 'idiots' guide (no disrespect intended).

I can figure out the programming bit and all,

but for this particular project no interface details are provided ; unless someone has a copy of the PIC-Agoras issue in EPE (April, May 1997) I am pretty blur on the i/o details, etc... one I/O from hall effect sensor and that's it?

Yes, it just uses a single input from a sensor, with the output to an LCD text module. I have the magazine at home!.

If i wanted to incorporate a series of LED warnings for speed, that would be simply more programming and more serial lines?

Yes, just a bit of programming and use some extra I/O lines (not serial lines).

Thanks Nigel. Am currently doing a crash course on PICs. Building a simplified version of the LPT programmer just for 84s.

Could you be so kind as to scan a parts list and a schematic of the Agoras in? Or whatever relevant data would be good too :)

Thanks!
 
indecided said:
Could you be so kind as to scan a parts list and a schematic of the Agoras in? Or whatever relevant data would be good too :)

Took a bit of finding - April 1997!.

Here's the circuit:
 

Attachments

  • pic_agoras1.jpg
    pic_agoras1.jpg
    385.4 KB · Views: 2,703
Nigel Goodwin said:
indecided said:
Could you be so kind as to scan a parts list and a schematic of the Agoras in? Or whatever relevant data would be good too :)

Took a bit of finding - April 1997!.

Here's the circuit:

That's very nice of you Nigel!

Anyways, just a few questions since you have the magazine..

1) Judging by the pinout, the LCD in question would be a < 80 char HD44870 if i'm not mistaken?

2) What is the function of IC2 (not shown but visually tied to INT/RB0 on IC3.. Looks like this is part 2 of 2.. any ideas about part 1?

3) the circut looks like it has its own built in programmer... right?

4) what are the functions of the individual modes, as indicated by the switch S4.

5) I'm rather confused by SK1/3, SK1/4, WD1... WD1 looks like a wall wart (adapter) to me (hope WD /= watchdog, hehe) . SK1/3 ? SK1/4 - tied to ground.

6) How much coding will it take to change the LCD output to a BCD decoder output, as I plan to use 3x 7 segment LED displays.. LCDs are unaffordable and backlit ones are simply pricey where I am.. and we don't have "surplus sales" :(.

7) What I wouldn't do for the WHOLE 2 parts of the article :)
 
What vehicle is this for? Most OEM speedo pulse generators are calibrated to output 4000 pulses per mile(or km depending on country).From what I've read above, it seems you're making things much more complex than they need to be.Use a PIC to measure pulsewidth or increment a counter, do a little math, and output to the LCD.Even with modest skills, its rather simple.
 
indecided said:
Anyways, just a few questions since you have the magazine..

1) Judging by the pinout, the LCD in question would be a < 80 char HD44870 if i'm not mistaken?

Yes, just a standard LCD module, they used a 2x8 one in the original article.

2) What is the function of IC2 (not shown but visually tied to INT/RB0 on IC3.. Looks like this is part 2 of 2.. any ideas about part 1?

The other two chips are on a seperate board, and not relevent to your design - they are a PLL and a schmitt trigger - they were used to provide a pulse output from the FGM-3 sensor used in the design.

The circuits for the project are only in one part, there is a second part, which deals with setting it up etc.

3) the circut looks like it has its own built in programmer... right?

It's got connections for ICSP using the EPE TK series of programmers.

4) what are the functions of the individual modes, as indicated by the switch S4.

There are seven different modes:

Mode 0) Trip elapsed time and distance (km).
Mode 1) Current speed and average speed (km/h).
Mode 2) Peak speed and total difference (km/h).
Mode 3) Trip elapsed time and distance (miles).
Mode 4) Current speed and average speed (miles/h).
Mode 5) Peak speed and total difference (miles/h).
Mode 6) Current wheel rotation count, and average over ten seconds.
Mode 7) Visual warning of reset contdown on both lines.
5) I'm rather confused by SK1/3, SK1/4, WD1... WD1 looks like a wall wart (adapter) to me (hope WD /= watchdog, hehe) . SK1/3 ? SK1/4 - tied to ground.

WD1 is an audio buzzer, for audible indications. Sk1 is simply the external conenction to the board - basically power positive and negative, and a pulse input.

6) How much coding will it take to change the LCD output to a BCD decoder output, as I plan to use 3x 7 segment LED displays.. LCDs are unaffordable and backlit ones are simply pricey where I am.. and we don't have "surplus sales" :(.

You would need to rewrite the entire display routines, probably using interrupts to multiplex the displays - see my tutorials for an example.

7) What I wouldn't do for the WHOLE 2 parts of the article :)

If I get time I'll scan the whole article.
 
Nigel,

thanks a lot for answering the questions. I think my jaw just dropped - I was expecting a plain jane digital speedo, and it looks like the holy grail now..

My, this is definitely a must build. :)
 
MM..the 16c84 is sorta discontinued and I might have problems finding it at RS.

Can i subsitute it with the 16F84A? I believe it has an extra 32 bytes of codespace... looks backwards compatible by any means.. any problems? Might be useful if my motorola pressure sensors come in time. Then i probably could integrate vacuum reading too... If I have any I/O pins left.

And I believe the 10MHz version of the chip is used and not the 4MHz one?

anyways, was the 2x8 display they used fully utilized? I'd probably be putting in a 2x16 and will prob want to expand their short forms they used..

How does switch s4 operate? with *eight* modes how is the switch operated?
Actually, umm. what sort of a switch is it in the first place?

@eclipsed - doing this for a 13 year old Honda Accord. Here we're not so lucky and we get the lemon carb cars.. so no computer. :(
 
thats look a really nice speedo, bit better than 7-seg displays.
is the source code for that available?
 
indecided said:
MM..the 16c84 is sorta discontinued and I might have problems finding it at RS.

Can i subsitute it with the 16F84A? I believe it has an extra 32 bytes of codespace... looks backwards compatible by any means.. any problems?

You should use the 16F628, the 16F84 is long obselete as well, the 628 replaced the 84 series. The only change required is two lines to turn off the comparators in the 628 - it's also cheaper than the 84!.

Might be useful if my motorola pressure sensors come in time. Then i probably could integrate vacuum reading too... If I have any I/O pins left.

And I believe the 10MHz version of the chip is used and not the 4MHz one?

To be honest I've never found any difference!, I'm absolutely sure they all come off the same production line and just get stamped differently. There's no possible a way a chip designed for 10MHz is only going to work down at 4MHz (and that's assuming they even grade them at all) - I've overclocked 4MHz 16C84's at 12MHz with no problems!.

anyways, was the 2x8 display they used fully utilized? I'd probably be putting in a 2x16 and will prob want to expand their short forms they used..

Yes it was, with a 2x16 you could improve it - the extra memory in the 628 would come in handy for this! - 2Kb instead of 1Kb.

How does switch s4 operate? with *eight* modes how is the switch operated?
Actually, umm. what sort of a switch is it in the first place?

It's a "4 bit binary, rotary switch".

@eclipsed - doing this for a 13 year old Honda Accord. Here we're not so lucky and we get the lemon carb cars.. so no computer. :(
 
Yep, I made a couple of calls and confirmed that the 16F628 is indeed affordable..

And as I expected, it's harder to find a 4 bit binary, rotary switch here then a PIC16F628. The main sources are RS/Farnell (Malaysia) and they're asking twice to THRICE the price of the 16F628 for the switch!

Question : What am I exactly lookin for when you mention a binary, rotary switch - are we looking for - a BCD based switch - hence 1,2,4,8?

Can this rotary switch be replaced by any other form of more economical switching without too much code changes? A single pushbutton would be excellent and more modern looking. two I/Os programmed to look for a latch, and then switch modes - not forgetting to loop 0-7 after that.

Such a pain acquiring components at reasonable pricing here.. I'm off to go see if i can find the rotary & a reasonably backlit LCD at a good price.
 
indecided said:
Yep, I made a couple of calls and confirmed that the 16F628 is indeed affordable..

And as I expected, it's harder to find a 4 bit binary, rotary switch here then a PIC16F628. The main sources are RS/Farnell (Malaysia) and they're asking twice to THRICE the price of the 16F628 for the switch!

Question : What am I exactly lookin for when you mention a binary, rotary switch - are we looking for - a BCD based switch - hence 1,2,4,8?

Can this rotary switch be replaced by any other form of more economical switching without too much code changes? A single pushbutton would be excellent and more modern looking. two I/Os programmed to look for a latch, and then switch modes - not forgetting to loop 0-7 after that.

Such a pain acquiring components at reasonable pricing here.. I'm off to go see if i can find the rotary & a reasonably backlit LCD at a good price.

You could do it with an eight way switch, and use diodes to create the binary data - it's a good test for you :lol:

Or you could replace it by a smaller switch, and alter the code accordingly - do you really need all the options?.
 
Nigel Goodwin said:
indecided said:
Yep, I made a couple of calls and confirmed that the 16F628 is indeed affordable..

And as I expected, it's harder to find a 4 bit binary, rotary switch here then a PIC16F628. The main sources are RS/Farnell (Malaysia) and they're asking twice to THRICE the price of the 16F628 for the switch!

Question : What am I exactly lookin for when you mention a binary, rotary switch - are we looking for - a BCD based switch - hence 1,2,4,8?

Can this rotary switch be replaced by any other form of more economical switching without too much code changes? A single pushbutton would be excellent and more modern looking. two I/Os programmed to look for a latch, and then switch modes - not forgetting to loop 0-7 after that.

Such a pain acquiring components at reasonable pricing here.. I'm off to go see if i can find the rotary & a reasonably backlit LCD at a good price.

You could do it with an eight way switch, and use diodes to create the binary data - it's a good test for you :lol:

Or you could replace it by a smaller switch, and alter the code accordingly - do you really need all the options?.

Binary/coded switches are just a major pain to obtain. I may just splurge on them though..if I have a bad time making the alternatives. But these switches are pretty ugly.. not very sleek in today's eyes.

Actually, I wouldn't mind doing just that : at the moment, my country uses km/h for speed indicators, but i'll be going to Iowa soon to continue my studies...hence m/h will be soon useful.

Perhaps I should just set up 4 switches, and have the software bind them accordingly... and later on bind the km/h functions to the miles/h function.

eight way switch and diodes to create binary data? Now i'm confused..
how does eight individual pushbutton switches and a maze of diodes sound like?
 
indecided said:
eight way switch and diodes to create binary data? Now i'm confused..

Think pull-up resistors on the four lines, with each switch connection taking different lines to ground via diodes - so for all ones you have no diodes, and the resistors pull all the lines HIGH. For all zeros you have diodes from each line, pulling them all LOW - for values inbetween you simply wire diodes accordingly.

how does eight individual pushbutton switches and a maze of diodes sound like?

In sounds like the switches don't latch 8)
 
Nigel Goodwin said:
indecided said:
eight way switch and diodes to create binary data? Now i'm confused..

Think pull-up resistors on the four lines, with each switch connection taking different lines to ground via diodes - so for all ones you have no diodes, and the resistors pull all the lines HIGH. For all zeros you have diodes from each line, pulling them all LOW - for values inbetween you simply wire diodes accordingly.

how does eight individual pushbutton switches and a maze of diodes sound like?

In sounds like the switches don't latch 8)

Oh dear. I can't make much sense outta this.. I can roughly quantify the idea but have no inkling of a circut. Please do elaborate.. I'm pretty keen on using pushbutton switches instead of a rotary dial.

OTOH, am I supposed to be looking for a decimal/hexadecimal rotary?

parts num 333-091/333-085 on RS (Rotary Switches)
 
Status
Not open for further replies.

Latest threads

Back
Top