Is there a way to tell if an Arduino MKR GSM 1400 has lost power and has to rely on the connected battery?
Ideally, I'd like to do this without adding additional circuitry. Alternatively, can I connect VIn to an analogue input pin?
On the schematic, there are two lines that seem promising. One named VBATT\2.4B that go into PB09 of U1 via a voltage divider and another named VBAT\1.4B. Also the BQ24195L is an I2C device which would probably be connected the the main micro controller.
What I need to do is to send an SMS as soon as the incoming power is lost to notify a user that the power supply has tripped. Does anyone have any code samples?
DPM_STAT
bit from the SystemStatusRegister. I think that this indicates when there is a draw of current from the battery, but I'm not 100% sure about that when I read the spec sheet: (ti.com/lit/ds/symlink/bq24195l.pdf section 8.3.2.2 Dynamic Power Management) Can you share anything you figured out?