[Teensy 3.2 + audio shield] Line-In is Noisy. Ground loop isolator doesn't fix it

clarkc5

Member
Hi, I'm using a teensy 3.2 with the audio shield. The connections are all soldered by me (possible damage?)

My microphone is this battery powered camera microphone. https://www.amazon.com/dp/B00E58AA0I?psc=1&ref=ppx_yo2_dt_b_product_details

However I don't think this is the problem because the sound still happens when the mic is disconnected, but it's also mixed with a much louder buzzing from the mic being disconnected, which makes it harder to distinguish.


This is the noise... careful, it's loud when I talk in the beginning, compared to the noise

https://soundcloud.com/user-731846263/record



What I tried:

1. Turning off the high pass filter in the code

2. Audio jack ground loop isolator (tried both in headphone hack and microphone jack)

3. Powering from battery source instead of usb (does that mean a usb ground loop isolator won't work?)


None of these worked... can anyone offer suggestions or ideas? I appreciate it

One more question... can anyone please recommend other audio specific microcontrollers which are good for recording? I need the least noisy one possible. Thanks
 
CODE


#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=147,115
AudioOutputI2S i2s2; //xy=448,119
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 1, i2s2, 1);
// GUItool: end automatically generated code

AudioControlSGTL5000 sgtl5000_1;



void setup() {
Serial.begin(9600);
AudioMemory(8);
sgtl5000_1.enable();
sgtl5000_1.volume(1);
sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN);
sgtl5000_1.micGain(36);
delay(1000);
}

void loop() {
// do nothing
}
 
BTW. How are you connecting that microphone to the audio shield?
Can you attach a circuit diagram and/or a photo?

Pete
 
I just tried that, and it reduced the noise significantly. Thank you! Although there is still a low hum and some white noise, the worst of it is gone. One of the reasons I was attracted to the teensy is because it has the ability to record 4 microphones at once, I guess that isn't possible with the MIC input.

I'll attach a photo of my setup in a minute.
 
Perhaps that's a private track, not visible on the site to me.

The microphone input is for an electret capsule. Don't expect performance from it, the SGTL5000 is a
budget mobile phone / mp3 player audio codec chip basically, designed for an insensitive microphone
right in front of someone speaking. There are definitely spuriae on the microphone input if you hook
it up to an FFT, I'd expect it to be generally noisy too. Microphone signal levels (a few millivolts) on
a CMOS digital chip are going to be compromized by digital hash from the supply rails, its unavoidable.

For any decent quality I suggest: microphone -> microphone preamp -> line inputs. Once its at line level
(a volt or so), noise and interference aren't going to anything like as problematical.
 
I just made it a public track, sorry.

I appreciate the advice and knowledge. Right now I'm making a prototype so some noise is okay, but I will need some higher quality chips for the final product. Do you have any suggestions for audio chips? Or brands?
 
For microphones you can't just use an ADC, you need a preamp first, microphone signals are measured in microvolts and millivolts and
low noise circuitry is a requirement before any digital electronics is involved. Once upto line level there's a bewildering choice of audio
ADCs/DACs/Codecs/etc - a parametric search facility on the website of an electronics supplier such as digikey is a good place to start
scoping what's out there - it changes all the time (and at the moment availability is a very big issue, which is why those sites are
where to look - if its out of stock, you need to know).

Can't seem to download that as a wav, which would mean I could analyze it. Its also not loud on a laptop!
I recorded my mic while playing it and got a crude spectrum, seeing spur at 14.7kHz or so and a broad area
around 6kHz. I think the 14.7kHz is something I've noticed before when running FFTs direct from the audio mic
input.
 
Thanks for your help, it's giving me some clarity on how it all works. I think I need to move on from the teensy audio shield to something more sophisticated.

So the fundamentals of the system are something like this? :

Microphone > Pre Amp > ADC > Digital pin on Microcontroller (like esp32 or teensy or arduino?)

And use the microcontroller to convert the digital input into a .wav?
 
Back
Top