Homodyne detection for arduino
It may be possible to modify that program in order to get such a large
frequency range:


change the local oscillator frequency to 3.5&nbsp;kHz
drastically shorten the filter's time constant in order to get a
wider passband


However, the homodyne detection scheme is best suited for building very
narrow band filters. In your case, the upper limit you want is quite
close to the Nyquist frequency (4,808&nbsp;Hz), so I suggest you use a
high-pass, rather than a band-pass filter. The simplest high-pass you
can get is a numerical derivative:

y[n] = x[n] − x[n−1]

The gain of this filter is 2×sin(π×f/fsamp), so you get the
−3&nbsp;dB cutoff at fsamp/4 ≈ 2,404&nbsp;Hz. If you need
something better, you may want to try a higher order filter. But then
you get deep into the territory of digital filter design, which can be
tricky, especially if you have no experience with the z-transform or you
want to implement the filter in fixed point.

Edit: If you really want a bandpass, the simplest I can think of is
this two-pole filter:

y[n] = 0.360 x[n] − 0.885 y[n−1] − 0.552 y[n−2]

It will give you a maximum gain of roughly&nbsp;1 at about
3.43&nbsp;kHz, and −3&nbsp;dB cutoffs at 3 and 4&nbsp;kHz. A
straightforward floating point implementation would be:

float filter(float x)
{
    static float y1, y2;
    float y = 0.360 * x - 0.885 * y1 - 0.552 * y2;
    y2 = y1;
    y1 = y;
    return y;
}


You should convert this to fixed point if you want to use it, otherwise
I doubt your Arduino will have the processing power to run every sample
through it. Below is a plot of this filter's gain, compared with the
simple derivative, which I divided by&nbsp;2 in order to normalize its
gain:



Note that the gain gets flat as you approach the Nyquist frequency, and
stays relatively high (above −5.4&nbsp;dB).