I'm attempting to record 8-bit/8kbps audio to an SD card using the samd21g18a microcontroller. I'm having an issue where the ADC sample value drops whenever the SD card is being written to. This results in a "ticking" noise during playback.
The "ticking" happens at a ~60ms interval which is consistent with SD card writing after buffering 512 bytes (512 * (1 / 8000) = 0.064 seconds). I've shortened all the wires to their minimum lengths which has reduced the amplitude of the "ticking" significantly, but it still faintly exists. Does anyone have any suggestions for shielding the mic/ADC from noise from the SPI lines?
Here is a screenshot of the audio file in Audacity that shows the "ticking" sound. This was before I shortened the wires so it's not quite this severe anymore:
For the mic, I'm using this Adafruit breakout built around the MAX4466, which seems to be picking up and amplifying the noise from the SPI lines.
@JRE Here is a diagram of the setup. Again, the lines are kept as short as possible with both breakout board grounds connecting directly to the Feather M0 ground pin.
@John Birckhead I initially thought that power to the mic might be dropping while the SD card is writing due to the higher current demands. Here is a screenshot of VCC (CH1) and the mic output (CH2) while it's logging to the SD card. The input voltage seems very stable even upon zooming in.
Here's a screenshot of the SD shield clock pin (CH1) and the mic output (CH2). The resolution isn't great, but you can see that the mic output drops then recovers when the SD write happens.