Micro-SD Card

Module Specification

Micro-SD Card

Micro-SD card slot for local storage and data logging

Description

Micro-SD card module for reading and writing files over SPI. Adds gigabytes of local storage for data logging, media, and configuration, with no cloud required.

For ages 14 and up. Not a toy. Contains small parts: choking hazard. Keep away from children under 3. Adult supervision recommended.

Made by Atech ApS, Lille Strandstræde 6A, st. th., 1254 København K, Denmark.

Technical Specifications

Part:
microSD Card (SPI)
Interface:
Digital
Ports:
2 neighbouring ports
Current:
~100 mA
Size:
39.5 x 19.7 x 9.5 mm

Pins

3.3V (first port)
supply
GND (first port)
ground
Data A (first port)
CS, chip select
Data B (first port)
SCLK, serial clock
3.3V (second port)
supply
GND (second port)
ground
Data A (second port)
MOSI
Data B (second port)
MISO

Key Features

  • →Standard FAT filesystem support
  • →Reads and writes files over SPI
  • →Supports high-capacity micro-SD cards
  • →Hot-swappable card slot

Common Applications

Data logging
Sensor recording
Media storage
Config & firmware files
+ Use in Project

Technical

storage

microSD Card

microSD Card (SPI)
Interfacedigital
PortsTakes 2 adjacent ports; needs a port carrying digital
Current100 mA
Size39.5 × 9.52 × 19.72 mm (CAD bounding box)
DriverMicroSDCard

Removable microSD storage on an SPI bus. Gigabytes of FAT16/FAT32 space for data logging, audio, images, or anything that must be readable on a computer afterwards. Double module spanning two adjacent ports: CS on Line A1, SCLK on Line B1, MOSI on Line A2, MISO on Line B2.

What it can do
  • write_file Write text or bytes to a path, replacing the file
  • append_line Append a line to a file
  • read_file Read a file back
  • list_dir List a directory
  • find Search for files by glob
  • grep Search inside a file for text
  • make_dir Create a directory
  • delete_file Delete a file
  • card_info Card type, capacity, used and free space
  • remount Mount a card that was inserted after boot
  • log Queue lines to a file from a background writer, without blocking
How it works
microSD CARD (SPI):
- begin() returns false when no card is inserted. Not fatal: keep running and offer
  remount(). isMounted() is the mount state.
- ONE card per board: the ESP32 core has a single global SD object, so a second
  MicroSDCard refuses to mount (micro_sd_card.h).
- Needs a HARDWARE SPI host. With a camera and a screen on the board too, call
  atech::reserveSpiHosts(n) first in setup(), before any begin(), with n = the number
  of microSD cards + cameras (atech_spi_hosts.h). Do not call setSpiHost().
- Writes BLOCK for tens of milliseconds, occasionally far longer. Never call
  writeFile()/appendLine() on a periodic path. For anything recurring call
  beginLogger(path) once in setup(), then logLine() in the loop: it queues and returns
  while a background task on core 0 writes. droppedLines() > 0 means the rate is too high.
- readFile(path) loads the whole file into RAM. Use readBytes(path, offset, buf, len) or
  readLine(path, index) for anything large.
- Directories: mkdir(path) (parents are not created). listDir(path, names, sizes, isDir,
  max) fills a bool per entry; sizes is -1 for a directory. Build paths with
  MicroSDCard::pathJoin(base, name, out, outSize) and go up with MicroSDCard::pathUp(path).
- Card info: cardType(), cardSizeBytes(), usedBytes(), freeBytes().
- FAT16 or FAT32 only. exFAT is not supported, and a 64 GB+ card from the factory is
  usually exFAT: it will not mount until reformatted.
Suggested control

A file browser pane fed by sd_list events, with a path breadcrumb and per-row Read and Delete buttons. Add a text editor panel that sends sd_write, and a card-status strip showing type, free and used space from sd_status.

Pinout
Port 1
PinLineDirFunction
1HV–not connected
25V–not connected
33.3Vinputsupply
4GND–ground
5Data AinputCS, chip select
6Data BinputSCLK, serial clock
Port 2
PinLineDirFunction
7HV–not connected
85V–not connected
93.3Vinputsupply
10GND–ground
11Data AinputMOSI
12Data B**output**MISO

from p2p/ground_truth/hardware/prototyping_line/modules/micro_sd_card.md

Chip

The doc for this module names no separate part. It is passive or discrete hardware, so there is no chip datasheet to read.