Noises while recording audio with Teensy 3.1

Status
Not open for further replies.
I am trying to record audio to later on play it back.
This is my setup:
- Teensy 3.1
- Audio Shield
- Microphone (Adafruit's https://www.adafruit.com/products/1063 )
- Headphones plugged to the AudioShield
- SD CARD: San Disk Ultra 8GB MicroSDHC 1


I followed the example from Paul Stoffregen(Recorder.ino), connecting the 3 buttons and trying to save raw + play the raw file, but i get weird noises while saving the file. I am attaching the raw file and the wav file ( done with sox like this:
sox -r 44100 -e unsigned -b 16 -c 1 ./RECORD_1_1.RAW out_1_1.wav
) In the audio (wav file) tyou can bearly hear my voice...
I connected the microphone to the Line in L ( which should be port0 in the line in)...
Is there anything i am doing wrong until here?

Could it be that this kind of SD Card i am using is not correct for this? If is jus play WAV files, like the example of SamplePlayer.ino, works perfectly, there is no problem on playing wav files.

Is there any problem if i use the microphone of Adafruit and connect it like this (over line in port) to the Teensy 3.1?
I think the problem i get it when i write to the file and save it because if i try the example of Filter and modify it a bit, i can hear well my voice (not recording, playing directly the AudioInput -> AudioOutput).

Thanks in advance!
 

Attachments

  • AudioOut.zip
    454.3 KB · Views: 155
zsnap7.png
I see digital noise plus white noise.
 
I am not connecting it to the AGND,
Im connecting the input to normal ground, the one next to the L or the other ground.
teensy3_audio_back.jpg
Should i connect it to the AGND the input?
The output, if i have it to normal jack shouldn't affect to this,no?
 
@xxxajk, nothing...
i keep getting the white noise...
what else could i try? I ground it to GND and not to AGND though.
Is there any test you think i could make to see if there is anything wrong?
Thanks a lot xxxajk !
 
Would this be something good to do? (on top of the Teensy i will put the audio shield for the audio output but i would use the Teensy and not the AudioShield for the input)

Screen Shot 2015-07-27 at 09.55.02.png

Or is it stupid?
 
Ahh yes, you need some simple filtering to solve the remaining problems. You *can* try to use the "AREF" pin as the V+ for the mic as a starting point. If that helps clear things up -- even a little, then you have to just filter your supply. Note too that this kind of mic is very sensitive. Without knowing much about your setup, here are a few more tips:

I see the classic 50/60Hz hum from the mains.
I see the SD card access (those are the chirps in the audio)

Ferrite on the ground and leads to the mic.
Add a 0.1uF capacitor on the mic board across the ground and power leads
Add a 10uF electrolytic capacitor on the mic board across the ground and power leads
Use shielded cable to the mic.
 
zsnap8.png
The large -- more square wave is your mains hum.
The smaller ripples are caused when your SD card does a save.

Add additional capacitor on the sd card to help eliminate the chirp sound, which is caused by a flash write.
 
ooooh wow this si so nice to know!

So, should it look something like this?

Screen Shot 2015-07-27 at 11.32.47.png

Where :
Add a 0.1uF capacitor on the mic board across the ground and power leads
Add a 10uF electrolytic capacitor on the mic board across the ground and power leads
Not sure how to ferrite it

But! i found this:

769617c55731d9d2.png

So i should ferrite it like this, to the main ground and 5v or to the one in the microphone?
 
First, do not use a breadboard. That is going to give you a lot of hum.
You will want to solder the capacitors right on the mic board where the power comes in.
In a few minutes I can show you an example. I'll have to make something up then photograph it.
 
True! i was going to solder it but it was just to show you the connection i would do.
Ill wait for ur example, really appreciate it!
Thanks!
 
The top circuit is correct.

The bottom one is mostly correct. You just need a ferrite bead, not a full choke.
They look like this:
ferrite_bead.jpg
Here is a small article about them:
http://https://en.wikipedia.org/wiki/Ferrite_bead

At a minimum:
You need one on the ground to the mic.
You need one of them on the v+ to the mic.

If you are not powering by USB you should place them on the power to the teensy 3 as well.
 
To add yet another thing to try, connect the Adafruit mic's GND pin directly to the GND on the audio shield. Use the "G" pins right next to the "R" and "L" inputs.

You might also try wiring its VCC pin to the 3.3V pin on the audio shield (near the bottom of the board, intended for a volume knob).

You're probably going to also need that filtering circuit. Looks like Adafruit's product has high sensitivity to even slight power supply noise, which is really unfortunate.
 
If that fails, as hardware hack to Adafruit's product, you might try adding capacitance between AVCC and AGND on their board.

Adding more capacitance in parallel with C1 might also help. R2 and C1 form a low-pass filter that tries to keep power supply noise out of the mic.

sensors_mic.png
(click for full size)

If there's noise on AVCC, unfortunately R3 and R4 will couple it right to the input.

A better approach would involve lower impedance resistors to divide the power supply, like 1K, and also a 10uF or even 100uF capacitor to AGND. That would create a very low noise, low impedance voltage half way between AVCC and AGND. Then it could be connected by a 470K resistor to C2 and U1 pin 1.

Replacing FB1 with a wire might also help slightly. Or maybe not. Hard to say for sure. But from everything you've described, the problem seems to be unavoidable noise on the power supply, and poor PSRR of Adafruit's product... so attempting to clean up the power line or improve the mic boards power supply noise rejection are where to focus your effort.
 
Last edited:
Hey!
Thanks for the information to both, really appreciate it!
So i followed xxxajk's istructions and made this fritzing:
xxxajkVersion.jpg
And also i followed Paul Stroffregen's instructions to make this:
PaulVersion.jpg
I was not able to follow the full instructions of the "hack" of the microphone, but what do you think about the schetches i made, you think this could work and they look fine connected?

Thanks!
 
Hello XXXAJK, i hope you are doing well; i'm having a really ugly SD noise, and i don't know how to solve it with a capacitor, can you help me with that?

This is my audio
View attachment SD.zip

I'm hearing everithing by the HP output and the noise is present when the recording process is on.

Thank you.
 
Status
Not open for further replies.
Back
Top