How recognize if CoreInk runs on battery?



  • Is it possible to recognize if CoreInk runs on battery or on USB-C power? Is there detailed schematic anywhere?



  • Hello @Martin8bity

    from what I can tell you can't, at least not directly. You can read the battery voltage (GPIO35) so you could poll it a couple of times and if the battery voltage goes up or is steady over time, USB-C power is most likely present. If the battery voltage goes down over time M5CoreInk most likely running from battery.

    In M5CoreInk USB-C power goes through TP4057 (charger) into the battery, from the battery the power goes though a MOSFET (on/off switch) into SY7088 (boost to 5 volts) and then into SY8089 (regulator 3.3 volts) into ESP32 etc.. All three ICs are preconfigured and not on I2C or something, meaning they cannot be queried about their state. For instance to know whether USB-C power is present the LED (red) of TP4057 would need to be queried, but I don't think it is hooked up to a GPIO.

    But then again, I only had my M5CoreInk for a couple for hours so I might very well be missing something.

    Cheers
    Felix



  • Core Ink runs on both battery and USB.



  • This topic is old, but I will reply if it is found through search functions:

    I found a solution, what can be applied with small external hardware modifications. It is possible to take some measurements on HAT interface's pin "5VIN".

    Measured voltages:

    If powered by USB:
    ~4.7V

    Powered by battery and switched off:
    ~0.7V

    Powered by battery and switched on:
    ~2.4V

    Using voltage divider with two same resistors, we get usable logic values for HIGH and LOW ( ~2.3V and ~1.2V). The measured values are not inside garanteed logic range but as a workaround: it works well. Maybe it helps someone else...