Glitch when Playing Audio from SD card in Teensy 3.2

Status
Not open for further replies.

ajay.dusa

Member
When Playing Audio from SD card through Teensy 3.2. I am getting Glitch in between at random intervals and it is happening in all audio files. Initially I thought, the problem would be in my WAV audio file. But the file is clean. I recorded the Audio using Audacity to see the comparison between the played audio from Teensy 3.2 and WAV file which I loaded onto SD card.
For Testing purpose I am using WavFilePlayerUSB.ino code. I have added the screenshot of the comparison and link for the audio file where I am getting the glitch.
I also tried using Linear Power Supply even that didn't solved the Problem. I don't know why it is happening with the Audio Shield.

https://drive.google.com/file/d/12boHFJwzo2XSV-vXT5HExOy6XyafSjFG/view

Recorded _Audio.JPG
 
2 questions.

How are you making this recording? Is it the headphone or line out of Teensy connected to the line-in on your PC?

Can you show a time scale somehow?

Without knowing more, I can at least say the most common problem is ground loops. You said you "tried using Linear Power Supply", but no info about that power supply or what other connections your had during the test. The best way to check for a ground loop is to run from a battery, or from a power supply you know is "floating". Unplug the USB cable during that sort of test, since the digital ground of USB is very likely to cause this sort of issue while you also have the analog ground of the line out connected to the same PC. Or you could try recording the a battery powered device that definitely has no ground connections, like a Zoom H1, if you having access to that sort of recording gear.
 
Sorry for the delay Paul.

For recording the audio I used Audacity with USB Cable connected to the PC and Teensy 3.2, after the recording I was listening to the audio using Headphone Jack of the PC.
I have attached the pictures with the TimeScale of the Glitch in Audio Signal.

For Testing purpose I connected Liner Power Supply --> Teensy 3.2 with AudioShield --> Speaker. I used Headphone Jack of Teensy AudioShield, then connected to the Speaker. As mentioned by you I also tried powering the Teensy using the Lithium polymer Battery and then tried playing the audio using Headphone Jack of Teensy , still I was getting the Glitches in between at random intervals.

Yesterday I then tried MP3-Player Lib
https://forum.pjrc.com/threads/27059-MP3-Player-Lib-with-example

to play the audio files. I thought the cause might be with my audio file because I was converting the mp3 file from mp3 format to wav. I even tried with mp3 format still the Glitches were there :(
 

Attachments

  • 1st_Clip.JPG
    1st_Clip.JPG
    108.2 KB · Views: 48
  • 2nd_Clip.JPG
    2nd_Clip.JPG
    55.4 KB · Views: 44
Finally, the Problem is solved. Issue was with the SD Card. I was using SanDisk 8GB Class 4 MicroSD card I replaced it with the Samsung Evo 16GB Class 10. There were No Glitches Nothing.
 
Status
Not open for further replies.
Back
Top