Electronics

Micro SD Card Adapter Module

AED 14.95

1

Description

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

 

Features:

  1. Allows reading and writing of data to a microSD card with an Arduino board or any other MCU with an SPI interface.
  2. Can be used with the Arduino IDE's SD library, which simplifies card starting, reading, and writing.
  3. Includes a voltage regulator, which allows the module to be powered from the Arduino's 5V and 3.3V pins.
  4. Uses the SPI communication protocol to communicate with Arduino.
  5. Supports the FAT file system.
  6. Supports micro SD cards up to 2GB in size.
  7. Supports Micro SDHC cards up to 32GB in size.
  8. Has a low current requirement, typically between 0.2 and 200mA.
  9. Can be used for a variety of applications, including data logging, data visualization, and more.

 

Description:

The BFD-1000 sensor module is a multi-sensor module that can be used to create a line follower robot that can accurately track a black or white line. The module is designed with 5 TCRT5000 sensors for line tracking and black road detection and an IR proximity sensor in the front. This combination of sensors makes it easy to create a robot that can accurately follow a line, even on complex tracks, The TCRT5000 sensors are designed to detect the contrast between a black line and a white background, which makes them ideal for line following. They have a detection range of 0-4cm, which means that they can detect the line even when it is very close to the ground. The sensors are also highly sensitive and can detect lines with a sensitivity range of 0.5mm-40mm without any adjustment. The front IR proximity sensor is designed to detect obstacles in front of the robot. It has an adjustable detection range of 0-5cm, which means that it can detect obstacles at varying distances. The sensor operates on an input voltage of 3.0V-5.5V and outputs digital signals (high and low level) that can be easily connected to a microcontroller. The module also has LED lights as indicators for easy debugging. The BFD-1000 sensor module is designed with a special touch sensor design, which simplifies the robot's design. The sensor outputs all digital signals, which makes it easy to connect to a microcontroller. The module also supports a voltage of 3.0-5.5V, which means that it can meet any system requirements.

 

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:

  1. Data logging: The module can be used for storing sensor data or any other data that needs to be recorded over time.
  2. Audio and video recording: The module can be used to store audio and video files for various applications.
  3. Data transfer: The module can be used to transfer data between different devices, such as computers, smartphones, and tablets.
  4. Robotics: The module can be used for data storage and transfer in robotics applications.
  5. IoT projects: The module can be used for storing and retrieving data in Internet of Things (IoT) projects.
  6. 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:

Datasheet