Description
This MicroSD card module allows MicroSD cards to be written and read for applications that create or need access to large quantities of data. It includes a 3.3V regulator and level shifter for use with both 5V and 3.3V MCUs
PACKAGE INCLUDES:
- MicroSD Card Module with Level Shifter (MicroSD Card not included)
KEY FEATURES OF MICROSD CARD MODULE WITH LEVEL SHIFTER:
- SPI bus interface
- Built-in 3.3V regulator
- Built-in logic level shifter
- 3.3V and 5V MCU compatible
- 5V operation
SD cards are commonly used for applications such as temperature logging where the time and temperature are recorded over long periods of time. It can also be used to serve large amounts of data such as graphic images.
This MicroSD card module is powered from 5V and includes a built-in 3.3V regulator to power the SD card. A 74LVC125A chip is used on the module as a logic level converter on the data lines so the module can be directly connected to either a 3.3V or 5V MCU without damage to the SD card.
The data lines have 3.3K series resistors on the inputs of the 74LVC125A to provide an additional level of protection.
Module Connections
The module has a male right-angle header installed. The module can be inserted directly into a breadboard or female Dupont style jumpers can be used to make connections to it.
1×6 Header
- CS = SPI Chip Select
- SCK = SPI Clock
- MOSI = SPI MOSI, connects to MOSI on MCU
- MISO = SPI MISO, connects to MISO on MCU. Silkscreen may be incorrectly labeled ‘MOSO’
- VCC = 5V power.
- GND = Ground, must be common with the MCU
OUR EVALUATION RESULTS:
In the example we are using here, we are using an Uno
Insert a MicroSD card into the module and wire up 5V and ground and the SPI pins as follows:
- CS – Uno pin 10, Mega 2560 pin 53
- SCK – Uno pin 13, Mega 2560 pin 52
- MOSI – Uno pin 11, Mega 2560 pin 51
- MISO – Uno pin 12, Mega 2560 pin 50
The IDE example program SD/CardInfo is a good way to test the basic setup and card. A slightly pruned down version is shown below.
You may need to change this line of code to match the SPI chip select pin for your MCU: const int chipSelect = 10;
An example output of the program is shown below.
MicroSD Card Module Test Program
/* SD card test This example shows how use the utility libraries on which the' SD library is based in order to get info about your SD card. Very useful for testing a card when you're not sure whether its working or not. Connect 5V power and ground. Connect MOSI to MOSI - pin 11 on Uno, 51 on Mega 2560 Connect MISO to MISO - pin 12 on Uno, 50 on Mega 2560 Connect CLK to CLK - pin 13 on Uno, 52 on Mega 2560 Connect CS to SPI Chip select - Pin 10 on Uno, 53 on Mega 2560 */ // include the SD library: #include <SPI.h> #include <SD.h> // set up variables using the SD utility library functions: Sd2Card card; SdVolume volume; SdFile root; // change this to match your SD shield or module; const int chipSelect = 10; void setup() { Serial.begin(9600); Serial.print("nInitializing SD card..."); // we'll use the initialization code from the utility libraries // since we're just testing if the card is working! if (!card.init(SPI_HALF_SPEED, chipSelect)) { Serial.println("initialization failed. Things to check:"); Serial.println("* is a card inserted?"); Serial.println("* is your wiring correct?"); Serial.println("* did you change the chipSelect pin to match your shield or module?"); while (1); } else { Serial.println("Wiring is correct and a card is present."); } // print the type of card Serial.println(); Serial.print("Card type: "); switch (card.type()) { case SD_CARD_TYPE_SD1: Serial.println("SD1"); break; case SD_CARD_TYPE_SD2: Serial.println("SD2"); break; case SD_CARD_TYPE_SDHC: Serial.println("SDHC"); break; default: Serial.println("Unknown"); } // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32 if (!volume.init(card)) { Serial.println("Could not find FAT16/FAT32 partition.nMake sure you've formatted the card"); while (1); } Serial.print("Clusters: "); Serial.println(volume.clusterCount()); Serial.print("Blocks x Cluster: "); Serial.println(volume.blocksPerCluster()); Serial.print("Total Blocks: "); Serial.println(volume.blocksPerCluster() * volume.clusterCount()); Serial.println(); // print the type and size of the first FAT-type volume uint32_t volumesize; Serial.print("Volume type is: FAT"); Serial.println(volume.fatType(), DEC); volumesize = volume.blocksPerCluster(); // clusters are collections of blocks volumesize *= volume.clusterCount(); // we'll have a lot of clusters volumesize /= 2; // SD card blocks are always 512 bytes (2 blocks are 1KB) Serial.print("Volume size (Kb): "); Serial.println(volumesize); Serial.print("Volume size (Mb): "); volumesize /= 1024; Serial.println(volumesize); Serial.print("Volume size (Gb): "); Serial.println((float)volumesize / 1024.0); Serial.println("nFiles found on the card (name, date and size in bytes): "); root.openRoot(volume); // list any files in the card with date and size root.ls(LS_R | LS_DATE | LS_SIZE); } void loop(void) { }
BEFORE THEY ARE SHIPPED, THESE MODULES ARE:
- Sample tested and inspected per incoming shipment
Notes:
- None
Technical Specifications
Operating Ratings | ||
Vcc | 5V | |
Dimensions | ||
PCB Board | L x W (PCB) | 41 x 24mm (1.6 x 0.95″) |
With MicroSD card (does not over-hang) | 41 x 24mm (1.6 x 0.95″) | |
Country of Origin | China |