Introduction
In this easy recipe, we'll walk you through the process of setting up and programming a TFT display to enhance your Arduino projects. Whether you're looking to display graphics, text, this tutorial will provide you with the essential steps to make this display work on your Arduino. Let's dive into the world of visual displays and unlock the potential of your Arduino!
Additional Toppings
Ingredients
- Arduino (On this example I chose Arduino Uno)
- TFT 2.4” LCD Shield (ILI9341 based)
- 5V to 3.3V Converter (Optional) or…
- 5 x 5.1KΩ resistors
- 5 x 2.2KΩ resistor
- Breadboard
- Cables
- Arduino IDE
Preparation
The most important thing that you need to have in mind is that the TFT display works on 3.3V and Arduino works on 5V. On this project I connected the VCC, LED and Reset to the 3.3V Pin on Arduino. However, the rest of the pins also need to be reduced from 5V to 3.3V. The easiest way to achieve this is to buy an inexpensive 5V to 3.3V logic converter like the one below:
Since I didn’t have any module to achieve this I created a basic voltage divider by using some resistors (5.1K and 2.2K). To reduce the voltage from 5V to 3.3V we can use the below formula:
(R2 / (R1 + R2) ) * V = (5.1 / (5.1+2.2))*5 =3,493 V.
Having in mind this, we can connect the pins as shown on the table below:
TFT Display 2.4” |
Arduino |
SDO (MISO) |
Pin 12 |
LED |
Pin 3.3V |
SCK |
Pin 13 |
SDI (MOSI) |
Pin 11 |
D/C |
Pin 9 |
RESET |
Pin 3.3V |
CS |
Pin 10 |
GND |
Pin GND |
VCC |
Pin 3.3V |
The connection diagram is the following:
Serving
To test your circuit you can use the example code provided by the library AdaFruit ILI9341. First you need to import the libraries:
- Adafruit ILI9341
- Adafruit GFX (Graphics libraries)
Then click on File -> Examples -> AdaFruit ILI9341 -> graphictest. Compile the code and upload it to your Arduino.
If your circuit was assembled properly, the show will start.
I’ve replicated this project from the bread board to a fixed circuit board, I will have a plug and play display for my future projects Enjoy!
Comments
Post a Comment