This here is the biggest TFT display I have to control directly with an Arduino or ESP32
for example.
And I say directly because it has an 8 bit parallel input that you could connect to a
microcontroller.
Because of course there are bigger screens on the market, such as for example, this one
that I’ve used for my smart mirror project with a raspberry pi.
But this one comes with a separate driver PCB with HDMI input and with Arduino or ESP32
we don't usually use HDMI.
That’s why I say this is the biggest TFT display I found for Arduino and today we learn
how to use it.
So guys let’s get started.
What's up my friends, welcome back.
The reason I found this big display is because I’m making the second attempt of making
an MSLA printer.
Remember that with the old project was using a tiny screen of 128 by 160 pixels and compared
with that, the new LCD is huge.
So working on that project, between other LCDs I’ve tested, I found a 3.5 inch display,
a 4 inch display but also this 7 inch display.
This is the size of the display.
It works with the SDD1963 driver.
This 3.5 inch works with the ILI9341 driver and the 4 inch display works with the ST7796
driver.
For my MSLA printer I’ve removed the screen from the module PCB and I’ve already designed
all the needed PCBs and I’m working on the 3D design of the printed body.
I’ve gone with the 4 inch display instead of the big one because it has SPI communication.
So lets start.
First let’s control the big display and later we also control the small ones in case
you want to know how.
This screen comes as a module, meaning it already has the driver on it and also an SD
card reader and a touch screen film on top.
The module has this pinout for a parallel connection.
We need to connect data pins to the inputs DB0 to DB7 and the chip select, write, reset,
RD and RS pins.
Also 5V, ground and 3.3V. I won’t use the SD card for this screen
so I won’t connect the card pins.
Connect it like this to an ESP32.
For an Arduino MEGA I think you would need a display shield such as this one from AliExpress
which I don’t have right now.
To make the connections I’ve made this prototyping PCB.
To control this screen I found this library on github, TFT eSPI by Bodmer.
This library is great and compatible with all these display drivers.
So download it and install it into the Arduino libraries folder.
To use this library we first have to open the user setup file and change the parameters
for our screen just by uncommenting that part.
I open the file with Arduino so I can clearly see which part is commented and which not.
In the driver section uncomment the SSD 19 63 800 driver.
Scroll down and comment the SPI pins since we won’t use SPI.
Scroll down and here we uncomment the TFT parallel 8 bit mode since we will use the
8 parallel pins to control this screen.
Then uncomment all these pins for CS, DC, reset, WR and RD and also the pins used for
the data from 0 to 7.
Save the file.
In Arduino IDE make sure you install the ESP32 boards using the link.
I have a tutorial on how to do that or if you are using the last Arduino IDE version,
you can directly install them from the board manager.
Then go to example and from the TFT eSPI library open the graphic test.
Select the ESP32 dev module board and upload the code.
The first try didn’t work.
And I’ve had this problem for a few hours till I figured out that the ESP I was using
had an error.
In the code we use pin 33 for chip select.
But if you check pin 33 on this ESP, you can see that we have pin 23.
But we have another pin 23 here so I think this was a mistake of some sort.
So then I’ve used this other ESP32 with fewer pins, but at least this one has the
pin 33.
So make sure you use the correct hardware.
I’ve changed the writing on my prototyping PCB for the new ESP.
I uploaded the same code and this time we have better results.
We can finally see something on the screen, text, lines and shapes, screen rotation, so
this is a success.
But then I’ve uploaded a PNG example and as you can see, we get some sort of noise
and the pixels are not ok.
The poor sponge bob has all sorts of bad pixels.
To fix that error, after some tests I figured out that we need to use the next driver on
the list.
So in the setup uncomment the SSD1963 800 ALT driver.
Now the pixels are fixed but the colors are not right.
As you can see, sponge bob is blue and he should be yellow, right?
So in the setup file, we have this line here that we have to uncomment.
Basically we change the red green blue order.
Now upload the code again and success.
Finally we have good pixels and also colors.
We can also install the JPEG or PNG decoder libraries and print pictures.
This is another example for some simple pictures.
This is another example for different fonts you can use with this library and screen.
If you want to use the touch screen and the SD card, you have to connect the SPI pins
as well for both the card and the touch.
In the setup file, define the SPI pins and the CS pin for the SD card and for the touch
driver.
Let’s test more examples from this library but using the 4 inch or the 3.5 inch display,
which are the ones I will use with my MSLA printer.
For the 4 inch, in the setup file we need to select the ST 77 96 driver and for the
3.5 inch screen we have to select the ILI 94 88 driver.
These displays are using SPI connection so we only need a few wires.
So, in the setup file comment back the parallel pins.
Then go and uncomment the SPI pins.
I’ve made another prototype board for the SPI connections.
Make sure you connect the screen like this.
Now I upload the graphic test code and there you go, it works.
But now I’ve also connected the SD card wires.
I copy some files to an SD card, and these are the files for all the layers for a 3D
print object.
Now I upload this JPEG from SD card example.
I insert the SD card and as you can see we now print the JPEG files on the screen so
I could now use this display with my MSLA printer.
I’m now ready for my project but I wanted to also show you the big screen.
For my project I will remove the screen from the module PCB and create my own PCB.
These flexible pins are the connections for SPI.
I will also remove the back lighting so the screen gets transparent, so stay tuned for
that project, it should be awesome.
By the way, the smaller screens also have an option for touchscreen but I’ve ordered
them without because for the MSLA printer I need to remove all the layers and make it
transparent.
So guys I hope you’ve learned something new about TFT screens.
If so, give me a like or comment below.
Thanks again and see you later guys.