Searching \ for 'How to count RPM and do other tasks?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'How to count RPM and do other tasks?'.

Truncated match.
PICList Thread
'How to count RPM and do other tasks?'
1998\04\27@122539 by PHXSYS

picon face
Hello everyone!

In my current project, I am using a BS2 and  I want to read vehicle rpm
(revolutions per minute) and complete several tasks based on RPM values. I am
afraid if I use the Count command, the minimum time necessary to read cranking
rpm (100) will affect the other tasks I want to perform. At 100 rpm, 4
cylinder engine. The stamp will receive 2 X 100 /60 pulses per second = 3.3
Hz. I will need to count for at least .5 seconds for minimum resolution.

Is there an easier way, am I overlooking an obvious option? I was thinking
some kind of counting latch/frequency counter might work, where its full time
job is to determine frequency. Then I could just read this device to get an
immediate rpm value. I also thought of using a frequency to voltage converter
and reading it with the a/d converter I am already using. I am not sure how I
could use this idea to easily program the unit for different engines (4,6,8,12
cylinders) I have never done anything like this, I'll appreciate any help or
suggestions. I need to keep this cheap, hopefully for a commercial



1998\04\28@080506 by Russell McMahon

picon face
1.    Your concern is apparently not how long it takes to
acquire data as the fact that the BS2 is tied up while you
are doing so. A less than trivial but potentially successful
solution may be to use a phase lock loop IC and a divider to
compare the PLL oscillator with the cranking pulses - the
phase lock oscillator is run at eg 10 times faster (or more)
and you can then divide the PLL oscillator and compare it
with the cranking frequency. You then measure one period of
the PLL frequency with your BS2 in much less time. You would
still have to let the PLL stabilise and there is some doubt
about how well this would work with the uneven cranking
speeds you will experience. PLLs are notoriously evil
devices to design but there is a wealth of application data
available. A CD4046 with its "digital" phase comparator (an
Exclusive OR gate) can work marvels. There are modern
versions of this (Philips make several) with even ":better"
"frequency lock" comparators.

2.    More easily - you could create a peak voltage
inversely proportional to the cranking period and then
control a voltage to frequency converter at a frequency of
you choice. The BS2 can then read this frequency. Accuracy
would be only moderate but I suspect you don't need very
high accuracy here (although I'm not certain of what you are
trying to achieve.  A cheap voltage to frequency converter
can be produced with a standard 555 timer and perhaps a
little other glue logic. There are numerous circuit
cook-books around which will suggest appropriate 555
circuits. A low tech way of producing a variable voltage
with few external parts would be to charge a capacitor
through a resistor and reset the capacitor to zero every
time the motor passed the reference point. The peak voltage
would represent the motor period.

3.    You could use a PIC with an internal Analogue to
digital converter. If you are aiming at a commercial design
ANY PIC is liable to be cheaper than a BS2 and you could try
eg the MicrEngineering labs BASIC which emulates the BS1
instruction set. If you were hoping to sell any volume of
anything the compiler would soon pay for itself in BS2
savings. Once you have easy A2D you can measure the voltage
in 2. above easily and rapidly.

4.    With external hardware you can make a simple
"frequency counter" which counts up until a motor pulse is
received, whereupon it latches the count and resets the
counter. The count is then read by the PIC. You have limited
pins available on the BS2 so this is probably not

5.    Can you get more pulses per motor revolution - there
are many teeth on the starter ring gear - can you get near
it? Maybe the eg alternator is geared so as to produce more
usable pulses per revolution. Cam belts with (non-metallic)
teeth would be a marvelous source of pulses (optical

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...