SD shield doesn't work with battery

Hello arduino forum,

I try to make a GPS datalogger.
Evertything works fine when i test everything with the arduino connected with my pc.
From the moment i plug a battery to the arduino. the SD card reader/writer doesn't work anymore.
I am sure its not the code i made because i have the same problem when i use the example CardInfo what stays standard in de library.

the thing what happening is this:

SD card reader/writher connected with arduino, arduino connected to pc.
i upload the sd cardinfo code and next i try to read whats on the sd card.
This is working. the serial monitor say what it must say:

Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Volume type is FAT32
Volume size (bytes): 3034054656
Volume size (Kbytes): 2962944
Volume size (Mbytes): 2893

from the moment i plug in a battery, so... now the arduino is connected to the pc and to the battery.
its not possible anymore to read the sd. the serial monitor now say this:

Initializing SD card...Wiring is correct and a card is present.
Card type: SDHC
Could not find FAT16/FAT32 partition.
Make sure you've formatted the card

i hope somebody can tell me whats wrong here.

Greetings,

Thom

What battery are you using? And how?

Is it possible that the battery cannot supply sufficient current for reading the SD card? Are you trying to get GPS lock at the same time (always current intensive)? Maybe that’s knocking down the voltage. SD cards can only run on 3v3 but I get the impression that some (particularly cheap and/or knockoff ones) become unreliable if the voltage drops much further.

Are you powering both GPS and SD off the Arduino’s 3v3? That might not be able to stand the current.

"Initializing SD card" a problem with your SD card, you remove it while your arduino or pc was using it, or to high/low power try to format it and test it again

from the moment i plug in a battery, so... now the arduino is connected to the pc and to the battery.
its not possible anymore to read the sd. the serial monitor now say this:

if you are lucky your SD will work again :smiley:
or from battery more details about your battery will help V,A lithium, alkaline ?!