learn to Design software filters

Discussion in 'Embedded Systems and Microcontrollers' started by aamirali, Jul 29, 2014.

  1. aamirali

    Thread Starter Member

    Feb 2, 2012

    I want to learn how to design software filters in embedded. I have two scenario's in it:

    a). sample a ac signal with freq of 50Hz. So I need to design a band pass filter which can only allow freq around 50hz to pass through, rest all must be rejected.

    b). sample a dc signal i.e zero freq. So design a low pass filter which only allow freq near 0 Hz to pass.

    1. I am not asking anyone to design these for me.
    2. I want to learn them how to do that it in microcontroller.
    3. I tried to search them on on internet but they all take to DSP & I couldn't understand the relationship. as it includes complex maths & no where i see link to microcontroller.
    4. After some searching I found this:
    http://coactionos.com/embedded design tips/2013/10/04/Tips-An-Easy-to-Use-Digital-Filter/

    5. Can someone point to weblink where I can learn like if have to design a filter in context of applying i in a microcontroller
    a). At what freq should I sample
    b). how many samples to take
    c). FIR or IIR, which will suit me?
  2. Papabravo


    Feb 24, 2006
    It is not that simple. Understanding the math is a requirement. How are you going to debug a piece of code that does not produce the expected result. The code is the same weather you implement it in a DSP or a microcontroller. Deal with it!

    You also need to adjust your expectations. There is no way to construct a filter of any type with an infinitesimally small passband around a center frequency. The best you can do is attenuate frequency components in the stopband. IMHO web resources for learning filter design are basically crap. I recommend a college level textbook to learn how to specify and design filters.