SD Card Writing problem

I have some issues writing to a csv file in an SD Card.
I wrote and tested my code with an old SD card module and once I changed the reader to the basic SD Card Module SKU: 018-DB-SDCARD it stopped working. I am using an Arduino Uno, and even running sample code SD - Card Info fails.
I wonder if I am missing a step or if there is any extra documentation on such module.

Hi Susana,

Thanks for your message - we’ll get back to you tomorrow morning with a way forward (just snagged us at the end of the day)

Hey Susana,
Just taking a look at this module alongside your post. I might need a little additional information on your issue so that I can help you out. Are you getting a card read failed on the SD.Begin function in your code?

Hi Susana, was your previous card module using SPI as per the Arduino SDcard library?
Might need to take a look at your code/hardware setup

Yes , it uses SPI. Attached Image of the other SD card module. When I run the example code “Card Info” and it is the first time that I run the code since placing the card it runs, but it doesn’t after.

In my main code, which is a data logger. Sometimes the card initialises (sometimes it doesn’t) but I never get to write on it (See save data code excerpt). So it seems again that it can’t read it.


  // CSpin is on pin 4, tried with 10 as well but no luck
  if (!SD.begin(CSpin)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
  Serial.println("card initialized.");

// Save data
 if (SD.exists("data.csv")) { 
//     now append new data file
    sensorData ="data.csv", FILE_WRITE);
    if (sensorData) {
      sensorData.close(); // close the file
  else {
    Serial.println("Error writing to file !");

Hmm sounds interesting. When you say it doesn’t run, or doesn’t initialise, what exactly is happening when it doesn’t work, does it just print nothing, do you get an error?

Try checking the SD card format (FAT32 is what you want) and that the SD card is MBR. It could be worth reducing the SPI bus speed to half.