SaabCentral Forums banner
1 - 20 of 38 Posts

·
Registered
Joined
·
994 Posts
Discussion Starter · #1 · (Edited)
Here goes nothing. I'm going to try and make my own digital tachometer for my '93 900 non-turbo. I'm currently sitting at home for winter break and BORED OUT OF MY MIND with utterly nothing to do (nothing is broken on the Saab *knocks on wood*). I'm in my second year of studies as an electrical engineer with a keen interest in computers/circuits. What better way to apply myself than to use what I learned in ECE230 (Microcontrollers and Computer Architecture) at Rose-Hulman to create my own digital tach. I'm sure I'll have detailed technical questions along the way, but for now, all I want are ideas for mounting this thing. I don't even have an LCD screen yet, let alone anything to mount the screen in. So... whatever ideas you've got, throw them at me!

Also, if anyone knows where I can buy a properly sized LCD, I'm listening. The one I was taught how to use in class used a "standard 14 pin connector".

Cheers,
David
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #2 ·
Does anyone know any many pulses the (crankshaft mounted) hall sensor creates per revolution?
 

·
Registered
Joined
·
178 Posts
i almost went to rose hulman the phone thing and legos were pretty cool recruitment tools.

Sparkfun is the place to go to get any kinds of good components with a description of what they do. Adafruit, and digikey are good too. It's just a matter of preference. If you are new to programming then you can get an Arduino since they are easy to cobble things together with and have billions of examples laid out for beginners otherwise any chip will do. I suggest getting a serial 2 pin lcd that way you have more pins open for other sensors that you are inevitably going to throw in nor or later. Also it will help when you cannibalize it for another project. its easier to work with and just as simple to code.

Here are two examples that I have copied for other friends drag and show cars that should help you get going. I included the page with comments because they often help add in a little more insight.

nixie tube this one looks great and uses some nice retro tech
pic ax nice and small with a good ability to add more things if needed

For the mounting vacuum forming is a good thing to have and extremely easy thing to make that creates professional products quickly.

If you really want some fun and busy work, design it with an FPGA. It may cost a little more but you will give your self a mighty big hammer that most people never heard of, including your profs.

good luck
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #4 ·
i almost went to rose hulman the phone thing and legos were pretty cool recruitment tools.

Sparkfun is the place to go to get any kinds of good components with a description of what they do. Adafruit, and digikey are good too. It's just a matter of preference. If you are new to programming then you can get an Arduino since they are easy to cobble things together with and have billions of examples laid out for beginners otherwise any chip will do. I suggest getting a serial 2 pin lcd that way you have more pins open for other sensors that you are inevitably going to throw in nor or later. Also it will help when you cannibalize it for another project. its easier to work with and just as simple to code.

Here are two examples that I have copied for other friends drag and show cars that should help you get going. I included the page with comments because they often help add in a little more insight.

nixie tube this one looks great and uses some nice retro tech
pic ax nice and small with a good ability to add more things if needed

For the mounting vacuum forming is a good thing to have and extremely easy thing to make that creates professional products quickly.

If you really want some fun and busy work, design it with an FPGA. It may cost a little more but you will give your self a mighty big hammer that most people never heard of, including your profs.

good luck
ah, but you see, i've already got the microcontoller and everything that I'll need to connect it to the output of the crank sensor I think. No need to buy those parts :). I have an LCD as well, only problem is that A) its not backlit, and B) it's no where near good looking enough to want to use permanently. I will use the one I have until I get it working well enough that I'm willing to spend a couple bucks on on a better LCD and mounting equipment.

As for the FPGA... that'd have been fun!!! We used one in my Intro to Logic Design course. That one and the microcontroller course have been my favorite courses so far, by a long shot. Unfortunately, I didn't get to keep the FPGA.

Anyway, I think I might have the program done already - I just need to know how many pulses per revolution the sensor spits out. I was expecting on the order of 100, but I ran across pics of the distributor that make me think otherwise. Dunno if they upped the resolution for the crank sensor though. I know how I can find out, but it require a fair bit of time in the bitter cold tomorrow, so if anyone wants to chime in before I go test for myself, you'll have my thanks ;ol;

I was also realizing how unhelpful a digital tach actually is... an analog gauge is just plain easier to read. Precise numbers are so rarely needed. So, I was thinking I might look into getting a graphical LCD display at some point, but that's a kind of programming that I have no experience with. We'll see! :D
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #6 ·
Well that is *not* what I was hoping for. I'm currently browsing through all the sensors on digikey (very nice system of searching for products) looking for something that will read each tooth on the ring gear. So far I haven't found anything that will do the exact job, but there are a few that could be made to work with some effort. And the only thing that will give me the full resolution that the ring gear offers is a light sensor, but I haven't checked to see if a light sensor would be fast enough.
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #7 · (Edited)
Turns out I don't need such a high resolution. I was initially planning on counting the number of pulses in every tenth of a second. This would would have been accurate at high RPMs, but very inaccurate at low RPMs - hence forth why I needed a higher resolution. However, my dad suggested updating the LCD with every 5 pulses and then using time passed to calculate RPMs. THIS should be perfect! Unfortunately.... I have to rewrite the entire program and use a timer on the microcontroller that we never learned about. This could take a while. But its fun!

--Edit--
Scratch that. Due to limitations with my counter, I'll be updating the LCD with every pulse of the sensor. This gives some very accurate readings :)
 

·
Registered
Joined
·
21 Posts
Cannot wait to see this done... Perhaps if you can assemble a pre-working kit, and get together some mounting stuff, you could sell these. ;ol; for the effort!
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #9 ·
I was actually just thinking the same thing last night, so I started putting a parts list together. We'll see how it ends up when I'm done and its been tested.

Also, I couldn't find any suitable 4 character LCD screens that weren't 7-segment (thought about using 7-segment, but I don't think I have the processing capacity for it - it would interfere with the tach) so I'm using a 16x2 character LCD. This means lots of extra room. Anndd.... with that, I think I'm going to try and add in a voltmeter and water temp reading. If you have other ideas, I'm open to them.
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #11 ·
VFD would be cool. I'll look into it - but probably won't happen. I really like the idea of having that 16x2 display to open up more options, and LCD is much cheaper than VFD for that purpose.
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #12 ·
Alright, I was all excited and ready to get this thing hooked up and running wheeenn.... the EZK unit decided to make a fool out of me. I pulled the circuit board out of its box so that I could connect to pin 24 and 20, as described in the bentley (I tried pulling the rubber boot back, but without success), clipped a couple aligator clips between the pins and the voltmeter, turn ignition on and then turned the engine over by hand (jacked up one wheel with tranny in 5th and turned the wheel). What do I see on the voltmeter as I do this? Between 0 and 100mV. Anyone know what went wrong?

Pictures of the setup posted here: http://www.stlswedespeed.com/david.zemon/tachometer/
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #13 · (Edited)
I've decided to do what I can to add an oil temp sensor as well. Digikey.com has this wonderful little resistor sensor that I'm hoping will work while submerged in oil. Assuming it does, I will simply attach it to my oil dipstick. The tough part will then be getting a good seal at the top... but I'll take care of that later. Taking that resistor reading should be simple enough, and then I'll have oil temp!

-Edit-
Here's what I've got so far for the display. It'll measure engine rpm, oil temp, water temp, and battery voltage.
2500rpm W:190F
B:13.7V O:176F
Still don't know if I should use the water temp sensor at the intake manifold or thermostat.
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #15 · (Edited)
dunno what else has been said on here but the signal for the rev counter normally comes from the ignition pulse. It fires once per rev and fires more often if the engine is moving faster.
the rev counter? You mean for the tachometer in the gauge cluster? sorry.. i'm really not sure what you mean here.

The program still has some bugs that I'm ironing out for the battery voltage, but I here's what it should look like once I'm finished...


Oh, and I still have no idea why I wasn't getting a signal from the hall sensor. Anyone tried to test theirs before?

--Edit--
Battery voltage problem fixed. Its now correctly reading and displaying battery voltage. I'm going to order the oil temp sensor now and start testing that.
 

Attachments

·
Registered
Joined
·
994 Posts
Discussion Starter · #17 ·
Ah! Yes, and I guess that would make perfect sense. But there no reason I need to run off the same signal as the gauge cluster. in fact, it makes sense not to run off the same signal. The crank position sensor should be much more accurate. For one, it happens twice as often. and two, it doesn't change places depending on engine rpm and load like the ignition pulse. Not that you'll be able to read any amount of decent accuracy on the digital readout i'm making, but it'll be there :lol:
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #18 ·
My oil temp sensor just arrived. Its tiny! But that's beside the point. I was wondering if anyone had brilliant ideas for what I might encase it in. I don't want to drop the thing in the oil by itself.

Anyone know what temp hot-glue melts? One idea I had was wrap it in heatshrink, and then glue both ends shut - hot glue would be easiest, but I'm worried that'd melt and get sucked into the engine. Epoxy would be my next guess.

Are there less jank ideas out there?
 

·
Registered
Joined
·
994 Posts
Discussion Starter · #19 ·
well, after a loonggg haitus during Spring semester, I'm back to playing with the microcontroller again. I ran into two issues before school started up: 1) the microcontroller only runs so fast - its not fast enough to update the LCD and accurately keep track of the rpm, 2) in an attempt to optimize the programming I am trying to write my own 8-bit LCD library, since that should be faster than the 4-bit library given to me in class.

Solution? DUAL CORE TECHNOLOGY! =D
I will continue trying to write my own 8-bit library - it's fun. But in the meantime, I can just use two microcontrollers (they're all of ~$2 each). One will receive all inputs from the car - hall effect sensor, temp sensors, etc - do the arithmetic and output integer numbers to the second proc. the second proc will then convert the integer numbers to strings and display them on the LCD, refreshing the tach (and now throttle position) many times a second, and battery voltage and temps once every second, or less often.

Summer should be fun in Rolla!
 

·
Registered
Joined
·
178 Posts
Why do you need to refresh the tach so often? Any thing in the tens or single digits will either be a flicker or an 8 depending on your setup. Also I hope you are using interrupts and a shared external oscillator to keep your two microcontrollers synched instead of a loop starting at power. Are you using a AVR style controller? Personally if I was going to employ a multicore controller I would go with propeller only cause its going into a Saab.

My oil temp sensor just arrived. Its tiny! But that's beside the point. I was wondering if anyone had brilliant ideas for what I might encase it in. I don't want to drop the thing in the oil by itself.
Why didn't you just get a ready made oil temp sensor? Its already encased and tested to work.
 
1 - 20 of 38 Posts
Top