Power Outage Monitoring Advice

Hi Particle Community,

I’m looking to use Particle to measure 12V AC power that inputs into a battery to notify me when the power goes out. The battery plugs in to a normal wall socket. I need the Boron/Argon to connect to ethernet so I’m going to add a featherwing adapter. What would be a simple way to wire the Boron to detect a power outage?


1 Like

Do you mean 120 VAC from an ordinary wall socket to a battery charger? And how are you powering the Boron/Argon? USB power adapter with backup LiPo battery?

The easiest proxy is to use a Boron because it has a PMIC on it, and monitor the PMIC power good flag. It returns true when external power is present, which will be true when there is 120V main power powering the USB power adapter. The Boron will continue to run because of the battery when there is no main power. No additional hardware is required at all to use this technique.


I use a 5 volt power brick, just a usb phone charger actually.
from the positive 5v to the ground (negative) of the 5v, two resistors, 16kohm and 16kohm in series.
Measure the Voltage at the junction of the two resistors. It should be one half the 5v or 2.5v when the phone charger is plugged in, zero volts when the phone charger is unplugged. (Unplugged simulates the power failure.)
From the junction of the two resistors to the A1 pin.
From the ground (negative) of the 5v to the ground of the proton/boron.
Read A1 and if the value is over 2000, then power is ON, else, the power is OFF.
And I forget why 2000, but it has been working for me no problem, so I don’t mind.
I found this the safest way to monitor power status of a battery with a battery charger on it.
I don’t have to deal with the wild swings of the battery voltage of the monitored battery.
I also use an INA219 current sensor, which has a voltage function and is a 2IC device to monitor the actual voltage of the battery being charged. And it is connected to the same proton/boron.

The battery being charged is also powering the Boron and will power it for days and days, it’s a 100Amp lifep04 so monitoring the boron battery will not work for me.