An Enhanced Smart Home Control And Monitoring System

DOI : 10.17577/IJERTV3IS051336

Download Full-Text PDF Cite this Publication

Text Only Version

An Enhanced Smart Home Control And Monitoring System

Umeojiako Ebere A1, Okezie C. C2, Akpado K. A.3 , Agbonghae O. A4

123Department of Electronics and Computer Engineering, Nnamdi Azikiwe University, Awka, Nigeria.

4Electronics Development Institute, Awka Nigeria.

Abstract-Home Automation technology is becoming as synonymous with environmental sustainability as it is with convenience and security. Incorporating smart home technology into a new or existing structure makes it easier to reduce energy consumption and carbon footprint (ones impact on the environment) a home creates. This paper proposes an enhanced smart home control and monitoring system which conserves energy by automatically controlling various home installations and appliances. The system also secures the house in real time by opening the door only when the right password is supplied and detects fire in its infancy. At the heart of the control is AT89C51 which is a low power, high performance cmos 8-bit microcontroller. Appropriate sensors were chosen to monitor the processes. The output from the sensors serves as input to the microcontroller which actually controls the entire processes. The system was simulated using proteus ISIS and a working prototype was produced.

Keywords AT89C51 Microcontroller, Smart home, environmental sustainability.

INTRODUCTION

Todays culture is filled with horror stories of home break-ins and burglaries, leaving people with the fear that their home may not be protected from the outside world. This desire for security has caused an increase in the demand for sophisticated home alarm systems. This demand for better home security systems has also drifted over to a need for home automation.

A home automation system integrates electrical devices in a house with each other in order for them to be controlled from a central location which results in improved convenience, security and energy efficiency/conservation.

Understanding how energy is spent and knowing how to control it are key prerequisites for residential energy conservation and achieving environmental sustainability and reduction in carbon footprint. Ones daily activities affect the environment in many different ways driving, flying, heating/cooling homes; even the type of food eaten makes a difference. When carbon emissions and carbon footprint is talked about, it usually mean carbon dioxide (CO2) emissions which is a green house gas it traps the suns heat and keeps the earth warm. Too much CO2 in the air leads to climate change, also known as global warming.

Ones carbon footprint is the amount of carbon dioxide that enters the atmosphere because of the electricity and fuel one uses. It is measured in tonnes of carbon dioxide. In 2010, the UK produced 496 million tonnes of carbon dioxide. Some of this is produced by business and industry, but around 30% comes directly from household energy use [3]. Energy use in the home accounts for around 3.2 tonnes per household [3]. Fig 1.1 shows energy consumption for typical home with heating accounting for 29% energy drain while cooling follows suite.

Figure 1: A Plot of typical energy consumption in homes [1]

Therefore, by making the households more energy efficient, energy consumption will be reduced to the barest minimal and big reduction in the carbon dioxide emissions can be achieved.

Active research is moving towards smart homes, home automation and smart meters with demand response integration to shut off loads by the utility when peak demand is high [6]. However, when the user is empowered to make control decisions, the result leads to energy conservation and active environmental sustainability which is accepted and tolerated all over the world.

SYSTEM ANALYSIS AND DESIGN

Every module of a logic system can be represented by a general model called the state machine [2]. The job of a finite state machine is to sequence operations on a data path. The model consists of three elements, viz:

  • The next state function which in general receives as input the present values of the state variables together with the external inputs. From these it generates the next state which is the next value of the state variables.

  • The state which consists of memory elements which holds the present values of the state variables (state register).

  • The output function which receives as input the present values of the state variables together with the current input values and generates the current outputs.

MOD EM

FIG 3: THE MODEL FOR THE SMART HOME AUTOMATION AND MONITORING SYSTEM

Next State Logi c (g)

g(X,Q)

State mem ory

State

Outp ut Logi c (f)

g (X, Q)

f (X, Q)

Here, the State is the memory element which consists of flip flops that holds the present values of the state variables.

The next State logic consists of AT89C51, a low power consumption microcontroller with programmable memory which receives as input the present values of the state variables together with the external inputs.

The output function receives as input the present values of the state variables together with the current input values and generates the current outputs which is displayed on an LCD or sent as an sms message to a dedicated number through the GSM modem.

The Input Interface comprises of the over head tank water level monitoring sensor sub circuit, the smoke sensor sub circuit, temperature control sensor sub circuit, the motion

Fig 2: The general model of finite state machine [2].

From the general model of a finite state machine, the model for the enhanced smart home control and monitoring system was realized as shown in fig. 3 below.

controlled light sensor sub circuit and the keypad.

Each of these with the exception of the keypad comprises of the following:

THE SIGNAL CONDITIONING CIRCUIT

Analog signal conditioning provides the operations necessary to transform a sensor output into a form necessary to interface with other elements of the process control loop. In these cases, it is necessary to provide a circuit to convert this resistance change either to a voltage or a current signal. This is generally accomplished by divider circuit:

VD = R2Vs (1)

R1 + R2

Where Vs = Supply voltage

R1, R2 = divider resistors

THE COMPARATOR

A digital Comparator is an interface device between analog and digital circuits. The input section is similar to an op-amp, while the output section can be connected directly to TTL or CMOS.

It compares two voltages or currents and outputs a digital signal which acts as an input to a TTL or CMOS device. It has two analog input terminals and and one binary digital . The output is ideally

MDS = Motion Detection Signal KPS = Keypad Signal

PSN = Present State Name; PSC = Present State Code (the memory location); NSN = Next State Name

NSC = Next State Code (The memory Location)

St0

That is, Vo = Vref V (2)

The output signal remains constant as the differential input voltage changes. When described that way, the comparator resembles a 1-bit ADC.

DESIGN SPECIFICATIONS

Following the model of the enhanced smart home control system shown in figure 3, the design will focus on these three layers: the input interface layer, the control software and the output interface layer.

The model specifications are as follows:

The enhanced smart home control system was designed to have five process variables at the input interface layer which are called (WLS = Water Level Signal, TC = Temperature Control Signal SKS = Smoke Signal, MDS = Motion Detection Signal, KPS = Keypad Signal).

The control voltage used is +5volt and a maximum current of 200mA.

THE ASM CHART OF THE SYSTEM

The design of a finite state machine starts with an abstract graphic description such as a state diagram or an ASM chart. Both show the interaction and transitions between the internal states in graphical formats. A state diagram or an ASM chart can capture all the needed information (that is, state, input, output, next state function and output function) in a single graph.

For the purpose of this work, an ASM chart was used for the design of the finite state machine, an enhanced smart home control and monitoring system. The acronym used in both

St1

St2

St3

St4

St5

St6

St7

St8

St9

WLS

RL1

WLS

TCS

RL2 TCS

BUZZER

SKS

SKS

RL3

MDS

MDS

KPS

RL4 KPS

the ASM chart and the State Transition Table is defined below:

WLS = Water Level Signal

TCS = Temperature Control Signal SKS = Smoke Signal

Fig.4: ASM Chart of the System

Table 1: The State Transition Table of the System

THE INPUT INTERFACE DESIGN (INPUT QUALIFIERS)

Overhead tank sensor sub circuit

WATER SENSOR (UPPER)

LI N K P A T

H

Input Qualifiers WLS TCS SKS MDS KPS

PS N DC BA

P S C

NS N D CB A

N S C

Output RL1 RL2 BUZ RL3 RL4

L1

0

ST0

00

00

ST

0

00

00

L2

1

ST

O

00

00

ST

1

00

01

1

L3

1

ST1

00

01

ST

1

00

01

L4

0

ST1

00

01

ST

2

00

11

0

L5

0

ST2

00

11

ST

2

00

11

L6

1

ST2

00

11

ST

3

00

10

1

L7

1

ST3

00

10

ST

3

00

10

L8

0

ST3

00

10

ST

4

01

10

0

L9

0

ST4

01

10

ST

4

01

10

L1

0

1

ST4

01

10

ST

5

01

11

1

L1

1

1

ST5

01

11

ST

5

01

11

L1

2

0

ST5

01

11

ST

6

01

01

0

L1

3

0

ST6

01

01

ST

6

01

01

L1

4

1

ST6

01

01

ST

7

01

00

1

L1

5

1

ST7

01

00

ST

7

01

00

L1

6

0

ST7

01

00

ST

8

11

00

0

L1

7

0

ST8

11

00

ST

8

11

00

L1

8

1

ST8

11

00

ST

9

11

01

1

L1

9

1

ST9

11

01

ST

9

11

01

L2

0

0

ST9

11

01

ST

0

00

00

0

R15

R14

49%

Z12 1/4(U2)

WATER SENSOR (LOWER)

R16

49%

Z13 1/4(U2)

R17

Whenever the comparator output changes from 1 to 0 or vice versa, the present state and next state is executed and an output is generated. The present state code and the next state code are sub routines stored in those memory locations.

Fig 5: Overhead tank sensor sub circuit

Since the comparator compares two analog voltages and outputs a digital signal, one of the voltages on the comparator inputs will be the variable input and the other a fixed value called the threshold or the trigger voltage. To determine the threshold voltages, appropriate resistors have to be chosen.

Experiment shows that the resistance of water is 100K. Therefore taking Rw= 100k

Let Vw = ½ Vcc = ½ × 5 = 2.5 V

Where Vw forms a voltage divider between Rw and R14 From (1), we have that

VD = R2Vs

R1 + R2

Hence Vw 100 × Vcc

Rw + R14 Vw = 100 × Vcc

100 + R14

2.5V = 100 × 5V

100 + R14

2.5V = 1 × 5

1 + R14

2.5 + 2.5R14 = 5

Therefore, R14 = 1K

Allowing current of 2MA to flow through R15 (so that the voltage will be high enough) and then applying ohms law, we have that

V = IR (3)

where V = Vcc = 5V R15 × 2MA = Vcc = 5V

R15 = 5 = 2.5K Approx. 2.7K for tolerance 2×10-3 consideration

Therefore, R14 = R16 = 1K and R15 = R17 = 2.7K. To get VTH, from (1)

VD = R2Vs

R1 + R2

Therefore,

VTH =Vw = 2.7 × 5

100 + 2.7

Switch on light Increment count Else switch off light Else if exit then

Check if count is zero

VTH

= 13.5

102.7

If not zero then Decrement count Switch off light End

Therefore VTH = 0.13V

From equation (2), Vo = Vref V, any voltage above 0.13V will result in a negative value which is equal to zero. But once a voltage of o.13V is received, the comparator output will turn to one.

THE NEXT STATE LOGIC DESIGN

Below is the control algorithm from where the control software was generated from.

Begin (): Initialize Process variables Do forever

If (WLS) then Process (Water); Else if (TCS) then

Process (Temperature); Else if (SKS) then Process (Smoke);

Else if (MDS) then Process (Room light); Else if (KPS) then Process (Keypad); End

Water: Check water level

If level is minimum then

Switch on pump

Check for maximum level If level is maximum then Display tank full

Switch off pump

End

Temperature: Check Temperature

If (temperature) too high then

Switch on AC Else switch off AC End.

Smoke: Check for smoke

If (smoke sensed) then Sound an alarm Display message (LCD) End

Room Light: Check entrance

If (entrance) then

Check room light intensity

If room dark then

Keypad: Check for code

If code correct then

Grant access

Else if allow 3 time check

If code incorrect then

Deny access Send message Sound an alarm

Display error (LCD)

End

End

THE OUTPUT INTERFACE DESIGN THE GSM MODEM

Text message may be sent through the modem by interfacing only three signals of the serial interface of modem with microcontroller i.e., TxD, RxD and GND. The following is the AT Command for sending text message to a mobile phone through the GSM Modem interfaced with a microcontroller:

  • AT + CMGW = phone number, text message, 26. With this command, the Controller now sends the message to the dedicated phone number.

The AT commands is activated once the controller receives a signal from the hazard detector (smoke detector) or when the wrong keypad is supplied three times. On the activation of the AT command, the binary streams are passed through a Gaussian filter (to filter out sidebands extending from the carrier) and then applied to an I- Q modulator where the modulation index is 0.5. To keep the modulation index at 0.5, an I- Q carrier generator was used, that is, two carriers, one in-phase and another one quadrature to it. This is then summed and transmitted into the channel. At the receiving end, a local oscillator generates a signal at the channel's carrier frequency. The incoming signal and the local oscillator signal are applied to a demodulator circuit. This translates the data signal in the sidebands back to its original baseband frequency. An electronic filter removes the carrier frequency, and the data signal is output for use.

MODEL SIMULATION

ACos(2

)

SYSTEM SIMULATION

Proteus Isis was used to simulate and validate the system first before a prototype was developed.

C X

os

()

Phase Shaping Filter

Binar y

X

n

Inte grat

Gaus sian Filte r g(t)

+

Si X

Rf Outp ut

n(

)

Asin(2

)

Figure 6: GSM GMSK Modulator

Fig 7: System in off mode

FIG. 8: SYSTEM IN ON MODE

5V

GSM MODULE

RX TX

5V

1

2

3

4

5

6

7

8

9

10

11

12

13

14

VSS VDD VEE

RS RW E

D0 D1 D2 D3 D4 D5 D6 D7

10K VO

10UF

COM

1B 1C

2B 2C

3B 3C

4B 4C

5B 5C

6B 6C

7B 7C

ULN2003

10K

Z1 1

Z2 2

Z3 3

Z4 4

Z5 5

Z6 6

Z7 7

Z8 8

9

10

11

Z9 12

Z10 13

Z11 14

15

40

VCC P0.0/AD0 P0.1/AD1

P0.2/AD2 P0.3/AD3 P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 PSEN ALE

EA P2.7/A15 P2.6/A14 P2.5/A13 P2.4/A12 P2.3/A11 P2.2/A10 P2.1/A9

P2.0/A8

P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST

P3.0/RXD P3.1/TXD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 P3.6/WR P3.7/RD XTAL2 XTAL1

VSS

39

38

37

36

35

34

33

AT89c5X

32

29 5V

30

31

28

27

9 BUZZER

20K

220V AC

11.0592 MHZ

Z12

Z13 16

Z14 17

18

19

20

26 1

2

25 3

24 4

6

23 Z17 5

22 Z16 7

21

16

15

14

13

12

11

10 12V

RL1 RL2 RL3

Fig. 9: The Smoke Occurrence Scenario

30PF 30PF

AC

ROOM LIGHT

PUMP

RL4

DOOR DRIVE

Fig. 11: The Complete Circuit Diagram

Fig. 10: Scenario for Security threat

Fig 12: The Prototype

CONCLUSION

This paper have proposed and implemented an enhanced smart home control and monitoring system that is adaptive, cost effective, energy efficient and complies with smart planet initiatives. The model took care of the numerous limitations of the traditional automation system such as high infrastructure economy, dead lock states and efficiency in energy conservation. Proteus ISIS was used for model validations.

REFERENCES

  1. Department Of Energy, Energy Information Admission, Annual Energy Outlook 2006 with Projections to 2030, DOE/EIA-0383(2006), February 2006, Online:

    http://tonto.eia.doe.gov/ftproot/forecasting/0383 (2006).pdf

  2. G.N. Onoh, Digital Electronics, Immaculate Publishers Ltd, Enugu,1999.

  3. HTTP://WWW.energysavingtrust.org.uk/Take- action/Reduce-your-carbon-footprint

  4. Inderpreet Kaur, Microcontroller Based Home Automation System With Security (IJACSA) International Journal of Advanced Computer Science and Applications,Vol. 1, No. 6, December 2010, Pp.60-65.

  5. Jia-Ren Chang Chien, Cheng-Chi Tai The InformationHome Appliance Control SystemA Bluetooth UniversalType Remote Controller Proceedings of the 2004 IEEE. International Networking, Sensing & Control. Taipei, Taiwan, vol. 1,pp. 399-400, March 21-23. 2004.

  6. Lawrence Berkeley National Laboratory (2004). PIER Final:DevelopingandTestingLowPowerModeMeasure

    ments Methods.Sacramento,CA,California,Energy Commission

  7. Malik Sikandar Hayat Khiyal, Aihab Khan, and Erum Shehzadi, SMS Based Wireless Home Appliance Control System (HACS) for Automating Appliances and Security Issues in Informing Science and Information Technology Volume 6, 2009.

  8. Soyoung Hwang and Donghui Yu, Remote Monitoring and Controlling System Based on ZigBee Networks International Journal of Software Engineering and Its Applications Vol. 6, No. 3, July, 2012.

  9. Y. Bala Krishna1, S. Nagendram, Zigbee Based Voice Control System For Smart Home Y Bala Krishna et al,Int.J.Computer Techology & Applications,Vol 3 (1),163-168.

Leave a Reply