esp32 D1 Mini connecting SD Card

If doesn't fit into any other category ....
Post Reply
peridot
Posts: 46
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 7 times
Been thanked: 93 times

esp32 D1 Mini connecting SD Card

Post by peridot »

Hmmm, just trying one of these modules with SD Card without success, it will not recognize the SD Card (directly wired)
This is an established set up, if I then substitute a 30 pin ESP32 module it will recognise the SD with no problems. I am wondering if this is some kind of timing issue the MISO line does not seem to be responding correctly. Has anyone else tried / solved this combination.
User avatar
cicciocb
Site Admin
Posts: 1900
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 407 times
Been thanked: 1269 times
Contact:

Re: esp32 D1 Mini connecting SD Card

Post by cicciocb »

I think you should put some pullup resistors on the SDCARD pins.

This was suggested by PeterN into another thread (maybe on the old forum).
peridot
Posts: 46
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 7 times
Been thanked: 93 times

Re: esp32 D1 Mini connecting SD Card

Post by peridot »

Pull ups unfortunately are not helping for this combination unfortunately. Actually all the documentation I have read discourages pull ups on the SPI lines as they are intended to have a Tri state condition, perhaps the CS could benefit but not in this situation as I said.
I will have to stick with my larger 30 pin module when using SD
Thanks for your suggestions
User avatar
PeterN
Posts: 366
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 171 times
Been thanked: 203 times
Contact:

Re: esp32 D1 Mini connecting SD Card

Post by PeterN »

Hi Peridot and ciccioCB

As CiccioCB mentioned I had a similar problem some times ago and finaly ended with an additional pullup at the CS
My post from the old forum:
My (finally successful) experiences with different MicroSD cards and ANNEX 1.38RC4:

I am currently using:
# M5Stack (DIO with 40Mhz)with internal SPI-MicroSD interface or
# ESP32 NodeMCU (DIO with 80Mhz) with external SPI microSD interface HW-125
# a "new" 8GByte SHDC-MicroSD Class10 card
# An "old" 512MB microSD card.

My first experience with detecting SD cards on both ESP32s was:
1 ->Both SD cards were detected on the M5Stack with Annex 1.38RC4 IMMEDIATELY.
2.-> On the NodeMCU with FW-125 both SD cards were NOT recognized at first.

After the following changes I was able to detect both cards on the NodeMCU as well:
#1 I pulled the GPIO4-CS signal on the HW-125 to 3V3 with a 10K pullup resistor. Then the fast SHDC card was detected, but NOT the slow old SD card.
#2 The NodeMCU was fashed with DIO and 40MHz flash speed. THEN ALSO THE SLOW OLD SD-CARD WAS DETECTED IN THE FW-125-INTERFACE.

The external FW-125-SD-card interface with ESP32-NodeMCU worked for me therefore finally
- with the additional 10k CS pull-up resistor and
- 40MHz Flash speed at DIO-Flash interface
- for all my slow and fast SD cards.

I come to the conclusion that
- I will use only fast Class 10 SHDC cards in the future and
- I have to insert the additional 10k pull-up resistor at the FW-125
- I can then set to DIO and 80MHz.

This should also give the highest performance.
B3510A8A-E5D2-4832-8E8D-D26876FB95B8.jpeg
You do not have the required permissions to view the files attached to this post.
its1000
Posts: 76
Joined: Thu May 20, 2021 6:57 pm
Has thanked: 3 times
Been thanked: 1 time

Re: esp32 D1 Mini connecting SD Card

Post by its1000 »

hello all.
I imagine it is not possible to use the SD of this ESP32 because the sd is not connected to the correct GPIO?

Post Reply