SD Card Initialization Failed

i have a nano every connected to a " WWZMDiB Micro SD Card Reader Module Compatible with for Arduino Raspberry Pi Support Mini SD Card SPI SD Interface" (Amazon.com: WWZMDiB Micro SD Card Reader Module Compatible with for Arduino Raspberry Pi Support Mini SD Card SPI SD Interface (6 Pcs) : Electronics) and im running the Example/SD/CardInfo and i get
`Initializing SD card...initialization failed. Things to check:

  • is a card inserted?
  • is your wiring correct?
  • did you change the chipSelect pin to match your shield or module?
    Note: press reset button on the board and reopen this Serial Monitor after fixing your issue!`
    i have tried absolutely everything i have ever seen on the internet. i have soldered the SD card board, i have switched around pins, i have NO idea what i am doing. i literally just need to log data from a thermometer to it.
    the wiring goes:
    3V3 > 3V3
    GND > GND
    CS > D10
    MOSI > D11
    MISO > D12
    CLK > D13
    i have formatted the cards with official tools from the sdcard website. i have tried 2 separate sd cards, and 2 separate boards.
    here is my setup:



    thanks

Show the sketch you are using.

/*
  SD card test

  This example shows how use the utility libraries on which the
  SD library is based in order to get info about your SD card.
  Very useful for testing a card when you're not sure whether its working or not.
  Pin numbers reflect the default SPI pins for Uno and Nano models.
  The circuit:
    SD card attached to SPI bus as follows:
 ** SDO - pin 11 on Arduino Uno/Duemilanove/Diecimila
 ** SDI - pin 12 on Arduino Uno/Duemilanove/Diecimila
 ** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila
 ** CS - depends on your SD card shield or module.
 		Pin 10 used here for consistency with other Arduino examples

  created  28 Mar 2011
  by Limor Fried
  modified 24 July 2020
  by Tom Igoe
*/
// include the SD library:
#include <SPI.h>
#include <SD.h>

// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;

// change this to match your SD shield or module;
// Default SPI on Uno and Nano: pin 10
// Arduino Ethernet shield: pin 4
// Adafruit SD shields and modules: pin 10
// Sparkfun SD shield: pin 8
// MKR Zero SD: SDCARD_SS_PIN
const int chipSelect = 10;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.print("\nInitializing SD card...");

  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    Serial.println("initialization failed. Things to check:");
    Serial.println("* is a card inserted?");
    Serial.println("* is your wiring correct?");
    Serial.println("* did you change the chipSelect pin to match your shield or module?");
    Serial.println("Note: press reset button on the board and reopen this Serial Monitor after fixing your issue!");
    while (1);
  } else {
    Serial.println("Wiring is correct and a card is present.");
  }

  // print the type of card
  Serial.println();
  Serial.print("Card type:         ");
  switch (card.type()) {
    case SD_CARD_TYPE_SD1:
      Serial.println("SD1");
      break;
    case SD_CARD_TYPE_SD2:
      Serial.println("SD2");
      break;
    case SD_CARD_TYPE_SDHC:
      Serial.println("SDHC");
      break;
    default:
      Serial.println("Unknown");
  }

  // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32
  if (!volume.init(card)) {
    Serial.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card");
    while (1);
  }

  Serial.print("Clusters:          ");
  Serial.println(volume.clusterCount());
  Serial.print("Blocks x Cluster:  ");
  Serial.println(volume.blocksPerCluster());

  Serial.print("Total Blocks:      ");
  Serial.println(volume.blocksPerCluster() * volume.clusterCount());
  Serial.println();

  // print the type and size of the first FAT-type volume
  uint32_t volumesize;
  Serial.print("Volume type is:    FAT");
  Serial.println(volume.fatType(), DEC);

  volumesize = volume.blocksPerCluster();    // clusters are collections of blocks
  volumesize *= volume.clusterCount();       // we'll have a lot of clusters
  volumesize /= 2;                           // SD card blocks are always 512 bytes (2 blocks are 1 KB)
  Serial.print("Volume size (KB):  ");
  Serial.println(volumesize);
  Serial.print("Volume size (MB):  ");
  volumesize /= 1024;
  Serial.println(volumesize);
  Serial.print("Volume size (GB):  ");
  Serial.println((float)volumesize / 1024.0);

  Serial.println("\nFiles found on the card (name, date and size in bytes): ");
  root.openRoot(volume);

  // list all files in the card with date and size
  root.ls(LS_R | LS_DATE | LS_SIZE);
  root.close();
}

void loop(void) {
}

Nothing looks out of place in the wiring. Does the SD module show any information on the silkscreen?

I can only suggest checking your connections (wiggle, remove-replace, them). Sometimes the F connectors on the jumper wires do not make a good connection.

even with a direct connection it doesnt work. sometimes i think i emit an emp field and just fry everything around me. this entire project has been nothing but disaster


and im not even entirely sure what the card module even is, it has next to no information on it nor the listing (unless im just a complete moron, which is probably possible)
i guess thats what i get for buying cheap parts but this is supposed to be ultra budget :sob: (and like, SURELY it works right?? people buy it for a reason...)

It could be bad. I would order a handful of modules and lose the breadboard; use a solderable breadboard.

Try shorter wires. Around 10cm/4in. Try different wires.

Just as a data point:

A Nano Every with a straight through uSD breakout.

Using the sketch you included, with no modifications.

Initializing SD card...Wiring is correct and a card is present.

Card type:         SD1
Clusters:          61163
Blocks x Cluster:  2
Total Blocks:      122326

Volume type is:    FAT16
Volume size (KB):  61163
Volume size (MB):  59
Volume size (GB):  0.06

Files found on the card (name, date and size in bytes): 
00001.MP3     2025-04-15 05:14:34 3854
00002.MP3     2025-04-15 05:14:54 4089
00003.MP3     2025-04-15 05:15:12 4820
00004.MP3     2025-04-15 05:15:48 3567
00005.MP3     2025-04-15 05:16:08 5182

Assuming your adapter and card are okay, the only thing I can see that might be an issue is the series 10K resistors. My adapter board, designed for 3.3V operation, doesn't use them.

When I added 10K series resistors to SCLK, MOSI, MISO and CS, this is what I got:

Initializing SD card...Wiring is correct and a card is present.

Card type:         SD1
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card

Food for thought.

I believe the Nano Every is a 5V device. Your SD module is a 3.3V device. So the three SPI output lines are outputting 5V into a card powered at 3.3V. That might work, but probably exceeds the Absolute Maximum voltage applied to any pin by a good bit.

And the 3.3V output of the Every might not supply enough current to power the SD card.

So I think you need a 5V SD card module, which would have a 3.3V regulator and a voltage translator chip.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.