Professional Documents
Culture Documents
Department of Engineering
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:
3 Methodology
5 Conclusion
6 Reference
GUtech, Project Work II: Group: 7
Power Outage Detector 2
Table of tables:
Abbreviation
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
3. Materials :
Glue Drill
Wood Clamp
Wires Sandpaper
Potentiometer
Arduino Uno
4. Sketch :
5. Arduino Coding:
*/
#include <SoftwareSerial.h>
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
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
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.
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