@kuriko
Thank you for your hint. However, I don't know how it could help to solve my requirements.
In M5StickC-Plus example, IMU will remain powered on and will send interrupt on gpio 35 on motion.
In my requirement, axp2101 could send interrupt on power-on (usb), but its interrupt pin is not connected to esp32.
AXP2101 usually wakes up esp32 by simply powering on esp32, it is not a real wake up by interrupt. Therefore, wake up by power-on (usb) works only if esp32 was powered off by axp2101 previously. I cannot power-off esp32 because it should also wake up on gpio interrupt from PIR.
Posts made by davincino
-
RE: Wakeup Core2 v1.1 by USB and GPIO possible?
-
Wakeup Core2 v1.1 by USB and GPIO possible?
Hello together,
I want to put the device into deep sleep and wake it up either when USB power supply is connected or when PIR (connected on Grove port) detects movement.
Is this possible?
From what I understand, axp2101 "wakes up" the device on USB-connect by simply powering on the esp32. This should only work, when esp32 power supply was switched off previously. In my context, I cannot power off esp32, because it should react on PIR detection during deep-sleep.
In my opinion, putting the esp32 in deep sleep makes it impossible to recognize switched-on USB power supply. Unfortunately, IRQ from axp2101 is not routed to esp32...
Therefore, is my request realizable? Am I missing something?Thank you
-
RE: How recognize if CoreInk runs on battery?
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.7VPowered by battery and switched off:
~0.7VPowered by battery and switched on:
~2.4VUsing 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...
-
RE: Core Ink: recognize if USB or battery powered
I checked again electronic circuit:
It is possible to take some measurements on HAT interface's pin "5VIN". Measured voltages:If powered by USB:
~4.7VPowered by battery and switched off:
~0.7VPowered by battery and switched on:
~2.4VUsing 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...
-
RE: Core Ink: recognize if USB or battery powered
@ajb2k3
Thanks for the hint. Found a 3 years old thread. It is not possible to detect if it is powered from USB or battery... -
Core Ink: recognize if USB or battery powered
Hello,
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?