ESP32 Vs Micro SD issue

WoolySheep
Posts: 15
Joined: Wed Jan 06, 2021 9:46 am

ESP32 Vs Micro SD issue

Postby WoolySheep » Sun Jan 24, 2021 7:58 pm

Hi all
I have been looking at some projects that need me to read/write to Micro SD Cards. I followed the 'standard' SD Library @ https://github.com/espressif/arduino-es ... braries/SD. I took my soldering iron out and was able to recreate the below, it worked a dream.

Image

I don't like the idea though of soldering wires to a SD card adapter as it will break after a while. So, seeing 9 pins on it, but only 8 pins on the Micro SD card I took the adapter apart to see how it was wired up.

Image

I noted that Pin 4 on the adapter wasn't actually connected to the Micro SD card. The diagram says to put it to GND. As expected if you don't put it to GND, it still works.

I then write down the Pins that I used that worked (on the left below) and made adjustments to how they actually connect on the Micro SD card (on the right).
Image

I ordered a Micro SD card adapter, sadly I didn't realise the pitch was 2mm, so won't plug into a solderless breadboard. I took the card adapter apart so that I could confirm which pin goes where.

Image

Then, since the card goes in with the pin connectors at the bottom, I had to revers the pin direction. I then labelled up what should connect to what as below:
Image

The below is how it should wire up I believe, but sadly it does not work. When I run the code to check for an SD card & to write to it, it fails. I have checked the SD card and code with my other ESP32 that is using the original plastic adapter and it works perfectly, so assume it can only be my wiring of the adapter.
Image

Does anybody have any suggestions on where I went wrong?

Many thanks for any advise you can give.

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 Vs Micro SD issue

Postby chegewara » Sun Jan 24, 2021 10:20 pm

Image

This is difference between SD card and micro SD. You can use SD_MMC or SD SPI, depending how you wire it.

WoolySheep
Posts: 15
Joined: Wed Jan 06, 2021 9:46 am

Re: ESP32 Vs Micro SD issue

Postby WoolySheep » Sun Jan 24, 2021 10:45 pm

Thank you @chegewara for your comment.
I am though using a Micro SD card in a plastic adapter (which works) and then direct to Micro SD card and it does not work. That is what I don't understand. Do you see an error in my wiring?

chegewara
Posts: 2362
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 Vs Micro SD issue

Postby chegewara » Mon Jan 25, 2021 12:09 am

From pictures i dont see any obvious problems. It may be bad contact or soldering issue.

morphee909
Posts: 5
Joined: Wed Apr 19, 2023 8:28 am

Re: ESP32 Vs Micro SD issue

Postby morphee909 » Wed Apr 19, 2023 8:45 am

Did you resolve the problem ?

I've just made a custom board with a Wrover IE module, everything is working except the SD card.

My pinout is the same as yours, I don't see any errors after multiple checks.

I have 3V3, no shorts, and continuity check for SPI data lines and clock between the SD socket and the wrover module is ok.

I thought maybe SPI is not correctly configured but I run a little code to serial print the SPI configuration of my board and it prints what I expected.

So I don't know what to do now. I got 2 assembled boards from JLCPCB and same problem for both.

The SD socket I use is https://jlcpcb.com/partdetail/Sofng-TF15x15/C111196

Does anybody have an idea ? :|

WoolySheep
Posts: 15
Joined: Wed Jan 06, 2021 9:46 am

Re: ESP32 Vs Micro SD issue

Postby WoolySheep » Thu Apr 20, 2023 6:40 am

Hi,
Sadly not, I still have the issue. When I solder wires onto an SD to Micro SD card reader and put in a Micro SD card, I can read and write to it fine. I just can't to anythign else.

Regards
Alan

morphee909
Posts: 5
Joined: Wed Apr 19, 2023 8:28 am

Re: ESP32 Vs Micro SD issue

Postby morphee909 » Thu Apr 20, 2023 6:56 am

Now it works. I think I put an incompatible microSD card. It does not work with a 32GB SanDisck Ultra, but when I put a 32GB SanDisk Extreme it works without any problem. But I don't know why.

morphee909
Posts: 5
Joined: Wed Apr 19, 2023 8:28 am

Re: ESP32 Vs Micro SD issue

Postby morphee909 » Thu Apr 20, 2023 7:06 am

Here is my circuit. The only difference are the pull-up resistors. Maybe you could try with pull-up and a filtering capacitor between VDD and GND.
microSD circuit.jpg
microSD circuit.jpg (434.21 KiB) Viewed 6464 times

WoolySheep
Posts: 15
Joined: Wed Jan 06, 2021 9:46 am

Re: ESP32 Vs Micro SD issue

Postby WoolySheep » Thu Apr 20, 2023 4:31 pm

Hi @morphee909,
What are you using for the SD_VDD?

Thanks
Alan

morphee909
Posts: 5
Joined: Wed Apr 19, 2023 8:28 am

Re: ESP32 Vs Micro SD issue

Postby morphee909 » Thu Apr 20, 2023 5:40 pm

SD_VDD is connected to 3V3, there is a ferrite bead (FB2) between the 3V3 regulator and SD_VDD pin. The regulator is a SY8089AAAC.

Who is online

Users browsing this forum: Baidu [Spider] and 127 guests