Frequency Measurement Library Noise


Currently I am making use of this library and circuit to measure the frequency:-

However when I put my hand close to the circuit, I get fluctuations from the frequency readings. So I'm guessing I introduce noise some how? How can this be solved?


First, don't leave your input unterminated. If your frequency input pin is left "open" it can pick up stray signals. Second, when working with higher frequencies, having your circuit built on a board with a ground plane helps reduce stray signal input. The human body is somewhat like a capacitor that nicely couples stray AC mains signals to the vicinity of your circuit.

What he apparently means is to provide a pull-down. My first choice would be about 1 to 10K. The actual resistance depends in the impedance of the input components that are off board (the thing you are measureing). In building a frequency counter it is usual to provide an input "Buffer Amplifier" for 2 reasons, one is isolation from the "Counter" electronics (the Arduino) and the other reason is to provide a constant "Load" impedance to the circuit/value being measured. Over the years I've built several frequency counters and the one common thing to all of them is a buffer amplifier as it is much easier to replace a "Blown" transistor whether junction or Jfet rather than an expensive LSI counter/divider anain the Arduino. The "Buffer can be eliminated IF the counter is embedded properly and terminated properly. Most of the Audio" counters (to 100KHz or so) use a Jfet input buffer. Those intended for RF will use a Bi-Polar transistor principally as an impedance transformer to match a typical (in My case 50 ohms) to a complex impedance that is the divider input. Thus ends "Freqsuency Counters" 101.


The range of frequency I am trying to measure in from 0 to about 500 Hz.

@Docedison, unfortunately I have no idea what to do exactly. This pull up resistor, where does it need to go?

I really used the "Wrong" nomenclature it should be about 4K7 and go from input to ground. What it does is "Lower" the normally very high impedance of a Mosfet type input thus reducing its value to something that is less able to be affected by "Stray" noise like your hand near the input. As background we all live in a field of radiated electrostatic and electromagnetic fields. Our bodies "Pick" up those fields and to a point re-radiate that energy. This is the phenomena you are experiencing and the fix is to make the input low enough in impedance so that effective energy transfers are minimized. This change should require you to actually touch the input pin rather that affect it merely by close proximity. This is a complex field and I've tried to "Simplify" it with some close generalizations.


Worked like a charm. Thanks man!

From PWillard… This is good advice:

He thought you knew the meaning of termination, Until you pointed out my error in not reading your message carefully enough, So did I… Really Sorry to have wasted so much time…


Thanks again.

Another question while we're at it.

When connected to my car's speed signal, it measures the frequency spot on, however when var is stationary (zero speed) either it measures random values or nothing.

Is there a way of measuring zero frequency?