Go Down

Topic: [solved] banggood 1.8" TFT SD Card problem (Read 4112 times) previous topic - next topic

hape

Mar 28, 2016, 12:00 pm Last Edit: Apr 02, 2016, 03:40 pm by hape
hi everyone
i have managed to get this TFT (http://blog.simtronyx.de/wp-content/uploads/Anschlussbelegung-1.8-Zoll-TFT-Farb-Display-HY-1.8-SPI-1024x768.jpg) to work (no logic converter needs to be inserted). So after good results i ordered another TFT but get this one: http://devacron.com/wp-content/uploads/2014/05/arduino_tft_128x160b1.jpg

So both of them are with an ST7735 Chipset because i get on both a picture. The second one with header pins only for the display i need to connect a logic converter to get a nice picture.

But how to use the SD Card? I have soldered the 16Pin Header on the other side as the yellow pin headers (and only wired here the Arduino) but i got no information from the SD Card. Did someone manage to get it working? Did you need for the SD Card also the logic level converter (the MOSI /SDA and CLK / SCLK are shared).

So no conclusion how to get this to work.

after searching i found this:
https://www.youtube.com/watch?v=-dk_xDSTqEY    -> here  i can see there is nothing soldered on the tft pcb
but in the explanation there is this
http://i.imgur.com/vEKAYi4.jpg
and this
http://i.imgur.com/nLnwFC0.jpg

now i have tried this: http://i.imgur.com/nLnwFC0.jpg
but it also didn't work. Does nobody use this TFT? They sell it on Banggood like hell but only a few people did get it to work.
If there is somebody who has done this pls be so helpful and explain how.

thx
hape

david_prentice

So what is the problem?

The SD card has got series resistors.   R1, R5, R5.   It should work with 5V logic and with 3.3V logic.
Connect it to your SPI pins and run any SD examples.

The TFT does not appear to have any series resistors or level converters.     They might be concealed on the flexi-ribbon.    I would be happier with 3V logic.    If your screen works with 5V that is your choice.

Anyway,   I am sure that your display should work perfectly.    I have a similar one that just has the 16x1 header.   Both TFT and SD on the same SPI bus.   Separate TFT_CS, SD_CS pins.   3.3V logic.

David.


hape

hi
@David:
what i have tested is what you write. I have done 1kOhm resistors between Arduino and TFT -> works.

So TFT no problem now the SD Card
I have done nothing between SD Card and Arduino -> it doesn't work.
Than i have tested it with a logic level converter -> it doesn't work.
than i have done it with the described 10k resistor voltage divider -> it doesn't work.

Therefor i asked if someone has the ->same<- TFT and got the SD Card to work (if you read the forum on Banggood a few people mentioned this too but no one describes how it works).

thx for your help and i hope i could explain it that also native english people understood my broken english

hape

david_prentice

Measure the values of the existing series resistors on the SD.    Mine are 1k0.
Connect to Uno:
Code: [Select]

SD_CS   10
SD_MOSI 11
SD_MISO 12
SD SCK  13
GND     0V
VCC     5V

Run examples from the "SD.h" library.

Of course, you need to insert a real SD card into the socket.

As I said earlier,   the TFT and SD should work just fine.   There will be examples in the "Adafruit_ST7735.h" library.

David.

hape

hi
@David
so i measured my Resistors on the TFT before the SD Card. They are named as follows:
R1 10kOhm
R5 10kOhm
C3 (it has to be a capacitor
R4 10kOhm
R3 10kOhm
so that is totally different from yours but why ???
thx for help
hape

david_prentice

10k seems rather high for a series resistor.

SD cards and TFTs run at 3.3V.   I doubt if 10k resistors would give reliable signals.
This may be why they have not populated the 16x1 header.

The red MEGA2560 TFT shields also use 10k series resistors.    Their microSD cards do not work reliably.

Either replace with 1k0 or use 3.3V logic and 0R resistors.

David.

hape

hi
@David
thx very much for your help so far. So i will solder them out and make a test. I will (if it does or not) be back and tell what expirience i have made
hape

david_prentice

Do not use  0R resistors with 5V.   Replace the 10k with 2k2 or 1k0.

First off,   check that your SD disk is good.    e.g. on a PC or a proper Arduino shield with level shifters.

David.

david_prentice

#8
Mar 29, 2016, 12:17 pm Last Edit: Mar 29, 2016, 12:18 pm by david_prentice
My Blue display is like your first picture
I thought that I would just try my Blue display with 5V logic.    Hey-ho,  it can die if it wants.

The TFT works fine without the SD.    The SD works fine without the TFT.   

Programs that work fine with 3.3V logic are NOT happy with 5V.    The TFT display flashes during SD access.

I suspect that 5V logic might be ok with 1k0 series resistors on TFT_CS, TFT_RS, TFT_A0, ...

Life is a lot simpler with 3.3V logic.    By the time that you have added extra resistors,  level translators,  you might just as well have bought a 3.3V Arduino.

David.

hape

hi
@David: big thx to you. Without your hint that the resistors are to big i had never solved this problem. But for others who read this the solution is unbelievable. For the TFT its described that you have to use the 1kO resistors for the wires. So also its clear you have to share the Clock and MOSI  lines between the TFT and the SD Card. So i startet after the nice explanation from David and test all the resistors between which line they are. And i found that the resistors named 103 on it and R3, R4 and R5 beside are the lines from the SDCard field named CLK, MOSI and CS. So i only soldered the resistors out and uses the 1kO from the Arduino to the TFT and it works perfectly.
So the only question is: Who is such an idiot to design this PCB? I think not many people tried so hard to find out whats going wrong (i tried almost for 3 whole days to figure this out).

So if you have a 1.8" TFT with the yellow pins for the TFT on the one side and NC, NC, CD, MOSI, MISO, CLK (last 4 are SDCard), CS, SCK, SDA, RS, RST (last 5 are TFT), NC, BL, NC, VCC, GND (from pin 16 to pin 1) solder 4 more pins in the SDCard holes and solder the R3, R4 and R5 resistors out.
Then connect like this http://labs.domipheus.com/blog/wp-content/uploads/2014/06/1_8_TFT.png and connect yellow pin 4 DIN to SDCard MOSI and yellow pin 5 CLK to SDCard CLK. Now SDCard MISO has to go to pin 12 in Arduino UNO (without resistor) and SDCard CS where ever you plan the cable select (with a 1kO resistor) (in the SDCard info sample sketch its D4 on Arduino).

After this the TFT works perfectly and also the SD Card. This is imho a easy to make solution and you have to do something on this PCB if you want to work with the SD Card.

So my hope is that a few people now read this and bring the SD Card to work.

thx a lot for this forum to help others finding tricky solutions :-)
and a special thx to David
hape

david_prentice

#10
Apr 02, 2016, 03:46 pm Last Edit: Apr 02, 2016, 03:50 pm by david_prentice
Both SD_CS and TFT_CS need separate series resistors.

You can leave the R3, R4, R5 resistors in circuit.    Connect the TFT SPI lines to the SD side of these resistors.   You still need external series resistors for RESET, A0, TFT_CS.   But you can solder header pins onto the 16x1.   Use the 16x1 header for your external connections.   Remove the yellow header.

I would still be happier with proper 3.3V logic.   i.e. from Due or Zero.
Using series resistors relies on the chip substrate diodes conducting.     Not the best solution.

David.

petewill

#11
May 13, 2016, 01:43 am Last Edit: May 13, 2016, 01:52 am by petewill
I just wanted to say thanks for this thread.  I was able to get my SD card and TFT display working because of it!  I am a pretty visual person so I put together a wiring diagram that is working for me based on the info above.  If anyone sees anything incorrect about it please let me know and I'll correct it.

I used the Adafruit ST7735 "soft_spitftbitmap" example from the library.

I changed this in the code:
Code: [Select]

#define SPI_SCK 8  //Labeled CLK on display
#define SPI_DI  4 //Labeled MISO on display
#define SPI_DO  7  //Labeled MOSI on display

#define SD_CS    5  // Chip select line for SD card


//Use these pins for the display
#define TFT_CS   3
#define TFT_DC   6 //Labeled RS on display
#define TFT_RST  0  // you can also connect this to the Arduino reset

Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, SPI_DO, SPI_SCK, TFT_RST);


My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

darbyvet

I found this article and it has really helped me wire up my banggood tft and SD card reader

I wired up the SD card reader with the CS line to digital pin 4 to be consistent with the example sketches and ran spifitbtmap. I keep getting an SD card initialization failure error.

When I run cardinfo it says the wiring is correct and the card is present but it cant find the FAT16/FAT32 partition.It reads the card as an SDHC card.

I formatted the card and it reads fine on my pC.IT is a 4g SDHC card.

I ran the graphicstest and it runs perfectly now 1k resistors set up as in the above example.

Anyone have any suggestions as to why the SD card reader is not working?

Carl

Go Up