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.

asked Jul 18, 2018 at 16:54
7
  • 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 Commented Jul 18, 2018 at 16:55
  • Tried CardInfo program with SD library as well and it gives initialization failed error. Commented Jul 18, 2018 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 Commented Jul 18, 2018 at 17:20
  • @Juraj: The NodeMCU's SPI pins are 3.3V-ish. Commented Jul 18, 2018 at 17:49
  • @yeti, I know and if the SD adapter is 5 V then there is the problem Commented Jul 18, 2018 at 18:39

2 Answers 2

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.

answered Jul 19, 2018 at 5:08
5
  • but I would connect the adapter to 5V pin for a test Commented Jul 19, 2018 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? Commented Jul 19, 2018 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. Commented Jul 19, 2018 at 6:59
  • Thank you, it worked with VU pin of nodemcu which provide 5V supply Commented Jul 19, 2018 at 13:56
  • This is brilliant, works as a charm surely. I have just tried it out was facing a similar challenge, though for my case the output voltage on VIN is 4.75V Commented May 4, 2021 at 9:55
1

If you are giving power to nodemcu through USB cable. SD card VCC can be connected to the VIN pin of nodemcu ESP8266. I faced the same problem

NodeMCU V3 + SD Card with Arduino IDE Not working

but after connecting VCC of SD Card to VIN pin of nodemcu. it worked.

Thanks for the helping me Mr. Juraj

answered Jun 24, 2020 at 12:45

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.