feature-requests icon indicating copy to clipboard operation
feature-requests copied to clipboard

Support for ILI9488 display controller

Open FloFri opened this issue 2 years ago • 12 comments

Describe the problem you have/What new integration you would like

The ILI9488 display controller is used in some "larger" TFT displays (https://www.aliexpress.com/item/1005003773199628.html). It is similar to the ILI9341 display controller but needs some changes to work:

  • Changing the resolution to 480*320
  • Changing the colors to 888-values (e.g.: 24 bit rgb)

Please describe your use case for this integration and alternatives you've tried:

I already tried to use the ILI9341 component but it did not work (display is flashing white). I also tried to implement the needed changes myself but had no success. Changing the resolution resulted in a boot loop and only changing the way colors are handled did not work either (maybe my math was wrong).

Additional context

An arduino library for ILI9488 can be found here: https://github.com/jaretburkett/ILI9488

FloFri avatar Apr 30 '22 08:04 FloFri

Plus 1, but this has been requested before with no success. We can only hope.

Zoogara avatar May 07 '22 05:05 Zoogara

plus 1 - support for ESP32 TouchDown that includes the ILI9488 display

zala143 avatar May 07 '22 23:05 zala143

支持 ESP32 触控,包括 ILI9488 显示屏

hyq023488 avatar May 15 '22 05:05 hyq023488

I am currently using an ili9486 based controller with an esp32 using a closed PR from MasterTim17.

https://github.com/esphome/esphome/pull/1523

Not sure if this helps at all but it does work just fine.

workingmanrob avatar May 19 '22 20:05 workingmanrob

Would like to see support for this as well, because it is used in the ESP32 TouchDown (aka FreeTouchDeck).

markusressel avatar Jun 23 '22 16:06 markusressel

A big plus 1 from me - would really like this to be supported with touch XPT2046 - have a few lying around atm from my freetouchdeck days. had the idea having these on walls and desks integrated with home assistant.

@Zoogara what was the deal on prev request and being denied support?

hoodlumj3 avatar Sep 16 '22 18:09 hoodlumj3

@Zoogara what was the deal on prev request and being denied support?

Hmm - that was a while back - I should have linked the issue number.

The fact that this is still open is a good sign. Also that MasterTim17 has supposedly got these working in a forked version of ESPhome: https://github.com/esphome/esphome/pull/1523

I am currently pairing some spare freetouchdeck adapter boards from Dustin Watts with the 3.2" ILI9341 - the displays are pin-compatible and although lower resolution are only slightly smaller.

Zoogara avatar Sep 17 '22 02:09 Zoogara

I have it working right now using current (2022.8.3). It's not perfect but it's functional. I mean the colours are a bit of a disaster but I didn't care for my purpose.

I used https://esphome.io/guides/faq.html#how-can-i-test-a-pull-request like this.

external_components:
  - source: github://pr#1523
    components:
      - display
      - ili9486

I also opened a feature request so :+1: it all day - https://github.com/esphome/feature-requests/issues/1853

... oh my bad - this is for ili9488 - I forgot I had crossed over.. well maybe what Tim did for the 9486 will apply here as well. No 9488 to test with here though.

workingmanrob avatar Sep 17 '22 15:09 workingmanrob

I just created a PR esphome/esphome#3795 that does the same thing,

nielsnl68 avatar Oct 05 '22 10:10 nielsnl68

Plus 1 from me too! I have a 480x320 SPI display I bought from AliExpress which I can't get working despite using different types of drivers (I mainly focused on the ILI9341 display because - in my ignorance - I thought that I was getting)

This is such a good display model - at a nice price - I would love to see it working with ESPHome :)

I've tried github://pr#1523 (as above) which only shows a full screen white fill. In the original 9341 (see photo) tests I got a partial display - before I found out the display was probably a 9488. 20221013_190915

BerkshireBugsy avatar Oct 15 '22 12:10 BerkshireBugsy

I added the ili9488 to the ili9xxx component only to find out that the internal memory was not enough. We need to find a way to resolve that before it going to get drivers like this one to work within esphome.

But please know, i am working on it.

nielsnl68 avatar Oct 15 '22 12:10 nielsnl68

Thank you very much for the update

Out of curiosity is it the internal memory of the display hardware that is the issue or somewhere else in the chain?

BerkshireBugsy avatar Oct 15 '22 13:10 BerkshireBugsy

@nielsnl68

Thank you for your work, I have a ILI9488 and tried your PR, but got the same error.

[C][spi:023]: Setting up SPI bus... [D][ledc.output:041]: Calculating resolution bit-depth for frequency 1000.000000 [D][ledc.output:046]: Resolution calculated as 16 [E][display:022]: Could not allocate buffer for display!

If there is a fix, i would love to test it.

JeroenNL85 avatar Nov 03 '22 21:11 JeroenNL85

You need to use an esp32 with PSRAM

nielsnl68 avatar Nov 04 '22 00:11 nielsnl68

@nielsnl68 I am using your PR to get my ILI9488 screen working. I noticed that lines 35 - 37 in display.py (where the models are declared) are commented. Is that on purpose, or can I safely uncomment line 37?

Wummeke avatar Nov 17 '22 18:11 Wummeke

when you sure it works for you (You have a esp32 with PSRAM) then you can safely uncomment the ILI9488.

nielsnl68 avatar Nov 17 '22 18:11 nielsnl68

I do, since today. Unfortunately, I don't get the screen to work yet. I only get a blank screen with a grey-ish section on the right (when I hold the screen in landscape, wit pins to the left).

Wummeke avatar Nov 17 '22 19:11 Wummeke

that sounds as if not the whole screen is initialized. Are you on Discord as well. When so could you ping me there. then we can walk trough the config and see what to fix.

nielsnl68 avatar Nov 17 '22 19:11 nielsnl68

I have this display https://www.amazon.com.au/Touch-Screen-Module-Resolution-Arduino-Mega2560/dp/B07F2XM5HW but have not been successful. Would love it to work on ESPHome. Controller: ili9481 ili9468, ili9488 hx8357, or r61581 Pin info : 1 NC 2 VDD 3 VDD 4 CS 5 RS 6 WR 7 RD 8 RESET Has anyone got this working? How much RAM is required to run this one?

carryonrewardless avatar May 03 '23 02:05 carryonrewardless

@carryonrewardless, wouw, that seller let you really hanging 👎🏻 Have you been able to get the display working with the Mega2560? When not then my suggestion is to contact them and request the "Initialization Code" and try that with arduino IDE and see of you get the display working. When you get it working i am happy to add that to the list of options for the ili9xxx interface.

nielsnl68 avatar May 03 '23 09:05 nielsnl68

Has anyone got this working? How much RAM is required to run this one?

You need an esp32 with 2MB or more of PSRAM. You can calculate the memory size multiply the height, width and then by 2. For your display that is around 300KB.

nielsnl68 avatar May 03 '23 10:05 nielsnl68

Being pin compatible with Arduino Uno I paired it up with this https://99tech.com.au/product/esp32-uno-d1/ and have it working using Adafruit_GFX.h and MCUFRIEND_kbv.h libraries and mqtt to send it data for display. It's pretty basic and rather ugly. I want to have another attempt to get it working with ESPHome. The ESP32 Uno D1 seems like it should have enough memory but its above my pay grade. Any comments?

carryonrewardless avatar May 03 '23 13:05 carryonrewardless

Ah I found this for the display. http://www.lcdwiki.com/3.5inch_Arduino_Display-UNO It states it as a ILI9486/ST7796 I am going to try hooking it up to an ESP32 S2FN4R2.

carryonrewardless avatar Jun 04 '23 11:06 carryonrewardless