Is there a way to use micro-sd cards bigger than 2GB?

I am using micro-sd cards to store different timing data to run a stepper for specified times. So far I have only been able to use 1GB and 2GB cards, if I try to store the data on 4GB or bigger card, the arduino is not able to read the data from the card. The data is stored in simple .txt files, and the arduino can list the files, but it does not read the content of the files.

Is this a known problem?

I have tried different demo sketches that reads data from micro-sd cards, both .txt and .bmp files. If the card is bigger than 2GB, it will not read.

I use a 4 and a 16 GB card

Can this depend of the sd-card reader I use? I have this cheap card reader (attached picture)

I use SanDisk 4GB and now 16GB SDHC (SD size) cards, can't get 1GB and 2GB cards anymore.
Haven't used microSD cards much, altho I have designed that size PC card socket onto boards.

That looks like an ok module. I see a 3.3V regulator and what is probably 5V to 3.3V signal level adapter.

Are you powering it from 5V? Where is the 5V coming from?

1 Like

The issue would be with the software. I use that SD card module (avoid calling it a "reader"), it's just a socket and level shifter...it should work with every microSD.

CrossRoads:
That looks like an ok module. I see a 3.3V regulator and what is probably 5V to 3.3V signal level adapter.

Are you powering it from 5V? Where is the 5V coming from?

I power it with 5V from the Arduino Uno, and in case of the Nano, I get 5V from a LM2596S voltage regulator

MK1888:
The issue would be with the software. I use that SD card module (avoid calling it a "reader"), it's just a socket and level shifter...it should work with every microSD.

What kind of software issue then? I have this problem with all the example sketches I've tried. I also have it on a Mega with a 3.5" TFT running the ShowBMP sketch. Having the bmp files on a 4GB card shows "Error reading BMP file", while on a 2GB card the images shows just fine.

What library are you using? Is it the latest version?

I am using the latest version of SD.h and SPI.h
Have also tried SdFat.h, but with no luck.

did you run the CardInfo example tool?

Juraj:
did you run the CardInfo example tool?

I did, and it list the contents of the cards whithout problems, also on the 4GB card

I just tested my same module with Arduino Nano, 16GB SDHC card, and the Examples>SD>DumpFile sketch. Worked fine.

Did you format the card with SDFormatter? See the sticky for this forum.

I just did the same test with a 4GB and a 2GB. On the last one Dumpfile showed the content of the file, with the 4GB it just initialized the card

I have tried SDFormatter on my mac, but with no luck. So I format the cards commandline on Linux: mkdosfs -F 16 /dev/sda1, that works

On the Mac there are always added some hidden files to the card, even if formatted with SDFormatter

1 Like

Ok, now I tried to format a 4GB and a 16GB SDHD card with a new copy of SDFormatter, and it actually worked.
Thanks a lot, problem solved

2 Likes