SD Card Reader on TFT Shield

I'm trying to get the SD card reader on my 3.5" tft shield to work, but without luck until now. I'm using a Mega2560 and this shield:
https://www.amazon.de/TFT-LCD-Display-Arduino-Mega-Board-Touch-Panel/dp/B07P7M113Z/ref=sr_1_6?crid=9COBB3N1BXCJ

According to the positioning of the Reset, 3.3V, 5V, GND etc. pins on the right side and the D2-D7 Pins right below the SD pins should be digital 10-13. I've tried every pin in that range in SD.begin() but with no luck. Most guides say to enter the "CS Pin" here, but none of my SD pins is labeled as CS, so which one is it?

This is my sketch:

#include <SD.h>

void setup()
{
  Serial.begin(9600);

  if (!SD.begin(13)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
}

void loop()
{
	// nothing happens after setup
}

The SD Card is a 32GB card, formated to FAT32 via Windows Explorer. My goal would be to load a jpg (or bmp) file as splashscreen and a txt to Serial Monitor as help file.

PS: The screen itself is working just fine with MCUFRIEND_kbv and Adafruit_GFX. I'm currently only trying to get the SD reader to work.

The SPI connections have to be modified.
The shield is wired for an Uno. Modification necessary to use with a Mega. There are a couple of ways to do it. I prefered to bend the SCK, MOSI, MISO pins up and connect with jumpers to pins 52, 51, 50.

1 Like

You might want to double check that that shield has level shifters between the SD_SCK, SD_DI and SD_SS pins and the uSD. I've found that often there aren't any, which exposes the uSD card to 5V level signals from the Uno or Mega. And from looking at your photo, I'm pretty sure that's the case with your shield.

1 Like

So, in short - better don't use it if it's not really necessary, wich isn't the case in this project :wink: Thanks nevertheless for the fast responses, I think I'll go with external SD reader modules for future projects.

Edit: Concerning the level shift: I'm a little rusty on my electronics expertise (learned all of that years ago in school), but there's a line coming from the SD Reader over a modulator U3 to a resistor R1. Shouldn't that be a voltage divider?

U3 is likely to be a 3.3V voltage regulator. Possibly one of the AMS1117 devices.

Clearly the SD_SS goes direct to the micro-SD socket without any level shifting to reduce the 5V SS signal down to 3.3V.

It's likely that the remaining SPI signals also go direct without any level shifting either.

With that poor design, I would avoid using the built-in micro-SD socket as it would very likely damage the micro-SD card.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.