# Determine Frequency of Sine Signal

Hey,
I would like to determine the exact frequency of an incoming sine signal. All I know from the signal is, that it has 2V and a frequency between 10Hz and 50kHz.
The goal in the end is to filter the signal and when it has 15kHz to block it and also when it's over 40kHz.

Does somebody know how to to this or has tipps?

Thanks arminson

What do you mean about blocking it? The Arduino does not have a DAC (unless you consider PWM and an RC filter and possibly an opamp).

When you write "exact frequency", what do you mean? How much error?

Presumably, the incoming sine signal is offset by some amount of DC. You could look at the "zero crossings" (actually, the crossings of the DC offset) and either use the time between zero crossings (which would be a half period), or the time between zero crossings that are in the same direction to give the full period.

If you do not know the DC offset, then you are going to have to find maxima (or minima) and use the time between maxima (or minima) for a period. This is likely to be less accurate than zero crossings.

"...it has 2V..." is not very helpful.
With that frequency range, do you mean that you want your Arduino to sample at over 100 KHz? It can be done but may not be easy. What Arduino do you have?

Is this homework or a school project?