This is a project that I want to share with a large number of
watercraft enthusiasts from a blog post. There is a large number
of people around the world that are still riding 2-stroke Kawasaki
Jet Ski's, Yamaha Wave Runner's, and Sea Doo's, and I want to
help them prevent engine failures.
A tachometer is a good indicator that the jet pump and engine
is set up to work together. For reliability, it is important to know
where the engine makes peak horsepower (HP) and that the jet pump
is properly set-up to allow the engine to rev a few hundred rpms
beyond peak HP.
For example, if your stock engine with an after market exhaust makes
peak HP @ 6,500 rpm, the pump's impeller will load down the engine
at some point and act like a rev limiter. There were many impellers
sold that will load an engine down hard and prevent the engine from
exceeding 5500rpm, and that is the beginning of an engine that may
fail on a wide open throttle run.
But lets assume you have the correct impeller and the engine will rev
to 6600rpm, and you decide to have the engine modified to make more
HP at a higher rpm. Often cylinder porting will change where the engine
makes peak HP to either 6800rpm or 7200rpm.
Each set-up will increase the HP, but the 7200rpm engine will require a
smaller impeller so the engine will rev beyond 7200 by at least one or
two hundred rpm.
Again a tachometer is the first step to a reliable engine.
Most tachometers that are commonly available have a refresh rate that
is too slow. Good tachometers can cost $200.
I want to share a blog post on a PWC site that explains how to make a
decent tach, from common parts. Possibly built around a Nano Every.
I get the impression that you did not understand input capture.
I have consumed many data sheets, app-notes, tutorials, forum content,
and video's, but I am beginning to wonder about my comprehension.
What's the TOP value of your counter? Where does it reside?
The TCNTx register is first copied to a low byte, and then a high byte.
If I was programming in assembly, I would need to deal with these
separately. But according to the data sheets, GCC reads these 16 bit
registers, so I do not need to handle them as a high and low byte.
Where do you reset the counter for the next reading?
(Hint: counter is not "period")
TCNTx = 0. Even though this is an example in AVR-130: Set-up and
use of AVR timers, I would have thought it was reset when the interrupt
flag is cleared?
Use volatile multibyte variables with atomic read.
I use global variables and I use volatile to define variables changed by
I have read some about atomic functions, but I know more about timers
than atomic functions