Page 1 of 1

Digital Bandpass Filter

Posted: Wed Sep 07, 2016 12:56 am
by danlee58
I need a digital bandpass filter. There is a single channel input signal of ~5.6kHz embedded in noise. I want to filter the noise & amplify the signal. When the signal amplitude exceeds a threshold, I'll set an output bit.

I need a good A/D converter & reasonable sampling rate to prevent aliasing. Most of all I am looking for some 'C' code for a Bandpass Filter.

Re: Digital Bandpass Filter

Posted: Wed Sep 07, 2016 6:32 am
by basicchip
You can find some source at sourceforge, do you need better than 12 bit a/d?

Re: Digital Bandpass Filter

Posted: Thu Sep 08, 2016 1:08 am
by danlee58
A 12 Bit A/D should be OK. The A/D Sample Rate needs to be 20kHz. The Coridium ProPlus should be OK.

I have a Digital Filter Design Program from Iowa Hills Software. I have already generated 32 Coefficients for a 5.6kHz FIR Bandpass Filter. I only need code to sample the A/D, and fill a 32 word array. Then Multiply & Add to get an output. Then increment the array address for the next sample. The output should peak, when the selected frequency signature matches the coefficients.

Re: Digital Bandpass Filter

Posted: Thu Sep 08, 2016 2:46 pm
by danlee58
The signal that I want to sample is about 27 mVolts. I think that 12 bits should give me enough resolution.

Re: Digital Bandpass Filter

Posted: Sat Sep 10, 2016 10:33 am
by danlee58
I have code written in 'C' for a Coridium Super Pro. I think that processor is overkill for this application. How much do I need to change in my setup to use a Pro Plus?

Re: Digital Bandpass Filter

Posted: Sun Sep 11, 2016 3:19 pm
by basicchip
Well the sales of SuperPROs to PROpluses have been 10:1 so the prices now reflect that now(ie, we don't save much in low volume sales). Yes a FIR filter probably won't tax the CPU much, but to be able to do multiple things you will need to use DMA and or interrupts to keep up.

With a 27 mV signal a 50 cent quad op amp and a few Rs and Cs might be a better front end for a filter.