Core Ink: recognize if USB or battery powered
I bought the Core Ink for quick prototyping. I am very satisfied with the quality and the possibilities. What I'm missing: How can I tell if the device is USB or battery powered?
My firmware should provide an access point with a web interface, but only if the device is not running on battery power.
Current idea: I could use the battery voltage trend to determine whether the battery is charging or discharging. For this I have to check how accurate the internal measurement is. In any case, this implementation would be very cumbersome.
Maybe there are simpler options?
ajb2k3 last edited by
Please search the forum as this has been discussed and possible solutions created by users.
Thanks for the hint. Found a 3 years old thread. It is not possible to detect if it is powered from USB or battery...
I checked again electronic circuit:
It is possible to take some measurements on HAT interface's pin "5VIN". Measured voltages:
If powered by USB:
Powered by battery and switched off:
Powered by battery and switched on:
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...
IsoEek last edited by
@davincino Thanks for posting your findings.