- All Products
- All Products
- Micro SD Card Adapter Module
Micro SD Card Adapter Module
The "MicroSD Card Adapter" module is an SPI interface module that enables reading and writing data to a microSD card with an Arduino board. The module includes a voltage regulator, allowing it to operate with 4.5V-5.5V DC and utilize power from the Arduino's 5V and 3.3V pins. It supports both the FAT file system and microSD cards up to 2GB and Micro SDHC up to 32GB. This module is ideal for applications such as data logging and visualization.
Package Includes:
- 1 x MicroSD Card Adapter
Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days
Features:
- Allows reading and writing of data to a microSD card with an Arduino board or any other MCU with an SPI interface.
- Can be used with the Arduino IDE's SD library, which simplifies card starting, reading, and writing.
- Includes a voltage regulator, which allows the module to be powered from the Arduino's 5V and 3.3V pins.
- Uses the SPI communication protocol to communicate with Arduino.
- Supports the FAT file system.
- Supports micro SD cards up to 2GB in size.
- Supports Micro SDHC cards up to 32GB in size.
- Has a low current requirement, typically between 0.2 and 200mA.
- Can be used for a variety of applications, including data logging, data visualization, and more.
Principle of Work:
The MicroSD Card Adapter module works by utilizing the Serial Peripheral Interface (SPI) communication protocol to communicate with an Arduino board or any other microcontroller with an SPI interface. The module contains a microSD card slot and a voltage regulator that allows it to operate with a supply voltage ranging from 4.5V to 5.5V DC. work with the MicroSD Card Adapter module, the Arduino board must be connected to the module using the SPI pins, including MOSI, MISO, SCK, and CS pins. The Arduino board communicates with the module through the SPI interface and the SD library, which simplifies the initialization, reading, and writing of data to the microSD card. One of the most commonly used libraries with the MicroSD Card Adapter module is the SD library, which is included in the Arduino Integrated Development Environment (IDE). This library provides a set of functions that facilitate the interaction between the Arduino board and the microSD card, such as initializing the card, reading and writing data to it, and checking for errors.
Some of the Arduino functions used with the MicroSD Card Adapter module include:
SD.begin(csPin)
: Initializes the microSD card with the specified chip select (CS) pin.SD.open(filename, mode)
: Opens a file on the microSD card with the specified filename and mode.file.write(data, len)
: Writes the specified data to the open file.file.read()
: Reads a byte of data from the open file.file.seek(pos)
: Sets the file position to the specified byte position.
Pinout of the Module:
- GND: Ground
- VCC: Power supply voltage (4.5V - 5.5V)
- MISO: Master In Slave Out (data input from the module to the microcontroller)
- MOSI: Master Out Slave In (data output from the microcontroller to the module)
- SCK: Serial Clock (clock signal for synchronized communication)
- CS: Chip Select (used to enable communication with the module)
The module also includes the following components:
- MicroSD card slot: where the microSD card is inserted
- Voltage regulator: regulates the voltage from the input to 3.3V for the microSD card
Applications:
- Data logging: The module can be used for storing sensor data or any other data that needs to be recorded over time.
- Audio and video recording: The module can be used to store audio and video files for various applications.
- Data transfer: The module can be used to transfer data between different devices, such as computers, smartphones, and tablets.
- Robotics: The module can be used for data storage and transfer in robotics applications.
- IoT projects: The module can be used for storing and retrieving data in Internet of Things (IoT) projects.
- Home automation: The module can be used for data storage and transfer in home automation projects.
Circuit:
- MOSI (Master Out Slave In) pin of SD card module to MOSI pin of Arduino board (pin 11 on Uno
- MISO (Master In Slave Out) pin of SD card module to MISO pin of Arduino board (pin 12 on Uno
- SCK (Serial Clock) pin of SD card module to SCK pin of Arduino board (pin 13 on Uno
- CS (Chip Select) pin of SD card module to a digital pin on Arduino board we used pin 4.
- VCC: to 5v on Arduino.
- GND: ON GND
Library:
No need to download any library to work with this module the libraries SPI - SD are preinstalled on Arduino IDE.
Code:
This is an Arduino sketch that uses an SD card to read information and print it to the serial monitor:
#include "SPI.h" #include "SD.h" void setup() { Serial.begin(9600); while (!Serial); Serial.print("\nInitializing SD card..."); if (initializeSDCard(4)) { Serial.println("SD card initialized successfully."); printSDCardInfo(); } else { Serial.println("SD card initialization failed. Please check the wiring and try again."); } } void loop() { } bool initializeSDCard(int chipSelectPin) { Sd2Card card; return card.init(SPI_HALF_SPEED, chipSelectPin); } void printSDCardInfo() { SdVolume volume; SdFile root; if (!volume.init(Sd2Card())) { Serial.println("Could not find FAT16/FAT32 partition."); Serial.println("Make sure the card is formatted."); return; } Serial.print("\nVolume type is: FAT"); Serial.println(volume.fatType(), DEC); uint32_t volumeSize = volume.blocksPerCluster() * volume.clusterCount() / 2; Serial.print("Volume size (KB): "); Serial.println(volumeSize); Serial.print("Volume size (MB): "); Serial.println(volumeSize / 1024.0); Serial.print("Volume size (GB): "); Serial.println(volumeSize / 1024.0 / 1024.0); Serial.println("\nFiles found on the card:"); root.openRoot(volume); root.ls(LS_R | LS_DATE | LS_SIZE); }
This code initializes an SD card and prints some information about it. It uses the SD library and SPI communication protocol to communicate with the card. The initializeSDCard
function initializes the card using the specified chip select pin, and the printSDCardInfo
function prints information about the card, such as its volume type, size, and the files stored on it. The setup
function initializes the serial communication and calls these two functions to initialize the SD card and print its information. The loop
the function is empty and does not do anything.
Technical Details:
- Operating Voltage: 4.5V - 5.5V DC
- Current Requirement: 0.2-200 mA
- 3.3 V on-board Voltage Regulator
- Supports FAT file system
- Supports micro SD up to 2GB
- Supports Micro SDHC up to 32GB
Resources:
Features:
- Allows reading and writing of data to a microSD card with an Arduino board or any other MCU with an SPI interface.
- Can be used with the Arduino IDE's SD library, which simplifies card starting, reading, and writing.
- Includes a voltage regulator, which allows the module to be powered from the Arduino's 5V and 3.3V pins.
- Uses the SPI communication protocol to communicate with Arduino.
- Supports the FAT file system.
- Supports micro SD cards up to 2GB in size.
- Supports Micro SDHC cards up to 32GB in size.
- Has a low current requirement, typically between 0.2 and 200mA.
- Can be used for a variety of applications, including data logging, data visualization, and more.
Principle of Work:
The MicroSD Card Adapter module works by utilizing the Serial Peripheral Interface (SPI) communication protocol to communicate with an Arduino board or any other microcontroller with an SPI interface. The module contains a microSD card slot and a voltage regulator that allows it to operate with a supply voltage ranging from 4.5V to 5.5V DC. work with the MicroSD Card Adapter module, the Arduino board must be connected to the module using the SPI pins, including MOSI, MISO, SCK, and CS pins. The Arduino board communicates with the module through the SPI interface and the SD library, which simplifies the initialization, reading, and writing of data to the microSD card. One of the most commonly used libraries with the MicroSD Card Adapter module is the SD library, which is included in the Arduino Integrated Development Environment (IDE). This library provides a set of functions that facilitate the interaction between the Arduino board and the microSD card, such as initializing the card, reading and writing data to it, and checking for errors.
Some of the Arduino functions used with the MicroSD Card Adapter module include:
SD.begin(csPin)
: Initializes the microSD card with the specified chip select (CS) pin.SD.open(filename, mode)
: Opens a file on the microSD card with the specified filename and mode.file.write(data, len)
: Writes the specified data to the open file.file.read()
: Reads a byte of data from the open file.file.seek(pos)
: Sets the file position to the specified byte position.
Pinout of the Module:
- GND: Ground
- VCC: Power supply voltage (4.5V - 5.5V)
- MISO: Master In Slave Out (data input from the module to the microcontroller)
- MOSI: Master Out Slave In (data output from the microcontroller to the module)
- SCK: Serial Clock (clock signal for synchronized communication)
- CS: Chip Select (used to enable communication with the module)
The module also includes the following components:
- MicroSD card slot: where the microSD card is inserted
- Voltage regulator: regulates the voltage from the input to 3.3V for the microSD card
Applications:
- Data logging: The module can be used for storing sensor data or any other data that needs to be recorded over time.
- Audio and video recording: The module can be used to store audio and video files for various applications.
- Data transfer: The module can be used to transfer data between different devices, such as computers, smartphones, and tablets.
- Robotics: The module can be used for data storage and transfer in robotics applications.
- IoT projects: The module can be used for storing and retrieving data in Internet of Things (IoT) projects.
- Home automation: The module can be used for data storage and transfer in home automation projects.
Circuit:
- MOSI (Master Out Slave In) pin of SD card module to MOSI pin of Arduino board (pin 11 on Uno
- MISO (Master In Slave Out) pin of SD card module to MISO pin of Arduino board (pin 12 on Uno
- SCK (Serial Clock) pin of SD card module to SCK pin of Arduino board (pin 13 on Uno
- CS (Chip Select) pin of SD card module to a digital pin on Arduino board we used pin 4.
- VCC: to 5v on Arduino.
- GND: ON GND
Library:
No need to download any library to work with this module the libraries SPI - SD are preinstalled on Arduino IDE.
Code:
This is an Arduino sketch that uses an SD card to read information and print it to the serial monitor:
#include "SPI.h" #include "SD.h" void setup() { Serial.begin(9600); while (!Serial); Serial.print("\nInitializing SD card..."); if (initializeSDCard(4)) { Serial.println("SD card initialized successfully."); printSDCardInfo(); } else { Serial.println("SD card initialization failed. Please check the wiring and try again."); } } void loop() { } bool initializeSDCard(int chipSelectPin) { Sd2Card card; return card.init(SPI_HALF_SPEED, chipSelectPin); } void printSDCardInfo() { SdVolume volume; SdFile root; if (!volume.init(Sd2Card())) { Serial.println("Could not find FAT16/FAT32 partition."); Serial.println("Make sure the card is formatted."); return; } Serial.print("\nVolume type is: FAT"); Serial.println(volume.fatType(), DEC); uint32_t volumeSize = volume.blocksPerCluster() * volume.clusterCount() / 2; Serial.print("Volume size (KB): "); Serial.println(volumeSize); Serial.print("Volume size (MB): "); Serial.println(volumeSize / 1024.0); Serial.print("Volume size (GB): "); Serial.println(volumeSize / 1024.0 / 1024.0); Serial.println("\nFiles found on the card:"); root.openRoot(volume); root.ls(LS_R | LS_DATE | LS_SIZE); }
This code initializes an SD card and prints some information about it. It uses the SD library and SPI communication protocol to communicate with the card. The initializeSDCard
function initializes the card using the specified chip select pin, and the printSDCardInfo
function prints information about the card, such as its volume type, size, and the files stored on it. The setup
function initializes the serial communication and calls these two functions to initialize the SD card and print its information. The loop
the function is empty and does not do anything.
Technical Details:
- Operating Voltage: 4.5V - 5.5V DC
- Current Requirement: 0.2-200 mA
- 3.3 V on-board Voltage Regulator
- Supports FAT file system
- Supports micro SD up to 2GB
- Supports Micro SDHC up to 32GB
Resources: