Introduction: Micro SD Card Tutorial
This Micro SD Card is used for transfering data to and from a standard sd card. The pin out is directly compatible with Arduino and also can be used with other microcontrollers. It allow us to add mass storage and data logging to our project.
- Input Voltage: 3.3V/5V
- With all SD SPI Pins out :MOSI, SCK, MISO and CS ,for further connection
- Through programming, you can read and write to the SD card using your arduino
- Make your SD application more easier and simple
- Communicate with Arduino using SPI interface
- Push-pop socket with card slightly over the edge of the PCB so its easy to insert and remove
- 4 mounting holes with 2.2mm diameter
- Only use 4 I/O pins on the Arduino
- Size: 42mm x 25mm x 5mm
Step 1: Step 1 : Material Planning
For this tutorial, the items needed to run this project are:
- Arduino Uno
- USB Cable type A to B
- Micro Sd Card Module
- Female to male jumper wire
- SD Card
Step 2: Step 2 : Hardware Installation
Micro SD Card Module
This module uses the standard SPI interface for communication, which involve SPI buses, MISO, MOSI, SCK, and a CS signal pin. through programming, the data can easily be read and wrote into SD Card by using the Arduino or other microcontrollers.
- CS (chip select)
- SCK (serial clock)
- MOSI (master out slave in)
- VCC (3.3V or 5V)
- GND (ground)
Diagram above shows the simple connection between Micro SD Card Module and Arduino UNO:
- Connect VCC with 5V in the Arduino.
- Then, connect the GND of SD card to the ground of Arduino.
- Connect CS to pin 14
- Connect SCK to pin 13
- MOSI connect to the pin 11
- Lastly, connect MISO to pin 12
After completing the connection, connect the Arduino to power supply with USB cable.
Step 3: Step 3: Insert Coding
Lets try an example in the Arduino.
- Open the Arduino software
- Click 'file'
- Find the 'example'
- Click 'SD'
- Choose 'ReadWrite'
Step 4: Step 4 : Choose COM Port
Just click at 'Tools', then choose your port available on your PC.
Step 5: Step 5 : Upload Souce Code
Upload the source code into the Arduino and open the Serial Monitor to se the result.
Step 6: Ster 6 : Result
The following result will be displayed in the monitor. In this example, the .txt file named "test.txt" was created and the sentence "testing 1,2,3." were wrote into the .txt file. After this, the sentence "testing 1,2,3." were read back from .txt file and display on serial monitor.
soceraso made it!
We have a be nice policy.
Please be positive and constructive.
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
Sketch uses 11132 bytes (34%) of program storage space. Maximum is 32256 bytes.
Global variables use 1026 bytes (50%) of dynamic memory, leaving 1022 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20
An error occurred while uploading the sketch
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I am using the same process..
but it shows "sd fail" or "fail to initialize sd card"
how can i resolve this?