SD module for uno - what components to buy

Hello,

A while ago I posted about a project I was working on. What I am trying to do is send serial data from an Arduino to another device, and from what I've done so far I've figured it's possible and already have a good chunk of code written for it. I am now working on buying a few different components, and I am not sure what to get.

I have an Arduino uno, as far as I can tell it has just enough ports for what I need. I also have a 16x2 LCD display that came with the starter kit.

This is what I am looking at: SD module (amazon)

I plan to use several buttons to make an interface on the screen where I can choose what file to use to send the serial data. An SD card will hold the file data. The LCD indicates things like what files are available, what is selected, if data is being sent out, etc.

Is what I linked fine for an uno? Also, is there anything obvious I missed that I will need (aside from small things like resistors, etc)?

That looks fine. It should do what you want. Working with SD cards is pretty straight forward on an Arduino.

miker00lz:
That looks fine. It should do what you want. Working with SD cards is pretty straight forward on an Arduino.

Thank you, never worked with SD on an Arduino before so that's good to know. I appreciate it

I don't think that module is right for an Uno, which is a 5V device. SD cards are 3.3V devices, and that module does not drop the voltage on the Uno's SPI output pins SCLK, MOSI and CS to 3.3V. It just sends them through at 5V while powering the SD card at 3.3V, which violates maximum ratings. I know these modules are widely used, but this is just bad design. See attached schematic for this type of module. A 10K pullup resistor to 3.3V does nothing to reduce the voltage from 5V. It's not clear how these modules could ever work, but apparently some SD cards tolerate the abuse and work ok.

If you could use a microSD card instead, those modules typically include a level shifter IC, which is the proper design. However, those don't work well if there is more than one SPI slave because they don't let go of the MISO line when CS is turned off. But if you only have one SPI device, it should work fine.

You're right, you'd have to make your own voltage dividers to make sure you don't risk frying your cards. Very cheap, bad design. Easy fix, but the whole point of buying a module like that is to just be able to plug it in and go.

Sorry, kasi3958. I should have looked more closely.

It looks like this module is full size SD, but has the level shifter chip:

I don't know of any other source.

Alternatively, since the "bad" module does provide pullup resistors, you can cut the traces from the header pins, and instead connect with diodes. That would permit the MCU to bring a line low, but not high. When the MCU output goes to 5V, the diode would block that, and "high" would be provided to the SD card by the pullup resistor on the module. See attached picture. This fix probably would not operate as fast as using a level-shifter chip, but if that's not an issue, this will work in a pinch.

kasi3598:
is there anything obvious I missed that I will need (aside from small things like resistors, etc)?

I found the simplest option is a W5100 Ethernet shield. All doubts about levels, resistors, and voltages etc. are taken care of. They can be had for just a couple of dollars more than the module you refer to, and you simply plug it in and go.

ShermanP:
If you could use a microSD card instead, those modules typically include a level shifter IC, which is the proper design. However, those don't work well if there is more than one SPI slave because they don't let go of the MISO line when CS is turned off. But if you only have one SPI device, it should work fine.

Oh alright, good thing I hadn't ordered anything yet. :slight_smile: I'll look into using a microSD card instead, should be no problem. I won't be using more than one SPI device as far as I know, I just need pretty much anything that can hold a few megabytes of files. It seems like it works about the same way as an SD card in terms of programming, my only concern is if it uses the same amount of pins or less than a regular SD in order to be able to use both it and the LCD screen.

I'll probably just avoid using a full size SD card because based off of what ShermanP and miker00lz said, it looks like it's more trouble than it's worth. Those are good solutions in case I plan to work with them in the future however, I appreciate it.

Nick_Pyner:
I found the simplest option is a W5100 Ethernet shield. All doubts about levels, resistors, and voltages etc. are taken care of. They can be had for just a couple of dollars more than the module you refer to, and you simply plug it in and go.

Will take a look at the ethernet shield. It has more features than I'd need but looks very easy to use, thanks for the suggestion.

Regular and micro SD both have the same number of connections - power, ground, CS, CLK, MISO and MOSI.

Just make sure the LCD doesn't also connect via SPI.

Many Arduino screen modules include an SD card slot for free. A 2.4" color TFT touchscreen makes a much better-looking project than those old 16X2 LCDs.

MorganS:
Many Arduino screen modules include an SD card slot for free. A 2.4" color TFT touchscreen makes a much better-looking project than those old 16X2 LCDs.

I hadn't actually considered using a touchscreen at all, that is probably a lot better for what I'm trying to do anyway! Thanks for the suggestion, something like that would simplify the physical part of the project a lot.