Module 3.5: SD Cards

In Module 3.5, we begin with the basics of SD cards in all their wonderful form factors and flavors. We discuss the technology that makes SD cards possible, the types of memory cards, the form factors, their reliability, and power consumption. We also discuss what all those little numbers you normally ignore on your SD card mean, like read speed, card type, speed class, UHS speed class, and bus speed.

Once that’s done, we talk about file systems and why they’re needed. We go into how a file system fits on top of SD cards, how it organizes the bulk storage on an SD card, and the different types of file systems including FAT32 and exFAT.

In the lab portion, we’ll learn how we access the SD card on the WildLogger, installing the Arduino library to control our SD cards, and how easy it is to implement a system that can access multiple SD cards. We learn how to create and open files for reading, writing, or appending, how to read and write to a file, and things to watch out for to prevent file corruption. We implement a mini DOS system (Wild-DOS?) with commands to list files in a directory, and read, write, and delete files. Finally we finish off by implementing a command to write timestamped sensor data and files to our SD card.

Click here for video slides, terminology, downloads and additional references

 

3.5.1  Reading and Writing to the SD Card

In this video we cover

3.5.1 – Reading and Writing to the SD Card (PDF)

 

 

3.5.2  The FAT File System and Reading / Writing Our First Files – Lab 1

In this video we cover

3.5.2: The FAT File System and Reading / Writing Our First Files – Lab 1 (PDF)

 

 

3.5.3 Did I Just Create MS-DOS? – Lab 2

In this video we cover

3.5.3: Did I Just Create MS-DOS? – Lab 2 (PDF)

 

 

3.5.4 Did I Just Create A Data Logger? – Lab 3

In this video we cover

3.5.4: Did I Just Create a Data Logger? – Lab 3 (PDF)

 

 

Supporting Materials

Terminology Sheet

Module 3.5 Terminology Cheatsheet (PDF)

 

Video Slides

3.5.1 – Reading and Writing to the SD Card (PDF)

3.5.2: The FAT File System and Reading / Writing Our First Files – Lab 1 (PDF)

3.5.3: Did I Just Create MS-DOS? – Lab 2 (PDF)

3.5.4: Did I Just Create a Data Logger? – Lab 3 (PDF)

 

Reformatting an SD Card

Formatting a microSD card to FAT32 – Windows

Formatting a microSD card to FAT32 – Mac

 

Conversations & Troubleshooting

Module 3.5 Discussion (forum thread)

 

Useful References

SD Card Symbols Meanings – Reference 1

SD Card Symbols Meanings – Reference 2

Choose The Right SD Card

Explanation of Different Kinds of Flash Memory

Flash Memory Guide (from Kingston Manufacturer – PDF)

Physical Structure of Flash

How It works – NAND Flash Technology Basics

microSD Card Power Consumption Comparison

Tech Republic – FAT File System

FAT explained

FAT File Systems – Clusters

Unsigned Integers


Copy link