Using cheap AliExpress TFT Displays

Discussion about various user interfaces such as web interface, displays and apps
Post Reply
User avatar
Daveturpin
Posts: 35
Joined: Sun Dec 24, 2023 3:56 pm
Location: Virginia, USA
Has thanked: 19 times
Been thanked: 25 times
Contact:

Using cheap AliExpress TFT Displays

Post by Daveturpin »

I've been experimenting with "cheap" displays from AliExpress, with the intent of running user interface / display off of them in my Beetle project.

The display I have started with is the Guition JC3248W535 display. This is the cheapest display at <$20. It is defined as a 320 x 480 pixel 3.5" TFT display with capacitive touch:
back.jpg
This display looks promising because it has:
ESP32 S3 chip, dual core (of which I am only using one core for Arduino) Actually no longer true, I am now multithreading to improve the graphics and touch performance.
Lots of memory (SPIFFS and PSRAM)
Wifi 2.4ghz
BTLE
USB-C and serial comms
SD card
Speaker output
10 exposed general purpose input output (GPIO) pins, split into 3 japan solderless terminal (JST) headers (in 1.00mm and 1.25mm)
Can be powered by serial 3.3-5v, USB-C, or battery

At first it seemed like there was not a lot of support for the display, but with some tinkering with libraries and my own code, I have pretty much everything I need. Here is the display I have programmed:

On boot:
display_1.jpg
After giving it Serial commands that mimic CANBus:
display_2.jpg
I modeled the display off of my ID.4 center display. I am using the Adafruit_GFX library for graphics and the bb_captouch library for touch, and these things work.

I am also going to tinker with these other displays:

Guition JC8048W550, which is a larger 480 x 800 pixel 5" display with all the same specs but fewer GPIO pins,
ViewE DX48480040E, which is a 480 x 480 4" display (2.9 x 2.9") with just every single GPIO pin exposed.

Basically my goal is to put the display(s) on the CAN bus and analog circuits as my cockpit.
These displays can handle CAN, but need an external transceiver, of which I will be using the TJA1050 interface board. I will be reading kw/regen and rpm from the OpenInverter, and SoC from the Thunderstruck MCU. I also intend to add a GPS module with the NEO6MV2, get external temperature with a AHT20+BMP280 IC (which also does humidity but I don't need that), and use, at the least, the position of the DNR switch (either analog or from the CAN if OpenInverter sends these messages?) for the display.

The reason I am using GPS is that I want to get GPS speed, and not for the instantaneous speed, for which I will be using RPM, but as a long-term correction factor to make sure the RPM-speed conversion is accurate. I also show a "miles remaining" indication, which I will have to figure out how to estimate. I know my ID.4 estimates this based on SoC, driving history, and temperature. I should probably also put some kind of odometer on this, which needs to be saved for potentially years? Perhaps I can store the corrections and long-term data on the SD card? I haven't figured out how to use that yet.

And I also need to connect to the web interface to set up the inverter of course. Maybe these displays can do that as well. I haven't tried, and I know the GPIO pins will be different than on johu's code.
User avatar
Daveturpin
Posts: 35
Joined: Sun Dec 24, 2023 3:56 pm
Location: Virginia, USA
Has thanked: 19 times
Been thanked: 25 times
Contact:

Re: Using cheap AliExpress TFT Displays

Post by Daveturpin »

Successes so far:

- The Guition JC3248W535 display is the most mature now. So far I have been able to:
1) Generate graphics including improved fonts and BMPs for various warning indicators.
2) Touchscreen working but haven't done anything with it yet
3) Built a full simulation Serial interface which can set everything on the screen, including turn signals
4) Added sound via I2S protocol and added a small speaker. Have made "tick" and "tock" for turn signals, "start beep" and "warning" so far
5) Added CanBus read/write capability with the JTA1050 and can read/write commands I tell it to (still need to work on the Inverter side)
6) Have a working ESP32-CAM for backup camera, currently via WiFi and a WiFi connected device (clearly that won't work on the street)

But failures:
The other two displays, I haven't been able to get to work with the GFX library. I have learned that is is a lot harder to get a RGB display to work than a QSPI display. Although they accept the sketches without errors they. just. won't. display. stuff.

So, next:
1) Going to try a new approach. Instead of GFX I am going to try the Espressif ESP32_Display_Panel library and translate my graphics code to that other format. According the the manufacturers of the RGB boards, it should work a lot better.
2) Figure out a Serial protocol for the camera vice WiFi
3) Finish wiring in the OpenInverter and see if I can read its CAN

Edit!

I struck out 1) above, because after a lot of trial and error, using copilot to help me debug, etc., I found that the library I was already using was the correct one. I got the JC8048W550 working with the Arduino_GFX_Library. I haven't quite gotten the 480x480 display working, but it is displaying SOMETHING, meaning I just need to tweak RGB timing parameters until it works.

I also picked up an even larger 7" 800 x 480 display and will try out that one as well. Based on the limitations of the hardware, my final setup will probably be:

1) The smaller JC3248W535 display as my HUD, and also the hub of data. The reason, since this display uses QSPI protocols for the display, there are a lot of open GPIO pins that I can use for temperature, GPS, CAN, switches, etc.
2) A larger display near the radio. This will display the backup camera and serve as my GUI for CAN reading. Since all the other displays I have are RGB, which take a LOT MORE pins from the ESP32, it really only leaves a couple I can use for other things. However, each of these RGB displays has at least TWO free pins, enough for CAN, and I will use the UART-USB bridge for communicating with the camera (still experimenting with that)
3) The backup camera mounted in the rear, hard-wired via a USB cable.
User avatar
uhi22
Posts: 1085
Joined: Mon Mar 14, 2022 3:20 pm
Location: Ingolstadt/Germany
Has thanked: 187 times
Been thanked: 604 times

Re: Using cheap AliExpress TFT Displays

Post by uhi22 »

Good progress, I keep an eye on it.
A different, smaller, minimal display which I use in my OEM car is described here https://github.com/uhi22/TFT-with-CAN
No touch, no sound, no WiFi. Just CAN.
Post Reply