Arduino Micro SD Card Module Tutorial - Circuit Digest

Skip to main content
Continue to site >>>
  1. Home
  2. Microcontroller Based Projects
  3. Micro SD Card Module with Arduino: Understanding and Interfacing
Micro SD Card Module with Arduino: Understanding and Interfacing Published May 25, 2022 3 D Debashis Das Author Interfacing a Micro SD Card Module with Arduino

Connecting an SD card module to Arduino is way easier than you think. In this guide, we’ll break down the module’s pins and components, show you how to wire it to your Arduino, and get you reading and writing data in no time. Think of it as turning your Arduino into a reliable data logger. We have covered many other interfacing tutorials before that might interest you, such as this 16x2 LCD with Arduino interfacing guide, Arduino 7-segment display tutorial, and more.

Micro SD Card Module with Arduino - Quick Overview

Build Time: 1-2 hours | Cost: $10-20 | Difficulty: Beginner

What You'll Learn: SPI communication, SD card file handling, Arduino programming, Data logging basics

Applications: Temperature logging, GPS tracking, Battery monitoring, Sensor data storage

Table of Contents

  • Micro SD Card Module Pinout
  • Module Components
  • Micro SD Card Module Circuit Diagram
  • Arduino with SD Card Module Circuit Diagram
  • Module Preparation
  • Code Implementation
  • Working Demo
  • Troubleshooting
  • GitHub Repository

Why You Need an SD Card Module for Arduino Projects

So here’s the thing: Arduino’s built-in memory is tiny. If you’re just blinking LEDs, no problem. But the moment you try to log data, say battery usage, temperature over time, or GPS coordinates, you’ll run out of space almost instantly.

The usual fix is to add an SD card. Those little microSD cards can hold gigabytes, and they’re physically smaller than a rupee coin. Perfect for storing logs. In this tutorial, I’ll show you how to connect an SD card to Arduino and get it to save your data. Let’s jump in.

Micro SD Card Module Pinout

The module has 6 pins; those are GND, VCC, MISO, MOSI, SCK, and CS. All the pins of this sensor module are digital, except VCC and Ground. The pinout of the module is displayed below:

Micro SD Card Module Pinout

Quick Reference: Micro SD Card Module Pin Connections to Arduino

SD Card Module PinArduino UNO PinFunctionSignal Type
GNDGNDGround connectionPower
VCC5V or 3.3VPower supplyPower
MISODigital Pin 12Master In Slave Out (SPI data)Digital Output
MOSIDigital Pin 11Master Out Slave In (SPI data)Digital Input
SCKDigital Pin 13Serial Clock (SPI synchronization)Digital Clock
CSDigital Pin 10Chip Select (configurable)Digital Control

Module Components

This is a cheap and easy-to-use sensor that can be used for many different applications. This sensor can be used to read SD card data with a microcontroller. The part marking of the module is shown below.

Micro SD Card Module Components

If you take a close look at the micro module, there is not much on the PCB itself. There are only three components that are significant: the first is the micro SD card holder itself. This holder makes it easy for us to swap between different modules. The second most important thing is the level shifter IC, as the module runs only on 3.3V, and it has a maximum operating voltage of 3.6V, so if we directly connect the SD card to 5V, it will definitely kill the SD card. Also, the module has an onboard ultra-low dropout regulator that will convert the voltage from 5V to 3.3V. That is also why this module can operate on 3.3V power.

Module FAQ

1. What’s the best way to format an SD card?If you want your SD card to play nicely with Arduino and other devices, go with exFAT. It’s designed for flash memory and handles large cards without fuss.

2. Do SD cards have firmware?Yep. SD cards come with firmware baked in. Firmware ensures that the SD card stores data and retrieves it when required

3. Does formatting an SD card shorten its lifespan?It does. Formatting basically clears the whole card and marks every block as free. Since SD cards only have a limited number of read/write cycles, doing it over and over can wear them out faster.

4. What is an exFAT SD card?exFAT (Extensible File Allocation Table) is a file system made by Microsoft in 2006 for flash drives and SD cards. It stayed proprietary until 2019, and some parts are still patented, but it’s the go-to for large-capacity cards and works great with Arduino projects.

Tag » Arduino Micro Sd Card Adapter Tutorial