How to Read and Write Data in Arduino SD Card

9,175 views

The Arduino SD card module is especially useful for projects & tutorials that require data logging. The Arduino can create a file in an SD card to write and save data using the SD library. So in this tutorial, I am going to show you step by step “How to Read and Write Data in Arduino SD Card“, using an Arduino SD Card Module

An Arduino Micro SD card Module is an SPI (Serial peripheral interface) communication-based device. It is compatible with the TF (TransFlash) SD cards used in mobile phones and can be used to provide some sort of external storage for a microcontroller and microprocessor-based projects, to store different kinds of data types from images to videos. SD cards generally are 3.3V logic level-based devices, but with the aid of the Micro SD card module, the signals are converted to 5v via a logic level converter implemented on the SD card Module.

Hardware Components

Following components are required to make Arduino SD Card

S.NOComponentValueQty
1.Arduino Uno R31
2.Micro SD Card Module With an SD Card1
3.Breadboard1
4.Connecting Wires1
5.USB Cable A/B1

SD Card Module Pinout

sd card module pinout
Pin NamePin No.Description
GND1Ground
Vcc2 Supplies power to the module
MISO (Master In Slave Out)3SPI output from the Micro SD Card Module.
MOSI (Master Out Slave In) 4  SPI input to the Micro SD Card Module.
SCK (Serial Clock)5 Accepts clock pulses that synchronize data transmission generated by Arduino.
CS 6 Enable and disable specific devices on SPI bus.

Useful Steps

Follow all steps carefully from the video tutorial at the end of this post (Highly Recommended).

  • STEP # 1 ( Make SD Card Module Connections )
  • VCC – To VCC of Arduino.
  • GND – To GND of Arduino.
  • MISO – To D12 of Arduino.
  • MOSI – To D11 of Arduino.
  • SCK – to D13 of Arduino.
  • CS – To D10 of Arduino.
  • STEP # 2 ( Upload Code )
  • Download code and upload it to Arduino Board using Arduino IDE Software
  • https://www.arduino.cc/en/Main/Software

Circuit Diagram

arduino sd card module

Applications

  • SD Card Modules are a simple solution for transferring data to and from a standard SD card.
  • Commonly used in applications requiring data logging & management.