Search
Product Info
microSD Shield
sku: DEV-09802
Update: After taking a figurative lashing from the comments section we're begging for mercy by updating the microSD Shield board. All new microSD shields have a voltage converter chip on-board that converts the Arduino 5V signals to 3.3V signals in accordance with SD specifications. No more 'blown up' SD cards!
Description: Running out of memory space in your Arduino project? The microSD Shield equips your Arduino with mass-storage capability, so you can use it for data-logging or other related projects. A microSD quickstart guide is available!
Communication with microSD cards is achieved over an SPI interface. The SCK, DI, and DO pins of the microSD socket are broken out to the ATmega168/328's standard SPI pins (digital 11-13), while the CS pin is broken out to Arduino's D8 pin. If you decide to use one of the many open source FAT libraries (like FAT16 or SDFat) make sure to change the code to reflect the location of the CS pin. Most libraries assume the CS pin is connected to D10; this will have to be changed to D8. Also for the libraries to work pin D10 will have to be set as an output in the 'setup()' section of your sketch. The shield also includes a large prototyping area with a 13x12 grid of 0.1" pitch PTHs.
This shield comes populated with a microSD socket, red power indicator LED, and a reset button; but it does not come with headers installed. We recommend the 6 and 8-pin stackable headers.
Documents:
- microSD Quickstart Guide
- Example sketch
- Schematic
- Eagle Files
- FAT16 Library (Unzip this folder in the Arduino Libraries Folder. Once unzipped you can find an example by going to File->Examples->FAT->FAT_Example in Arduino. You must re-open Arduino after unzipping the folder.
Pricing
Comments
39 comments
Feeds
Currency
Display prices in
Feedback
If you would like to tell us more, you can fill out our form if you need some psycho-suggestive questions. Go to the form.






























In other words, to use the protoboard space of this board usefully, you need to solder wires to the header pins themselves... Or else (for a solderless protoboard) use stackable headers and plug wires into the top... It seems like the extra strip of through-hole connections to the I/O lines could have been provided, as on the protoshield, for most pins anyway...
I think this board would be vastly improved by a couple mods:
- 3.3 volt communication
- Pin replication like on the proto-shield
I know I'd pay the extra couple bucks. Anyone else?
At least tell us which microSD cards this is supposed to work with.
Check out the size of your SD card, along with the following comment from the example:
"The library will only work on SD cards after they've been formatted to FAT16."
If you're using anything above a 2GB SD card, you could have problems. Some 2GB cards don't fully meet the SD card specification for the low speed SPI interface. If you want to be really safe and eliminate the SD card itself as a problem source, try the board out with a 1GB or smaller card.
Someone out on the web did some testing with microcontrollers, the low speed interface, and a half dozen or so 2GB cards from different vendors. He found roughly 80% worked via SPI (not really used in most current consumer SD products, as the proprietary protocol is faster). Google should be able to find it or an analogous comparison.
Cheers
I also know that the cards supports SPI as the file I try to create was at one point created, but it was empty and the card deemed corrupt by my card reader.
I would be curious to know what cards if any people have gotten this shield to work with.
Tried it with the one they sell. No luck.
RIP poor memory card :(
5 v too much??
maybe only works with arduino pro 3.3V version?
1) fat16.cpp has a comment in FAT::Write that said it will always write to EOF. It will not because the second argument to fat_seek_file was 0 and not a pointer to an offset as it needs to be.
2) fat16_example.pde says read(buffer) will read sizeof buffer. The actual read routine will read 512 bytes regardless of the size of the buffer.
3) When the test file gets >512 bytes the example will fail.
4) fat16.cpp should be rewritten to: a) return more error indications b) take size args, rather than assume strings c) have seek function.
I've fixed the items above. Let me know if you want it posted somewhere.
I'm successfully using this code with a shield that takes regular SD cards instead of microSD cards. The SD shield can get its power from the 3.3v supply on the Duemilenove board. This code works much better than the filelogger/nanofat code that came with the SD shield. The nanofat code takes 300 milliseconds on every write call. This code takes less than 2 milliseconds.
The only advantage to the nanofat code is that it is 9000 bytes smaller than this code.
Thanks for the critiques, we'll try and implement some of them when we can. In the meantime we'd love to post your code. Feel free to send us a link that we can add to the product description, or you can send us the source and we'll host it and provide a download link.
You can find a schematic for a resistor-based level shifting SD card interface here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1206874649/0
There's also excellent info on Arduino->SD card communication in the SdFat lib documentation: http://code.google.com/p/sdfatlib/
If this shield had an integrated level shifter, I'd buy a few of 'em.
or does the diode method work? Does anyone have this shield working and if so whats your setup?
Jon
or does the diode method work? Does anyone have this shield working and if so whats your setup?
Jon
Well i did get the shield working perfectly fine. But I had to basically not install the header for pins 8, 11, 12, 13. Then just used the diode diagram here, http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=65 and asembled it on the small prototyping area. The code works and I'm using a kingston 2gb memory card.
Jon
Hacking up the board what the day after you get it working is for. :)
Also, highly recommend using sdfatlib over the library linked from this page. I found it was much easier to get up and running and has lots of nice pre-written examples to explore:
http://code.google.com/p/sdfatlib/
Quick reminder for anyone using the 4050 IC - the MISO pin needs to be hooked up opposite the 3 other SPI pins. I made this stupid mistake and spent hours trying find it.
I was not able to get it working on an Arduino Duemilanove using the FAT16 library with a Kingston 512MB card. It is working using the SdFat library after changing the Sd2Card.h to #define SOFTWARE_SPI and changing the 3 SOFT_SPI_SS_DDR/PORT/BIN pins from PIN10_* to PIN8_*.
Its also worth noting that the minimum sketch to open a file and write a string is 2K smaller with the SdFat lib.
I got it working with voltage dividers and the sdfat library, see: http://www.holdentechnology.com/micros2/arduinos/60-sdshield
-Mike
-Mike
The radio shield has a proto area. So I picked up the parts to put the SD shield on the proto area of the radio shield. A project that requires 2 shields and a LCD is pretty tall. Removing almost 1/2 inch of high makes packaging easier.
How do I return mine for a working unit?
We have buy this shield, it work very well with the Arduino Duemilanove, but it dont work with the Mega !
Some one have the same problem?
The SPI pins for Arduino Mega are located elsewhere (pin 50-53 instead of 10-13). Simply bend out pins 10, 11, 12 and 13 on the shield so that they do not go into the Mega. Stick the shield in. Put a jumper wire in the headers of pin 10-13 and route them as follows:
Shield pin 10 --> Mega pin 53
Shield pin 11 --> Mega pin 51
Shield pin 12 --> Mega pin 50
Shield pin 13 --> Mega pin 52
This applies to all SPI shields.
Thanks to: http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/
I got to try this shield with SDFat Lib
Prior to soldering the shield, I was able to get it to run.
After soldering to headers, suddenly I just keep on getting the
type any character to start
card.init failed
SD error
errorCode: 1
errorData: 3F
type any character to start
error when running SDFatInfo.
Please help.
I can’t seem to get the board to work.
Best regards,
Martin
What kind of pins did you guys use instead of the stackable headers you recommend?
I've used 16 pin dip wire-wrap sockets and then cut the socket off the top of the board; quick touch-up with the soldering iron and it looks great.
Nice way to keep the stack thin.