Hello everyone!
I'm new to M5Stack products, and just bought Core2 with Axp2101, stacked with expander M5Stack M123. Using M5Unified library.
What I'm trying to achieve:
Use PIR sensor (currently connected to GPIO 36, via groove portB) to wake the unit from deep sleep, whenever it detects movement. I'm using
esp_sleep_enable_ext0_wakeup(GPIO_NUM_36, 1);
And it kinda works, but the problem is Core2 still uses 30mA in deep sleep. I've tried disabling LCD, speaker, mic, etc., but the only way I was able to really drop it down was to use
M5.Power.Axp2101.setBLDO2(0);
however, the PIR doesn't wake the unit anymore then. (it works great with just a sleep timer though, but I really need that PIR sensor wake up... )
Disabling other stuff from Axp2101 leaving only BLDO2 enabled:
M5.Power.Axp2101.setALDO1(0);
M5.Power.Axp2101.setALDO2(0);
M5.Power.Axp2101.setALDO3(0);
M5.Power.Axp2101.setALDO4(0);
M5.Power.Axp2101.setBLDO1(0);
M5.Power.Axp2101.setDLDO1(0);
M5.Power.Axp2101.setDLDO2(0);
helped a bit, got down to about 25mA. But that is still way too high.
Is there some way to have true deep sleep, but be able to wake up with PIR sensor (which really should use a fraction of mA, if I'm not mistaken)?
Should I connect it in a different way maybe?