I'm trying to understand the power requirements of an SD card. I have a cheap breakout board from eBay that includes built-in level shifters, so I can plug it in directly to my Arduino. I provide power from one of the digital pins, and it works. This doesn't make sense to me, as I thought an SD card reader should draw upwards of 50-100 mA, well over the capacity of an individual digital pin on the Arduino. However, at least one SD card manufacturer does this as well, so I'm not making this up.
I have checked, and the data is written no problem. I have connected an ammeter between the Arduino and the SD reader, and it never jumps above 3 mA? The only problem I have is when I switch from using the USB cable (connected to my computer) for power to a battery pack, the SD card starts acting erratically. Which makes sense, if it's not getting enough current.
What I'm wondering is why it ever works when connected to a digital output pin? Clearly I'm missing something important.
Edit: The reason why I thought they required a lot of current: I've seen comments like this on a number of tutorials:
One is that they are strictly 3.3V devices and the power draw when writing to the card can be fairly high, up to 100mA (or more)!
Edit2: @dlu answer lead me to investigate the voltage I was sending to the SD card reader, which turns out to have been the problem. I was supplying the Vin pin with 5.2V, which was regulated down to 4V, presumably too low for the 5V-3.3V step-down at the SD card. Moving the battery power to the 5V pin corrected this. This also introduces some new risk, as the board is now receiving unregulated power. But that is another problem.
Edit3: And finally, answering my original question: I found a note on the Adafruit product page for a similar breakout that indicates:
Onboard 5v->3v regulator provides 150mA for power-hungry cards
So despite only drawing 3mA of current from the Arduino pin, the actual SD card is supplied with > 100mA from the regulator.