Save this video free

CE351 lec37 SD card and SPI

Yiyan Li · 53:04 · Watch on YouTube

Part of Fort Lewis College CE351. See all 20 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Yiyan Li explains why high-speed sampling to an SD card requires writing raw 512-byte blocks instead of relying on Arduino's file-oriented SD.h workflow, which can take roughly 15 to 50 milliseconds per write. The lecture covers SPI wiring and 3.3 V level shifting, PCB practices for impedance matching and decoupling, block addressing, and how to stream blocks continuously before sending recorded data to a computer for analysis.

Key takeaways

Chapters

0:00 Why 40 kHz Sampling Requires Raw SD Card Blocks
8:30 Tutorial Tasks and Hardware Setup Expectations
9:20 SPI Pins, 3.3 V SD Cards, and Buffer Direction
15:20 SPI Signal Integrity and Series Resistor Matching
19:40 LP2985 Power Regulation and PCB Decoupling Capacitors
28:50 SD Card Addressing and SPI Master Responsibilities
34:30 Why SdFat Block Access Replaces File-Oriented SD.h
39:00 Continuous SD Card Writes with Start, Data, and Stop
45:20 Reading and Spooling SD Data to a Computer
49:50 Tutorial Wrap-Up: Block Storage and Sampling Practice

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 options. Okay? Either use your laptops through serial monitor, save the data to the C CSV file, and and or you directly store everything on the SD card. So uh the major task for this tutorial seven, right? Is to learn um how to save data to to the SD card. So there are there are two options. If you find some online resources for especially for the Arduino platforms, they have a header file called sd.h. And usually that's for beginners um to to use. They don't really care about the speed. Okay? So it's SD .h something like this. You see this everywhere.

0:47 You see this everywhere. Um and and we cannot use it. The thing is when that if you are using SD .h, it opens a file first and then write to it. Write to the card. So this takes about like 15 to 50 milliseconds in general. Okay? Um but for our case at that point you you can you can slow down the sample rate, right? Just in case that the 25 microseconds interrupt the ADC that we have been using uh since a few weeks ago, right? Is that 40 kHz?

1:37 It's about 40 kHz, right? Or 400 kHz? 40 kHz. So for this sample rate, for example, this is required. Okay? You cannot slow it down. If it's 25 microseconds times 5 uh 12 per block, so it's another concept. So in the SD card it's it's separating um the the entire SD card space by blocks. No matter what the size is, for example, 16 gigabytes, or maybe 32 gigabytes for the card I just gave to you guys, right? So the modern modern ones are pretty big. And they are separated by blocks or we can say pages. And every block or every page is

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Yiyan Li.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.