Looking for suggestions…
I have an IOT device that has a BBB with a power cape powered by a 5vdc psu hooked up to a switch and a 4g modem that are powered by a 24vdc psu all powered off of an incoming 120vac line.
The power cape is setup to gracefully shut down the BBB if the power is off for more than 30 seconds coming off of the 5vdc psu.
I’am adding an APC UPS in front of both of the smaller PSU’s so that I can keep the entire unit connected to the network on powerloss.
What I’am not sure how to approach is monitoring supply current so that the beagle knows when Line voltage is no longer being supplied. Some of my ideas have included using one of the random sensors I see floating around or using a NC relay and holding it open with power. I main want to be able to send an sms to myself if the power switches to the UPS and I’am currently less concerned about monitoring the status of the UPS or anything like that (although that would be cool). More important that the device tells me when it goes off mains power and when it goes back on mains power so I can decide weather or not I need to go attend to it.
Has anyone tried to do anything like this? Any suggestions for a simple way to monitor when the current drops to zero with the gpio pins? Seems like I should be able to do this some real ghetto, yet reliable way…
Thanks