Go Down

Topic: Using FIR Filter in a PWM code (Read 2321 times) previous topic - next topic


I have a pwm code for Arduino Uno and It takes in audio on ADC0
Did you also consider using an analog low-pass filter at the input to the arduino? That's to ensure that only signals having frequencies in the audio range get sampled by the arduino - to avoid 'aliasing'.


1)  FIR filters can be much slower to calculate for a given filter specification, a bad idea on a low-performance 8-bit
microcontroller.  Use IIR unless you need phase-linear.

2)  Filter design starts with a specification of phase behaviour, passband, stopband, ripple and attentuation, from this the type and then order is determined.  Then the filter is designed.

3)  Its easy to do in Python using the scipy.signal library.   Checkout buttord, butter, ellipord, eliip, cheby1ord, checy1, bessel functions.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up