0

I am trying to connect CATALEX MicroSD Card adaptor to new NodeMCU V3 and PIN configuration are as below,

NodeMCU  ---------> SD Card
GPIO13 (D7) ------> MOSI
GPIO12 (D6) ------> MISO
GPIO14 (D5) ------> SCK
GPIO15 (D8) ------> CS
VCC (3.3V) -------> VCC
GND --------------> GND

Tested above setup with QuickStart program from SdFat library in Arduino IDE. But it gives error output as below,

SPI pins:
MISO: 12
MOSI: 13
SCK:  14
SS:   15

SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10

Enter the chip select pin number: 15

Disabling SPI device on pin 10
Can't access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X20,0XFF

SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Does another SPI device need to be disabled?
Is there a wiring/soldering problem?

errorCode: 0x20, errorData: 0xff

chipSelect is 15.

Also, I am using SanDisk 16GB Micro SDHC class 4 Memory Card.

I have tried googling with the error but did not find solution. Please help me.

  • use the SD library. the esp8266 version. it is a part of the esp8266 arduino package. you can find the examples in IDE Examples menu – Juraj Jul 18 '18 at 16:55
  • Tried CardInfo program with SD library as well and it gives initialization failed error. – Akshay Jul 18 '18 at 17:02
  • the adapter has a 5 V to 3.3 V conversion? like this one? arduitronics.com/product/210/microsd-card-adapter-catalex – Juraj Jul 18 '18 at 17:20
  • @Juraj: The NodeMCU's SPI pins are 3.3V-ish. – gone Jul 18 '18 at 17:49
  • @yeti, I know and if the SD adapter is 5 V then there is the problem – Juraj Jul 18 '18 at 18:39
0

SD cards work on 3.3 V, so the adapter has 5 V to 3.3 conversion for power and signal, to connect SD card reader to a 5 V MCU. You can't connect this SD card adapter to an 3.3 V MCU like the esp8266.

  • but I would connect the adapter to 5V pin for a test – Juraj Jul 19 '18 at 5:54
  • NodeMCU has VIN pin which shows voltage around 4.25 V, can this be connected to VCC of the SD card? Or should I use external 5 V power supply? – Akshay Jul 19 '18 at 6:25
  • I work with Wemos and there is a 5 V pin. I thought NodeMcu has it too. I don't know it the Vin of NodeMcu can be used to power devices. – Juraj Jul 19 '18 at 6:59
  • Thank you, it worked with VU pin of nodemcu which provide 5V supply – Akshay Jul 19 '18 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.