Props for adding a schematic!
Like you said, the problem is likely noise. You could include a small capacitor from A0 to GND to smooth out the signal. You'd have to calculate a suitable value, but I suspect something like 10nF or 100nF would help.
I'd also be inclined to have a look at the signal with a scope to get a feeling for the nature of the problem you're dealing with.
The method you are using is measuring the frequency of the ripple from the rectified AC from the alternator, this ripple level is affected by battery condition and load.
You would be better using the points signal to the ignition coil for a more reliable signal, however you will need some extra components to protect your controller from ignition spikes.
Did you Google;
arduino engine tacho
They show other methods.
What model Arduino are you using?
Do you have an oscilloscope?
lol, i meant ac voltage..
W is waveform, the ac output before the rectifier diodes..
The frequency follows rpm..
But pretty sure it's AC, alternating current..
~q
i googled exactly your post title..
lot's of good info..
pretty sure they sell tachs that plug in..
but yes, in reading through some of this..
there will be noise or variations when lights turn on, when batt starts charging..
off the shelf tachs must deal with it??
probably better off sticking a magnet on the crank shaft and use a sensor to read it..
not sure what you need exactly, maybe someone else can offer advice on how you should rectify..
kind of makes sense, full wave rectify 7vac and you should see 14vdc which would be needed to charge a 12vdc batt..
Have you considered the alternator output will not be a reliable indicator of engine speed?
As @herbschwarz says, In your "second schema" the voltages are wrong. should be 7v: 3.5V: 1.75V to A0
You are using an analog input and a basically sinusoidal waveform - I dont know how successfully pulsein will deal with a signal that isnt a pulse.
If you connect instead to a digital input pin the hysteresis my be enough to overcome noise and give you a decent reading. (explanation here)