M5Paper / Touch only working on USB power

  • Hello @felmue,

    thanks for your reply. Yes, i charged the device for about 12h via USB power adapter. As i mentioned other programs like Calculator or Factory Test work without any problem.
    Also MQTT is transmitted in the loop and the screen refreshes constantly if I put a "Set screen show" in the loop.
    I will try to put a batterty voltage label on screen when i am home to check the battery.

    When i start/reset the device with USB power attached, then remove the USB, the program works until i power down the M5Paper with the button on the back. After Powerup with center-button no touch is recognized anymore.


  • Hello,

    battery voltage is ~4.7V when on battery. No matter what i do, it is impossible for me to get touch working when on battery und using UIFlow.
    I tried to use Arduino IDE and compiled the Touch example from GitHub m5stack/M5EPD.
    Nothing is displayed on display (another problem?)
    But if i start the M5Paper on battery and connect USB afterwards to PC i can see the serial.printf in COM monitor. Touch is detected correctly.

    If i try the same with UIFlow (put "print get touch coordinates" in the loop), "status" in COM monitor is always false and coordinates are 0,0.


    Any other ideas?


  • I have same issue.

    I checked the documentation of the GT911 touch panel and found that the i2c address has two modes, 0x5D or 0x14, depending on the High/Low of INT at boot.

    After checking the i2c address with the code below, it is highly possible that the i2c address of the touch panel is different and is not being controlled correctly.

    • USB power boot: 0x5D
    • Battery power boot: 0x14

    from machine import Pin, I2C
    i2c = I2C(scl=Pin(22), sda=Pin(21), freq=400000)

    I think it need to fix initial pin config of M5PAPER touch panel driver or m5paper firmware.

  • Hi @kinako

    I think you found the root cause. The M5EPD library checks for both I2C addresses:

    if (Wire.endTransmission())
      if (Wire.endTransmission())
        log_e("Touch screen IIC connection error");
        return ESP_FAIL;
      _iic_addr = 0x5D;

    And I guess M5Paper UIFlow firmware probably isn't doing that.

    In addition I found that the 10k pull-up resistor (R87) on the INT line is not populated in my M5Paper. And the GPIO the INT line is connected to (GPIO36) is an input only GPIO which doesn't support internal pull-up or down. Which means the INT line is more or less floating.

    With UIFlow I confirmed that touch does not work in my M5Paper (running from battery) if I populate the 10k pull-up resistor. And touch does work if the INT line is pulled down during startup.

    Edit: I've just run your test code on my M5Paper (with INT floating) and I get the I2C address 0x5D in both cases, running from USB and running from battery.


  • Hello @kinako and @felmue,

    wow, your findings sound promising. I can confirm with i2c.scan() on my device that i2c addresses on battery are integers [20, 68, 80, 81] and on USB [68, 80, 81, 93] so the (int)20 switches to (int)93 what is exactly the mentioned HEX addresses 0x14 and 0x5D.

    I used following UIFlow Python code and watched output on COM Monitor:

    from m5stack import *
    from m5ui import *
    from uiflow import *
    from machine import Pin, I2C
    while True:
      i2c = I2C(scl=Pin(22), sda=Pin(21), freq=400000)

    Any idea what is the best way to create a bug report about this?

  • I think I am experiencing similar issue. I am able to use UIFLOW for my M5paper by using the "RUN" but when I do the "DOWNLOAD", the program seems to be fine, but I get a blank screen, and no touch, but know the program is functioning as I use the side rotating button which "things" appear on the screen as I expected, but on startup blank screen, and no touch, the only way I know the program is running is the toggling of UP and DOWN wheel.

    Wondering if it is similar issue or something else is going on?

  • Hello @joefly,

    regarding the your touch problem i think it is the same issue that we found here. About the blank screen on powerup: Do you have a "set screen show" block at the end of your Setup block? The screen is only shown/updated with "Set screen show" also after powerup.

  • @BiGbEn Hi.

    As I said, the program works fine on "Run" with Set Screen Show on setup. But only on Download does the program does not function as expected, particularly screen and touch not working/incorrectly. I noticed that the bug was not listed under the bug report list. Any hope of this being resolved?

  • An Update, I found my own problem. So my issues is not related to this above bug, it was due to no doing wifi connect within the program downloaded. I guess RUN integrates the wificonnect and the download does not.

    Related: I noticed using the download, I am not able to connect to device using UIFLOW IDE, have to put the device is FLOW mode. Is there away to program it to allow for UIFLOW to still connect?

  • Hi @all,

    Hi, sorry for taking so long to reply.Next version(v1.9.2) will jugement the address after power on.

  • Hello,

    i can confirm that touch is now working with firmware 1.9.2 in battery mode. Thanks @all for the help.