2

I was having a problem making my SD card reader work with Arduino Mega. I tried a lot of things to no avail until I read somewhere that I should try putting a 10 kΩ or 1 kΩ resistor in series with the MOSI and SCLK pins. But for some reason in my case I had to put a 1 kΩ resistor in series with SCLK and CS pins to make it work. What exactly is the reasoning?

Waveshare micro SD card reader

SD card reader schematic

Out of curiosity I added a level shifter too since the SD card module doesn't have one on it and that didn't work. So the Arduino and SD card reader pins must be connected to each other with no level shifting!

Velvet
  • 4,299
  • 4
  • 14
  • 32
BigRedMachine
  • 193
  • 1
  • 9
  • 2
    Is your Arduino a 3.3V one, or a 5V one? Your resistors aren't in series, they are pull-ups. I can understand this for the CS pin, but it's curious that you would need a pull-up on the SCLK unless it's configured wrong. Are you bit-banging the SPI or using hardware SPI? – Ron Beyer Mar 20 '20 at 02:11
  • It's 5V and I'm using the hardware SPI and I'm running the Arduino IDE SD example sketch. – BigRedMachine Mar 20 '20 at 16:08

2 Answers2

1

You can find 1 kΩ series resistors on some products, not just pull-ups. I suspect they are there for current limiting or 5 V - 3.3 V conversion purposes. Mine worked OK with the series Rs driven from 3.3 V (once I found out that the MISO signal was somehow just not getting to the SD card and I fixed it).

Velvet
  • 4,299
  • 4
  • 14
  • 32
0

I notice that some commercial products add 1k resistors (in series with) 3 of the SD card lines being: SD_CS, SD_CLK and SD_MOSI. I note that they do NOT add anything in the SD_MISO line.

All three of these lines are INPUTS, so perhaps they are added for stability reasons,or to drop the voltage a bit (across the imput impedance in the SD card). There is an argument for adding a 1k resistor to the SD_MISO line, as this would protect the drivers from damage if there are two devices trying to drive the MISO line, BUT the aformentioned commercial products don't use one on the MISO line!