Last year I bought a couple of TJCTM24024 TFT LCD screens on e-bay for around $8. I thought it was time to get them working using the Arduino.
The short answer is that I now have the TJCTM24024 working just fine. I will describe the software in a future article. Today, I will describe the adventures in trying to figure out exactly how this “mystery module from China” could be used.
The module is a 2.4” TFT touchpad, similar to what you find in a mobile phone. Someone has taken the TFT screen and mounted it on a circuit card together with a resistive touch screen and an SD card reader, together with some interface pins.
There is a great advantage to buying these kinds of modules from major online retailers such as Adafruit or Sparkfun. The main advantage is documentation and software. For example, Adafruit provides an Arduino software library for its display devices and instructions on how to use them. The disadvantage is price – a similar breakout board costs 3-4 times more than the cheap modules you can find on e-bay or elsewhere.
Since I was just wanting to play around and learn about these modules, I opted for cheap. I was willing to put in the time and wanted to learn.
TJCTM24024 – Digging In!
In my opinion, many of these mystery modules from China that you can find cheap on e-bay are good deals for experimenters and bad deals for novices. I am confident that many purchasers gave up on trying to get them to work. Here are three tips on overcoming documentation and software hurdles for modules like the TJCGM24024.
- Make sure that you can find a data sheet on the module. This is a must. Without a data sheet you are in trouble. I was able to find a schematic and a datasheet.
- From the datasheet and schematic, I was able to find out what chips were used to drive the different components on the module. The display used the popular ILI9341 driver. The touch features were controlled by the popular XPT2046 (also known as ADS7843) driver. The SD card driver chip was not documented, but I let that go because I did not intend to use it anyway. All three of these drivers shared something called the SPI bus. SPI or Serial Peripheral Interface is well supported in hardware or software on the Arduino.
- Once you know what are the driver chips, you can check available Arduino libraries to see if they are supported. The ILI9341 TFT display controller is supported by most of the Arduino display libraries. Good news. The XP2046 touch screen controller was a bit more of a challenge. Many of the touch libraries want to access the resistive touch pad X-Y pins directly rather than using the SPI bus, but eventually I found some libraries that gave me a starting point.
So, if you want to buy a mystery module such as the TJCTM24024, the above description represents the type of digging you need to do to avoid the frustration of getting it to work for you. Find a schematic or datasheet; identify the driver chips; find libraries that support these driver chips.
Supply Voltages for Display Modules like TJCTM2404
Nearly all TFT LCD Touchscreen devices use 3.3 volts. Most Arduino devices use 5.0 volts. These are not compatible. If you try to use these 3.3V devices with a normal Arduino you run a big risk of destroying the devices. You have two choices. The first is to “level shift” using chips or a small hand-made circuit to reduce the voltage. The second choice is to use a version of the Arduino designed for 3.3V. This is what I did. The Arduino Pro Mini 3.3V is shown above. It has roughly the same capabilities as the Arduino UNO except it runs at half the speed and needs an external USB interface. You can get the Pro Mini and a CP2102 USB module together for around $5.