0% found this document useful (0 votes)
118 views

Home Energy Consumption Alert On Handset and Monitoring Using Iot and Cloud

This document describes a project to monitor home energy consumption using IoT and cloud technology. Sensors measure current consumption of individual loads. An Arduino processes this data and sends it via WiFi to the cloud for real-time user monitoring. A GSM module sends SMS alerts when consumption reaches a predefined threshold to help users reduce usage and electricity bills. The system aims to help financially disadvantaged users better manage their energy consumption.

Uploaded by

Divya Lakshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views

Home Energy Consumption Alert On Handset and Monitoring Using Iot and Cloud

This document describes a project to monitor home energy consumption using IoT and cloud technology. Sensors measure current consumption of individual loads. An Arduino processes this data and sends it via WiFi to the cloud for real-time user monitoring. A GSM module sends SMS alerts when consumption reaches a predefined threshold to help users reduce usage and electricity bills. The system aims to help financially disadvantaged users better manage their energy consumption.

Uploaded by

Divya Lakshmi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 60

HOME ENERGY CONSUMPTION ALERT ON HANDSET

AND MONITORING USING IOT AND CLOUD

ABSTRACT

The project is based on smart monitoring of energy consumption using Arduino Uno
and uploading into cloud using Wi-Fi module and SMS alert using GSM module. Normally,
people regret over energy consumption at the billing time so through this project we are
intending to help them .At first we measure the energy using an analog energy meter and
send the value and process the data using Arduino, current sensors are attached at each loads
and current consumption of each load are measured using those current sensors and those
measured values are sent to the Arduino where they are processed. The Node MCU, which is
an Wi-Fi module that acts as a gateway to send the data to the cloud where the user can view
the real time data so that they can reduce their consumption.GSM Module is a module that
send messages to handsets of the user, the program for the Arduino is written in such a way
that it sends an alert message to user upon specific unit of consumption which is predefined
onto the Arduino. This allows the user to manage their loads according to the financial
stability. The user can estimate the amount of energy consumption according to their uses and
reduce their load .The monitoring of energy consumption in cloud enables the user for the
time to time monitoring of load energy consumption. The energy consumption project mainly
focuses on financial poor people where their motive is to reduce their energy consumption for
reduced electricity bill
CHAPTER 1
1.1 INTRODUCTION:
A smart grid is an enhanced power grid that utilizes digital communication
technologies to improve the efficiency, sustainability, and reliability in power grids. One of
the most salient advantages is that entities in smart grid can mutually communicate with each
other in a real-time manner. For example, smart metering, which is a basic function in smart
grids, allows a power provider to remotely and timely obtain the user consumption, and
accordingly re-allocate the resource to generate the right amount of power to satisfy the user
demand without unnecessary waste. Although smart metering has its advantages, it also
brings challenges. Smart metering using modern communication technologies is in the risk of
cyber-attacks. The meters are distributed and the transmission medium is physically exposed
to attackers. The readings collected from meters may face the threat of being sniffed,
intercepted, or altered. In order to protect the user privacy and the integrity of meter readings,
it is of great importance to take security into consideration. Moreover, although the majority
of meters are distributed in clustered power supply areas, there are some hard-to-reach meters
far from the clustered area. Data shows that the 1% hard-to-reach meters can account for as
much as 50% of the entire smart metering network operational cost. Therefore, it can save up
to 50% of unnecessary cost by solving such 1% problem. In this paper, our research aims to
solve the above challenges by proposing a secure smart metering system based on LoRa
technology which is a new type of wireless telecommunication network designed to allow
long-range communications. We use symmetric cryptography to secure the data during the
transmission. To maintain a long-term security feature, we further design a key management
protocol to remotely and securely update the encryption keys that are used to protect the
transmitted data. We implement the system and conduct experiments to evaluate its usability
and efficiency. In summary, we make the following contributions:

• We make the pioneer exploration in designing a smart metering infrastructure based on


LoRa providing an end-to-end data protection.

• We implement our design and conduct evaluation experiments which demonstrate the
practicality of our design in real-world smart grid scenario.
• We discuss a variant of metering topology considering the battery limit of other meters to
facilitate the application of our design to other energy/utility domains, e.g., water metering
and gas metering.

1.2 EXISTING SYSTEM

In existing method there is no advanced technology for measuring the reading of electric bill
in home’s, humans are placed for take readings from home, in such cases no one is present in
home and previous month current reading will be noted. Due to this electric bill are not
maintained properly and human need is required here. The increasing trend there are lot of
problems should be handled. At first the higher supply needs have to be met by the increment
of energy production. Along with this fact, higher demand may involve a gird overload. Due
to this method we can’t control power limit to homes and industries, every one use many
usages of their electricity

DISADVANTAGES

 Human need is required.

 Electric bills are not maintained properly.

 Can’t control the electricity limit in industries and homes.

PROBLEM DESCRIPTION:

The existing system for detecting power theft isn't an efficient one. The facility theft
happening is detected while taking the energy meter readings by calculating the difference
between the facility received within the transformer which received within the destination.
No measure is taken to forestall it.In this project wireless technology is used to monitor theft
in Electricity meter. An electric meter is a device used for measuring the amount of electrical
energy supplied to a residential or commercial building. Due to the increasing cost of
electricity, the electricity related theft increases and thus tampering and security in electric
meters has become a major concern for government agencies across the globe. Ineffective
and inefficient present methods of detecting and preventing Power and electricity theft cause
a revenue loss along with damage to personal and Public property.
1.3 PROPOSED SYSTEM

Here we introduce an advanced smart metering system for measuring and controlling
the electricity. We monitor the current and voltage through sensors for each device. This
method Consumes less power and high efficiency. If any user uses more electricity,
indication will be send and power will be cut off for certain time. User will go to EB office
and get a permission for high use of electricity.

Voltage and Current sensor is placed for measuring the voltage and current state of the EB
meter, this will identify the power usages in home. So we can avoid the wastage of power and
power saving will take place is and also we can get the electricity bill in wireless technology,
no man power is needed for take reading in homes and industries. The system will also
provide whenever power cut occurs means the reason (ex: power theft, maintenance
scheduling, billing problem.etc) sent through via SMS.

In these proposed system IOT technology is used to transmit the Alert message to the
customer, during High Power consumption. This process will be happening when needed that
means if SMS is received from authorized server mobile transmission customer and EB. Then
the energy theft controlled by current, voltage and short-circuit sensor. Reduces the manual
manipulation work and theft. Use of GSM in the system provides the numerous advantages of
wireless network systems. In these model we set the certain value of current & voltage level
by the help of programming. If the current & voltage level less than the certain value means,
there is no High-Power consumption. So the Alert message not send & the led also OFF.
When the voltage & Current above the certain value Alert message send to the customer &
the LED is turn ON for the indication Cost wise low when compared to other energy meters
without automatic meter reading and high power consumption. Payment reminder should also
be sent Payment reminder should also be sent

ADVANTAGES

 No man power need for taking current readings.

 Avoid high usage of electricity.

 Can identify the high electricity used industries easily.


CHAPTER 2

BLOCK DIAGRAM

POWER SUPPLY UNIT


Step Down
Transformer Voltage Regulator
Rectifier Filter Circuit
(230v AC – 12 v AC) IC7805

Buzzer

Voltage / Current
Sensor

Relay
NodeMCU
Module
Load 1

ARDUINO UNO
Load 2

GSM Module

LED
HARDWARE REQUIREMENTS

 Arduino UNO Microcontroller


 GSM Module
 NodeMCU
 Voltage / Current Sensor
 Relay
 Load 1
 Load 2
 LED
 Buzzer

SOFTWARE REQUIREMENTS

 Embedded C
 Arduino IDE
CHAPTER-3
MODULE DESCRIPTION
HARDWARE UNIT

3.1 POWER SUPPLY UNIT:

Power supply is a reference to a source of electrical power. A device or system that


supplies electrical or other types of energy to an output load or group of loads is called a
power supply unit or PSU. The term is most commonly applied to electrical energy supplies,
less often to mechanical ones, and rarely to others.

Fig 3.1.1 Power Supply unit

3.1.1STEP DOWN TRANSFORMER

Basic power supply the input power transformer has its primary winding connected to
the mains (line) supply. A secondary winding, electro-magnetically coupled but electrically
isolated from the primary is used to obtain an AC voltage of suitable amplitude, and after
further processing by the PSU, to drive the electronics circuit it is to supply. The transformer
stage must be able to supply the current needed. If too small a transformer is used, it is likely
that the power supply's ability to maintain full output voltage at full output current will be
impaired. With too small a transformer, the losses will increase dramatically as full load is
placed on the transformer. As the transformer is likely to be the costliest item in the power
supply unit, careful consideration must be given to balancing cost with likely current
requirement. There may also be a need for safety devices such as thermal fuses to disconnect
the transformer if overheating occurs, and electrical isolation between primary and secondary
windings, for electrical safety.
Fig 3.1.1.1 Step down Transformer

3.1.2 THE RECTIFIER STAGE


Rectifier circuit is used, to convert the AC input is converted to DC. The full wave
bridge rectifier uses four diodes arranged in a bridge circuit to give full wave rectification
without the need for a center-tapped transformer. An additional advantage is that, as two
diodes are conducting at any one time, the diodes need only half the reverse breakdown
voltage capability of diodes used for half and conventional full wave rectification. The bridge
rectifier can be built from separate diodes or a combined bridge rectifier can be used.
It can be seen that on each half cycle, opposite pairs of diodes conduct, but the current
through the load remains in the same polarity for both half cycles.

Fig 3.1.1.2 Bridge Rectifier


3.1.3 FILTER:
A typical power supply filter circuit can be best understood by dividing the circuit
into two parts, the reservoir capacitor and the low pass filter. Each of these parts contributes
to removing the remaining AC pulses, but in different ways.
Electrolytic capacitor used as a reservoir capacitor, so called because it acts as a
temporary storage for the power supply output current. The rectifier diode supplies current to
charge a reservoir capacitor on each cycle of the input wave. The reservoir capacitor is large
electrolytic, usually of several hundred or even a thousand or more microfarads, especially in
mains frequency PSUs. This very large value of capacitance is required because the reservoir
capacitor, when charged, must provide enough DC to maintain a steady PSU output in the
absence of an input current; i.e. during the gaps between the positive half cycles when the
rectifier is not conducting.
The action of the reservoir capacitor on a half wave rectified sine wave. During each
cycle, the rectifier anode AC voltage increases towards Vpk. At some point close to Vpk the
anode voltage exceeds the cathode voltage, the rectifier conducts and a pulse of current flows,
charging the reservoir capacitor to the value of Vpk. Once the input wave passes Vpk the
rectifier anode falls below the capacitor voltage, the rectifier becomes reverse biased and
conduction stops. The load circuit is now supplied by the reservoir capacitor alone. Of
course, even though the reservoir capacitor has large value, it discharges as it supplies the
load, and its voltage falls, but not by very much. At some point during the next cycle of the
mains input, the rectifier input voltage rises above the voltage on the partly discharged
capacitor and the reservoir is re-charged to the peak value Vpk again.

Fig 3.1.3.1 Filter Circuit


3.1.4 VOLTAGE REGULATOR
Voltage regulator ICs are available with fixed or variable output voltages. They are
also rated by the maximum current they can pass. Negative voltage regulators are available,
mainly for use in dual supplies. Most regulators include some automatic protection from
excessive current and overheating.
The LM78XX series of three terminal regulators is available with several fixed output
voltages making them useful in a wide range of applications. One of these is local on card
regulation, eliminating the distribution problems associated with single point regulation. The
voltages available allow these regulators to be used in logic systems, instrumentation, Hi-Fi,
and other solid state electronic equipment. Although designed primarily as fixed voltage
regulators, these devices can be used with external components to obtain adjustable voltages
and current.
1. Positive regulator
1. input pin
2. ground pin
3. output pin
2. It regulates the positive voltage
3. Negative regulator
4. Ground pin
5. Input pin
6. Output pin
It regulates the negative voltage. The regulated DC output is very smooth with no
ripple. It is suitable for all electronic circuits.

Fig 3.1.4.1 Regulator Circuit

Fig 3.1.4.2 Power Supply Circuit


3.2 ARDUINO UNO

An Arduino is actually a microcontroller based kit which can be either used directly
by purchasing from the vendor or can be made at home using the components, owing to its
open source hardware feature. It is basically used in communications and in controlling or
operating many devices. It was founded by Massimo Banzi and David Cuartielles in 2005.

The Arduino Uno is a microcontroller board based on the ATmega328. It has 14


digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.

It contains everything needed to support the microcontroller; simply connect it to a


computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-
serial driver chip. Instead, it features the Atmega8U2 programmed as a USB-to-serial
converter. "Uno" means one in Italian and is named to mark the upcoming release of Arduino
1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward.

The Uno is the latest in a series of USB Arduino boards, and the reference model for
the Arduino platform; for a comparison with previous versions.

3.2.1 ARDUINO ARCHITECTURE:

Arduino’s processor basically uses the Harvard architecture where the program code
and program data have separate memory. It consists of two memories- Program memory and
the data memory. The code is stored in the flash program memory, whereas the data is stored
in the data memory. The Atmega328 has 32 KB of flash memory for storing code (of which
0.5 KB is used for the bootloader), 2 KB of SRAM and 1 KB of EEPROM and operates with
a clock speed of 16MHz.

The most important advantage with Arduino is the programs can be directly loaded to
the device without requiring any hardware programmer to burn the program. This is done
because of the presence of the 0.5KB of Bootloader which allows the program to be burned
into the circuit. All we have to do is to download the Arduino software and writing the code.
3.2.1.1 ARDUINO PIN DIAGRAM

Arduino Uno consists of 14 digital input/output pins (of which 6 can be used as PWM
outputs), 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a power jack, an
ICSP header, and a reset button

3.2.2 POWER JACK

Arduino can be power either from the pc through a USB or through external source like
adaptor or a battery. It can operate on a external supply of 7 to 12V. Power can be applied
externally through the pin Vin or by giving voltage reference through the IORef pin. The
Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically. External (non-USB) power can come either from an
AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging. The
board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.
3.2.3 DIGITAL INPUTS

It consists of 14 digital inputs/output pins, each of which provide or take up 40mA


current. Some of them have special functions like pins 0 and 1, which act as Rx and Tx
respectively, for serial communication, pins 2 and 3-which are external interrupts, pins
3,5,6,9,11 which provides pwm output and pin 13 where LED is connected.

3.2.4 ANALOG INPUTS:

It has 6 analog input/output pins, each providing a resolution of 10 bits.

3.2.5 AREF

It provides reference to the analog inputs

3.2.6 RESET

It resets the microcontroller when low

STEPS TO PROGRAM AN ARDUINO

Programs written in Arduino are known as sketches. A basic sketch consists of 3 parts

1. Declaration of Variables
2. Initialization: It is written in the setup () function.
3. Control code: It is written in the loop () function.

 The sketch is saved with. ino extension. Any operations like verifying, opening a
sketch, saving a sketch can be done using the buttons on the toolbar or using the tool
menu.
 The sketch should be stored in the sketchbook directory.
 Chose the proper board from the tools menu and the serial port numbers.
 Click on the upload button or chose upload from the tools menu. Thus the code is
uploaded by the bootloader onto the microcontroller.
3.2.8 BASIC ADRUINO FUNCTIONS
 digitalRead(pin): Reads the digital value at the given pin.
 digitalWrite(pin, value): Writes the digital value to the given pin.
 pinMode(pin, mode): Sets the pin to input or output mode.
 analogRead(pin): Reads and returns the value.
 analogWrite(pin, value): Writes the value to that pin.
 serial.begin(baud rate): Sets the beginning of serial communication by setting the bit
rate.
3.2.9 FEATURES

 It is inexpensive
 It comes with an open source hardware feature which enables users to develop their
own kit using already available one as a reference source.
 The Arduino software is compatible with all types of operating systems like
Windows, Linux, and Macintosh etc.
 It also comes with open source software feature which enables experienced software
developers to use the Arduino code to merge with the existing programming language
libraries and can be extended and modified.
 It is easy to use for beginners.
 We can develop an Arduino based project which can be completely stand alone or
projects which involve direct communication with the software loaded in the
computer.
 It comes with an easy provision of connecting with the CPU of the computer using
serial communication over USB as it contains built in power and reset circuitry.

3.3 RELAY

We know that most of the high end industrial application devices have relays for their
effective working. Relays are simple switches which are operated both electrically and
mechanically. Relays consist of a n electromagnet and also a set of contacts. The switching
mechanism is carried out with the help of the electromagnet. There are also other operating
principles for its working. But they differ according to their applications. Most of the devices
have the application of relays.
Fig 3.3.1 Relay

The main operation of a relay comes in places where only a low-power signal can be
used to control a circuit. It is also used in places where only one signal can be used to control
a lot of circuits. The high end applications of relays require high power to be driven by
electric motors and so on. Such relays are called contactors.

3.3.1 RELAY DESIGN

There are only four main parts in a relay. They are

 Electromagnet
 Movable Armature
 Switch point contacts
 Spring
Fig 3.3.1.1 Relay design

It is an electro-magnetic relay with a wire coil, surrounded by an iron core. A path of


very low reluctance for the magnetic flux is provided for the movable armature and also the
switch point contacts.  The movable armature is connected to the yoke which is
mechanically connected to the switch point contacts. These parts are safely held with the
help of a spring. The spring is used so as to produce an air gap in the circuit when the relay
becomes de-energized.

3.3.2 RELAY WORKING

Fig 3.3.2.1 Relay working

The diagram shows an inner section diagram of a relay. An iron core is surrounded by
a control coil. As shown, the power source is given to the electromagnet through a control
switch and through contacts to the load. When current starts flowing through the control coil,
the electromagnet starts energizing and thus intensifies the magnetic field. Thus the upper
contact arm starts to be attracted to the lower fixed arm and thus closes the contacts causing a
short circuit for the power to the load. On the other hand, if the relay was already de-
energized when the contacts were closed, then the contact move oppositely and make an open
circuit. As soon as the coil current is off, the movable armature will be returned by a force
back to its initial position. This force will be almost equal to half the strength of the magnetic
force. This force is mainly provided by two factors. They are the spring and also gravity.

Relays are mainly made for two basic operations. One is low voltage application and
the other is high voltage. For low voltage applications, more preference will be given to
reduce the noise of the whole circuit. For high voltage applications, they are mainly designed
to reduce a phenomenon called arcing.

3.3.3 RELAY BASICS


The basics for all the relays are the same. Take a look at a 4 – pin relay shown below.
There are two color’s shown. The green color represents the control circuit and the red color
represents the load circuit. A small control coil is connected onto the control circuit. A switch
is connected to the load. This switch is controlled by the coil in the control circuit. Now let us
take the different steps that occur in a relay.

Fig 3.3.3.1 Relay operation


3.3.4 ENERGIZED RELAY (ON)
As shown in the circuit, the current flowing through the coils represented by pins 1
and 3 causes a magnetic field to be aroused. This magnetic field causes the closing of the pins
2 and 4. Thus the switch plays an important role in the relay working. As it is a part of the
load circuit, it is used to control an electrical circuit that is connected to it. Thus, when the
relay in energized the current flow will be through the pins 2 and 4.

Fig 3.3.4.1Energized Relay (ON)


3.3.5 DE – ENERGIZED RELAY (OFF)
As soon as the current flow stops through pins 1 and 3, the switch opens and thus
the open circuit prevents the current flow through pins 2 and 4. Thus the relay becomes de-
energized and thus in off position.

Fig 3.3.5.1 De-Energized relay(OFF)

In simple, when a voltage is applied to pin 1, the electromagnet activates, causing a


magnetic field to be developed, which goes on to close the pins 2 and 4 causing a closed
circuit. When there is no voltage on pin 1, there will be no electromagnetic force and thus no
magnetic field. Thus the switches remain open.

3.4 BUZZER

A buzzer is a mechanical, electromechanical, magnetic, electromagnetic, electro-


acoustic or piezoelectric audio signaling device. A Piezo electric buzzer can be driven by an
oscillating electronic circuit or other audio signal source. A click, beep or ring can indicate
that a button has been pressed.A buzzer takes some sort of input and emits a sound in
response to it. They may use various means to produce the sound; everything from metal
clappers to electromechanical devices. A buzzer needs to have some way of taking in energy
and converting it to acoustic energy. Many buzzers are part of a larger circuit and take their
power directly from the device’s power source. In other cases, however, the buzzer may be
battery powered so that it will go off in the event of a mains outage.

A buzzer or beeper is a signaling device, the word "buzzer" comes from the rasping
noise that buzzers made when they were electromechanical devices, operated from stepped-
down AC line voltage at 50 or 60 cycles. Other sounds commonly used to indicate that a
button has been pressed are a ring or a beep
BUZZER CIRCUIT

Fig: Buzzer Circuit

This novel buzzer circuit uses a relay in series with a small audio transformer and
speaker. When the switch is pressed, the relay will operate via the transformer primary and
closed relay contact. As soon as the relay operates the normally closed contact will open,
removing power from the relay, the contacts close and the sequence repeats, all very quickly
so fast that the pulse of current causes fluctuations in the transformer primary, and hence
secondary.

The speakers tone is thus proportional to relay operating frequency. The capacitor C
can be used to "tune" the note. The nominal value is 0.001uF, increasing capacitance lowers
the buzzers tone.

TYPES OF BUZZER

ELECTROMECHANICAL

Early devices were based on an electromechanical system identical to an electric


bell without the metal gong. Similarly, a relay may be connected to interrupt its own
actuating current, causing the contacts to buzz. Often these units were anchored to a wall or
ceiling to use it as a sounding board. The word "buzzer" comes from the rasping noise that
electromechanical buzzers made.
MECHANICAL

A joy buzzer is an example of a purely mechanical buzzer. They require drivers.

PIEZOELECTRIC

A piezoelectric element may be driven by an oscillating electronic circuit or


other audio signal source, driven with a piezoelectric audio amplifier. Sounds commonly used
to indicate that a button has been pressed are a click, a ring or a beep.

Buzzers are typically used for identification and alarm purposes across many major
industries.

INDUSTRIES SERVED

 Safety and Security


 Automotive Electronics
 Office Automation
 Medical Equipment
 Industrial
 Consumer Electronics

PIEZO VS. MAGNETIC BUZZERS

CUI's buzzer line utilizes two main technologies. Each technology has specific advantages
and tradeoffs that must be taken into consideration depending on the application
requirements.

PIEZO BUZZER CHARACTERISTICS


 Wide operating voltage: 3~250V
 Lower current consumption: less than 30mA
 Higher rated frequency
 Larger footprint
 Higher sound pressure level
MAGNETIC BUZZER CHARACTERISTICS

 Narrow operating voltage: 1~16V


 Higher current consumption: 30~100mA
 Lower rated frequency
 Smaller footprint
 Lower sound pressure level

BENEFITS OF BUZZER

 The use of warning systems like delta-alarm or electric buzzers could be very
beneficial in minimizing loss of lives during a disaster or accident. They are important
devices in any building or facilities to alert and notify people if a timely evacuation is
necessary.
 Specialized electric alarm systems could act as warning about threatening liquid level
conditions in lift pump chambers, sewage, and other non-potable water applications. It
is essential that you know how efficiently your home is or business site’s sewer
system works and this can be gauged more accurately if it is accompanied by an
electric sewage alarm.
 Most electro mechanical buzzers are easy to set up. In fact, you don’t need to hire an
electrician to install it, since no hard wiring is usually needed. This means cutting
down on expenditure for hiring a professional installer.
 In workplace, electric buzzers, especially those with timing software, offers more
benefits and features than traditional timers and expensive bell. They could be
synchronized with automatic software via computer to control and switch times or
channels within the day.
 Electric buzzers could even be used in a wide array of appliances. Some buzzers are
now used in switching sounds of electric home appliances such as microwaves,
washing machines, calculators, smoke detectors, and telephone ringers, transmitters,
and many more.
 With the help of electro-mechanical buzzers, you can be notified of an automobile
entering your residence or business when you’re in remote areas, so you never miss a
warning.

MODERN APPLICATION

 Novelty uses
 Judging Panels
 Educational purposes
 Annunciator panels
 Electronic metronomes
 Game show lock-out device
 Microwave ovens and other household appliances
 Sporting events such as basketball games
 Electrical alarms
 Joy buzzer- a mechanical buzzer used for pranks

3.5 GSM MODEM

GSM is a mobile communication modem; it is stands for global system for mobile
communication (GSM). The idea of GSM was developed at Bell Laboratories in 1970.  It is
widely used mobile communication system in the world. GSM is an open and digital cellular
technology used for transmitting mobile voice and data services operates at the 850MHz,
900MHz, 1800MHz and 1900MHz frequency bands.

GSM system was developed as a digital system using time division multiple access
(TDMA) technique for communication purpose. A GSM digitizes and reduces the data, then
sends it down through a channel with two different streams of client data, each in its own
particular time slot. The digital system has an ability to carry 64 kbps to 120 Mbps of data
rates.

There are various cell sizes in a GSM system such as macro, micro, pico and umbrella
cells. Each cell varies as per the implementation domain. There are five different cell sizes in
a GSM network macro, micro, pico and umbrella cells. The coverage area of each cell varies
according to the implementation environment.

GSM ARCHITECTURE
A GSM network consists of the following components:

 A Mobile Station:  It is the mobile phone which consists of the transceiver, the
display and the processor and is controlled by a SIM card operating over the network.
 Base Station Subsystem: It acts as an interface between the mobile station and the
network subsystem. It consists of the Base Transceiver Station which contains the
radio transceivers and handles the protocols for communication with mobiles. It also
consists of the Base Station Controller which controls the Base Transceiver station
and acts as a interface between the mobile station and mobile switching center.
 Network Subsystem: It provides the basic network connection to the mobile stations.
The basic part of the Network Subsystem is the Mobile Service Switching Centre
which provides access to different networks like ISDN, PSTN etc. It also consists of
the Home Location Register and the Visitor Location Register which provides the call
routing and roaming capabilities of GSM. It also contains the Equipment Identity
Register which maintains an account of all the mobile equipments wherein each
mobile is identified by its own IMEI number. IMEI stands for International Mobile
Equipment Identity.

GSM MODEM WORKING PRINCIPLE


A GSM modem is a device which can be either a mobile phone or a modem device
which can be used to make a computer or any other processor communicate over a network.
A GSM modem requires a SIM card to be operated and operates over a network range
subscribed by the network operator.  It can be connected to a computer through serial, USB
or Bluetooth connection.A GSM modem can also be a standard GSM mobile phone with the
appropriate cable and software driver to connect to a serial port or USB port on your
computer. GSM modem is usually preferable to a GSM mobile phone. The GSM modem has
wide range of applications in transaction terminals, supply chain management, security
applications, weather stations and GPRS mode remote data logging.Some GSM Modems also
has GPRS feature that allows transmission of data over TCP/IP (internet).To transmit data
using GSM Modem, there are various methods that can be used, such as:

 SMS
 CSD or HSCSD
 GPRS / UMTS
AT commands with a GSM/GPRS MODEM or mobile phone can be used to access following
information and services:
 Information and configuration pertaining to mobile device or MODEM and SIM card.
 SMS services.
 MMS services.
 Fax services.
 Data and Voice link over mobile network.

TYPES OF AT COMMANDS

There are two types of AT commands:

 Basic commands are AT commands that do not start with "+". For example, D (Dial),
A (Answer), H (Hook control), and O (Return to online data state) are basic
commands.
 Extended commands are AT commands that start with "+". All GSM AT commands
are extended commands. For example, +CMGS (Send SMS message), +CMGL (List
SMS messages), and +CMGR (Read SMS messages) are extended commands.

 Reading, writing and deleting SMS messages.

 Sending SMS messages.


 Monitoring the signal strength.

 Monitoring the charging status and charge level of the battery.

 Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per minute is very
low only about six to ten SMS messages per minute.Here are some of the tasks that can be
done using AT commands with a GSM/GPRS modem or mobile phone:

 Get basic information about the mobile phone or GSM/GPRS modem. For example,
name of the manufacturer (AT+CGMI), model number (AT+CGMM), IMEI number
(International Mobile Equipment Identity) (AT+CGSN), and the software version
(AT+CGMR).
 Get basic information about the subscriber. For example, MSISDN (AT+CNUM) and
IMSI number (International Mobile Subscriber Identity) (AT+CIMI).
 Get the current status of the mobile phone or GSM/GPRS modem. For example,
mobile phone activity status (AT+CPAS), mobile network registration status
(AT+CREG), radio signal strength (AT+CSQ), battery charge level, and battery
charging status (AT+CBC).
 Establish a data connection or voice connection to a remote modem (ATD, ATA,
etc.).
 Send and receive fax (ATD, ATA, AT+F*).
 Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write
(AT+CMGW), or delete (AT+CMGD) SMS messages and obtain notifications of
newly received SMS messages (AT+CNMI).
 Read (AT+CPBR), write (AT+CPBW), or search (AT+CPBF) phonebook entries.
 Perform security-related tasks, such as opening or closing facility locks (AT+CLCK),
checking whether a facility is locked (AT+CLCK), and changing passwords
(AT+CPWD). (Facility lock examples: SIM lock [a password must be given to the
SIM card every time the mobile phone is switched on] and PH-SIM lock [a certain
SIM card is associated with the mobile phone; to use other SIM cards with the mobile
phone, a password must be entered.])
 Control the presentation of result codes / error messages of AT commands. For
example, you can control whether to enable certain error messages (AT+CMEE), and
whether error messages should be displayed in numeric format or verbose format
(AT+CMEE=1 or AT+CMEE=2).
 Get or change the configurations of the mobile phone or GSM/GPRS modem. For
example, change the GSM network (AT+COPS), bearer service type (AT+CBST),
radio link protocol parameters (AT+CRLP), SMS centre address (AT+CSCA), and
storage of SMS messages (AT+CPMS).
 Save and restore configurations of the mobile phone or GSM/GPRS modem. For
example, save (AT+CSAS) and restore (AT+CRES) settings related to SMS
messaging such as the SMS centre address.

APPLICATIONS

 SMS Gateway ie. to send and receive SMS


 Telemetricto collect data from remote terminals
 call-back service for VOIP
 SMS application, SMS solution, or SMS programmed
 automatic reloading of pre-paid account with STK API
 machine to machine communication
 sending SMS from PC
 automating business process
 vehicle tracking with cell broadcast feature or with integrated GPS terminal

3.6 LED
LED (LIGHT EMITTING DIODE) consists of a chip of semiconducting
material impregnated, or doped, with impurities to create a p-n junction. As in other diodes,
current flows easily from the p-side, or anode, to the n-side, or cathode, but not in the reverse
direction. Charge-carriers—electrons and holes—flow into the junction from electrodes with
different voltages. When an electron meets a hole, it falls into a lower energy, and
releases energy in the form of a photon.
.

LEDs are usually built on an n-type substrate, with an electrode attached to the p-
type layer deposited on its surface. P-type substrates, while less common, occur as well.
Many commercial LEDs, especially Gann/InGaN, also use sapphire substrate. Most materials
used for LED production have very high refractive indices. This means that much light will
be reflected back in to the material at the material/air surface interface. Therefore, Light
extraction in LEDs is an important aspect of LED production, subject to much research and
development.

Efficiency and operational parameters:

Typical indicator LEDs are designed to operate with no more than 30–60  mill
watts [mW] of electrical power. Around 1999, Philips Lumileds introduced power LEDs
capable of continuous use at one watt [W]. These LEDs used much larger semiconductor die
sizes to handle the large power inputs. Also, the semiconductor dies were mounted onto metal
slugs to allow for heat removal from the LED die.
One of the key advantages of LED-based lighting is its high efficiency, as measured by its
light output per unit power input. White LEDs quickly matched and overtook the efficiency
of standard incandescent lighting systems. In 2002, Lumileds made five-watt LEDs available
with a luminous efficiency of 18–22 lumens per watt [lm/W]. For comparison, a conventional
60–100 W incandescent light bulb produces around 15 lm/W, and standard fluorescent lights
produce up to 100 lm/W. (The luminous efficiency article discusses these comparisons in
more detail.)

Parts of an LED

In September 2003, a new type of blue LED was demonstrated by the company Cree, Inc. to
provide 24 mW at 20 milliamperes [mA]. This produced a commercially packaged white
light giving 65 lm/W at 20 mA, becoming the brightest white LED commercially available at
the time, and more than four times as efficient as standard incandescent. In 2006 they
demonstrated a prototype with a record white LED luminous efficiency of 131 lm/W at 20
mA. Also, Seoul Semiconductor has plans for 135 lm/W by 2007 and 145 lm/W by 2008,
which would be approaching an order of magnitude improvement over standard incandescent
and better even than standard fluorescents.Nichia Corporation has developed a white light
LED with luminous efficiency of 150 lm/W at a forward current of 20 mA.It should be noted
that high-power (≥ 1 W) LEDs are necessary for practical general lighting applications.
Typical operating currents for these devices begin at 350 mA. The highest efficiency high-
power white LED is claimed by
Philips Lumileds Lighting Co. with a luminous efficiency of
115 lm/W (350 mA).
Cree issued a press release on November 19, 2008 about a laboratory prototype LED
achieving 161 lumens/watt at room temperature. The total output was 173 lumens, and the
correlated colour temperature was reported to be 4689 K.

The inner workings of an LED

I-V diagram for a diode an LED will begin to emit light when the on-voltage is exceeded.
Typical on voltages are 2-3 Volt

V-I CHARACTERSTICS

3.7 VOLTAGE SENSOR


The voltage Sensor uses only electronic components. The voltage to be measured is
directly applied to the sensor terminals: +HT (positive high voltage),-HT (negative high
voltage or ground) the primary voltage going through an insulated Amplifier, is converted
into the output current Is proportionally to the input signal. The power supply of the primary
section of this sensor is galvanic insulated. This principle is called static voltage sensing.

The measurement of voltage is based on voltage divider. Two main types are


available, namely the capacitive one and the resistive one. The output in both cases is a low-
level voltage signal. The output is linear throughout the whole rated measurement range.
The considerations and protection methods against the Ferro resonance, discussed with
traditional voltage transformers, are not applicable with voltage sensors.

Two main principles for voltage sensor implementation

As with current sensors, also with voltage sensors it is possible to cover certain
voltage range with one sensor type. To give an idea of the secondary voltage signal level,
one fixed point (ratio) inside the rated voltage range could be 20000/√3V primary value,
typically corresponding to 2/√3V secondary-signal level.

Ideal for situations where power quality is an issue, Voltage Watch sensors facilitate
monitoring of supply voltage levels. They identify under voltage or overvoltage concerns and
help protect critical motors and electronics. Because they have an industry-standard 4–20 mA
output, they are easily coupled to a data logger, panel meter or PLC for real-time monitoring
and reporting.
DESCRIPTION

 This module is based on resistance points pressure principle, and it can make the input
voltage of red terminal reduce 5 times of original voltage.
 The max Arduino analog input voltage is 5 V, so the input voltage of this module
should be not more than 5 V. 

ADVANTAGES

 Galvanic insulation between primary and secondary circuits


 Accuracy and high dynamic performance.
 High overload capacities.
 High reliability.

APPLICATIONS

 Traction
 Main convertors.
 Auxiliaries.
 Battery chargers
 Choppers
 Sub-stations.
 Connect this voltage sensor module with Arduino sensor shield through 3 Pin sensor
cable, not only can easily realize to detect and control the voltage, but also can display
the voltage through the IIC LCD1602 LCD module and make voltage monitor.
3.8 CURRENT SENSOR

`A current sensor is a device that detects electric current (AC or DC) in a wire, and


generates a signal proportional to it. The generated signal could be analog voltage or current
or even digital output. It can be then utilized to display the measured current in an ammeter or
can be stored for further analysis in a data acquisition system or can be utilized for control
purpose.

The sensed current and the output signal can be:

 Analog output, which duplicates the wave shape of the sensed current
 Bipolar output, which duplicates the wave shape of the sensed current
 Unipolar output, which is proportional to the average or RMS value of the sensed
current

Direct current input,

 Unipolar with a Unipolar output, which duplicates the wave shape of the sensed
current
 Digital output which switches when the sensed current exceeds a certain threshold

APPLICATIONS
 Suitable for the current measuring
 Monitoring and protection of AC motor
 Lighting equipment
 Air compressor
 
SPECIFICATIONS
 Input Current: 0~30A AC
 Output Mode: DC 0~1V
 Non-linearity:2-3%
 Build-in sampling resistance (RL): 62Ω
 Turn Ratio: 1800:1
 Resistance Grade: Grade B
 Work Temperature: -25°C ~ ﹢70°C
 Dielectric Strength(between shell and output): 1000V AC/1min 5mA
 Leading Wire in Length: 1m
 Open Size: 13mm x 13mm
CHAPTER 4

SOFTWARE UNIT
4.1 EMBEDDED C

Embedded C is a set of language extensions for the C Programming language by


the C Standards committee to address commonality issues that exist between C extensions for
different embedded systems. Historically, embedded C programming requires nonstandard
extensions to the C language in order to support exotic features such as fixed-point
arithmetic, multiple distinct memory banks, and basic I/O operations.

In 2008, the C Standards Committee extended the C language to address these issues
by providing a common standard for all implementations to adhere to. It includes a number of
features not available in normal C, such as, fixed-point arithmetic, named address spaces, and
basic I/O hardware addressing.

Embedded C uses most of the syntax and semantics of standard C, e.g., main()
function, variable definition, datatype declaration, conditional statements (if, switch, case),
loops (while, for), functions, arrays and strings, structures and union, bit operations, macros,
etc. A Technical Report was published in 2004 and a second revision in 2006.

4.1.1 NECESSITY
During infancy years of microprocessor based systems, programs were developed
using assemblers and fused into the EPROMs. There used to be no mechanism to find what
the program was doing. LEDs, switches, etc. were used to check for correct execution of the
program. Some ‘very fortunate’ developers had In-circuit Simulators (ICEs), but they were
too costly and were not quite reliable as well. As time progressed, use of microprocessor-
specific assembly-only as the programming language reduced and embedded systems moved
onto C as the embedded programming language of choice. C is the most widely used
programming language for embedded processors/controllers. Assembly is also used but
mainly to implement those portions of the code where very high timing accuracy, code size
efficiency, etc. are prime requirements.
As assembly language programs are specific to a processor, assembly language didn’t
offer portability across systems. To overcome this disadvantage, several high level languages,
including C, came up. Some other languages like PLM, Modula-2, Pascal, etc. also came but
couldn’t find wide acceptance. Amongst those, C got wide acceptance for not only embedded
systems, but also for desktop applications. Even though C might have lost its sheen as
mainstream language for general purpose applications, it still is having a strong-hold in
embedded programming. Due to the wide acceptance of C in the embedded systems, various
kinds of support tools like compilers & cross-compilers, ICE, etc. came up and all this
facilitated development of embedded systems using C. Assembly language seems to be an
obvious choice for programming embedded devices. However, use of assembly language is
restricted to developing efficient codes in terms of size and speed. Also, assembly codes lead
to higher software development costs and code portability is not there. Developing small
codes are not much of a problem, but large programs/projects become increasingly difficult to
manage in assembly language. Finding good assembly programmers has also become
difficult nowadays. Hence high level languages are preferred for embedded systems
programming.

4.1.2 ADVANTAGES
 It is small and simpler to learn, understand, program and debug.
 Compared to assembly language, C code written is more reliable and scalable, more
portable between different platforms.
 C compilers are available for almost all embedded devices in use today, and there is a
large pool of experienced C programmers.
 Unlike assembly, C has advantage of processor-independence and is not specific to
any particular microprocessor/microcontroller or any system. This makes it
convenient for a user to develop programs that can run on most of the systems.
 As C combines functionality of assembly language and features of high level
languages, C is treated as a ‘middle-level computer language’ or ‘high level assembly
language’.
 It is fairly efficient.
 It supports access to I/O and provides ease of management of large embedded
projects.
 Java is also used in many embedded systems but Java programs require the Java
Virtual Machine (JVM), which consumes a lot of resources. Hence it is not used for
smaller embedded devices.
 Other High-level programming language like Pascal, FORTRAN also provide some
of the advantages.

4.1.3 EMBEDDED SYSTEMS PROGRAMMING

Embedded systems programming is different from developing applications on a


desktop computer. Key characteristics of an embedded system, when compared to PCs, are as
follows:
 Embedded devices have resource constraints (limited ROM, limited RAM, limited
stack space, less processing power)
 Components used in embedded system and PCs are different; embedded systems
typically use smaller, less power consuming components. ·         Embedded systems
are more tied to the hardware.
Two salient features of Embedded Programming are code speed and code size. Code
speed is governed by the processing power, timing constraints, whereas code size is governed
by available program memory and use of programming language.  Goal of embedded system
programming is to get maximum features in minimum space and minimum time.
 
Embedded systems are programmed using different type of languages:
 Machine Code
 Low level language, i.e., assembly
 High level language like C, C++, Java, Ada, etc.
 Application level language like Visual Basic, scripts, Access, etc.
Assembly language maps mnemonic words with the binary machine codes that the
processor uses to code the instructions. Assembly language seems to be an obvious choice for
programming embedded devices. However, use of assembly language is restricted to
developing efficient codes in terms of size and speed. Also, assembly codes lead to higher
software development costs and code portability is not there. Developing small codes are not
much of a problem, but large programs/projects become increasingly difficult to manage in
assembly language. Finding good assembly programmers has also become difficult
nowadays. Hence high level languages are preferred for embedded systems programming.
 
Use of C in embedded systems is driven by following advantages:
 It is small and reasonably simpler to learn, understand, program and debug.
 C Compilers are available for almost all embedded devices in use today, and there is a
large pool of experienced C programmers.
 Unlike assembly, C has advantage of processor-independence and is not specific to any
particular microprocessor/ microcontroller or any system. This makes it convenient for a
user to develop programs that can run on most of the systems.
 As C combines functionality of assembly language and features of high level languages,
C is treated as a ‘middle-level computer language’ or ‘high level assembly language’
 It is fairly efficient
 It supports access to I/O and provides ease of management of large embedded projects.
 
Many of these advantages are offered by other languages also, but what sets C apart
from others like Pascal, FORTRAN, etc. is the fact that it is a middle level language; it
provides direct hardware control without sacrificing benefits of high level languages.
 
Compared to other high level languages, C offers more flexibility because C is
relatively small, structured language; it supports low-level bit-wise data manipulation.
 
Compared to assembly language, C Code written is more reliable and scalable, more
portable between different platforms (with some changes). Moreover, programs developed in
C are much easier to understand, maintain and debug. Also, as they can be developed more
quickly, codes written in C offers better productivity. C is based on the philosophy
‘programmers know what they are doing’; only the intentions are to be stated explicitly. It is
easier to write good code in C & convert it to an efficient assembly code (using high quality
compilers) rather than writing an efficient code in assembly itself. Benefits of assembly
language programming over C are negligible when we compare the ease with which C
programs are developed by programmers.
 
Objected oriented language, C++ is not apt for developing efficient programs in
resource constrained environments like embedded devices. Virtual functions & exception
handling of C++ are some specific features that are not efficient in terms of space and speed
in embedded systems. Sometimes C++ is used only with very few features, very much as C.
And, also an object-oriented language, is different than C++. Originally designed by
the U.S. DOD, it didn’t gain popularity despite being accepted as an international standard
twice (Ada83 and Ada95). However, Ada language has many features that would simplify
embedded software development.Java is another language used for embedded systems
programming. It primarily finds usage in high-end mobile phones as it offers portability
across systems and is also useful for browsing applications. Java programs require Java
Virtual Machine (JVM), which consume lot of resources. Hence it is not used for smaller
embedded devices.Dynamic C and B# are some proprietary languages which are also being
used in embedded applications.Efficient embedded C programs must be kept small and
efficient; they must be optimized for code speed and code size. Good understanding of
processor architecture embedded C programming and debugging tools facilitate this.
 
4.1.4 DIFFERENCE BETWEEN C AND EMBEDDED C
Though C and embedded C appear different and are used in different contexts, they
have more similarities than the differences. Most of the constructs are same; the difference
lies in their applications.C is used for desktop computers, while embedded C is for
microcontroller based applications. Accordingly, C has the luxury to use resources of a
desktop PC like memory, OS, etc. While programming on desktop systems, we need not
bother about memory. However, embedded C has to use with the limited resources (RAM,
ROM, I/Os) on an embedded processor. Thus, program code must fit into the available
program memory. If code exceeds the limit, the system is likely to crash.
Compilers for C (ANSI C) typically generate OS dependent executables. Embedded
C requires compilers to create files to be downloaded to the microcontrollers/microprocessors
where it needs to run. Embedded compilers give access to all resources which is not provided
in compilers for desktop computer applications.Embedded systems often have the real-time
constraints, which is usually not there with desktop computer applications.Embedded systems
often do not have a console, which is available in case of desktop applications.So, what
basically is different while programming with embedded C is the mindset; for embedded
applications, we need to optimally use the resources, make the program code efficient, and
satisfy real time constraints, if any. All this is done using the basic constructs, syntaxes, and
function libraries of ‘C’.
4.2 ARDUINO SOFTWARE (IDE)

The Arduino Integrated Development Environment or Arduino Software (IDE)


contains a text editor for writing code, a message area, a text console, a toolbar with buttons
for common functions and a series of menus. It connects to the Arduino and Genuino
hardware to upload programs and communicate with them.

4.2.1 TOOLS

 Auto Format 
 this formats your code nicely: i.e. indents it so that opening and closing curly braces
line up, and that the statements inside curly braces are indented more.
 Archive Sketch 
Archives a copy of the current sketch in .zip format. The archive is placed in the same
directory as the sketch.
 Fix Encoding & Reload 
Fixes possible discrepancies between the editor char map encoding and other
operating systems char maps.
 Serial Monitor 
Opens the serial monitor window and initiates the exchange of data with any
connected board on the currently selected Port.
 Board 
Select the board that you're using. See below for descriptions of the various boards.
 Port 
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
 Programmer 
For selecting a hardware programmer when programming a board or chip and not
using the on-board USB-serial connection.
 Burn Boot loader 
The items in this menu allow you to burn a bootloader onto the microcontroller on an
Arduino board.
4.2.2 TABS, MULTIPLE FILES, AND COMPILATION

Allows you to manage sketches with more than one file (each of which appears in its
own tab). These can be normal Arduino code files (no visible extension), C files (.c
extension), C++ files (.cpp), or header files (.h).

4.2.3 UPLOADING

Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. The boards are described below. Once you've selected the
correct serial port and board, press the upload button in the toolbar or select the Upload item
from the File menu. Current Arduino boards will reset automatically and begin the upload.

With older boards (pre-Diecimila) that lack auto-reset, you'll need to press the reset
button on the board just before starting the upload. On most boards, you'll see the RX and
TX LEDs blink as the sketch is uploaded. The Arduino Software (IDE) will display a
message when the upload is complete, or show an error.

When you upload a sketch, you're using the Arduino bootloader, a small program that
has been loaded on to the microcontroller on your board.

It allows you to upload code without using any additional hardware. The bootloader
is active for a few seconds when the board resets; then it starts whichever sketch was most
recently uploaded to the microcontroller. The bootloader will blink the on-board (pin 13)
LED when it starts (i.e. when the board resets).

4.2.4 LIBRARIES

Libraries provide extra functionality for use in sketches, e.g. working with hardware
or manipulating data. To use a library in a sketch, select it from the Sketch > Import
Library menu. This will insert one or more #include statements at the top of the sketch and
compile the library with your sketch. Because libraries are uploaded to the board with your
sketch, they increase the amount of space it takes up.
If a sketch no longer needs a library, simply delete its #include statements from the
top of your code. There is a list of libraries in the reference. Some libraries are included with
the Arduino software. Others can be downloaded from a variety of sources or through the
Library Manager. Starting with version 1.0.5 of the IDE, you do can import a library from a
zip file and use it in an open sketch. See these instructions for installing a third-party library.

4.2.5 SERIAL MONITOR

It Displays serial data being sent from the Arduino or Genuino board (USB or serial
board). To send data to the board, enter text and click on the "send" button or press enter.
Choose the baud rate from the drop-down that matches the rate passed to Serial.begin in your
sketch. Note that on Windows, Mac or Linux, the Arduino or Genuino board will reset (rerun
your sketch execution to the beginning) when you connect with the serial monitor. You can
also talk to the board from Processing, Flash, MaxMSP, etc (see the interfacing page for
details).

4.2.6 REFERENCES

Some preferences can be set in the preferences dialog (found under the Arduino menu
on the Mac, or File on Windows and Linux). The rest can be found in the preferences file,
whose location is shown in the preference dialog.

4.2.7 LANGUAGE SUPPORT

Since version 1.0.1, the Arduino Software (IDE) has been translated into 30+ different
languages. By default, the IDE loads in the language selected by your operating system.
If you would like to change the language manually, start the Arduino Software (IDE)
and open the Preferences window. Next to the Editor Language there is a dropdown menu of
currently supported languages. Select your preferred language from the menu, and restart the
software to use the selected language. If your operating system language is not supported, the
Arduino Software (IDE) will default to English.

YOU can return the software to its default setting of selecting its language based on
your operating system by selecting System Default from the Editor Language drop-down.
This setting will take effect when you restart the Arduino Software (IDE).
Similarly, after changing your operating system's settings, you must restart the
Arduino Software (IDE) to update it to the new default language.

4.2.8 BOARDS

The board selection has two effects: it sets the parameters (e.g. CPU speed and baud
rate) used when compiling and uploading sketches; and sets and the file and fuse settings
used by the burn boot loader command. Some of the board definitions differ only in the latter,
so even if you've been uploading successfully with a particular selection you'll want to check
it before burning the boot loader. You can find a comparison table between the various
boards here.

Arduino Software (IDE) includes the built in support for the boards in the following list,
all based on the AVR Core. The Boards included in the standard installation allows to add
support for the growing number of new boards based on different cores like Arduino Due,
Arduino Zero, Edison, Galileo and so on.
CHAPTER 5

LITERATURE SURVEY

Title: SwapGuard: A software-only solution for attesting hot-swappable devices in power


grids

Author: Xinshu Dong; SumeetJauhar; Binbin Chen

Year: 2016

Hot-swappable devices play an important role for achieving high availability and easy
maintainability in power grids, especially in substations. However, they also present a
potential attack vector for malware to penetrate an otherwise highly closed system. We
propose SwapGuard, a software-only solution that effectively guards a power grid system
against swapped-in devices infected with malware. Built upon existing software-based
attestation techniques, Swap Guard’s design can securely handle hot-swapping event and
accommodate different types of devices and networks. We evaluate SwapGuard on real-world
power grid devices. The experimental results show that SwapGuard incurs low overhead to
the operation of the system, in terms of the additional time required before a swapped-in
device starts to function, the overhead to bootstrap the whole system, and the overhead to
defend against unattested devices.

Title:Design and Implementation of LoRaWAN-Based Smart Meter System for Rural


Electrification

Author: I KetutAgungEnriko; Ali ZaenalAbidin; AzizahSyifalianti Noor

Year:2021

The urge to manage daily energy consumption has now become a worldwide priority. The
Internet of Things (IoT)-based smart meter has been widely used to monitor energy
consumption in many households. Lora WAN connectivity is confirmed to be one of the most
reliable connectivity to be used as a network system for IoT use cases. It can fulfill the needs
of low power, long-range, efficient, and affordable IoT technology in utility energy
monitoring. Lora WAN-based smart electric meters are designed in rural areas for monitoring
and managing electric energy consumption. The smart electric meter system consists of smart
kWh meters, LoRa gateway, network system, and dashboard for energy usage monitoring.
The system design process consists of feature design, architecture design, data flow design,
LoRa gateway site planning, and platform setup. The implementation can be concluded that
LoRa can be used for smart electric meters in rural areas. A gateway can reach a maximum
distance of 1.58 km, with an RSSI of -99.40 dBm ±4.56 dBm. LoRa gateway availability can
reach 100% by implementing gateway protection systems. The Lora WAN-based smart
electricity meter has also proven to be cost optimized, efficiently reducing monthly costs to
92.12%.

Title: Design and Implementation of an IoT-Based Energy Monitoring System for Managing
Smart Homes
Author: Michael OpokuAgyeman; Zainab Al-Waisi; IglaHoxha
Year: 2019

The usage of smart meters has been expanding rapidly since the 2000s, as they
provide economic, social and environmental benefits for multiple stakeholders. A smart meter
can have a customizable design based on the requirements of customer and utility company.
They can be implemented by using different sensors and devices, supported by dedicated
communication infrastructure. This paper presents the design and implementation of a full
working smart meter system that provides remote control of individual loads by using
Arduino, Raspberry Pi and other sensors. The implemented system includes a mobile
application, developed for the client to control and manage the smart meter, along with a
website application, developed for the utility company to monitor and administer the system.
The energy monitoring system is equipped with various features such as sending a
notification to the client if consumption budget exceeds a customizable threshold (75%),
payment options by Visa or PayPal and many others.

Title: A new IOT‐based smart energy meter for smart grids


Author: Danielly B. Avancini, Ricardo A. L. Rabelo& Ashok Kumar Das
Year: 2020

The significant increase in energy consumption by the growth of the population or by


the use of new equipment has brought big challenges to the energy security as well as the
environment. There is a need that consumers can track their daily use and understand
consumption standards for better organizing themselves to obtain financial and energetic
efficiency. With the improvement of smart networks technology for better energy supply, a
smart meter is not just a simple measurement gadget anymore, but it has additional functions
including smart equipment control, bidirectional communication that allows integration of
users and networks, and other functionalities. Smart meters are the most fundamental
components in smart power grids. Besides, the meters used with a management system can be
utilized for monitoring and controlling home appliances and other gadgets according to the
users' need. A solution of an integrated and single system should be more efficient and
economical. Smart measurement systems allow monitoring the energy consumption of the
final consumers while providing useful information about the energy quality. The information
provided by these systems is used by the operators to enhance the energy supply, and
different techniques can be also applied for this end, such as charge scheduling, management
from the demand side, and non‐intrusive load monitoring. The Internet of Things (IoT) is
becoming a great ally in the management of smart distribution and energy consumption in
smart systems scenarios. To address these issues, this paper proposes and demonstrates a new
smart energy meter following an IoT approach and its associated costs and benefits. The
developed device incorporates several communication interfaces. In order to easily integrate
with any monitoring software solution, the meter has a multi‐protocol connection. Finally, the
provided solution is validated and demonstrated in real‐life environments and it is also under
use. The intention of this thesis is to investigate the possibility to implement a guitar tuner,
using only an ordinary mobile phone as a platform. Samples are read from the microphone
already located in the mobile, then processed using available resources and nally the result is
presented on the display. Although the outcome of the thesis can be seen as a success, there is
room for improvements and alternative solutions.

Title: LORAWAN Internet of Things Network Planning for Smart Metering Services

Author: Alvin Yusri; Muhammad Imam Nashiruddin

Year: 2020

Optimization of energy usage is essential to minimize the waste of energy usage. Smart
Metering is a solution to resolve this problem. It can measure, collect, analyze energy
distribution and its consumption, and communicate with metering devices on schedule and
on-demand, i.e., for electricity, water, and gas services. However, selecting the right Internet
of Things (IoT) network connectivity to deploy Smart Metering services is still the main
challenge, especially for the dense urban setting. LoRaWAN is one of the most popular Low
Power Wide Area technologies consider as a suitable IoT network connectivity for Smart
Metering because LoRaWAN has a long battery life, using unlicensed frequency and low cost
of deployment. In this research, the LoRaWAN IOT network planning to deliver Smart
Metering services was conducted in Jakarta City, as representative of the dense urban setting.
The network planning methods are using capacity and coverage analysis as well as radio
network planning simulation. It is found that to deploy Smart Metering services in the Jakarta
City area, at least 23 gateways are required with Spreading Factor (SF) values of 7, Code
Rate (CR) of 1/2/3/4, and can serve at the level of receiver sensitivity > -129dBm. An average
received signal level of -78.84 dBm with an average of throughput distribution of 21.69 kbps
were obtained based on coverage prediction simulation. Meanwhile the Signal to Noise Ratio
(SNR) simulation generated the highest SNR is 30 dB, and the lowest SNR is -20dB resulting
in the average SNR level of the entire region is about -1.05dB.

Title: An Integrated IoT Architecture for Smart Metering

Author: Jaime Lloret; Jesus Tomas; Alejandro Canovas; Lorena Parra

Year: 2016

An invention using a data processing system, herein called the Pitch Processing
System, comprising a Pitch Processing Module, a User Control Module, a transducer,
software, and signal processing techniques integrated into an electric stringed musical
instrument. The system automatically and dynamically provides pitch alteration of the
instrument without requiring human or electromechanical intervention to physically change
string tension. The system corrects unintentional pitch drift and intonation errors, and
provides intentional pitch altering techniques for temperament changes, altered tuning styles,
and pitch bending. The result is a pitch altered signal output from the instrument.
Embodiments herein include a variety of input/output signal configurations for both analog
and digital interfaces to support maximum flexibility of the Pitch Processing System.
Title: Smart energy meter billing using GSM with warning system

Author: P. Loganthurai; M. Shalini; A. Vanmathi; M. Veeralakshmi; V. Vivitha

Year: 2017

The main idea of the project is to modernize our billing system using GSM. The GSM
is a technique works on the principle of TDMA - time division multiple access and operates
at the frequency of 900MHZ. The details of power displaced in the energy meter is
transferred to the mobile using GSM and it also shows the units consumed by the load. If the
number of units consumed by the total load exceeds certain limit means it will give a warning
based on tariff and also we are doing to turn ON and turn OFF the load by setting password
to each load using GSM technique. Thus with the help of this project we can reduce the
electricity bills.

Title: Modish Energy Datum using LoRa Technology

Author: C.ShyamalaKumari; Rohit Kumar; Saurav Kumar Gupta; ShourjyaHazra;


Mayurakshya Paul

Year: 2022

The advancement in emerging technologies to make life easier has brought a boon to
the world of innovations. In the rural parts of the country, still it has been seen in door-to-
door electricity bill collection where a person from the electricity department needs to visit
each home to take a household electric meter reading. This manual process of reading bills is
a rigid and time taking task. Errors in the reading bill such as extra amount and crime
committed in name of reading bills have been recorded in the last few years. In times of
pandemic, it became more difficult to read bills, and consumers were pressurized to pay bills
of more than 9- 10 months at a single time. To overcome this, there is a need for a smart
energy meter that could automate the system of bill reading. This paper introduces the idea of
the smart energy meter using LoRa technology. LoRa module which can work with a
microprocessor can be very useful to implement this idea. LoRa can transmit a huge amount
of data accurately up to a large distance without any significant loss. In big cities, smart
energy meter is being used which can read the units and send bills. But since these devices
need high-speed network connectivity, hence it is not possible to implement the same
technology in rural parts of the country. This paper tends to implement a smart energy meter
that could make the existing meter smart, rather than installing a new meter.
CHAPTER 6

SYSTEM ANALYSIS

6.1 PROBLEM DEFINITION

The existing system uses only an image based approach. It does not support minutiae
approach. It takes long time identification and also the result is not accurate.

6.2 PROBLEM ANALYSIS

The purpose of the System Analysis is to produce the brief analysis task and also to
establish complete information about the concept, behaviour and other constraints such as
performance measure and system optimization. The goal of System Analysis is to completely
specify the technical details for the main concept in a concise and unambiguous manner.

6.3 PACKAGES SELECTED

The package selected to develop Finger print matching is MATLAB and the package
has more advanced features. As the system is to be developed in Finger print matching,
MATLAB platform with windows Application is preferred.

6.4 FEATURES OF WINDOWS XP PROFESSIONAL

The ability to become part of a Windows Server domain, a group of computers that
are remotely managed by one or more central servers. A sophisticated access control scheme
that allows specific permissions on files to be granted to specific users under normal
circumstances. However, users can use tools other than Windows Explorer (like cacls or File
Manager), or restart to Safe Mode to modify access control lists. Remote Desktop server,
which allows a PC to be operated by another Windows XP user over a local area network or
the Internet.

Offline Files and Folders, which allow the PC to automatically store a copy of files
from another networked computer and work with them while disconnected from the network.
Encrypting File System, which encrypts files stored on the computer's hard drive so they
cannot be read by another user, even with physical access to the storage medium. Centralized
administration features, including Group Policies, Automatic Software Installation and
Maintenance, Roaming User Profiles, and Remote Installation Service (RIS). Support for two
physical central processing units (CPU). (Because the number of CPU cores and Hyper-
threading capabilities on modern CPUs are considered to be part of a single physical
processor, multi core CPUs is supported using XP Home Edition.) Windows Management
Instrumentation Console (WMIC): WMIC is a command-line tool designed to ease WMI
information retrieval about a system by using simple keywords (aliases).

6.5 RESOURCES REQUIRED

In this phase it is necessary to analyze the availability of the resources that are required to
design, develop, Implement and Test the project. The resources to be analyzed are
Manpower, Time and the system Requirements. Teams of two members are involved in the
entire SDLC life cycle except the testing phase. The testing phase is guided by the
professional testers before the implementation of the product. Time Analyzed to complete the
project is approximately four months with 4 hrs on daily basis except weekends. System
requirements are analyzed and listed below.

6.6 FEASIBLITY STUDY

The objective of feasibility study is not only to solve the problem but also to acquire a
sense of its scope. During the study, the problem definition was crystallized and aspects of
the problem to be included in the system are determined. Consequently, benefits are
estimated with greater accuracy at this stage. The key considerations are:

 Economic feasibility
 Technical feasibility
 Operational feasibility
6.6.1 ECONOMIC FEASIBILITY

Economic feasibility studies not only the cost of hardware, software is included but
also the benefits in the form of reduced costs are considered here. This project, if installed
will certainly be beneficial since there will be reduction in manual work and increase in the
speed of work.
6.6.2 TECHNICAL FEASIBILITY

Technical feasibility evaluates the hardware requirements, software technology,


available personnel etc., as per the requirements it provides sufficient memory to hold and
process.

6.6.3 OPERATIONAL FEASIBILITY

This is the most important step of the feasibility study this study helps to predict the
operational ability of the system that is being developed. This study also helps to analyze the
approach towards which the system must be developed by which development effort is
reduced. Proposed system is beneficial only if they can be turned into information systems,
that will meet the organization requirements. This system supports in producing good results
and reduces manual work. Only by spending time to evaluate the feasibility, do we reduce the
chances from extreme embarrassments at larger stager of the project. Effort spend on a
feasibility analysis that results in the cancellation of a proposed project is not a wasted effort.
CHAPTER 7

SYSTEM TESTING
7.1 TESTING OBJECTIVES

Testing is a set of activities that can be planned in advance and conducted


systematically. For this reason, a template for software testing, a set of steps into which we
can place specific test case design techniques and testing methods should be defined for
software process. Testing often accounts for more effort than any other software engineering
activity. If it is conducted haphazardly, time is wasted, unnecessary effort is expanded, and
even worse, errors sneak through undetected. It would therefore seem reasonable to establish
a systematic strategy for testing software

Type of Testing

There are two type of testing according their behaviors

1. Unconventional Testing

2. Conventional Testing

7.1.1 UNCONVENTIONAL TESTING

Unconventional testing is a process of verification which is doing by SQA (Software


Quality Assurance) team. It is a prevention technique which is performing from begging to
ending of the project development. In this process SQA team verifies project development
activities and insuring that developing project is fulfilling the requirement of the client or not.

In this testing the SQA team follows these methods:

1. Peer review

2. Code walk and throw

3. Inspection

4. Document Verification
7.1.2 CONVENTIONAL TESTING

Conventional Testing is a process of finding the bugs and validating the project. Testing team
involves in this testing process and validating that developed project is according to client
requirement or not. This process is a correction technique where testing team find bugs and
reporting to the development team for correction on developed project built.

7.2 TEST CASE DESIGN

7.2.1UNIT TESTING

The primary goal of unit testing is to take the smallest piece of testable software in the
application, isolate it from the remainder of the code, and determine whether it behaves
exactly as you expect. Each unit is tested separately before integrating them into modules to
test the interfaces between modules. Unit testing has proven its value in that a large
percentage of defects are identified during its use. In the company as well as seeker
registration form, the zero length username and password are given and checked. Also the
duplicate username is given and checked. In the job and question entry, the button will send
data to the server only if the client side validations are made. The dates are entered in wrong
manner and checked. Wrong email-id and web site URL (Universal Resource Locator) is
given and checked.

7.2.2 INTEGRATION TESTING

Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to
show that the system will operate successfully in all its aspects conditions. Thus the system
testing is a confirmation that all is correct and an opportunity to show the user that the system
works.

7.2.3VALIDATION TESTING

The final step involves Validation testing, which determines whether the software
function as the user expected. The end-user rather than the system developer conduct this test
most software developers as a process called “Alpha and Beta Testing” to uncover that only
the end user seems able to find. The compilation of the entire project is based on the full
satisfaction of the end users. In the project, validation testing is made in various forms. In
question entry form, the correct answer only will be accepted in the answer box. The answers
other than the four given choices will not be accepted.

7.3 TESTING STRATEGIES

A number of software testing strategies have been proposed in the literature. All
provide the software developer with a template for testing and all have the following generic
characteristics:

1. Testing begins at the component level and works “outward” toward the integration of
the entire computer-based system.

2. Different testing techniques are appropriate at different points in time.

3. The developer of the s/w conducts testing and for large projects, independent test
group.

4. Testing and debugging are different activities, but debugging must be accommodated
in any testing strategy.

7.4 INTEGRATION TESTING:

The strategies for integrating software components into a functioning product include the
bottom-up strategy, the top-down strategy and to ensure that modules will be available for
integration into the evolving software product when needed. The integration strategy dictates
the order in which modules must be available and thus exerts a strong influence on the order
in which modules are written, debugged and unit tested.

7.5 WHITE BOX TESTING:

It is just the vice versa of the Black Box testing. There we do not watch the internal variables
during testing. This gives clear idea about what is going on during execution of the system.
The point at which the bug occurs were all clear and were removed.

7.6 BLACK BOX TESTING:

In this testing we give input to the system and test the output. Here we do not go for watching
the internal file in the system and what are the changes made on them for the required output.
7.7 INTERFACE TESTING

The Interface Testing is performed to verify the interfaces between sub modules while
performing integration of sub modules aiding master module recursively.

7.8 MODULE TESTING

Module Testing is a process of testing the system, module by module. It includes the various
inputs given, outputs produced and their correctness. By testing in this method we would be
very clear of all the bugs that have occurred.

7.9 MAINTENANCE

The objectives of this maintenance work are to make sure that the system gets into
work all time without any bug. Provision must be for environmental changes which may
affect the computer or software system. This is called the maintenance of the system.
Nowadays there is the rapid change in the software world. Due to this rapid change, the
system should be capable of adapting these changes. In our project the process can be added
without affecting other parts of the system. Maintenance plays a vital role. The system will
able to accept any modification after its implementation. This system has been designed to
favor all new changes. Doing this will not affect the system’s performance or its accuracy.
This is the final step in system life cycle. Here we implement the tested error-free system into
real-life environment and make necessary changes, which runs in an online fashion.
CONCLUSION:

This paper proposes and implements a secure and costefficient smart metering
solution, i.e., secure smart metering infrastructure based on IOT technology. Moreover, a key
management protocol with self-verification and future key secrecy is designed to work with
the proposed infrastructure to maintain a long-term security by updating keys periodically.
The evaluation also demonstrates the practicability ofthe proposed solution in real-world
scenarios.
REFERENCES:

[1] Lora. http://www.semtech.com/wireless-rf/ internet-of-things/what-is-lora/.

[2] Semtech announces the industry’s first single chip hybrid plc and lora wireless platform
for smart grid, smart metering and iot applications.
http://investors.semtech.com/releasedetail.cfm?ReleaseID=968700.

[3] Smart metering: Lorawan vs. sigfox vs. weightless-p.


https://iot-daily.com/2016/12/09/which-lpwan-technology-is-most-suitable-for-smart-
metering/.

[4] Waspmote sx1272 networking guide.


http://www.libelium.com/downloads/documentation/waspmote_lora_868mhz_915mhz_s
x1272_networking_guide.pdf.

[5] M. Badra and S. Zeadally. Key management solutions in the smart grid environment. In
Wireless and Mobile Networking Conference (WMNC), 2013 6th Joint IFIP, pages 1–7.
IEEE, 2013.

[6] C. Beaver, D. Gallup, W. Neumann, and M. Torgerson. Key management for scada.
Cryptog. Information Sys. Security Dept., Sandia Nat. Labs, Tech. Rep. SAND2001-3252,
2002.

[7] R. Dawson, C. Boyd, E. Dawson, and J. M. G. Nieto. Skma: a key management


architecture for scada systems. In Proceedings of the 2006 Australasian workshops on Grid
computing and e-research-Volume 54, pages 183–192. AustralianComputer Society, Inc.,
2006.

[8] F. F. Demertzis, G. Karopoulos, C. Xenakis, and A. Colarieti. Self-organised key


management for the smart grid. InInternational Conference on Ad-Hoc Networks and
Wireless, pages 303–316. Springer, 2015.

[9] X. Dong, S. Jauhar, and B. Chen. Swapguard: A softwareonly solution for attesting hot-
swappable devices in powergrids. In Smart Grid Communications (SmartGridComm), 2016
IEEE International Conference on, pages 357–363.IEEE, 2016.
[10] S. Fuloria, R. Anderson, F. Alvarez, and K. McGrath. Key management for substations:
Symmetric keys, public keys or no keys? In Power Systems Conference and Exposition
(PSCE), 2011 IEEE/PES, pages 1–6. IEEE, 2011.

You might also like