Hi!
I'm trying to connect the Adfruit Breakout Board Micro-SD card reader to my ESP32 Feather (<https://www.adafruit.com/product/3405>). I have carefully looked into the wiring and am almost sure that it is supposed to work: I'm wiring as following.
3V ----> 3V
GND ---> GND
CLK ---> SCK (pin number 5)
DO ----> MISO (Pin number 19)
DI ----> MOSI (pin number 18)
CS ----> CS (pin number 33)
But, for some reason when using the example in the Arduino IDE: examples -> SD(ESP32) -> SD_Test, the serial port out puts Card Mount Failed.
Does someone have any exprience with connecting the ESP32 feather to the SD Card reader and can help me with this problem? Thanks!
Connecting esp32 to sd card reader
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- reschue
- Posts: 157
- Joined: Sun Jun 17, 2018 4:36 pm
Re: Connecting esp32 to sd card reader
No experience with either of the products you are using, but here goes.....
From the SD card documents on the Adafruit site, it looks like the pin labeled "3.3V" is actually the output from the on-board 5V-to-3.3V regulator. I don't see anything in the TI LP2980 data sheet that says you can't "back-drive" the output pin with no 5V applied, so operating it this way might be OK. (if it wasn't it'd probably crash the ESP32's 3.3V supply) But it looks a bit suspicious to me.
While you're waiting for a more qualified response, try running the SD card off of 5 Volts and see what happens.
Regards,
Rick
From the SD card documents on the Adafruit site, it looks like the pin labeled "3.3V" is actually the output from the on-board 5V-to-3.3V regulator. I don't see anything in the TI LP2980 data sheet that says you can't "back-drive" the output pin with no 5V applied, so operating it this way might be OK. (if it wasn't it'd probably crash the ESP32's 3.3V supply) But it looks a bit suspicious to me.
While you're waiting for a more qualified response, try running the SD card off of 5 Volts and see what happens.
Regards,
Rick
- emmadriesse
- Posts: 2
- Joined: Fri Feb 28, 2020 7:49 am
Re: Connecting esp32 to sd card reader
Dear Rick,
Thank you for trying to help me! I have now connected the 5V pin of the card reader to the so called 'USB' pin of the esp32. The USB pin gives an output of 5V to the card reader (as measured with a multimeter), though still the same problem appears unfortunatly :(
Thank you for trying to help me! I have now connected the 5V pin of the card reader to the so called 'USB' pin of the esp32. The USB pin gives an output of 5V to the card reader (as measured with a multimeter), though still the same problem appears unfortunatly :(
- reschue
- Posts: 157
- Joined: Sun Jun 17, 2018 4:36 pm
Re: Connecting esp32 to sd card reader
I figured that might be the case. Here's my next round of questions:
Sorry, but I have to ask - there IS an SD card in the socket and it is inserted correctly?
Do you have access to an oscilloscope (or better, a logic analyzer)? If so, take a look at the traffic on the MOSI, MISO, SCK, and CS lines (at the SD board), just to make sure there's nothing obviously wrong (shorts, opens, bad voltage levels, etc).
Have you used this CPU board with any other SPI peripherals that would give you some confidence that the CPU is OK?
Don't be discouraged. Almost every time I bring up a new chip on SPI or I2C I have to drag out the test equipment at some point to see what's wrong.
Sorry, but I have to ask - there IS an SD card in the socket and it is inserted correctly?
Do you have access to an oscilloscope (or better, a logic analyzer)? If so, take a look at the traffic on the MOSI, MISO, SCK, and CS lines (at the SD board), just to make sure there's nothing obviously wrong (shorts, opens, bad voltage levels, etc).
Have you used this CPU board with any other SPI peripherals that would give you some confidence that the CPU is OK?
Don't be discouraged. Almost every time I bring up a new chip on SPI or I2C I have to drag out the test equipment at some point to see what's wrong.
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Connecting esp32 to sd card reader
Please post a photo of your setup showing how everything is wired together.
- mickael_pruvost
- Posts: 3
- Joined: Wed Jul 01, 2020 6:01 am
Re: Connecting esp32 to sd card reader
Hello,
I have exactly the same problem when I work with "Adafruit Micro SD SPI or SDIO Card Breakout Board - 3V", PRODUCT ID: 4682
and my feather esp32 huzzah board . I did the following connections
3V ----> 3V
GND ---> GND
CLK ---> SCK (pin number 5)
DO ----> MISO (pin number 19)
DI ----> MOSI (pin number 18)
CS ----> CS (pin number 33)
my sd card is formatted
but still the same message "Card Mount Failed"...
Do you have any idea where this can come from?
thanks
Mickael
I have exactly the same problem when I work with "Adafruit Micro SD SPI or SDIO Card Breakout Board - 3V", PRODUCT ID: 4682
and my feather esp32 huzzah board . I did the following connections
3V ----> 3V
GND ---> GND
CLK ---> SCK (pin number 5)
DO ----> MISO (pin number 19)
DI ----> MOSI (pin number 18)
CS ----> CS (pin number 33)
my sd card is formatted
but still the same message "Card Mount Failed"...
Do you have any idea where this can come from?
thanks
Mickael
- adafruit_support_carter
- Posts: 29168
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Connecting esp32 to sd card reader
@mickael_pruvost Please start a new thread for your issue and post photos of your setup showing how everything is wired together.
- gryphon68
- Posts: 4
- Joined: Fri Sep 08, 2017 7:27 am
Re: Connecting esp32 to sd card reader
What is the Logic Level Voltage of the MicroSD Board when 5v is supplied to the regulator?
Is the level converter shifting it back to 5V?
Is the level converter shifting it back to 5V?
- darkmoon3d
- Posts: 57
- Joined: Wed Jul 22, 2015 3:51 am
Re: Connecting esp32 to sd card reader
I had success with same setup but with following pin layout:mickael_pruvost wrote:Hello,
I have exactly the same problem when I work with "Adafruit Micro SD SPI or SDIO Card Breakout Board - 3V", PRODUCT ID: 4682
and my feather esp32 huzzah board . I did the following connections
3V ----> 3V
GND ---> GND
CLK ---> SCK (pin number 5)
DO ----> MISO (pin number 19)
DI ----> MOSI (pin number 18)
CS ----> CS (pin number 33)
my sd card is formatted
but still the same message "Card Mount Failed"...
Do you have any idea where this can come from?
thanks
Mickael
3V - 3V
GND - GND
CLK - SCK (5)
SO - MOSI (18)
SI - MISO (19)
CS - (33)
Please be positive and constructive with your questions and comments.