

The Waveshare MicroSD Module (Part ID: Waveshare 3947) is a compact and efficient solution for interfacing with MicroSD cards. It enables seamless data storage and retrieval in embedded systems, making it ideal for applications requiring external memory. The module is designed to work with a wide range of microcontrollers and development boards, including Arduino, Raspberry Pi, and STM32.








The Waveshare MicroSD Module is built for reliability and ease of use. Below are its key technical details:
| Parameter | Specification |
|---|---|
| Operating Voltage | 3.3V or 5V |
| Communication Protocol | SPI (Serial Peripheral Interface) |
| Supported Card Types | MicroSD, MicroSDHC |
| Operating Temperature | -25°C to 85°C |
| Dimensions | 42mm x 24mm |
| Mounting Type | PCB Mount |
The module has a 6-pin interface for easy connection to microcontrollers. Below is the pinout:
| Pin Name | Pin Number | Description |
|---|---|---|
| VCC | 1 | Power supply input (3.3V or 5V) |
| GND | 2 | Ground |
| MISO | 3 | Master In Slave Out (SPI data output) |
| MOSI | 4 | Master Out Slave In (SPI data input) |
| SCK | 5 | Serial Clock (SPI clock signal) |
| CS | 6 | Chip Select (SPI enable signal) |
VCC pin to a 3.3V or 5V power source and the GND pin to ground.MISO, MOSI, SCK, and CS pins to the corresponding SPI pins on your microcontroller.Below is an example of how to use the Waveshare MicroSD Module with an Arduino UNO:
#include <SPI.h>
#include <SD.h>
// Define the Chip Select (CS) pin for the SD module
const int chipSelect = 10;
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
while (!Serial) {
; // Wait for the serial port to connect (for native USB boards)
}
Serial.println("Initializing SD card...");
// Initialize the SD card
if (!SD.begin(chipSelect)) {
Serial.println("SD card initialization failed!");
return;
}
Serial.println("SD card initialized successfully.");
// Create or open a file on the SD card
File dataFile = SD.open("example.txt", FILE_WRITE);
// Check if the file opened successfully
if (dataFile) {
dataFile.println("Hello, Waveshare MicroSD Module!");
dataFile.close(); // Close the file to save changes
Serial.println("Data written to example.txt");
} else {
Serial.println("Error opening example.txt");
}
}
void loop() {
// Nothing to do here
}
SD Card Initialization Fails
Data Corruption
File Not Found
Slow Data Transfer
Q: Can I use this module with a Raspberry Pi?
A: Yes, the module is compatible with Raspberry Pi. Use the SPI interface and configure it in the Raspberry Pi's settings.
Q: What is the maximum capacity of MicroSD card supported?
A: The module supports MicroSD and MicroSDHC cards, typically up to 32GB. Larger cards may work if formatted to FAT32, but compatibility is not guaranteed.
Q: Is the module hot-swappable?
A: No, it is not recommended to insert or remove the MicroSD card while the module is powered to avoid data corruption or hardware damage.
Q: Can I use multiple MicroSD modules on the same SPI bus?
A: Yes, you can use multiple modules by assigning a unique Chip Select (CS) pin to each module.
This concludes the documentation for the Waveshare MicroSD Module (Part ID: Waveshare 3947).