Redson Dev · Idea
Local Power Outage Notifier: SMS Alerts for Home or Small Business
Published July 5, 2026
Never be caught off guard by a power cut again. This project helps small businesses and households, like a bakery in Gaborone or a clinic in Francistown, monitor their power supply and receive immediate SMS notifications during an outage. It's ideal for safeguarding perishable goods, critical systems, or ensuring business continuity, sending an alert as soon as the main power fails and another when it's restored.
What you'll need
- ESP32 development board (e.g., ESP32 WROOM-32)
- Small USB power bank (e.g., 5000mAh)
- USB wall adapter (5V, 1A)
- USB Micro-B cable (for ESP32 power)
- AC voltage sensor module (e.g., ZMPT101B)
- SIM800L GSM/GPRS module
- Prepaid SIM card (with airtime and SMS bundle)
- Breadboard
- Jumper wires (male-to-male and male-to-female)
Step-by-step
- 01
Assemble Power Monitoring Circuit
Connect the ZMPT101B AC voltage sensor module to the ESP32. The sensor's 'AC_OUT' pin connects to ESP32 pin `VP` (GPIO36), and 'GND' to ESP32 'GND'. Ensure the sensor is safely plugged into an AC outlet (via a small adapter if needed) and that you are aware of mains voltage safety.
- 02
Integrate GSM Module for SMS
Connect the SIM800L module to the ESP32: SIM800L 'VCC' to ESP32 '3V3', 'GND' to ESP32 'GND', 'RX' to ESP32 'TX2' (GPIO17), and 'TX' to ESP32 'RX2' (GPIO16). Insert your active SIM card into the SIM800L module. Power the SIM800L via a separate 3.7V unregulated output from your power bank if the ESP32's 3.3V is insufficient for burst current.
- 03
Program ESP32 for Power Detection
Using the Arduino IDE with ESP32 board support, write code to read analogue values from `VP` (GPIO36). Set a threshold to detect voltage presence (power ON) or absence (power OFF). Implement a state machine to track power status changes (on-to-off, off-to-on) and avoid repeated notifications.
- 04
Implement SMS Alerting Logic
Within your ESP32 code, use the `TinyGSM` library to send SMS messages via the SIM800L module. When a power outage is detected, send an SMS like 'Power OUT at [Location]!' to a pre-defined number. Send 'Power RESTORED at [Location]!' when electricity returns. Add a delay (e.g., 5 minutes) between status changes before sending an SMS to prevent false triggers.
- 05
Deploy and Test
Power the entire setup using the USB wall adapter for normal operation, with the power bank acting as a backup for the ESP32 and SIM800L during outages. Unplug the wall adapter to simulate a power cut and verify you receive the 'Power OUT' SMS. Plug it back in to confirm the 'Power RESTORED' message. Place the device in a safe, visible location, such as near the main power board in a clinic.
Tips
- Ensure your SIM card has enough credit for SMS messages, and deactivate any PIN lock.
- For safer AC voltage monitoring, consider using an isolated AC-DC converter to power the ESP32 and then detect its output, rather than direct AC sensing.
- Encapsulate the entire project in a small, non-conductive enclosure to protect components and ensure safety.
