Vous êtes sur la page 1sur 30

1

CHAPTER 1

INTRODUCTION

In a world of highly developed countries and emerging economics, energy supply


plays a major role. In a modern household, hardly any device runs without electricity.
Understanding household energy usage in home is vital for the planning of energy
consumption and conservation. Household are an important group when addressing energy
conservation. Many researchers pointed out that changing life style is important to reduce the
energy consumption. Buildings constitute a large portion of the overall energy consumption,
nearly half of which is consumed by residential buildings.

To reduce the energy consumption of residential buildings and homes, it is necessary


to know the types of electrical appliances in a home and their power consumption behavior .
The greenhouse effect energy saving is the one of the critical issue in designing the electronic
appliances. The smart houses is the house equipped with highly advanced automatic light
systems, temperature controlling systems, security controlling mechanism and some other
functions. The smart sockets not only monitors and control the power consumptions but also
aids in managing the energy consumption of controllable appliances.

1.1 CONVENTIONAL METHODS

In considering improvements for energy conservation it is important to rememberthat


many traditional (historic) buildings perform very differently from modern buildings.Electric
utilities use electric meters installed at customers' premises for billing purposes. They are
typically calibrated in billing units, the most common one being the kilowatt hour (kWh). They
are usually read once each billing period. The traditional electric meter, used by electricity
companies for accounting is the electromechanical induction watt-hour meter. Its robust
technical design is in use for over a century but is not capable of more than measuring the
accumulated amount of consumed energy.

The fast development of electrical field makes our lives become more and more
convenient. Social demand for power supply capacity is becoming more and more increasing.
On one hand it is how to save power; On the other hand it is how to meet the electricity need
of the society which is being one of the most important problem throughout the world. Thus
we go for smart socket.
2

1.1 SMART SOCKET


We developed a smart socket with the help of Internet of Things to minimize the
energy consumption on home appliances. Smart socket is a very general term for a more
advanced metering device, which provides more detailed information on consumption to
the customer and is mostly able to communicate with the electricity supplier via some
network for the purpose of accounting, billing and monitoring.

Emergence of specialized, low power, cheap, and small size electronic components
enabling electrical power measurement and wireless connectivity together with the rise of
IoT (Internet-of-Things) paradigm made so called smart electric sockets an attractive
research and development topic and affordable node for home automation and energy
management solutions Capabilities range from simple display a meter, which gives a user
feedback on current and past consumption, to high-tech meters which are capable of
interacting with home automation systems and for instance are able to switch on a device
when the supplier indicates cheap energy prices. It is expected that SSoc will play a
significant role as consumer end-device in Smart grids deployment. Various SSoc
implementations, architectures and applications are being continuously described.

Intelligent socket’s original concept is for the purpose of security and protection,
it is on the basis of ordinary socket extending more functions, such as its several protection
functions against short circuit, overvoltage and lightning. Now smart socket is on the basis
of these features combined with the functions of control circuit remotely, and the statistical
power of connection on the socket device, through the network it will transmit the data to
the users, this data provides a basis for users make decisions wisely, it will make appliances
become more intelligent eventually.To make Smart socket economically reasonable it is
preferable to keep their power dissipation at the level below standby power of controlled
appliances. Modern homes provide electricity to electrical devices through the last element
of the power supply chain, the power sockets, which have been regarded traditionally as a
mere junction. In fact, power sockets have not evolved as fast as other everyday devices,
although they seem to be one of the best positioned candidates to be improved as smart
homes are becoming increasingly popular. In the last years researchers have enhanced
power outlets by adding different smart functionalities. For instance, by using Bluetooth
and GSM wireless interfaces. An improved version of the system is presented by including
ethernet support and the capability of measuring current consumption.
3

CHAPTER 2

LITERATURE REVIEW

Poojashri S and Lakshmi R presented the state-of-the art in electricity management


in smart homes, the various enabling technologies that will accelerate this concept, and topics
around consumer behavior with respect to energy usage. Smart homes rely on numerous
enabling technologies in both the electricity grid and consumer electronics. Standardization
and maturity of the technologies in each of these realms is required if smart homes are to be
pervasive. Given that buy in from users is a key that will unlock the adoption of smart homes,
rigorous tests with consumers must be integrated into the smart home design procedure.
Without the comprehensive multi-disciplinary assessment of the smart home, an expensive
system may fall short of expectations.

R,Vijayalaxmi and R Patil developed a smart socket with the help of Internet of
Things to minimize the energy consumption on home appliances. This application is controlled
by four application mode, they are peak time control mode, Auto control mode, user Control
mode, energy limit control. The main aim is to control the energy at home appliances The main
purpose of establishing this system is to control the electricity and the energy of home
appliances by automatic control. Where it can save up to 43.4 % of energy in day to day life
by human. A simple Internet of Things construct the connection between smart socket and the
server which can operate through the internet. It uses neural network algorithm which mainly
save unnecessary energy that are being wasted from the home appliances.

Chetashri Prakash implemented Smart Automation system with the help of wireless
technologies. The purpose of home automation system using internet and wireless networks is
to control the parameters like voltage, current and temperature and monitor it. It helps to
improve the performance of control network. IoT (Internet of Things) is fast rising technology
which involves interaction among object (things) through internet without human interference.
The main objective of using smart automation based on wireless and IoT is to reduce the
unnecessary energy consumption of smart home.
4

Jiang Feng Dai Jian Wu Fe ZouYan mainly introduced the intelligent electrical
outlet of each hardware modules; software part mainly analyses the socket’s communication
mechanism, and the electricity consumption of collected power statistics through diagrams to
feedback through wireless communication. Things achieved in an environment of
communication between the user and the smart power outlet timely feedback to the user, so as
to achieve energy-saving purposes. The automatic control system realizes the automatic control
for intelligent electrical outlet by WIFI wireless communication technology and Internet
technology. The system has much advantages in reliability and performance, It will better
realize the automation and intelligent in control process.

The intelligent energy control scheme named as the residency energy control system
(RECOs) is proposed and it is developed based on wireless smart sockets and IOT technology
to minimize energy or power consumption of home appliances with using sensors. The RECOs
shows control modes as automatic control, and overload concept, other concept as Geyser
control, LED, FAN, Bulb control. The results show this schemes saves more amount of power
consumption .A simple technology as IOT technology which integrates wireless smart sockets
home gateway energy controller, Zigbee. Most importantly the RECOs uses sensor, Other
appliances can also save some amounts of energy.

Sagar and karakalmani proposed a system that will provide remote control of
electrical appliances and perform emetering to reduce Power, Energy and Memory
consumption in the web applications, create a web application for making easy energy
metering, make hostel automated and intelligent and provide comfort to every user, make the
application real time so that the user can monitor real time data and takes a particular action,
control the devices such as Fan, Light and Air-conditioner (AC) and can increase/decrease the
speed, intensity and temperature respectively through mobile app. Utilizing Hall sensor for
current sensing and step-down transformer for voltage sensing. Voltage and current sampling
and quantization is done using single ADC of embedded MC CC430F6137. Active power
measurement uncertainty cannot be significantly reduced by increasing ADC resolution above
12 bits. Power dissipation is of the key importance because the socket itself is full day operated
and should add a negligible energy overhead in order to be economically justifiable.
5

CHAPTER 3

PROPOSED METHOD

3.1 INTRODUCTION
The objective of the project is to establish a smart switch board which updates the
consumer about daily usage of every single device in the home. The Arduino-based smart plug
contains sensors to measure the instantaneous AC voltage and current of the attached appliance.
AC current is measured using Hall Effect-Based Linear Current Sensor(ACS712). Knowing
the instantaneous voltage and current, a variety of quantities can be computed.

Electricity metering module is mainly be composed of a compact module, when the


socket is connected, it can realize the inspection of the values about the output current and
voltage from the socket, and the results will be sent to the arduino. To obtain power
measurements, a dedicated IC is usually used to perform the necessary analog-digital
conversions. In this paper, we use the CT sensor to convert current to voltage. These devices
use the Hall effect to measure current and can be either clamp-on (non-contacting) or in-line.
Inline CT sensors intercept the AC current and couple it with an internally calibrated Hall effect
element. This approach is compact and precise. More the high voltage AC input is electrically
the low voltage output inside the in-lin

Electric power management is very necessary, we don't use the simple way of
calculation about power is multiplied by the time.It should satisfy the precision of electricity
measurement requirements. A smart switch board works on device directly , so there will be
precise and reliable reading. Consumers will get notified about their electrical usage whenever
they require the reading.

This smart socket consists of:

 Hall Effect Current Sensor


 Arduino Uno
 16X2 LCD Display
6

3.2 BLOCK DIAGRAM

Figure 3.1 Block diagram of proposed system


The Figure 3.1 shows the block diagram of the project in which there is a socket from
which the current consumed by the device can be measured. If we have a super smart socket,
no matter where we go, we can control the home air conditioning, lights, television and other
household appliances just only with the phone, and we also can realize monitoring of family
power and getting its analysis table which may include active power, reactive power, apparent
power, root-mean-square voltage, root-mean-square current, power factor and other power
quality parameters. These quantities give a more accurate estimation of energy consumption
which can be helpful in power quality monitoring, detection of malfunctions, etc.

Electric signatures based appliance identification can be achieved using either non-
intrusive methods or intrusive methods. Non intrusive methods involve measuring the energy
consumption of the entire house and disaggregating it to identify individual appliances.
Intrusive methods require measuring the energy consumption of individual appliances in a
home using some kind of energy meters or smart plugs. Most of the proposed non-intrusive as
well as intrusive methods do not perform real-time identification and instead work with pre-
recorded data in an offline manner. Our smart plug system, on the other hand ,supports real-
time classification of the appliance energy consumption profile.
7

The smart plug is applied to the smart home, for collecting the electrical power
consumption, real-time power, real-time voltage, current, and it can connect WIFI, wireless
communication modules by UART, SPI and other wireless communication modules. Users can
remote monitor the home appliances by visit the WEB server. So it achieves the remote monitor
and intelligent purpose.

This work presents a smart plug platform that can perform real-time appliance
identification, offering several benefits to researchers and developers, e.g demand response,
appliance localization, human activity monitoring and energy analytics, etc. The system
consists of smart plugs based on Arduino open hardware platform. The system supports real-
time appliance identification, appliance energy consumption monitoring, and remote control.
Our smart plug platform can be extended to support additional features such as big data
analysis, detection of anomalous appliance behaviour and effective power allocation.
8

CHAPTER 4
COMPONENTS DESCRIPTION

4.1 HALL EFFECT CURRENT SENSOR


A hall effect current sensor allows non-contact detection of direct and alternating
currents, using a hall element, a magnet-electric converting element. This minimizes power
loss of the target current circuit and has a simple structure with high reliability. It offer a wide
range of models that can detect current between 1A and 5000A. This product line up responds
to an array of needs as a top maker taking pride in our level of success in the fields of industrial
and automotive devices.
Table 4.1 Current Sensor Specifications
5A Module 20A Module

Supply Voltage (VCC) 5Vdc Nominal 5Vdc Nominal

Measurement Range -5 to +5 Amps -20 to +20 Amps

Voltage at 0A VCC/2 VCC/2


(nominally 2.5Vdc) (nominally 2.5Vdc)

Scale Factor 185 mV per Amp 100 mV per Amp

Chip ACS712ELC-05A ACS712ELC-10A

Hall Effect sensors are available with either an analogue or digital outputs depending
on the application they are required for. It can also make customized products that match the
requests of customers. Something to take into consideration when selecting a Hall Effect sensor
is the surrounding area of the application as these sensors can be affected by external factors
interfering with the magnetic field.

4.2 ARDUINO UNO


The Arduino UNO is an open-source microcontroller board based on
the Microchip ATmega328P microcontroller and developed by Arduino.cc. The board is
equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to
9

various expansion boards (shields) and other circuits. The board has 14 Digital pins, 6 Analog
pins, and programmable with the Arduino IDE (Integrated Development Environment) via a
type B USB cable. It can be powered by a USB cable or by an external 9 volt battery, though
it accepts voltages between 7 and 20 volts. It is also similar to the Arduino Nano and Leonardo.
The hardware reference design is distributed under a Creative Commons Attribution
Share-Alike 2.5 license and is available on the Arduino website. Layout and production files
for some versions of the hardware are also available. "Uno" means one in Italian and was
chosen to mark the release of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of
Arduino Software (IDE) were the reference versions of Arduino, now evolved to newer
releases.
The Uno board is the first in a series of USB Arduino boards, and the reference model
for the Arduino platform.The ATmega328 on the Arduino Uno comes pre programmed with a
bootloader that allows uploading new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol. The Uno also differs from
all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it uses
the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
The Arduino/Genuino Uno has a number of facilities for communicating with a
computer, another Arduino/Genuino board, or other microcontrollers. The ATmega328
provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and
1 (TX). An ATmega16U2 on the board channels this serial communication over USB and
appears as a virtual com port to software on the computer.

4.3 16X2 LCD DISPLAY


LCD (liquid crystal display) is the technology used fordisplays in notebook and other
smaller computers. Like light-emitting diode (LED) and gas-plasma technologies, LCDs
allow displays to be much thinner than cathode ray tube (CRT) technology.
A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated
optical device that uses the light-modulating properties of liquid crystals. Liquid crystals do
not emit light directly, instead using a backlight or reflector to produce images in color
or monochrome. LCDs are available to display arbitrary images (as in a general-purpose
computer display) or fixed images with low information content, which can be displayed or
hidden, such as preset words, digits, and seven-segment displays, as in a digital clock. They
use the same basic technology, except that arbitrary images are made up of a large number of
small pixels, while other displays have larger elements.
10

CHAPTER 5
DESIGN SPECIFICATION

5.1 CURRENT SENSOR


Current sensor is a device which detects and converts current to get an output voltage,
which is directly proportional to the current in the designed path. When current is passing
through the circuit, a voltage drops across the path where the current is flowing. Also a
magnetic field is generated near the current carrying conductor. These above phenomenon are
used in the current sensor design technique. Current measurement is of vital importance in
many power and instrumentation systems. Traditionally, current sensing was primarily for
circuit protection and control. However, with the advancement in technology, current sensing
has emerged as a method to monitor and enhance performance
A Hall Effect sensor is a transducer which varies its output voltage in reaction to a
magnetic field. These types of sensors are used for proximity switching, speed detection,
positioning and current sensing applications. The key factor determining sensitivity of Hall
effect sensors is high electron mobility. Hall effect sensors with linear transducers are
commonly integrated with digital electronics.Hall Effect sensors are a type of non-contacting
position sensor. They can be either rotary or linear and because they are non-contacting, they
are wear free and have virtually infinite life. The Hall effect sensor interfaces may include input
diagnostics, fault protection for transient conditions, and short/open circuit detection. It may
also provide and monitor the current to the Hall effect sensor itself.

5.1.1 DIAGRAM
11

5.1.2 PIN DESCRIPTION


Vcc – Supply(5v)
Vout- Analog output
Gnd- 0V

5.1.3 ADVANTAGES
Although Hall Effect sensors are often seen as more expensive than standard linear or
rotary sensors this is not always necessarily the case and they are frequently selected because
of their advantages.They are suitable for harsh environments with high IP ratings to
IP68/69K.Hall Effect sensors do not wear so have a long life and in case of two part technology,
meaning they have virtually unlimited life.
 They are highly reliable.
 Offer pre-programmable electrical angles and outputs.
 Offer high speed operation.
 May operate as an electronic switch.
 It can be operated at higher frequencies.
 Can measure a wide range of magnetic fields

5.1.4 APPLICATIONS
Hall Effect sensors have a wide range of applications. They are used in many industries,
we see a high demand for them in the Motorsport industry where they are used on sequential
gear boxes, throttle measurement where the non-contacting, wear free principle, is very
prominent. Some other applications for Hall Effect sensors include

 Automation equipment
 Mobile vehicle
 Marine
 Handling equipment
 Agricultural machinery
 Process and packaging machines
 Slitting & rewinding machines
 Automotive fuel level indicator
12

5.2 ARDUINO UNO

Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller.


Along with ATmega328P, it consists other components such as crystal oscillator, serial
communication, voltage regulator, etc. to support the microcontroller.

5.2.1 DIAGRAM

5.2.2 PIN DESCRIPTION


Arduino Uno has 14 digital input/output pins (out of which 6 can be used as PWM
outputs), 6 analog input pins, a USB connection, A Power barrel jack, an ICSP header and a
reset button.The 14 digital input/output pins can be used as input or output pins by using
pinMode(), digitalRead() and digitalWrite() functions in arduino programming. Each pin
operate at 5V and can provide or receive a maximum of 40mA current, and has an internal pull-
up resistor of 20-50 KOhms which are disconnected by default. Out of these 14 pins, some
pins have specific functions as listed below:

 Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL
serial data and connected with the corresponding ATmega328P USB to TTL serial chip.
 External Interrupt Pins 2 and 3: These pins can be configured to trigger an interrupt on
a low value, a rising or falling edge, or a change in value.
 SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These for SPI communication.
13

 PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using
analogWrite() function.
 In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is HIGH
– LED is on and when pin 13 is LOW, its off.
 Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits
of resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit
can be increased by using AREF pin with analog Reference() function.
 Analog pin 4(SDA) and pin 5(SCA) used for TWI communication using Wire library.

Arduino Uno has a couple of other pins as explained below:

 AREF: Used to provide reference voltage for analog inputs with analogReference().
 Reset Pin: Making this pin LOW, resets the microcontroller

5.2.3 MEMORY:

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).

5.2.4 TECHNICAL SPECIFICATIONS

Microcontroller ATmega328P – 8 bit AVR family microcontroller


Operating Voltage 5V
Recommended Input Voltage 7-12V
Input Voltage Limits 5V
Analog Input Pins 6 (A0 – A5)
Digital I/O Pins 14 (Out of which 6 provide PWM output)
DC Current on I/O Pins 40 Ma
DC Current on 3.3V Pin 50 Ma
Flash Memory 32 KB (0.5 KB is used for Bootloader)
SRAM 2 KB
EEPROM 1 KB
Frequency (Clock Speed) 16 MHz
Table 5.1 Key features of Arduino Board
14

5.2.5 COMMUNICATION

Arduino can be used to communicate with a computer, another Arduino board or other
microcontrollers.The ATmega328P microcontroller provides UART TTL (5V) serial
communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An
ATmega16U2 on the board channels this serial communication over USB and appears as a
virtual com port to software on the computer. The ATmega16U2 firmware uses the standard
USB COM drivers, and no external driver is needed. The Arduino software includes a serial
monitor which allows simple textual data to be sent to and from the Arduino board. There are
two RX and TX LEDs on the arduino board which will flash when data is being transmitted
via the USB-to-serial chip and USB connection to the computer (not for serial communication
on pins 0 and 1). A Software Serial library allows for serial communication on any of the Uno's
digital pins. The ATmega328P also supports I2C (TWI) and SPI communication. The Arduino
software includes a Wire library to simplify use of the I2C bus.

5.2.6 POWER

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 a
2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted
in the Gnd and Vin pin headers of the POWER connector. 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. The power pins are
as follows:

 VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.

 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin
of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and
can damage your board. We don't advise it.
15

 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.

 GND. Ground pins.

5.3 LCD DISPLAY


A liquid-crystal display (LCD) is a flat-panel display or other electronically modulated
optical device that uses the light-modulating properties of liquid crystals. Liquid crystals do
not emit light directly, instead using a backlight or reflector to produce images in color
or monochrome. LCDs are available to display arbitrary images (as in a general-purpose
computer display) or fixed images with low information content, which can be displayed or
hidden, such as preset words, digits, and seven-segment displays, as in a digital clock.

They use the same basic technology, except that arbitrary images are made up of a large
number of small pixels, while other displays have larger elements.LCD modules are vey
commonly used in most embedded projects, the reason being its cheap price, availability and
programmer friendly. Most of us would have come across these displays in our day to day life,
either at PCO’s or calculators. The LCD screen is more energy-efficient and can be disposed
of more safely than a CRT can.

5.2.1 DIAGRAM

5.3.2 FEATURES

 Operating Voltage is 4.7V to 5.3V


 Current consumption is 1mA without backlight
 Alphanumeric LCD display module, meaning can display alphabets and numbers
16

 Consists of two rows and each row can print 16 characters.


 Each character is build by a 5×8 pixel box
 Can work on both 8-bit and 4-bit mode
 It can also display any custom generated characters
 Available in Green and Blue Backlight

5.3.3 PIN DESCRIPTION

PinNo Pin Name Description

1 Vss (Ground) Ground pin connected to system ground

2 Vdd (+5 Volt) Powers the LCD with +5V (4.7V – 5.3V)

Decides the contrast level of display. Grounded to get


3 VE (Contrast V)
maximum contrast.

Connected to Microcontroller to shit between command/data


4 Register Select
register

Used to read or write data. Normally grounded to write data


5 Read/Write
to LCD

Connected to Microcontroller Pin and toggled between 1 and


6 Enable
0 for data acknowledgement

7 Data Pin 0

8 Data Pin 1

9 Data Pin 2 Data pins 0 to 7 forms a 8-bit data line. They can be connected
to Microcontroller to send 8-bit data.

10 Data Pin 3
These LCD’s can also operate on 4-bit mode in such case
Data pin 4,5,6 and 7 will be left free.
11 Data Pin 4
17

12 Data Pin 5

13 Data Pin 6

14 Data Pin 7

15 LED Positive Backlight LED pin positive terminal

16 LED Negative Backlight LED pin negative terminal

Table 5.2 Pin description of 16x2 LCD display


18

CHAPTER 6
SOFTWARE DESCRIPTION

6.1 ARDUINO SOFTWARE IDE


6.1.1 INTRODUCTION

The open-source Arduino Software (IDE) makes it easy to write code and upload it to
the board. It runs on Windows, Mac OS X, and Linux. Arduino consists of both a physical
programmable circuit board (often referred to as a microcontroller) and a piece of software,
or IDE (Integrated Development Environment) that runs on your computer, used to write and
upload computer code to the physical board. Arduino is a great tool for people of all skill levels.
The Arduino hardware and software was designed for artists, designers, hobbyists, hackers,
newbies, and anyone interested in creating interactive objects or environments. Arduino can
interact with buttons, LEDs, motors, speakers, GPS units, cameras, the internet, and even your
smart-phone or your TV! This flexibility combined with the fact that the Arduino software is
free, the hardware boards are pretty cheap, and both the software and hardware are easy to learn
has led to a large community of users who have contributed code and released instructions for
a huge variety of Arduino-based projects.

6.1.2 DESCRIPTION

The Arduino integrated development environment (IDE) is a cross-


platform application (for Windows, macOS, Linux) that is written in the programming
language Java. It is used to write and upload programs to Arduino board. The source code for
the IDE is released under the GNU General Public License, version 2. The Arduino IDE
supports the languages C and C++ using special rules of code structuring. The Arduino IDE
supplies a software library from the Wiring project, which provides many common input and
output procedures. User-written code only requires two basic functions, for starting the sketch
and the main program loop, that are compiled and linked with a program stub main() into an
executable cyclic executive program with the GNU toolchain, also included with the IDE
distribution. The Arduino IDE employs the program avrdude to convert the executable code
into a text file in hexadecimal encoding that is loaded into the Arduino board by a loader
program in the board's firmware.
19

6.1.2.1 WRITING SKETCHES

Programs written using Arduino Software (IDE) are called sketches. These sketches are
written in the text editor and are saved with the file extension .ino. The editor has features for
cutting/pasting and for searching/replacing text. The message area gives feedback while saving
and exporting and also displays errors. The console displays text output by the Arduino
Software (IDE), including complete error messages and other information. The bottom
righthand corner of the window displays the configured board and serial port. The toolbar
buttons allow you to verify and upload programs, create, open, and save sketches, and open the
serial monitor.

6.1.2.2 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. On the Mac, the serial port is
probably something like /dev/tty.usbmodem241 (for an Uno or Mega2560 or Leonardo) or /
dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB board),
or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan USB-to-Serial
adapter).On Windows,it's probably COM1 or COM2 (for a serial board) or COM4
COM5, COM7, or higher (for a USB board) - to find out, you look for USB serial device in the
ports section of the Windows Device Manager. On Linux, it should
be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct serial port and
board, press the upload button in the toolbar or select the Upload item from the Sketch 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. It 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).
20

6.1.2.3 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 #includestatements 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. The Leonardo is Arduino’s first development board to use one microcontroller
with built-in USB. This means that it can be cheaper and simpler. Also, because the board is
handling USB directly, code libraries are available which allow the board to emulate a
computer keyboard, mouse, and more!

6.1.2.4 SERIAL MONITOR

This displays serial sent from the Arduino or Genuino board over USB or serial
connector. 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 menu that matches the rate passed to Serial.begin in
your sketch. Note that on Windows, Mac or Linux the board will reset (it will rerun your sketch)
when you connect with the serial monitor. Please note that the Serial Monitor does not process
control characters; if your sketch needs a complete management of the serial communication
with control characters, you can use an external terminal program and connect it to the COM
port assigned to your Arduino board.

6.1.2.5 ADVANTAGES

 Ready to use
 Examples of codes
 Effortless functions
 Large community
21

6.2 PROTEUS
6.2.1 INTRODUCTION

The Proteus Design Suite is a proprietary software tool suite used primarily
for electronic design automation. The software is used mainly by electronic design
engineers and technicians to create schematics and electronic prints for manufacturing printed
circuit boards.It was developed in Yorkshire, England by Labcenter Electronics Ltd and is
available in English, French, Spanish and Chinese languages. We can simulate our work and
be more efficient in completing the task at hand.Though user interface could have been made
better, one can interact with the running simulation, using switches, etc.Also virtual electronic
measurement instruments are available.

The first version of what is now the Proteus Design Suite was called PC-B and was
written by the company chairman, John Jameson, for DOS in 1988. Schematic Capture support
followed in 1990, with a port to the Windows environment shortly thereafter. Mixed
mode SPICE Simulation was first integrated into Proteus in 1996 and microcontroller
simulation then arrived in Proteus in 1998. Shape based autorouting was added in 2002 and
2006 saw another major product update with 3D Board Visualisation. More recently, a
dedicated IDE for simulation was added in 2011 and MCAD import/export was included in
2015. Support for high speed design was added in 2017. Feature led product releases are
typically biannual, while maintenance based service packs are released as required.

The Proteus Design Suite is a Windows application for schematic capture, simulation,
and PCB layout design. It can be purchased in many configurations, depending on the size of
designs being produced and the requirements for microcontroller simulation. It is a software
suite containing schematic, simulation as well as PCB designing.

 ISIS is the software used to draw schematics and simulate the circuits in real time.The
simulation allows human access during run time,thus providing real time simulation.

 ARES is used for PCB designing.It has the feature of viewing output in 3D view of the
designed PCB along with components.

 The designer can also develop 2D drawings for the product.


22

6.2.2 FEATURES

ISIS has wide range of components in its library. It has sources, signal generators,
measurement and analysis tools like oscilloscope, voltmeter, ammeter etc., probes for real time
monitoring of the parameters of the circuit, switches, displays, loads like motors and lamps,
discrete components like resistors, capacitors, inductors, transformers, digital and analog
Integrated circuits, semi-conductor switches, relays, microcontrollers, processors, sensors etc.

ARES offers PCB designing up to 14 inner layers, with surface mount and through hole
packages. It is embedded with the foot prints of different category of components like ICs,
transistors, headers, connectors and other discrete components. It offers Auto routing and
manual routing options to the PCB Designer. The schematic drawn in the ISIS can be directly
transferred ARES. Schematic capture in the Proteus Design Suite is used for both the
simulation of designs and as the design phase of a PCB layout project. It is therefore a core
component and is included with all product configurations.

PCB Layout module is automatically given connectivity information in the form of


a netlist from the schematic capture module. It applies this information, together with the user
specified design rules and various design automation tools, to assist with error free board
design. PCB's of up to 16 copper layers can be produced with design size limited by product
configuration. One can now look at the finished PCB design without actually making one. The
3D visualization feature virtually creates a 3D model of the PCB. One can use this to verify
whether it will look like one has imagined. All PCB Design products include an autorouter and
basic mixed mode SPICE simulation capabilities. No worry about violating any design rules
because it automatically detects design rule (DRC) errors.

One can also let Proteus do the work for him/her. One can place the components on
their respective places and select the "auto route" option. This will automatically draw multiple
variations of traces and selects the best one. There is also an "Auto placer" option present. This
option needs one to specify the board dimensions by drawing the shape and size of the board
so that, it can place the components within the board boundaries. One can use Proteus 8
professional's "Bill of materials" feature. We just have to specify the cost of each of
components. After specifying the cost for all items, Proteus automatically makes a list of all
components used with their individual price and total price.
23

Many of the components in Proteus can be simulated. There are two options for
simulating: Run simulator and advance frame by frame. The "Run simulator" option simulates
the circuit in a normal speed (If the circuit is not heavy). "Advance frame by frame" option
advances to next frame and waits till one click this button for the next time. This can be useful
for debugging digital circuits.One can also simulate microcontrollers. The microcontrollers
which can be simulated include PIC24, dsPIC33, 8051, Arduino, ARM7 based
microcontrollers.One can download the compilers for Proteus or use different compiler and
dump the hex files in the microcontroller in Proteus. One can even interact in real-time with
the simulation using switches, resistors, LDRs, etc. There are even virtual voltmeter, ammeter,
oscilloscope, logic analyzer,etc.
24

CHAPTER 7

RESULT AND DISCUSSION

7.1 HARDWARE RESULT

The hardware model of the proposed model consisits of Arduino uno, 16x2 LCD,
current sensor and power supply.

Fig 7.1 Connecting circuit to power supply


25

7.2 DESCRIPTION
The connection are given as per the circuit diagram.Current sensor is inserted between load
and phase wire. For alternating current input, 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.

Fig 7.2 Connected with AC supply


26

DC supply current can also be measured using this sensor.Current sensor reads the
value from which voltage and current values are known.The current sensor reads the value
when the device is connected to the supply.It gives instantaneous value of voltage and current.

For Direct current input, the sensed current and the output signal can be

 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

Fig 7.3 DC connection circuit


27

Result can also be viewed in serial COMM port.Data is known without much
calculation.It reads zero when there is no supply and gives the value reliably when the supply
is given.It gives value for every second so instantaneous value can be known.It is an output
which can be viewed in the system.

Fig 7.4 Snapshot of serial COMM output


28

CHAPTER 8
CONCLUSION AND FUTURE SCOPE

8.1 CONCLUSION
One of the main purposes of constructing a smart house is to automatically control
those appliances in the house to achieve the goals of energy saving and smart living. In this
project, energy consumption in a residence is monitored through IoT and smart sockets. We
describe the home power monitoring system using smart plug which we have developed. The
developed monitoring system is composed of the wireless power outlet, which named smart
plug, and the energy control panel. The smart plug integrates AC power receptacle and sensor
node into a power socket to switch the power ON/OFF and to measure the power consumption
of plugged appliances. The energy control panel stores the received signals into the database.
The experiment results show the adaptability and feasibility of the energy consumption data.
The system has much advantages in reliability and performance, It will better realize the
automation and intelligent in control process.

8.2 FUTURE SCOPE

Future research may integrate into the end devices to allow them to be tasked with more
sophisticated data processing and generation. Furthermore, security is an important issue in
safely protecting. The next further job mainly realizes the intelligent socket all the way of
timing control, it also can add a leakage protection switch to regular socket, eventually it will
be able to make it more practical by analyzing and improving them. Later, we can add an LED
display in the smart socket further, it can make convenient for users to intuitive interact and
experience intuitively.
29

REFERENCES
[1] Chen Hai Wang, Zhen Juan Zhang, Ming Huang. The design of the wireless intelligent
socket system in the smart home. Journal of TV Technology, vol.37 (2013):80-83.

[2] Yi chao Jin, Lijuan Sun, Ruchuan Wang. The design of the intelligent electrical outlet in
Internet environment. The 4th China sensor network academic conference proceedings in
CWSN2010.pp.321-326, 2013.

[3] Yichao Jin, Lijuan Sun, Runchuan Wang. The design of the intelligent electrical outlet in
Internet environment. Journal of Research and development of Computing machine,
vol.47(2010):321-326.

[4] Jin Wang. Research of wireless digital home networks. Xi AN Northwestern


university,2010.

[5] Wei Xu, Yuanjian Jiang, Bin Wang. Application of ZigBee technology in the intelligent
electrical outlet design. Journal of Communication of Power System,vol.32(2011):78-81.

[6] Fangrong Xu. Design of Wireless Intelligent Home Control System. Journal of Modern
architecture electrical, vol,1,2010.

[7] Xianchang Min, Lican Huang. Research of Web service technology based based on the
Android platform. Journal of Industrial Control Computer,vol.24(2011):92-94.

[8] Jinhua Peng, Shaolong Shu, Feng Lin, Zhiqiang Huang. A review of several studies on the
Home energy management system. Journal of Management of Power demand
side,vol.13(2011):35-38.

[9] Hashizume A, Mizuno T, Mineno H. Energy monitoring system using sensor networks in
residential houses[C] 26th International Conference on Advanced Information Networking and
Applications Workshops (WAINA).Fukuoka:IEEE Press,2012:595-600.

[10] Lih-Jen Kau, Bi-Ling Dai, Chih-Shen Chen, Sung-Hung Chen, A cloud network-based
power management technology for smart home systems, in Proc. IEEE Int.Conf.onSystems,
Man, and Cybernetics (SMC), Seoul, 2012, pp. 2527–2532. [Online]. Available:
http://dx.doi.org/10.1109/icsmc.2012.6378125

[11] G. Reiter, Wireless connectivity for the Internet of Things, White Paper by Texas
instruments, 2014.
30

[12] Commission Regulation (EC) No 1275/2008. [Online]. Available: http://eur-


lex.europa.eu/legal-content/EN/ALL/?uri=CELEX:32008R 1275

[13] S. Rusitschka, C. Gerdes, K. Eger, A low-cost alternative to smart metering infrastructure


based on peer-to-peer technologies, International Conference on the European Energy Market,
pp. 1-6, 2009.

[14] Dae-Man Han, Jae-Hyun Lim, Smart home energy management system using IEEE
802.15.4 and zigbee, IEEE Transactions on Consumer Electronics, Volume 56 , Issue 3, pp.
1403-1410, 2010.

[15] Muhammad Aftab, Amalfi Darusman, Israa Al Qassem, Majid Khonji and Sid Chi-Kin
Chau. OS Plug: Open Platform for Smart Plugs.In ACM e-Energy, 2015.

Vous aimerez peut-être aussi