Out Of Stock
Description
The SD Card Module is an add-on module that makes using SD cards with Arduino easier. It can be easily connected to the Arduino and communicates with it via the SD SPI protocol. This module supports both 5V and 3.3V DC input and has a size of 5.1cm x 3.1cm. With this module, you can read and write to the SD card using Arduino programming, and it can be used for various applications such as MP3 players and MCU/ARM system control.
Package Includes:
- 1 x SD Card SPI Module
Features:
- Easy connectivity: The SD Card Module can be easily connected to the Arduino as a peripheral device, making it easy to integrate with your Arduino projects.
- SD SPI communication: The module communicates with the Arduino through the SD SPI protocol using the MOSI, SCK, MISO, and CS pins.
- Dual DC input: The module supports both 5V and 3.3V DC input, providing flexibility in power supply options.
- Compact size: The module has a compact size of 5.1cm x 3.1cm, making it easy to fit into tight spaces or small projects.
- Read and write capabilities: With this module, you can read and write data to the SD card using Arduino programming, providing data storage capabilities to your projects.
- Versatile applications: The module can be used for a variety of applications such as MP3 players and MCU/ARM system control, providing flexibility in project design.
Description:
The SD Card Module is a small electronic device designed to simplify the use of SD cards with an Arduino microcontroller. This module is particularly useful when you need to store data or information and read it from your Arduino project. With this module, you can easily read and write data to an SD card using the SD SPI protocol. One of the standout features of this module is its ease of connectivity. The SD Card Module can be easily connected to the Arduino as a peripheral device, which simplifies the integration of SD card functionality into your Arduino projects. Another key feature is its support for dual DC input. This module supports both 5V and 3.3V DC input, providing flexibility in power supply options. This means that you can use this module with a range of Arduino boards and other devices that use different voltages. The compact size of the module (5.1cm x 3.1cm) makes it easy to fit into small spaces and tight project designs. The module's read-and-write capabilities enable you to store and retrieve data from the SD card, making it an essential tool for data logging, media storage, and other applications. Additionally, this module can be used for a variety of applications such as MP3 players and MCU/ARM system control. This makes it a versatile tool for a wide range of projects, from hobbyist electronics to professional applications.
Principle of Work:
The SD Card Module works by using the SD SPI (Serial Peripheral Interface) protocol to communicate with the Arduino microcontroller. This protocol allows for high-speed, full-duplex communication between the module and the Arduino. When the module is connected to the Arduino, the MOSI (Master Output Slave Input), SCK (Serial Clock), MISO (Master Input Slave Output), and CS (Chip Select) pins on the module are connected to their corresponding pins on the Arduino. The Arduino can then use these pins to send and receive data to and from the SD card. To write data to the SD card, the Arduino first sends a command to the module to initiate the write operation. The module then selects the SD card and begins to write the data. The Arduino monitors the progress of the write operation and waits for the module to finish before sending any more commands. To read data from the SD card, the Arduino first sends a command to the module to initiate the read operation. The module then selects the SD card and begins to read the data. The Arduino monitors the progress of the read operation and waits for the module to finish before retrieving the data.
Pinout of the Module:
Pin Name | Description |
---|---|
CS | Chip Select: Used to select the SD card |
MOSI | Master Out Slave In Used to send data to the SD |
MISO | Master In Slave Out Used to receive data from SD |
SCK | Serial Clock: Used to synchronize data transfer |
VCC | Power supply input (+5V or +3.3V) |
GND | Ground |
Applications:
- Data logging: You can use the module to store data from sensors, such as temperature or humidity sensors, and then retrieve the data for analysis later.
- Media storage: The module can be used to store media files, such as music or images, for use in multimedia applications, such as MP3 players.
- Industrial control: The SD Card Module can be used in industrial control systems for data storage and retrieval.
- Robotics: You can use the module to store data or instructions for robotics applications, such as autonomous robots.
- Internet of Things (IoT): The module can be used in IoT applications to store data from sensors or other connected devices.
- DIY electronics projects: The SD Card Module can be used in a wide range of DIY electronics projects that require data storage or retrieval.
Circuit:
Here is a table with the pin connections for the Arduino Uno:
SD Card Module Pin | Arduino Uno Pin |
---|---|
CS | D10 |
MOSI | D11 |
MISO | D12 |
SCK | D13 |
VCC | 5V or 3.3V |
GND | GND |
Library:
The SD library is pre-installed in your Arduino IDE you can upload this code to your Arduino Uno
Code:
Arduino code reads data from the Serial Monitor and writes it to a text file on the SD card:
#include "SPI.h" #include "SD.h" File myFile; void setup() { Serial.begin(9600); // Initialize the SD card if (!SD.begin(10)) { Serial.println("SD card initialization failed"); return; } Serial.println("SD card initialized"); } void loop() { if (Serial.available()) { char data = Serial.read(); // Open the file for writing myFile = SD.open("data.txt", FILE_WRITE); // Write the data to the file if (myFile) { myFile.print(data); myFile.close(); Serial.println("Data written to file"); } else { Serial.println("Error opening file"); } } }
This code listens for incoming data on the Serial Monitor and writes it to a file named "data.txt" on the SD card. You can modify the file name to your preference. When data is received, the file is opened for writing and the data is written to the file using the print()
function. The file is then closed. If there is an error opening the file, an error message is printed to the Serial Monitor.
Technical Details:
- Communication: SD SPI (MOSI, SCK, MISO, and CS)
- Operating voltage: 5V or 3.3V
- Current consumption: < 200 mA
- Size: 5.1cm x 3.1cm (2.01 inches x 1.22 inches)
- Maximum supported SD card size: 2 GB
- Compatible with Arduino Uno and other Arduino boards
- Built-in 3.3V voltage regulator
Resources: