Esp32 + ili9341 + 5v power supply are creating laggy UI

I’m experiencing a problem with laggy ui when I power esp32 with different power supply than usb port on laptop. When it is connected to the laptop everything works smooth. When I power esp32 with external 5v power supply via micro usb or pins ui is laggy.
I tried different power supply different esp32 bord and display. Both external power supplies that I tried are 5v 2A.
Every time result is the same. Also with external power supply it is using more CPU resources for rendering.
Please watch the video.

Does anyone have idea what can be the problem?

I’m guessing the clock speed is lower for some reason when powered externally.

1 Like

Are you writing anything out to serial?
I’m not sure if it could cause the problem but its worth asking…

1 Like

@embeddedt I will check clock speed.
@elgerg I’m printing standard things some debug messages. So you think that it can be a problem?

I’m not 100% sure.

Some chips do seem to suffer:

If the buffer is overflowing as nothing is ack’ing it that might cause the slow down?

I’d try removing them and testing.

Quick thoughts, since the power supply seems to make the difference, the first thing I think of is check for noise/interference from the power supply. Noise from the power supply could cause interrupts on floating GPIOs (if configured) or wreck havoc with a capacitive touch screen (causing touch interrupts).


I am not sure if this was established. As suggested earlier here, this may be related to the lack of communication with a computer.

Serial monitor is not causing problem. I removed some logs not all of them (I was logging coordinates every time when I touch the screen).
@bneuen can be that power supply is not optimal. I was testing it with phone charger 5V 2A and with power supply from image bellow also 5V 2A. Both power sources are acting identical.

Also when I plug cable from phone charger to usb port on laptop everything is working normally (I’m powering it via VIN pin nothing is connected to micro usb port). So we can be sure that serial monitor is not causing problems.
I accidentally discovered interesting thing. When I hold connection of positive or negative wire with fingers, everything works perfectly. I’m sure that I need to put capacitor somewhere.
Look at the video.

Any further suggestions?

That is interesting.

Looking at the video I’d say that the breadboard is the issue… I suspect if you wired it up directly with dupont cables or a custom PCB it would behave a lot better.

I was trying to add 0.1uF and 1000uF between positive and negative wire without luck. If I put finger on 1000uF capacitor everything works perfectly. If I move finger problem is starting again. I’m not sure that breadboard is causing issue because when I power esp32 via power bank everything is working perfectly. I think that power supply is too “noisy” for esp32. To bad that I don’t have oscilloscope. I tested it with another phone charger and didn’t work. Tomorrow i will do further tests.


I connected GND pin to the power outlet earth terminal. So phone charger is not good power source for microcontroller because it’s not grounded. Also my other power supply was not grounded until now.

Thanks to everyone.

In all my microcontroller projects, the device is never grounded for earth and everything works just fine. Same with all phones and devices that works on small 5 volts chargers. Something is strange if your project require earth ground.

Same as me. I was powering my other projects with phone chargers that are not grounded. Project was working perfectly I wouldn’t even notice this problem If I didn’t use table that needs to be scrolled. Probably I have a lot interference because of protoboard and cables, also important thing is that a lot of devices are using battery and charger is just charging that battery.

I am using the same display with stm32 black pill. I have almost the same problem. when i power my mcu with the pc usb everything works well. If i power it with external 5v supplies my display shows only white screen but all other functions (outputs/inputs) work properly. any other ideas to solve this problem with out grounding the supply?