Home › Parts › Microcontrollers & modules › microSD card module

microSD card module (AMS1117, 74LVC125A, FAT32)

Microcontrollers & modules · SPI · FAT

Micro SD Card Adapter (AMS1117 + 74LVC125A, 5 V) · 16 GB microSDHC (FAT32)

microSD card module (AMS1117, 74LVC125A, FAT32) on the simulator's bench

Try it on the benchThe lab drops it on an empty bench and opens its datasheet card.

Typical part: Micro SD Card Adapter (catalex-style, 6-pin) · or a bare 3.3 V microSD breakout

Pins

Ratings and limits

Supply5 V module: VCC 4.5–5.5 V into an AMS1117-3.3 (drops about 1.1 V, so 3.3 V in leaves the card about 2.2 V: not enough). Bare breakout: 3.3 V only, no regulator, 5 V kills the card
Currentcard idle about 0.3 mA, 30–100 mA while writing (peaks up to 200 mA on some cards): give it a solid supply and a 10 µF cap near the socket
BusSPI mode 0, up to 25 MHz (4 MHz is the SD.h default); the card needs at least 74 clocks with CS high before CMD0
Level shifterthe 5 V module’s 74LVC125A has its output enable tied low: MISO is driven even when CS is high, so it blocks other SPI devices on the same MISO. Give it its own SPI bus, or use a module with a proper tri-state buffer
CardsSDSC up to 2 GB (FAT16), SDHC 4–32 GB (FAT32). 64 GB and larger SDXC cards come formatted exFAT, which the ESP32 SD library cannot mount: reformat them as FAT32
Pull-upsMISO, MOSI and CS want 10 kΩ pull-ups; most modules fit them

How to use it

A data logger’s storage. With SD.h: SD.begin(CS) mounts the card, SD.open("/log.csv", FILE_APPEND) opens a file, print/println write, close() (or flush()) makes it permanent. Paths start with "/". FILE_WRITE on the ESP32 starts the file empty; FILE_APPEND adds to the end.

More in microcontrollers & modules

Sources: SD Association Physical Layer Simplified Specification v9 (SPI mode, CMD0/8/55/41/58, CSD v1/v2); Espressif arduino-esp32 SD library (sd_diskio.cpp, vfs_api.cpp); ChaN FatFs; AMS1117 and 74LVC125A datasheets.