Summary of AVR Digital Hum Nuller using ATmega168 microcontroller
This article describes an ATmega168-based digital comb filter designed to eliminate 60Hz (or 50Hz) hum noise and its harmonics from real-time audio signals. The algorithm creates an average background waveform of the noise and subtracts it from the input, preserving non-periodic audio features while attenuating periodic hum frequencies. The system is limited to a 24kHz bandwidth due to the microcontroller's RAM and CPU constraints.
Parts used in the AVR Digital Hum Nuller:
- ATmega168 microcontroller
- Digital comb filter algorithm
- Analog circuit (optional for subtraction)
This ATmega168-based digital comb filter built to clean a realtime audio signal. It can remove the ubiquitous 60Hz (50Hz in some countries) hum noise caused by power lines and household electrical wiring. Since the noise is not strictly sinusoidal it is necessary to remove all harmonics of 60Hz, and that is what this filter does.
Dan Stahlke, project designer, explained that the hum cleaning algorithm works by building a sort of average background waveform and then subtracting this from the signal to pick out only the non-periodic features. The result is that signals that oscillate at 60Hz or multiples thereof get attenuated while everything else passes through unchanged. The bandwidth is limited to 24kHz due to both RAM and CPU constraints in the ATmega168 chip. As a workaround it is possible to use the digital filter to just output the simulated background waveform and subtract this from the signal using an analog circuit.
For more detail: AVR Digital Hum Nuller using ATmega168 microcontroller
- What is the primary function of this project?
To remove ubiquitous 60Hz or 50Hz hum noise caused by power lines and household electrical wiring from realtime audio signals. - How does the hum cleaning algorithm work?
It builds an average background waveform and subtracts it from the signal to isolate non-periodic features. - Does the filter only target the fundamental frequency?
No, it removes all harmonics of 60Hz because the noise is not strictly sinusoidal. - What limits the bandwidth of this filter?
The bandwidth is limited to 24kHz due to RAM and CPU constraints in the ATmega168 chip. - Can I use an analog circuit with this digital filter?
Yes, you can output the simulated background waveform from the digital filter and subtract it from the signal using an analog circuit. - Which microcontroller is used in this project?
The project uses an ATmega168 microcontroller. - What happens to signals oscillating at multiples of 60Hz?
These signals get attenuated while everything else passes through unchanged.

