Teensy 3.1, Noise in SD record/play with minimal components

JeonLab

New member
Hello.

I have searched this forum and Google for solutions for my issue, but couldn't find any (yet).
I'm trying to make a minimal record (voice) and play device using Teensy 3.1, ADC input circuit (in Teensy Audio library github), microphone with a simple npn transistor amplifier, and DAC output with an earphone. No audio shield or any other fancy stuff.

I tried direct connection (ADC1 to DAC1) without recording and the sound quality was fine, negligible noise. But with the recording set up (ADC to Queue and playSdRaw to DAC), there is constant loud noise. The noise is very similar to the one in this post.

I also tried to disconnect A2 (ADC) and record expecting just low level white noise since there is no mic-amp input, but the noise was still there.

The power source was lipo battery and I tried bunch of different size of electrolytic capacitors to the AGND and VCC, but didn't help.

Playing WAV file from the SD card was also fine. Actually the sound quality with this minimal configuration was quite impressive. So, I don't really think this is some sort of ground loop or decoupling issue. If it is, the noise should be there when I play the WAV file as well. Please correct me if I'm wrong.

Any suggestions and advice would be greatly appreciated.

Jinseok
 
I have done some more tests. I updated the setting as shown below to direct the ADC input to DAC and also to QUEUE to record to the SD card.

// GUItool: begin automatically generated code
AudioInputAnalog adc1;
AudioRecordQueue queue1;
AudioPlaySdRaw playRaw1;
AudioOutputAnalog dac1;
AudioConnection patchCord1(adc1, 0, queue1, 0);
AudioConnection patchCord2(adc1, 0, dac1, 0);
AudioConnection patchCord3(playRaw1, 0, dac1, 0);
// GUItool: end automatically generated code

This is only part I changed in the example Recorder code.

Again, from DAC, with an earphone, the sound was so clear with negligible white noise. But as soon as I press the REC button (pull down Pin0), the loud noise starts and it's recorded to the SD card. I took the RAW file and the noise pattern looks like below picture.
Screenshot from 2019-12-03 19-30-36.png

As I explained in my previous post, playing WAV file or direct connection from ADC to DAC do not have this noise. Is there anything I can do to get rid of the noise? Please help!

Thanks.

Jinseok
 
how did you connect sdcard to T3.1?
can you provide picture of wiring?
what code did you use?
schematics of ADC buffer?
 
Dear WMXZ,

Thank you for your reply.
I have an Adafruit 1.3" TFT LCD 240x240 with SD card socket and the T3.1 is connected to it. The CS pin for the TFT is 10 and for the SD card is 4. I know a breadboard can pick up noise from power line or even from the air (any RF), but I need to test the circuit first before designing and ordering PCB, so yes, I used a breadboard to put them together. Even the T3.1 is not soldered to header or any PCB yet. That's why I tested ADC to DAC directly to see if this rough wiring picked up any RF or power line noises, but as I mentioned in earlier post, other than very low level white noise, the sound quality is perfectly fine.

The code I used is as I described before, the same as the example Recorder in the library. The audio input circuit for the ADC is also taken from the Audio Library page for mono.
I was thinking to add some band pass filters on the mic input and/or on the DAC output, but as I mentioned before, direct connection ADC to DAC and WAV file play from the SD card do not have any noise issues. Only when I record to SD card, this kind of noise is added. It seems to me that the noise is not added by any electrical signal but by the writing process to the SD card.

Thank you.
 
Thank you, WMXZ for your quick advice. I will do that soon once my other tests are done. I also think I will need a pre-amp for the mic input. I guess the SNR is too low when the ADC is converted into raw data.
I will report back with the results soon.

Thanks.
 
Did you get this figured out? I having the same problem. It's only at random. Sometimes It will, other times it won't. The sound in my case is good even while recording, but the playback of the file is this patterned noise.
 
One thing I've noticed is you've conected two outputs to the same input on dac1 - this may well be the issue.

Use a Mixer4 if you want to combine signals. The rule is only one output into any input.
 
Back
Top