logo elektroda
logo elektroda
X
logo elektroda

[Solved] How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?

staszekrpmechatronik 462 10
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21848579
    staszekrpmechatronik
    Level 3  
    Posts: 28
    Rate: 2
    Hello everyone, in the following text I describe a problem concerning the ILI9486 display and the ESP32.

    I have been trying to solve a somewhat complicated problem for a long time (something around half a year) - I have been trying to connect the display to the ESP32 so that I can get the desired result, initially to display shapes. I've tried searching for tutorials from the YouTube platform but it hasn't had much effect, most of the videos either do it with an Arduino UNO/MEGA or just have a different display, but after spending a long time doing this unsuccessful "research" I came across this certain video where the guy shows how to solve a problem I've been struggling with for a long time. Link to the video - https://www.youtube.com/watch?v=X3jjvWWvWzc

    This video is very inaccurate, as the author didn't even show how he connected the power supply (which normally isn't a big problem, but here there is a problem between the 3.3 V and 5 V that the Arduino, to which the shield is dedicated, gives). I know you can see the VIN etc on the schematic from Fritzing, but I can't quite see it in real life as the pin layout is different.

    After a long time of failures, I started to doubt the display's performance and thought the problem might be physical and it was the display that was faulty, so I checked the whole thing by connecting it to an Arduino UNO - the display worked perfectly. (This is the glue demo I uploaded from the MCUFRIEND library)

    I also thought I'd include a link to the documentation from the shop page so that it's easier to identify this model - https://www.lcdwiki.com/res/MAR3501/3.5inch_Arduino_8BIT_Module_MAR3501_User_Manual_EN.pdf

    After connecting the display as in the video, adding 3.3 volts - 3.3 volts and GND - GND, as intuition says, the display starts and, moreover, displays shapes and what it should, but the image is DRAMATICALLY dark (compared to the same on the Arduino) - yet the colours are recognisable.

    It seems to me (although I could be wrong) that the brightness (or rather darkness) is due to the insufficient voltage the ESP32 is giving, but I don't get a different result by connecting 3.3 V to the VIN (I deliberately don't connect 5 V to the VIN, because as far as I know the ESP32 does NOT operate on 5 V, but 3.3 V) and I don't want to experiment without, because I don't want to damage anything. - Or with too long cables (which I doubt).

    I am also attaching some pictures of the whole thing at 48 MP for clarity.
    How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?20260225_1..033.jpg (10.49 MB)You must be logged in to download this attachment. How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?20260225_1..951.jpg (9.98 MB)You must be logged in to download this attachment. How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?20260225_1..919.jpg (10.39 MB)You must be logged in to download this attachment. How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?20260225_1..839.jpg (10.34 MB)You must be logged in to download this attachment. How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?20260225_1..749.jpg (1.99 MB)You must be logged in to download this attachment. How do I connect an ILI9486 display shield to ESP32, 3.3V or 5V?20260225_1..926.jpg (10.31 MB)You must be logged in to download this attachment.
    If anyone has dealt with the whole thing (or not), but is familiar with the subject as well as with SD card modules for the Arduino running over SPI, I would like them to add how to display frames to this display to create animations. I would be very happy if someone, familiar with this library, would write a bit about reading touch from the display and useful commands, as I don't understand the examples I have tested from the library.

    Thanks in advance for all the answers and best regards.

    PS: I got kicked out of Elektroda a while ago and was terribly annoyed that I lost all the text, but I found a button to restore an unsaved message, so I'm very happy.
  • ADVERTISEMENT
  • Helpful post
    #2 21848845
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14469
    Help: 650
    Rate: 12486
    staszekrpmechatronik wrote:

    It seems to me (although I could be wrong) that the brightness (or rather darkness) is due to the insufficient voltage that the esp32 gives, however, I do not get a different result by connecting 3.3v to the VIN, (I deliberately do not connect 5V to the VIN because as far as I know the esp32 does NOT operate on 5 volts but 3.3V) and I do not want to experiment without because I do not want to damage anything.

    The ESP32 runs on 3.3V and 5V will damage it, but what makes you think the VIN is the same as the VDD on your board? What model of board do you have?

    The vast majority of boards like yours are USB powered, with 5 V. There is an LDO 3.3 V AMS1117-3.3 on board, which provides 3.3 V with 5 V at the input. VIN is the pin designation of the input, if you feed 5 V to VIN, it will only pass through the LDO AMS1117-3.3 and when lowered you will get 3.3 V at the ESP.
    LM1117 regulator schematic with 10 µF capacitors and a package pinout labeled GND, OUTPUT, INPUT
    Pinout diagram of LM1117-ADJ LDO regulator labeled VIN, VOUT, and ADJ/GND
    Don't just confuse VIN with VDD, because if you gave 5 volts to VDD (directly) on your board, you would then damage the ESP, as you wrote.

    Do you have a multimeter? You could, as an exercise, check for yourself with a multimeter where VIN goes , and where VDD goes on your board. Locate the AMS1117-3.3 on it, you have the pins in the pictures from me.

    staszekrpmechatronik wrote:

    - Or from cables that are too long (which I doubt).

    I have found out many times that short cables are good practice, so I would shorten them anyway. Then you end up looking for a problem for several hours and the cables are to blame.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 21848927
    inot
    Level 38  
    Posts: 3550
    Help: 439
    Rate: 798
    staszekrpmechatronik wrote:
    After connecting the display as in the video by adding 3V3-3.3V and GND-GND as intuition says the display starts and moreover displays shapes and what it should however the picture is DRAMATICALLY dark

    Perhaps this display should be supplied with 5 volts. As you can see in the picture, the display has a 3.3 V regulator on the board.
    This page (to be translated) describes and illustrates the difference between the power supply methods.
    Link
    Two photos of a TFT display module on a breadboard with wires, showing a cartoon face with different brightness
  • #4 21849150
    staszekrpmechatronik
    Level 3  
    Posts: 28
    Rate: 2
    even here it is much brighter than mine, should I add a logic level converter? an external power supply with common ground?, speak up because I don't want to mess something up

    Added after 25 [minutes]:

    p.kaczmarek2 wrote:
    What model of board do you have?

    i honestly don't know exactly. I once got a code from GPT to check something like this:

    Code: C / C++
    Log in, to see the code

    the result of this code is
    === ESP32 parameters===
    Chip model: ESP32-D0WD-V3
    Liczba rdzeni: 2
    Wersja SDK: v5.5.1-931-g9bb7aa84fe
    Rozmiar Flash (bytes): 4194304
    MAC WiFi: 00:00:00:00:00:00
    Max heap (bytes): 292492
    CPU freq (MHz): 240

    in general, the second gpt chat says that the mac address reader in this code has no right to work. which would justify these zeros
  • ADVERTISEMENT
  • #6 21849387
    staszekrpmechatronik
    Level 3  
    Posts: 28
    Rate: 2
    >>21849236
    I don't want to be unkind, but it's an ILI9431, which is a slightly different controller. It is. I have a 9486, but I'm hoping the tutorial will work on mine, although I'm not optimistic as I've seen some that didn't work. Thanks, I'll give it a try.

    Added after 3 [minutes]:

    inot wrote:
    You have this module.

    I don't know if it's quite this module - there are 2 things pointing to it: it's a board, it's always worked on the ESP32 DEV module in the Arduino IDE and after reaching out to the manufacturer's site I found that he writes about my ESP-32 30Pin CP2102 board. What makes you conclude that it's an esp Do It?
  • ADVERTISEMENT
  • Helpful post
    #7 21849397
    inot
    Level 38  
    Posts: 3550
    Help: 439
    Rate: 798
    staszekrpmechatronik wrote:
    operated on esp32 DEV module in arduino ide

    All modules with the WROOM 32 microcontroller belong to the ESP32 DEV category.
    You can compare with the schematic.
    https://embedded-systems-design.github.io/ove...e-esp32-devkit-doit-v1/SchematicsforESP32.pdf
    staszekrpmechatronik wrote:
    but it's ILI9431, which is a slightly different controller.

    That's a fact, but it's just a library change. Both drivers however use the same bus, i.e. RD, WR, RS, CS, RST control signals and D0..D7 data signals.
  • #8 21850085
    staszekrpmechatronik
    Level 3  
    Posts: 28
    Rate: 2
    inot wrote:
    Maybe this display should be supplied with 5 V

    In the sense of from the VIN? Connect the 5 volts of the display to the VIN? I'm powering the chip from USB, so I guess 5 volts is sitting there, which I'll check, just tell me if it's safe to do so
  • Helpful post
    #9 21850108
    inot
    Level 38  
    Posts: 3550
    Help: 439
    Rate: 798
    Power schematic: NCP1117 regulator from VIN to VDD3V3 and SS14 diode between VCCUSB and VIN
    According to the diagram, the VIN is connected via a diode to the USB voltage. You can measure whether there is actually a voltage of this value on this pin.
    The example circuit Link also uses this solution.
  • #10 21850126
    staszekrpmechatronik
    Level 3  
    Posts: 28
    Rate: 2
    I have 5.11 volts between ground and VIN. I have no idea where the 0.11 volts is coming from. USB from the computer, so it should be stable. The multimeter has never fooled me. I'm connecting VIN to 5 volts of the display - hopefully it will work.

    Added after 2 minutes:

    Well, and you won't believe it - IT WORKS!
    Thanks to everyone for their help.

    Added after 19 minutes:

    p.kaczmarek2 wrote:
    I have found out many times that short cables are good practice, so I would shorten them anyway. Then you end up looking for a problem for several hours and the cables are to blame.

    I'm currently going to make something like an adapter so that this shield slides into the pins and works with the ESP32, but I'm waiting for the PCB package to arrive
  • #11 21850140
    staszekrpmechatronik
    Level 3  
    Posts: 28
    Rate: 2
    The solution to the problem appeared to be to connect the VIN pin (ESP32) to 5 V (display).
ADVERTISEMENT