Skip to content

Commit

Permalink
AR: use bandpass filter for analog input
Browse files Browse the repository at this point in the history
Many bad quality analog mics are not centered properly at 1.6V, but stuck at 0V or stuck at 3.3V in silence. The bandpass filter removes DC offsets and improve signal quality.
  • Loading branch information
softhack007 authored Sep 23, 2023
1 parent eb66a40 commit 438525e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions usermods/audioreactive/audio_reactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@ class AudioReactive : public Usermod {
DEBUGSR_PRINTLN(F("AR: Analog Microphone (left channel only)."));
audioSource = new I2SAdcSource(SAMPLE_RATE, BLOCK_SIZE);
delay(100);
useBandPassFilter = true; // PDM bandpass filter seems to help for bad quality analog
if (audioSource) audioSource->initialize(audioPin);
break;
#endif
Expand Down

0 comments on commit 438525e

Please sign in to comment.