Trying to get ESP32 to run example sketch SD_TEST

I see lots of examples for interfacing ESP32 to a SD card. I’ve been trying to get one to work for two days though and NO luck. I made my own SD card breakout by soldering 2.54mm pin header an SD card adapter… I have a breakout board on order but hasn’t arrived yet.

My goal is to eventually create an audio player (HERE) but I digress. Can anybody tell me if I’ve wired this correctly? I have my schematic below…

Also if anybody has a spec or datasheet that outlines the signal breakdown / transmission protocol for accessing SD via SPI would be great. I’m probing everything with my oscope. SPI is simple enough to understand but not for sure what I’m looking at. MOSI, CS, & SCLK work fine but MISO is not responsive (data from the card). I’ve tried multiple cards… tested them in PC and they work but no luck with my prototype.

Also my ESP32 thing plus is outputting 4.0V on the 3.3V pin. I divided it down to 3.2V for input to SD card. Not sure what tolerance is voltage input to SD card.


NOTE: I define my pins for the referenced Arduino example sketch below…

//Uncomment and set up if you want to use custom pins for the SPI communication
#define REASSIGN_PINS
int sck = 18;
int miso = 19;
int mosi = 23;
int cs = 5;

How is the physical SD card connected? Also maybe take a strictly overhead photo somewhat closer so folks can see the connections/pins

Thanks @TS-Russell I got a PCB with SD card slot / breakout board and tore the circuit down not 5 minutes ago. So unfortunately, I cannot take a picture… Next time I’ll get a close up / wire a little cleaner.

Breakout works like a champ. Maybe issue was my own stupidity… Can a person modify an adapter to work like this (photo below). No pins were shorted (unsure of broken connections internal to adapter tho).

I suggest you check the SD card separately with an Arduino. Check with the in-built SD card reading example of Arduino IDE.

Lol yea I’d guess one or more of those pins were the issue…yes, in theory you can mod stuff like this but soldering to tabs housed in plastic is usually tricky and you introduce a lot of potential points of failure.

Glad to hear it’s working now; cool project!

Tried that. Per my last post, I got the SD card to work. Issue was the adapter. I must have melted or broken a connection trying to solder my former SD card adapter like that.

Thanks for the help! My ultimate design may forego the 5 to 3.3V converter which is on the current SD breakout board I’m testing.

The solution was my I don’t have the delicate touch to solder on plastic backed pins. I must have broken a connection. Using a breakout board worked like a champ wired as I had in my original schematic.

I’ve made the same adapter and it worked terrifically. Just remember you can’t use it on any 5 volt uC, it’s gotta be a board that has 3.3 volt I/O or you risk blowing up your SD card.

2 Likes