SD Card stopped being detected (kinda urgent)

shivamgrover

New member
Hi guys, I got a teensy 4.0 and the audio board with SD card slot. I have been having some inconsistent issues with the SD card, I'll describe them below:

Yesterday I took a used non-formatted sandisk 128GB SD card and tried that, but the Teensy could not detect it.

Today, I purchased a new Kingston 64 GB SD card, and plugged it in, and the Teensy was able to detect it, and the SDCardTest example would give the size and type or the card correctly. I then added 4 randomly downloaded wav files from the internet to the SD card, changed their names to SDTEST1.WAV, SDTEST2.WAV and so on. The list files example was able to detect them but the WavFilePlayer would play them but I couldn't hear anything on the earphones.

I thought maybe the wav files are not in the correct format, so I decided to download the one's officially posted here. When I listed the files using the list files example, it showed the files but all had 0 size. And obviously it wouldn't play.

I plugged in my SD card on to my laptop to see what happened, and windows told me that the SD card needs to be fixed, and I followed the prompt and it "fixed" it. But since then I am not able to get the Teensy to read my SD card. On the SDCardTest example, it keeps saying "SD card is not connected or unusable :-(".

I tried formatting it in various ways, FAT16, FAT32, ext4, exFAT. I even used this software which I found linked in one of the previous forums with a similar question, but the Teensy could never find my SD card.

I checked all pins between the teensy and the audio board as well, and they all seem fine. Nothing seems broken or shorted.

Just to clarify for the wav files, the earphones work fine if I play a random frequency, or if I sample from the mic itself. Only the wav files were having some issue. However, that's a problem for future me, atleast right now I would just like to get my SD card working again. I don't wanna buy another one (atleast until I know what went wrong), and it would be great if this one could be fixed.

Sorry for the urgency, I just have a submission due on Sunday :( Any help would be greatly appreciated! Excited to finish my Teensy build!
 
What version of TeensyDuino is in use? 1.59 beta 4 should release soon - the beta 3 version has some changes that may not relate or help.

Were both cards reformatted with the sdCard Formatter? In the past that has worked for proper formatting.

Having the PC correct the 'needs to be fixed' isn't normal from Teensy usage AFAIK. Especially if only reading files written and 'safelly removed' from a PC, and then safely inserted before the sketch starts.

Perhaps check the soldering as well. With good SD cards and proper soldering the example sketches should run with the proper PIN #defines in use.
 
I am using the latest shown on the Boards Manager, i.e. 1.58.1
I didn't format the first SD card since it had some important stuff, and I understand why it's not recognised and that's okay.

But the new card was recognised the first few times, and then stopped getting recognised. After that I did use the SD Card formatter. One thing to note is that serial monitor printed "Card type is SDHC" when it was working, but the SD Card formatter shows Type as SDXC.


1700693912349.png


1700693812245.png




Another thing I would like to mention is that last night when I reached home, I just connected the teensy once again with the SD card in it, and it worked. I didn't format it or change anything, it worked as is. But now I came to my lab, and tried it again, it's giving me the same error. In the screenshot below, the first output is when it worked last night, and the subsequent ones are from right now. I checked the soldering again, and I formatted it again with the SD card formatter. It still gives the same error.

1700694101939.png




Having the PC correct the 'needs to be fixed' isn't normal from Teensy usage AFAIK. Especially if only reading files written and 'safelly removed' from a PC, and then safely inserted before the sketch starts.
You are right, at one point earlier I inserted the card into an android phone since I wanted to copy the WAV files onto it but I didn't have a card reader. The android phone created a bunch of folders etc onto it. But Now I am using a card reader with my laptop and have properly formatted the card multiple time. Is it possible that the android device permanently changed something? But then it was also working last night. The inconsistency is weird.


Perhaps check the soldering as well. With good SD cards and proper soldering the example sketches should run with the proper PIN #defines in use.
Yeah, I'll do it again but I think it's all connected well and there's no short circuit. As for the pins, I just ran the default example that came with the library. It did work a few times but then stopped working, which makes me think the pin definitions should be correct otherwise it wouldn't work at all.

Any help would be greatly appreciated!
 
UPDATE: FIXED

So basically I redid the solder, and it seems like that fixed the issue. Both my SD cards are being detected now, and I am able to play WAV files.

Hopefully it stays this way until my presentation next week :)

Thank you for the help and suggestions @defragster !
 
Back
Top