Hello
I am looking for a suitable library for filtering digital signals.
It's important to me to be able to filter the signal in real time, it's a necessary condition.
My application is when the arduino samples a signal coming from the electrodes, and I want to filter out the 50 Hz frequency from it, as well as everything above 500 Hz.
For the project I am using Arduino DUE.
Thanks
There is no simple answer to this question and no universal library to solve the problem.
You can reduce unwanted signals in the input, but you have to specify the bandwidth and level of reduction. The more reduction, the more complicated the filter, and the longer the time it takes to execute. "Ripple" in the passband is also an important issue.
You have to start by defining what you mean by "real time" (the permissible filter lag), the amount of signal reduction in dB in the various bands, then chose the type of filter to design (there are many).
You can learn by experimenting with this on line filter calculator: http://t-filter.engineerjs.com/
Thank you very much Jremington
I will make my point clear
"Real time" I mean building a device where electrodes measure a signal for a certain period of time, the Arduino converts the signal from analog to digital by a loop, and sends it to the computer for further processing,
I need to integrate the filtering inside the loop, so that every sample received will be filtered immediately and then sent to the computer.
I thought there would be directories because filtering is a common thing.
You need a notch filter for frequency 50. and LPF up to 500
The attenuation should be up to -40DB
These are simple filters, I hope there is something like this built in and I'll put in as an argument my bandwidth and attenuation depth
Thanks
Well by definition "filtering" acts over a number of samples and can't be applied "immediately". The digital filter with the response that @jremington gives will probably be realised as a tapped delay line (transversal filter). To pass a maximum frequency of 500 Hz you would need to be sampling the signal at 1000Hz minimum and the delay through the filter would be 10s of samples. If you have a significant 50Hz component then the first thing to do is to look carefully at the grounding, you probably have an earth loop. Read up on and follow low-level audio wiring practice - similar problem to avoiding "mains hum". As for the low-pass requirement, if the signal starts out in the analogue domain then have you considered a simple active analogue filter? That would probably have significantly less delay than a digital one.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
