Frequency Filtering with the Audio Hacker Shield

The Audio Hacker shield for Arduino lets you do some cool things with digital signal processing. This new project shows how a fairly simple Arduino sketch can implement a low-pass filter, high-pass filter and band-pass filter.

A low-pass filter allows low frequencies to pass through (makes sense, right?) while attenuating or cutting out the frequencies that are higher than a specified cutoff frequency.

A high-pass filter is the opposite. It lets high frequencies through while attenuating frequencies below the cutoff frequency.

A band-pass filter lets frequencies that are near the cutoff frequency to pass through but attenuates the frequencies above and below it.

There is a new example sketch included in the Audio Hacker library called “Filter” that implements these 3 filters. In the video below I’m using the DJ Shield to make it easy to provide inputs but it is not strictly required. An audio source is plugged into the Audio Hacker input. A pot connected to A0 controls the cutoff frequency. A button on digital pin 5 starts/stops the audio processing, and a button on digital pin 4 controls the filter selection. I’m lighting up the red LED for low-pass filter, blue LED for high-pass filter, and both LEDs for band-pass filter.

Now shown in the video is the effect of the filter resonance. The pot conntected to A1 controls the resonance of the filter. Resonance amplifies the frequencies around the cutoff frequency, and has an especially cool effect when using a low-pass filter.

The resonant filter implemented here is adapted from the code here. I hope this simple project lets you hear how different filters sound and gives you something new to explore with your Audio Hacker shield!

Published by Michael, on September 22nd, 2015 at 6:55 am. Filed under: Arduino,Audio. | 5 Comments |

5 Responses to “Frequency Filtering with the Audio Hacker Shield”

  1. Nice!

    Comment by MFoobar on April 17, 2016 at 7:44 AM

  2. Do you have code for a bandstop filter?

    Comment by tom f on February 10, 2019 at 3:56 PM

  3. I don’t but you might look here:

    Comment by Michael on February 10, 2019 at 6:29 PM

  4. Hi, your project is very interesting and I would like to have the relative sketch for Arduino. I’m sorry but at the link suggested it does not appear. The page is blank. I thank you so much if you are so nice to let me know the sketch for the 3 type of filters.
    Many thanks, best regards.


    Comment by Gian Battista Pettinelli on April 4, 2019 at 8:14 AM

  5. Gian, I updated the links to The Arduino sketch for this project is here:

    Comment by Michael on April 4, 2019 at 9:27 AM

Leave a Reply