SD card initialization failed

  • SD card module

You may see

initialization failed!
Card failed, or not present
SD fail

Why it happens

  • The card isn't FAT32 (cards over 32 GB usually aren't).
  • The chip-select pin differs from the code.
  • Weak power or loose wires.

How to fix it

  1. Use a card of 32 GB or less, formatted FAT32.
  2. Match the CS pin in SD.begin(4).
  3. Wires: MOSI 11, MISO 12, SCK 13 on an Uno.
  4. Give the module 5 V if it has a regulator.

It worked if: The SD > CardInfo example prints the card size.

From the official documentation. From the Arduino SD library's notes. Sources: Arduino SD library.

Didn't help? Search another error or ask us.