You are on page 1of 10

German University of Technology in Oman

Department of Engineering

Project Work II – Final Report

Power Outage Detector

Group: 7
Mohammed Al Hinai 22-0840
Muhammed Al Badi 22-0419
Mohammed Al Mazroui 22-0282
Osama Al Qassabi 21-0192
Shurooq Al Shuaili 21-0248

Supervisor:
Dr.Yathrib Ajaj

Date of submission:
25-05-2023

All content and results of this paper are the intellectual property of its author and/or GUtech
and may not be reproduced, displayed or distributed without permission.
GUtech, Project Work II: Group: 7
Power Outage Detector 1

Table of Content

1. Contents
Table of Content...........................................................................................................1
Table of Figures............................................................................................................1
Table of Tables.............................................................................................................2
2. Aim and objective of the project.............................................................................2
3. Introduction and Literarure Reviw..........................................................................2
4. Methodology..........................................................................................................3
1. Manufacturing plan.............................................................................................3
2. Tools and machines...........................................................................................3
3. Materials.............................................................................................................4
4. Sketch................................................................................................................4
5. Results and Discussion.........................................................................................5
6. Conclusion.............................................................................................................6
7. Reference..............................................................................................................6

Table of figures:

1 Aim and objective of the project

2 Introduction and Literarure Review

3 Methodology

4 Results and Discussion

5 Conclusion

6 Reference
GUtech, Project Work II: Group: 7
Power Outage Detector 2

Table of tables:

Table of Materials ,Tools and Machines.

Abbreviation

RXD recieve data


TXD transfere date
UART Universal asynchronous receiver-
transmitter
GPRS General Packet Radio Service
SMS Short message service

Aim of the Project


The aim of this project is to design and develop a device that can identify power
outages and provide automatic notifications to users. The project aims to enhance
safety and security measures in both residential and commercial buildings.
Furthermore, it will help develop a thorough understanding of the crucial circuit
connections required for the device's successful operation. Finally, to successfully
complete the entire project within a two-month timeframe while overcoming any
potential obstacles in the development process.

2. Introduction and Literarure Review


Our project focuses on developing a power outage detector, which was inspired by a
team member's personal experience involving a robbery that occurred during an
electrical power outage. The development of a power outage detector is extremely
helpful since it can detect situations where the electrical supply to a facility is
disrupted. This device has been designed to detect the presence of electricity from
the electrical source and immediately convert to battery power in the case of a power
loss. When the power is turned off, the device sends an SMS alert to make sure the
user is informed, and it alerts the user once again when the power is turned back on.
GUtech, Project Work II: Group: 7
Power Outage Detector 3

While working on this device, we anticipate potential challenges, such as time


constraints, as we have approximately two months to complete its development. Our
project overcome the limitations of existing solutions in several ways. Firstly, despite
conventional electrical failure alarm systems that just utilise audio sirens to inform
users, our device also uses SMS alerts to guarantee prompt and accurate
notifications, even when users are not near the alarm. Secondly, Wi-Fi connectivity is
used by some projects to track power outages and send alerts. The cellular data
module in our device, in contrast, enables it to connect directly to cellular networks to
send notifications even when access to Wi-Fi is unreliable or unavailable. Lastly,
power loss detection may be a component of sophisticated and expensive smart
home automation systems, but our emphasis is on simplicity and affordability. Our
standalone device offers a practical and affordable solution without the need for
complicated smart home automation. It is particularly designed for power outage
detection and warning. Our project seeks to develop an effective and dependable
power outage detection system that circumvents the shortcomings of existing
systems by including SMS warnings, and prioritising simplicity.

Methodology

1. Manufacturing plan
The process of making the power outage detector was required to be done in two
parts: assembling the device components and making a showcase to display the
device's working mechanism clearly.
First, making the structure of the showcase. It Started by determining the size that is
needed to fit the power outage detector. Then, two identical pieces of wood had been
cut using a saw to the length and width as well as a thick piece of wood which is
representing the base of the showcase. After that, the cut edges of the wood had
been sanded to smooth them. Next, the pieces were gathered by adding a small
amount of glue and attached using screws and steel brackets. In addition, white paint
had been applied to the front side, and small pieces of furniture had been made by
using MDF wood to decorate the showcase.
Second, making the detector. After designing the circuit, the next step was to select
the components that will be used in the device including: power sources, Arduino,
GPRS shield, and any other necessary materials for the detector to function probably.
A solderable breadboard had been used as a base to build the circuit and headers,
and jumpers to connect the GPRS shield as indicated:
Connector 1 from Arduino D7 to GPRS TXD (UART).
Connector 2 from Arduino D8 to GPRS RXD (UART).
Connector 3 from Arduino D9 to GPRS D9 (board).
GUtech, Project Work II: Group: 7
Power Outage Detector 4

Arduino GND to GPRS GND (UART).


Correspondingly, an appropriate code including a specific phone number had been
prepared and connected to the system to detect power outages. Moreover, if mains
power fails, the GPRS module sends an alarm message with an SMS to the
connected cell phone. The next step was to test the device, determine where the
errors had occurred, and try to fix them. Finally, installing the detector in the
showcase that had been made before.

2. Tools and Machines :

3. Materials :

Materials/Circuitry Handheld tools Machinery


Plywood Jigsaw Sanding machine

Wax Handheld saw Miter saw

Glue Drill

Screws Glue Gun

Wood Clamp

Wires Sandpaper

Potentiometer

Arduino Uno

GPRS Sim 900

9V Battery and clip

10K Ohm Resistor


GUtech, Project Work II: Group: 7
Power Outage Detector 5

4. Sketch :

5. Arduino Coding:
*/
#include <SoftwareSerial.h>

// Configure software serial port


SoftwareSerial SIM900(7, 8);

//Variable to save incoming SMS characters


char incoming_char=0;
//Allarm status
byte allarmSent = LOW;

void setup() {
// Switch on the GSM shild
pinMode(9,OUTPUT);
GUtech, Project Work II: Group: 7
Power Outage Detector 6

digitalWrite(9, HIGH);
delay(2000);
digitalWrite(9, LOW);
delay(5000);
// Set pin 2 as input for Vin detection
pinMode(2,INPUT);
// Arduino communicates with SIM900 GSM shield at a baud rate of 19200
SIM900.begin(19200);
// Give time to GSM shield to log on to network
delay(30000);
// AT command to set SIM900 to SMS mode
SIM900.print("AT+CMGF=1\
");
delay(100);
sendSMSready();
// Set module to send SMS data to serial out upon receipt
// SIM900.print("AT+CNMI=2,2,0,0,0\");
// delay(100);
}

void loop()
{
// Display any text that the GSM shield sends out on the serial monitor
if(SIM900.available() >0) {
//Get the character from the cellular serial port
incoming_char=SIM900.read();
//Print the incoming character to the terminal
Serial.print(incoming_char);
}
while (digitalRead(2) == HIGH) {}
if(digitalRead(2) == LOW && allarmSent == LOW) {
// whait 1" more and send message if pin 2 is already LOW
delay(1000);
if(digitalRead(2) == LOW) sendSMSallarm();
}
while (digitalRead(2) == LOW) {}
if(digitalRead(2) == HIGH && allarmSent == HIGH) sendSMSallarmOFF();}

void sendSMSallarm()
{
// Set recipient's mobile number in international format
SIM900.println("AT + CMGS = \\"+XXXXXXXXXXXX\\"");
delay(100);
GUtech, Project Work II: Group: 7
Power Outage Detector 7

// Set SMS message


SIM900.println("*** MANCANZA TENSIONE RETE ***");
delay(100);
// End AT command with a ^Z, ASCII code 26
SIM900.println((char)26);
delay(100);
SIM900.println();
// Give module time to send SMS
delay(5000);
allarmSent = HIGH;}

void sendSMSallarmOFF()
{
// Set recipient's mobile number in international format
SIM900.println("AT + CMGS = \\"+XXXXXXXXXXXX\\"");
delay(100);
// Set SMS message
SIM900.println("*** TENSIONE RETE OK ***");
delay(100);
// End AT command with a ^Z, ASCII code 26
SIM900.println((char)26);
delay(100);
SIM900.println();
// Give module time to send SMS
delay(5000);
allarmSent = LOW;
}

void sendSMSready()
{
// Set recipient's mobile number in international format
SIM900.println("AT + CMGS = \\"+XXXXXXXXXXXX\\"");
delay(100);
// Set SMS message
SIM900.println("*** SISTEMA CONNESSO ***");
delay(100);
// End AT command with a ^Z, ASCII code 26
SIM900.println((char)26);
delay(100);
SIM900.println();
// Give module time to send SMS
delay(5000);
}
GUtech, Project Work II: Group: 7
Power Outage Detector 8

3. Results and Discussion:

4. Conclusion:
To sum up, power outage detectors are very practical in our daily lives. When there is
a shortage of current flowing through an electrical source in a building, switching to
battery power will alert the user with an SMS message. This detector is not limited to
residential buildings. It can be used, for example, in shops to prevent the spoilage of
food stored in refrigerators or server rooms. It can also be used in greenhouses and
livestock facilities. The development of this project consisted of four main phases
spanning approximately two months. After assembling the device, we designed and
built the showcase. While we were putting together our showcase, testing of the
device also continued, as we might have needed to make a few last-minute
adjustments. During the process, we faced problems and difficulties like finding the
right measurements for the showcase; we had to use four Arduinos because three of
them were burned because of some errors in connecting the wires, and another
problem was difficulty finding the correct programming for the Arduino device.

Challenges Faced and Solved:


Throughout the assembly phase we faced many challenges, most of the issues faced
were a direct result of our original schematics having been wrong. To name a few of
the issues tackled. Firstly, after having connected our circuit according to our original
design our Arduino shorted. After having found out that our designs were wrong, we
altered the mechanism and code to utilize a potentiometer. On our second test a wire
unplugged and burned some of our circuitry However, this was solved by simply
attaching all loose wires in the correct manner. Although that concludes all major
issues a few minor ones arose, which were powering the GPRS, which was solved by
connecting it to the breadboard. Another problem was a faulty cable which was
replaced.

Improvements:
Various improvements could have been made, including replacing the 9v battery with
a rechargeable one, installing a fuse, improving the wiring and fixing loose wire and
constructing a case for the device which would give you easy access to the
hardware.
GUtech, Project Work II: Group: 7
Power Outage Detector 9

5. References :
1. Project inspiration. (2022, June 2). hackster.io. Retrieved March 2, 2023, from
https://www.hackster.io/rob-lauer/cellular-enabled-power-outage-detector-w-
sms-notifications-181408.

2. Project reference. (2019, May 5). Arduino. Retrieved March 2, 2023, from
https://projecthub.arduino.cc/mbraccagni/55bbfc3b-10c4-4aa7-943b-
53b4eb110adc

You might also like