Teensy3.2 Audio Shield with SDcard problems- Intermittent

Status
Not open for further replies.

okwatts

Member
I have been struggling to use my new Teensy 3.2 and the audio shield with an SDcard for the audio tutorial. This has taken a week or 2 of my time including emails to Robin and Paul outlining my issues. Paul suggested posting here in the forum. The issue is the Sdcard is intermittent, it appears to be related to how long the Teensy combo is powered up.
As a background I added the 25K pot, microphone with washer and Winbond 25Q128JV spi flash chip to the audio shield. I added pins to the shield and sockets with long pins to the Teensy so I could place the combo on a breadboard. I started to work through the audio tutorial and it passed the hardware test, played a wav file from the Sandisk 32GB Ultra SDcard just fine. I was working my way through the section 2 examples and was doing the optional section on changing the delays when the wav file stopped playing. I then got the message that "Unable to access the SD card". Since then I have tried retouching all solder connections I made, I removed the audio shield and attached an external SDcard breakout using the same pins as the shield uses and it passes the SD card test in the examples. I have been trying to take adequate pictures and video to show what is happening but in essence the issue that occurs is as follows. Using the provided example for testing the audio shield hardware found in Examples->Audio->tutorial->TestTutorialkit, the pots,switches and microphone all work, I get to hear Paul's voice telling me the knobs and switches, buttons are registering and the example wav file begins to play, after about 10 seconds there is a loud buzz and the Teensy and demo no longer respond to the buttons to stop, reloading software allows all the basic hardware to function except playing the wav file from the sdcard. (Paul's voice tells me that there is no sdcard). It appears to be time/heat related as if I wait some minutes before retrying I can get some sound from the Sdcard before it quits again. As additional info, the SPI flash chip shows a similar intermittent issue using the examples under SPIFlash for writing, reading and erasing such that it sometimes works well and other times complains about not being able to access the SPIFlash chip. All other hardware for playing samples in the tutorial seem to work, which seems to implicate the SPI part of the circuitry on the audio shield, as the external SDCard has never shown any indication of not working. Possibly it is the Teensy3.2 but it's hard to say conclusively which is as fault.
Any suggestions would be welcome.
 
Puzzling - looks like you self built the Audio Tutorial board for hardware setup. I have one of those from PJRC here -just soldered on a Winbond FLASH.

What code are you running and for the Flash - that wasn't included in the tutorial?

Since you were making 'optional section' code changes - if you could post the code used that is not working it might be telling.
 
Watched the video.

Sure seems like a cold solder joint or other intermittent connection. Check pins 7, 10, 12, 14 (the ones used by the audio shield for the SD card). Any chance you could show us photos of the bottom side?

While I don't see anything on the 5 pins between pin 12 & 13, I should mention another case where someone had added a socket for those pins and one of the legs wasn't trimmed and was going into the breadboard, which shorted that other pin to a signal when it was plugged into the breadboard. I believe it may have been VBAT shorted to pin 12. When running stand-alone, not plugged into the breadboard, it worked flawlessly. When inserted to the breadboard, it sort-of worked but was unreliable. Turned out the extra signal added extra loading to the SPI bus, where it could usually work but would occasionally fail. I'm bringing this up only because the symptoms where so very similar. Maybe try running just the WAV file player example and test with the Teensy+audio plugged and unplugged from the breadboard.

Also inspect your soldering, just to make sure there isn't a solder bridge between pin 12 and VBAT, or anything else shorted to pins 7, 10, 12, or 14. Adding extra loading on those pins could cause this sort of problem where it works (just barely) but eventually fails within several seconds.
 
Thanks for the suggestions Paul, I will check this, particularly the breadboard issues. I have retouched all the solder joints both on the audio shield and the Teensy sockets prior to the video and didn't see any change but will double check and send before and after pictures. My other concern in relation to this was the sockets on the Teensy. They are flush with the circuit board and there is not a lot of space, if any, between the socket plastic and the pins on the MCU. I was thinking of trying to desolder the sockets and raise them slightly but doing that for 48 pins without damaging the board is a daunting proposition. My only comment is that when I tried the external sdcard with the Teensy, the Teensy was plugged into the breadboard and it never gave any issues with the SDTest software.

@defragster Thanks for the comment, I was using the code from the Examples for the teensy that is under the SPIFlash section, RawHardwareTest and EraseEverything. The only changes were for the pin assignments for the audio shield. For the audio tutorial I was just uncommenting some of the code that was suggested in the tutorial for trying delays and or turning pots for volume change and such.

I'll try and get some time later today to try and then report back.
 
They are flush with the circuit board and there is not a lot of space, if any, between the socket plastic and the pins on the MCU.

That's fine. They're designed to be flush with the PCB.


I was thinking of trying to desolder the sockets and raise them slightly but doing that for 48 pins without damaging the board is a daunting proposition.

Don't recommend trying that desoldering. Even with excellent tools, odds of damage to the PCB are high.
 
Ok tried resoldering all connections including the SDcard. This improved things although there were some anomalies
when running the mixer demo. After some time (say 5 to 10 minutes) I noted that turning knob A3 that
when it did work the value returned was greater than 512 out of 1023 at only about 15% of the knob range, whereas it had read
the full range 0 to 1023 over the complete range of the pot. I spent about 30 minutes playing about and testing the voltage of the pot
with a voltmeter when it was connected to the audio shield. so the read value corresponded to the voltmeter. When unplugging the
shield the pot read back to normal so 512 at about 50% of the range. A2 was fine for the entire time. I reconnected the audio shield
and left the samples playing and returned a few hours later to having no audio at all, not from the Sdcard or the buttons or knobs when running the
TestTutorialKit sketch. even though the Teensy displayed the values of the buttons and knobs. There was no beep, no voice of Paul
and no music from the sdcard even though the Teensy indicated it was playing. I turned it off and the next morning all was working for about
two loops of the SDcard playing a wav file. Then the sounds stopped and there was no beep etc. This persisted even after power cycling.

Today I tried it again and for about a minute it worked as it was supposed to then again no sound.
This is different than the original problem and now makes the audio shield of no value.
I am ready to give up and am prepared to return to playing with Arduino, STM32 and ESP8266 and ESP32.
I may try my Teensy3.6 and TFT display at some point but at the moment I have lost patience with trying to do anymore tinkering
with something that definitely appears to suffer from being used for any length of time.
There is obviously something wrong with combo of the Teensy3.2 and the Audio Shield. It makes no difference whether it is plugged into the breadboard
or not as far as the odd behaviour is concerned
 
@okwatts: I ordered one of the PJRC Tutorial Kits pre-assembled with T_3.2 and audio board and buttons and pots on breadboard a year or two ago. Worked perfectly as I went through the whole tutorial - including adding and working with at least two different SPI TFT displays according to the directions.

That required no soldering on my part and worked without issue including whenever I powered it up recently and expect it would now as needed to go through it all over again. I just powered it up and it passes the hardware test with beep.

No pictures have been shown, unfortunately it seems the need for added corrective soldering suggests it wasn't right at first and the added heat and attention may have damaged something in the process even if it was all properly connected in the end.

… Just got the SD card in and this works as well: le > Examples > Audio > Tutorial > Part_1_03_Playing_Music
 
Last edited:
@okwatts: I ordered one of the PJRC Tutorial Kits pre-assembled with T_3.2 and audio board and buttons and pots on breadboard a year or two ago. Worked perfectly as I went through the whole tutorial - including adding and working with at least two different SPI TFT displays according to the directions.

That required no soldering on my part and worked without issue including whenever I powered it up recently and expect it would now as needed to go through it all over again. I just powered it up and it passes the hardware test with beep.

No pictures have been shown, unfortunately it seems the need for added corrective soldering suggests it wasn't right at first and the added heat and attention may have damaged something in the process even if it was all properly connected in the end.

… Just got the SD card in and this works as well: le > Examples > Audio > Tutorial > Part_1_03_Playing_Music

Yes when it works it's great. I started with optimism and am now frustrated. I am more concerned that the sound now disappears which would indicate the sound chip is succumbing to this creeping disease. I suspected the Teensy for awhile but now I'm pretty sure that there is something seriously going bad with the audio board. I removed the audio board from the Teensy and wired it like I had the standalone SDcard and after it started from cold it failed after two tests of the SDCardTest Sketch whereas the external sdcard continues to pass the test no matter how long the teensy is powered. I also connected by wires the other pins used for the sound chip and again things only worked correctly for about 10 seconds when starting up, then failure with garbled sound then silence. The fact that the beep and stored samples have quit working is perplexing, as from the schematic, the SDcard and SPIFlash mem don't even appear to be connected to the sound chip. About the only thing left is to try and remove the SPIFlash chip and see if anything changes.
 
The soldered on Audio Board FLASH seems to be usable on T_3.2 with IDE 1.8.8 and TD_1.45 … ALSO IDE 1.8.9 TD_1.47:
Code:
Raw SerialFlash Hardware Test

Read Chip Identification:
  JEDEC ID:     EF 40 18
  Part Nummber: W25Q128FV
  Memory Size:  16777216 bytes
  Block Size:   65536 bytes

Reading Chip...

Writing 8192 signatures

Double Checking All Signatures:
  all 8192 signatures read ok

Checking Signature Pairs
  all 4095 signature pairs read ok

Checking Read-While-Write (Program Suspend)
  write 256 bytes at 256
  write time was 387 microseconds.
  read-while-writing: 00 00 00 00 15 F5 95 4B 
  test passed, good read while writing

Checking Read-While-Erase (Erase Suspend)
  erase time was 213037 microseconds.
  erase correctly erased 65536 bytes
  read-while-erasing: 00 00 00 00 15 F5 95 4B 
  test passed, good read while erasing

All Tests Passed  :-)

Test data was written to your chip.  You must run
EraseEverything before using this chip for files.
Flash Memory has 16777216 bytes.
Erasing ALL Flash Memory:
  estimated wait: 40 seconds.
  Yes, full chip erase is SLOW!
............................................
Erase completed
  actual wait: 45 seconds.
 
Last edited:
All right I have persisted and when retouching the solder points the sounds came back and the sdcard exhibited the previously temporary working behaviour. I then went the extra step and desoldered the spi flash chip and now after several hours of testing all appears to be working. As I wipe the egg from my face, it appears that my attempt to solder an SMD component was not particularly successful!! I have done a lot of soldering in the past but I'm relatively new to this technique. I accept the slings and arrows for berating and suspecting the audio shield. For now I will not attempt to add another SPI Flash chip, but I may get brave enough in the future should it become necessary. At least then I can compare to what was working and ensure that no changes occur with my "additions"!
Thanks to all who responded with helpful advice.
 
Status
Not open for further replies.
Back
Top