> -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Tony Nixon > Sent: Thursday, March 22, 2001 20:14 > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [EE]: Car Tachometer > > > Herbert Graf wrote: > > > > Well we just acquired a car and I am thinking of making > the addition of > > a tachometer with a PIC. The reason is that it is an 88 Olds > Delta 88 and > > those kinds of cars trigger the spark plugs more than just during the > > compression cycle making standard digital tachs useless, plus > it sounds like > > an interesting project! Has anyone does this sort of thing? I > was thinking > > of using a freq to voltage converter but I'd rather do it all > digitally. I > > was thinking about measuring the time between pulses to determine RPM > > (because counting the number of pulses per set amount of time > would result > > in WAY to slow display updates and lack of resolution at lower > RPMs). 100us > > resolution seems good enough for my uses. What does everyone > think of that? > > The only thing is I would have to use the inverse of this > measurement, how > > easy is this to do with a PIC? I was thinking of using a lookup > table (with > > maybe 256 entries and some linear interpolation) but I'd rather > do it with > > the math if possible. ANY comments and pointers would be greatly > > appreciated. TTYL > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > Use this simple formula... > > > 927C0h > ------------------------ = RPM > 100uS Loops X Cylinders > > > You might be able to simplify it even more > > Eg. for 8 cylinders > > > 124F8h > ------------ = RPM > 100uS Loops > > > Use a 24 bit counter to count the 100uS loops. > > Start the count when the points open. > Increment the counter on every 100uS loop > The next time the points open... > Divide 124F8h by the count value. > The result is RPM. > Convert this to BCD and display it on 4 LEDs. > Debounce the points for 8 X 100uS loops. > Reset the counter Thanks alot, however I'd like to add that since the car uses an electronic ignition system (no points) I'm planning to get my tach signal from a fuel injector, anyone see problems with this idea? I realize that injectors probably create a huge amount of transients on the line but I figure I should be able to filter that out. Ideas? Thanks, TTYL -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu