/PowerSensor

Arduino sketch to check whether power is on

Primary LanguageArduino

PowerSensor

The aim of this project is to sense my sump pump losing power and send a email/text.

  • I connected a 5V wall adapter to pin 2, with a 10k pull-down resistor
  • A green LED is connected to pin A2, lit when power is on.
  • A red LED is connected to pin A5, lit when power is off.
  • Currently using an Arduino Yún and sending email from a gmail account using this sketch at Temboo, which also requires a Temboo account.

I'm powering the arduino with a UPS. But, of course, if my web connection goes down (my cable modem or router), this won't work.

Also checkout out PowerSensor_wTemp, the same thing plus there's a temperature/humidity sensor attached, and I run a web server on the Yún side to display the current time and temp.