ESP32 Vs Micro SD issue
-
- Posts: 15
- Joined: Wed Jan 06, 2021 9:46 am
ESP32 Vs Micro SD issue
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.
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.
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).
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.
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:
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.
Does anybody have any suggestions on where I went wrong?
Many thanks for any advise you can give.
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.
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.
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).
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.
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:
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.
Does anybody have any suggestions on where I went wrong?
Many thanks for any advise you can give.
Re: ESP32 Vs Micro SD issue
This is difference between SD card and micro SD. You can use SD_MMC or SD SPI, depending how you wire it.
-
- Posts: 15
- Joined: Wed Jan 06, 2021 9:46 am
Re: ESP32 Vs Micro SD issue
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?
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?
Re: ESP32 Vs Micro SD issue
From pictures i dont see any obvious problems. It may be bad contact or soldering issue.
-
- Posts: 5
- Joined: Wed Apr 19, 2023 8:28 am
Re: ESP32 Vs Micro SD issue
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 ?
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 ?
-
- Posts: 15
- Joined: Wed Jan 06, 2021 9:46 am
Re: ESP32 Vs Micro SD issue
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
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
-
- Posts: 5
- Joined: Wed Apr 19, 2023 8:28 am
Re: ESP32 Vs Micro SD issue
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.
-
- Posts: 5
- Joined: Wed Apr 19, 2023 8:28 am
Re: ESP32 Vs Micro SD issue
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.
-
- Posts: 15
- Joined: Wed Jan 06, 2021 9:46 am
Re: ESP32 Vs Micro SD issue
Hi @morphee909,
What are you using for the SD_VDD?
Thanks
Alan
What are you using for the SD_VDD?
Thanks
Alan
-
- Posts: 5
- Joined: Wed Apr 19, 2023 8:28 am
Re: ESP32 Vs Micro SD issue
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: No registered users and 78 guests