Design and Implementation of Touchscreen and ... - IEEE Xplore

1 downloads 0 Views 772KB Size Report
Abstract— Home automation needs to make use of modern technologies to reduce human efforts as well as save energy. This paper focuses on the ...
Proceedings of 2013 2nd International Conference on Advances in Electrical Engineering (ICAEE 2013) 19-21 December, 2013, Dhaka, Bangladesh

Design and Implementation of Touchscreen and Remote Control Based Home Automation System Nazmul Hasan1, Abdullah Al Mamun Khan1 ,Nezam Uddin1,Abu Farzan Mitul1 1

Department of Electrical & Electronic Engineering, Khulna University Of Engineering & Technology (KUET), Khulna-9203 E-mail: [email protected], [email protected],[email protected],[email protected]

controller and a number of Bluetooth sub-controllers are used. The physical connection is needed between the local Bluetooth and sub-controller. The devices to be controlled make their communication with sub controller via a wired media. The problem of this system is the time delay, because of the sharing a single Bluetooth module by many devices to be controlled [5]. In a phone based remote controller for home and office automation, the system suffers from the problem of flexibility. Because users have to remember an access code. In a control network, using hand gestures, the controller uses a glove to relay hand gestures to the system. The problem of this kind of system is the lack of security. In the 21st century the use of the remote controller has been increased in a wide range because of the convenience and easiness of its use. The use of remote controller has been started to most of all the devices in the home or in the industrial devices. In addition, for home automation such as lighting and temperature control, door management, and security, remote controllers have been developed. The convenience of controlling the home devices without remote controller cannot be imagined. So here in this paper we designed and implemented a remote controlled home automation system with different features [6]. In this paper, we present a home automation system which is remote controlled as well as touch screen controlled. Besides normal load on/off, regulation of the load, control of temperature and humidity are the major concerns of our work. For saving the energy, automatic load off is done by sensing the presence of personal. Through this system, we could open and close the door automatically. Overall, the system is able to overcome the usual four obstacles in the home automation system.

Abstract— Home automation needs to make use of modern technologies to reduce human efforts as well as save energy. This paper focuses on the development of an embedded system for home automation system that use standard remote controller, temperature, humidity and touch screen as a user input device. The inconvenience in controlling the home devices has been solved by this home automation system. In this proposed home automation system different attractive features are combined together which is not found very often in other home automation system. This offers a low cost, complete and efficient system for remote operation of a room. Furthermore, this system can be applied to control all kinds of appliances automatically installed within buildings, companies, schools, hospitals and so on. Keywords— Home Automation, Technologies, Embedded System, Remote Control, Temperature, Humidity, Touchscreen, Human Existence.

I INTRODUCTION Nowadays home automation system is being widely used to control devices around the home. A variety of home devices can be controlled with the help of a home automation system. All kinds of home appliances like doors, lights, fan, electric heater, surveillance systems, and consumer electronics belong to the home automation system devices [1]. Home automation system is adopted by using the technology available for the purpose of controlling the devices as well as the systems used in the home automatically. The system used for improving the quality of resident’s life is regarded as home automation system. Actually home automation system is a house or living environment. To support the elderly and the disabled people; remote and local control are useful to ease human effort [2]. For making the home automation easy, the control of all the devices should be brought in one place. To do this several works have been done. But there are some obstacles to be overcome for making the home automation system easier and popular; these are high cost of ownership, inflexibility, poor manageability, and difficulty in achieving security [3].In Java based home automation system, a complex and costly installation and is needed. The requirement of a high end PC makes the system expensive. In this system, remote control of the devices is provided through integration with a personal computer (PC) based web server, in which with all the devices an embedded board is physically connected. For this individual connection the system becomes intrusive although it provides a safe solution [4]. In a Bluetooth based home automation system, a primary

978-1-4799-2465-3/13/$31.00 ©2013 IEEE

II SYSTEM OVERVIEW AND SYSTEM ELEMENTS A.

Detection of presence of human being In case of detection of human being, entering or leaving a room, we have used two infrared transceiver pair. One of which outside the door and another is inside the door. In order to detect the entrance of a human being, two sensors are used. In case of entrance, one must cross the outside sensor (sensor 1) first and then the inside sensor (sensor 2). For leave detection, process is just reverse. For both cases, there use one minute time delay between crossing the two sensor to avoid disturbance (for example, if a person wants to enter the room he crosses outside sensor then suddenly, he returns back without crossing inside sensor).This feature provides reduction of power loss.

347

Rx

D O O R

Tx

Tx

Fig. 1.

a. b. c. d. e. f. g.

Rx

A train pulse of 9ms A space of 4.5ms 8 bits Address 8 bits Invert Address 8 bits Data 8 bits Invert Data A tail pulse of 0.56ms

Detection of Enter and Leave

B.

Touchscreen A touch screen interface is also employed in this system, if remote controller battery goes down or gets lost. TABLE I

Measurement Variable

TOUCHSCREEN CONFIGURATION

X1

X2

Y1

Y2

Logic 1

Logic 0

High Z

ADC

Fig. 3.

Y

ADC

High Z

Logic 0

Logic 1

Demo Pin Connection

P1 ADC1

P2

P3

P4 ADC2

Logic ‘1’ is defined as a high pulse of 0.56ms and low pulse of 1.68ms. Logic ‘0’ is defined as a high pulse of 0.56ms and low pulse of 0.56ms. The carrier frequency of this protocol is 38 KHz. The total message length is 67.5ms (9ms+4.5ms+16*2.25ms+16*1.125ms). If a button is kept pressed then an auto repeat occurred. Auto repeat function occurred in every 110ms. In repeat frame there is no data or address just contains the followinga. A train pulse of 9ms b. A space of 2.25ms c. A tail pulse of 0.56ms

X

The sensitivity of touch pad is resistive. To interface this touch pad we need six pins in processor. Two pins (X1 and Y2) connected with IO and ADC pin of processor. When read the ADC value, the IO pins that connected to X1 and Y2 are configured as high impedence(High Z)mode. Flow diagram to read the positions(X and Y) of Touchscreen is shown in Fig 2.

Set ADC1 & ADC2 as analog input

P1, P2 as High Z P3, P4 as Output P3 = 0; P4 = 1;

P1, P2 as Output P1 = 1; P2 = 0; P3, P4 as High Z

Read X value from ADC2 pin

Fig . 4.

NEC protocol while pressing a button

To capture this protocol directly with processor we used an infrared sensor TSOP1738. This sensor is a negative logic sensor.

Read Y value from ADC1 pin

Fig. 2.

Time Division Of NEC PROTOCOL

D.

Temperature and Humidity In this mode, Loads are regulated depending on temperature and humidity.

Flow diagram to read the position of touchscreen

C.

Remote Controller There are different remote controller company existing in this world and they use different protocol. For example NEC, Phillips, Sony use their own protocol. The NEC protocol is famous one than other protocol because of it security. This protocol contains the following-

E.

Speed Regulation technique This system provides the regulation of loads. This is based on adjusting the power that feed to a load. That is phase fired control of traic. An addition circuitry is needed called zero crossing detectors that indicate the introduction of cycle. In fig

348

5, input is indicated by Yellow color and output of zero crossing detector is indicated by green color. Technique for Speed regulation is shown in fig 6.

Main Program

Start EXT INT

Start TMR INT

Set External INT (Raising Edge) Set TMR in Compare Mode

Traic OFF Load TMR CMR Value Start TMR

Traic ON Stop TMR

Internal Loop

End EXT INT

End TMR INT

Fig. 6. Fig. 5.

Speed regulation flow diagram

F.

Store Data This system is capable to store data in order to restart from its previous condition. For storing data we have used microcontroller on chip EEPROM memory.

Zero Crossing Detection

F = Falling Edge Interrupt R = Raising Edge Interrupt F ~ R = Time between F & R R ~ F = Time between R & F Y = True N = False

Flow diagram of NEC protocol microcontroller is shown in Fig 7.

decoding

START Initialization (INT, TMR, Variables)

S Detect F Start TMR Detect R

IF ~ R 9ms

A R~F 4.5ms

R

Detect Next R

N

S

Y

IR ~ F 2.25ms

Repeat Detect

Detect Next R

Space Detected

Detect Next F

Y

N

Reset All Variable Set INT R

Train Pulse Detected

F~R 0.56ms Y Data Found

Y

N

Y F~R 0.56ms

Message Found

N

Is Byte=4

R

Check Data

N

Byte++

R

Y

IIs Pass?

Tail Detected

Is Bit=8?

Send Data

Store Data R

N A

N

Flow Diagram for NEC Protocol Decoding

349

IS F ~ R 0.56ms

A Y Logic ‘0’

IS F ~ R 1.68ms

Bit++ Logic ‘1’ R

Fig. 7.

Detect Next F

Y N

with

architecture of software development for the system is given in fig. 9.

III PROPOSED HOME AUTOMATION SYSTEM ARCHITECTURE The proposed home automation system is designed to increase user friendliness, flexibility, low cost, security etc. through a single embedded system. It consists of a standard remote controller, temperature, humidity and touchscreen etc. The hardware used for the devices and software development are described in this section.

C.

System implementation Fig. 10, Fig. 11 and Fig. 12 show the design and implementation of circuits to drive various loads automatically, to regulate the speed, to control temperature and humidity, to use the touch screen, to monitor the entrance and leave of human being in a room etc.

A. Hardware Implementation The hardware circuit consists of a microcontroller, ADC converter, remote controller, resistive touch pad, relay, sensors, shift register, inverter etc. The main architecture of the system is shown in Fig 8 Remote Control

Resistive Touch Pad

IR Sensor

ADC(s)

Temperature & Humidity Sensor

1 wire Interface

Fig 10. Main control board layout

IR Rx(s)

OptoTraic Driver Controller (ATMega16))

OptoCoupler

Traic(s) Relay Driver

Fan(s)

Zero Crossing Detection Relay(s) XTAL (16M Hz)

Seven Segment Driver

EEPROM Bicolor LED(s)

Shift Register Inverter

Fig. 8.

Seven Segment Display

Load (s)

AC Source

Fig 11. Handmade keypad for controlling the load(in case the remote controller battery fail)

AC to DC Power Supply

Overall block diagram of the system.

B.

Software development A home network program is developed using programming language. The proposed system is composed of various interface programs. These are necessary to initialize the device after power on or reset, to re-configure it, to accept the connection request from the user and to establish the connection to the subsequent exchange of data. The main

Fig 12. Touchscreen control as an alternative to remote control.

350

Application: Load(s) ON or OFF Speed Regulation Mode Change etc.

START S1

Initialization

Application

Application Get Command (Remote/Touch Pad)

Read EEPROM Indicator

S3

Y

S1

N IIs Man Inside?

IIs Sensor1?

N

Reconfiguration Sensor

Read Sensor2

Y N

IIs Sensor2?

Reset Sensor 1

Y

Y

S1

IIs Valid?

Reset Sensor 2

Y Store & Compare

Start TMR for 1 Min

IIs Timeout

Store EEPROM

Y

N

IIs Timeout

N

N

Y Man Count --

Fig. 9.

Y

N

N

Application

IIs Count=0?

IIs Sensor1?

Y

N

IIs Same?

Turn off All Load(s) Y

N

Read Temperature & Humidity

IIs Mode & Fan?

N

Start TMR for 1 Min

Man Count ++

S3

N

Y

IIs Sensor2?

Y

IIs Valid?

Read Sensor 1

Update Indicator Store EEPROM

Update Indicator Store EEPROM

S3

Flowchart of the main program

IV FEATURES OF THE PROPOSED HOME AUTOMATION SYSTEM

V APPLICATION FIELDS

Our proposed home automation system has some special features which make the system more reliable and user friendly. The important features are Standard remote controller protocol (NEC) support, Availability of touch screen, Temperature and Humidity controlled system, Smart indication and display system, isolation of Microcontroller from high power circuits, Loads Status saving facility in case of power cut, Enter and leave detection of a person, Automation shut down in case of empty room etc.

The proposed system can be applied to buildings for houses, schools, public institutes etc. for automation, security and energy saving purposes. Loads of various types such as light, fan, TV, DVDs and others can be controlled by this type of home automation system. In addition, temperature and humidity can also be controlled. The energy can be saved by sensing the presence of human being in the room and making all loads shut down. The flexibility of the system has been increased by the use of a touchscreen. When the battery is low or cannot be found, then by using touchscreen the loads can be controlled.

351

VI RESULT AND DISCUSSION

REFERENCES

In practice, this system is able to operate in a room successfully. But sometimes it misses the input of remote controller. This is due to more noise sensitivity of infrared receiver that demodulates the standard remote controller signal. Another reason is the time calculation error of microcontroller between falling edge and raising edge of the standard remote controller signal. This is developed by calculating time between falling edge and raising edge of the signal more preciously with faster microcontroller. The system is able to overcome the problems of high cost of ownership, inflexibility, poor manageability, and difficulty achieving security. It can drive both resistive and inductive loads. In our case the maximum driven load is 5A. This can be increased with increasing the relays ratings, trace width of PCB layout as well as the isolation circuit. This product is fully commercial with high efficiency and multi-functionality. Only remote control device present in market having no feature about Touch screen, loads status recover system in case of power cut, temperature and humidity sensor as well as speed regulation of inductive load. The product cost is about BDT 1500 which is much less than available product present in market. The main aim of this project is to reduce human efforts with reduced cost and use some new technology like Touch screen.

[1]

[2]

[3]

[4]

[5]

[6]

[7]

[8]

The Temperature and humidity sensor worked properly. The speed regulation is done by reading the output of the temperature and humidity sensors having finite step size. Also set the maximum and minimum Threshold of this sensor at which the loads run at full speed and being of respectively. Here we consider temperature having more priority than humidity. Touch screen work with its full functionality. Divided into several grid like button, each grid have specific work. Only one problem is that the user having no access in setting the step size of temperature and humidity to regulate speed.

VII

CONCLUSION

The design process of a home automation system is presented in this paper. The controller consists of remote controller, touch screen, temperature and humidity sensor, speed regulator, micro controller etc. According to the command of the user through the remote controller or the touch screen all the home appliances can be controlled manually. The system can also work with complete automatic mode by detecting the presence of human being in the room. It can turn on and off appliances according to previously given programmed instructions. It can also regulate the temperature of the room by increasing or decreasing the fan speed. This system can be given more applicability by adding with a powerful WSN or GSM module to control the appliance remotely or to monitor the status. The system is very useful for commercial use. This system can be installed in commercial big office rooms for the purpose of maintaining suitable temperature in the room and also to reduce the wastage of power.

352

Jinsoo Han, JaeKwan Yun, JongHyun Jang, and Kwang-Roh Park,” User-Friendly Home Automation Based on 3D Virtual World”, International Conference on Consumer Electronics (ICCE), 2010 Digest of Technical Papers,pp. 499 - 500, 9-13 Jan. 2010 Kwang Ye01 Lee, Jae Weon Choi,“Remote-Controlled Home Automation System via Bluetooth Home Network”, SICE 2003 Annual Conference (Volume:3 ) pp. 2824 - 2829 Vol.3, 4-6 Aug. 2003 H. ElKamchouchi and Ahmed ElShafee,” Design and Prototype Implementation of SMS Based Home Automation System”, IEEE International Conference on Electronics Design, Systems and Applications (ICEDSA), 2012,pp. 162 – 167, 5-6 Nov. 2012 Carelin Felix and I. Jacob Raglend,” Home Automation Using GSM”, International Conference on Signal Processing, Communication, Computing and Networking Technologies (ICSCCN), 2011 ,pp. 15 – 19, 21-22 July 2011 N. Sriskanthan, F. Tan and A. Karande, "Bluetooth based home automation system", Microprocessors and Microsystems, Vol. 26, no. 6, pp. 281-289, 2002. Taewan Kim, Hakjoon Lee, and Yunmo Chung,” Advanced Universal Remote Controller for Home Automation and Security”, Consumer Electronics, IEEE Transactions on (Volume:56 , Issue: 4 ),pp. 2537 – 2542, November 2010 H. Ardam and I. Coskun, "A remote controller for home and office appliances by telephone", IEEE Transactions on Consumer Electronics, vol. 44, no. 4, pp. 1291-1297, 1998. T. Baudel and M. Beaudouin-Lafon, "Charade: remote control of objects using free-hand gestures", Communications of the ACM, vol. 36, no. 7, pp. 28-35, 1993.