On a classic Arduino Uno, connect the microSD module’s SPI data and clock pins to D11 (MOSI), D12 (MISO), and D13 (SCK). Connect its chip-select (CS) pin to the pin specified by the module, then use that same pin in SD.begin(...). Check the module’s own voltage and logic requirements before powering it: a VCC label alone does not establish that its signal inputs are safe for the Uno.
Uno SPI pins and module-dependent connections
The classic Uno’s hardware SPI connections are shared across SPI peripherals:
As an Amazon Associate I earn from qualifying purchases.
- MOSI (also labeled DI on some modules) → D11
- MISO (also labeled DO) → D12
- SCK (also labeled CLK) → D13
Connect the module’s GND to Uno GND. Connect VCC only to the supply specified by the exact module’s documentation, and verify its logic-level requirements as well. Modules that look similar may differ in power and signal handling.
CS, SS, or chip select is product-dependent. Arduino’s CardInfo example uses D10, while DFRobot’s Fermion DFR0229 specifies D4. Wire the module’s CS pin to the documented Uno pin and pass that same pin to the library.
#1 Best Overall
- Unlock your creativity with the versatile UNO R3 Board ATmega328P! Explore endless possibilities in electronics projects with its user-friendly Arduino development environment, extensive digital and analog I/O pins, and compatibility with various sensors and modules. Let your imagination soar!
- Experience the power of UNO R3 Board ATmega328P! This feature-packed development board boasts a high-performance ATmega328P microcontroller, 32KB of flash memory, and 2KB of SRAM. It's perfect for both beginners and advanced users seeking to build innovative applications in robotics, home automation, and more.
- Ignite your passion for electronics with the UNO R3 Board ATmega328P! Its open-source design allows for customization, while its 14 digital I/O pins and 6 analog input pins provide ample connectivity options. Get ready to bring your ideas to life and create interactive projects like never before.
- Elevate your DIY projects with the UNO R3 Board ATmega328P! This highly versatile development board offers seamless integration with the Arduino ecosystem, providing access to a vast library of code and resources. With its reliable performance and broad compatibility, you can easily prototype and realize your electronic dreams.
- Discover the endless potential of the UNO R3 Board ATmega328P! With its robust communication interfaces, including UART, SPI, and I2C, you can connect and communicate with a wide range of devices. Whether you're a hobbyist or a professional, this powerful development board is a must-have for creating innovative and interactive electronic systems.
Example: DFRobot Fermion DFR0229
DFRobot specifies this SPI module’s working voltage as 5 V and lists it as suitable for Arduino Uno/Mega. Its published Uno wiring is:
| DFR0229 pin | Arduino Uno connection |
|---|---|
| MISO | D12 |
| SCK | D13 |
| SS / chip select | D4 |
| MOSI | D11 |
| GND | GND |
| VCC | 5 V |
Use SD.begin(4) for this pin map. DFRobot’s product page documents the voltage and connections, but does not describe every detail of the module’s signal circuitry; consult the documentation for your own board rather than assuming its internals match.
Rank #2
- START CODING WITH THE ELEGOO UNO R3: Connect the included USB cable, upload your first sketch, and build sensor, motor, display, and automation projects, making it a practical controller for maker desks, classrooms, coding clubs, and robotics labs
- ATMEGA328P CORE FOR EVERYDAY PROJECTS: A 16 MHz clock, 32 KB flash, 14 digital I/O pins with 6 PWM outputs and 6 analog inputs provide a versatile foundation for LEDs, buttons, relays, servos, displays and sensors
- RELIABLE USB PROGRAMMING AND CLEAR WIRING: The ATmega16U2 USB interface supports sketch uploads and serial communication, while clearly labeled headers help simplify connections to jumper wires, shields and modules
- POWER AND EXPAND YOUR WAY: Run the board from USB or a recommended 7-12 V external supply, then add compatible shields and modules for data logging, automation, robotics, test fixtures and custom electronics projects
- BOARD AND USB CABLE INCLUDED: Comes with 1 ELEGOO UNO R3 development board and 1 USB-A to USB-B data cable; breadboard, sensors, shields and power adapter are not included, and younger learners should work with an experienced adult
Initialize the card with Arduino’s SD library
Arduino’s SD library supports card initialization and basic file and directory operations. Include the SD library, set the CS pin to match your wiring, and check the result of SD.begin(chipSelect) before attempting file operations. For example, with the DFR0229’s CS on D4:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#include <SPI.h>
#include <SD.h>
const int chipSelect = 4;
void setup() {
Serial.begin(9600);
if (!SD.begin(chipSelect)) {
Serial.println("Card initialization failed");
return;
}
Serial.println("Card initialized");
}
void loop() {
}
For a module wired to another CS pin, change chipSelect to that pin. If you choose a CS pin other than the Uno’s hardware SS pin, keep the hardware SS pin configured as an output, as required by the SD library API.
Rank #3
- START CODING WITH A FLEXIBLE UNO R3 BOARD: Connect the included USB cable, upload sketches with Arduino IDE and build sensor, motor, display and automation projects for maker desks, classrooms, coding labs and electronics prototyping
- ATMEGA328P CORE FOR EVERYDAY PROJECTS: A 16 MHz clock, 32 KB flash, 2 KB SRAM, 1 KB EEPROM, 14 digital I/O pins with 6 PWM outputs and 6 analog inputs support LEDs, buttons, relays, servos, displays and sensors
- CH340C USB-TO-SERIAL INTERFACE: The onboard CH340C handles USB communication for sketch uploads and serial monitoring, while clearly labeled digital, analog and power headers help simplify wiring to modules and shields
- USB OR EXTERNAL POWER: Run the board from the included USB cable or a recommended 7-12 V external DC supply, then expand with compatible shields and modules for robotics, data logging, automation and custom embedded projects
- BOARD AND USB CABLE INCLUDED: Comes with 1 ELEGOO UNO R3 controller board and 1 USB-A to USB-B data cable; breadboard, jumper wires, sensors, shields and power adapter are not included
Arduino’s SD guide includes CardInfo, read/write, file-dump, and file-management examples. CardInfo checks card presence, wiring, and the selected CS pin, then looks for a FAT16 or FAT32 partition. Follow the requirements of the specific library version and example you are using rather than assuming every card format is supported.
Quick Recap
Diagnose initialization and volume errors
Use this sequence when the example does not work:
- Check seating and documented requirements. Reseat the card and confirm the module’s VCC and logic requirements are compatible with the Uno connections.
- Recheck SPI wiring. Verify MOSI/DI → D11, MISO/DO → D12, and SCK/CLK → D13, with a shared ground.
- Match CS in hardware and code. Trace the CS wire to the Uno pin and make the
SD.begin(...)argument identical. - Run CardInfo or another Arduino SD example. Inspect the Serial Monitor output to distinguish initialization trouble from later volume inspection.
- If initialization succeeds but volume inspection fails, check whether the card has the FAT16/FAT32 partition expected by the selected example and library.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




