Design and implementation control of intelligent building · 2018-04-08 · Abstract — The...

9
JIEE Časopis priemyselnej elektrotechniky Journal of Industrial Electrical Engineering ISSN 2454-0900 www.jiee.eu vol:2 (2018) issue: 1 8 Design and implementation control of intelligent building 1 Mário BARDOŇ, 2 Anna HODUÍKOVÁ 1,2 Department of Theoretical and Industrial Electrical Engineering, Faculty of Electrical Engineering and Informatics, Technical University of Košice, Slovak republic 1 [email protected], 2 [email protected] Abstract The article focuses on the design and implementation of an intelligent building. Several companies deals with the realization of such home, that offer their own products and solutions to simply and efficiently build a new or rebuild the old house into an intelligent building. Companies that offer solutions in this area have a higher quality and sophistication, but its price is higher. Our effort was to create a smart home that would be more affordable. For the management of the intelligent system is necessary the "heart", which controls the whole house. We decided to use the Arduino Mega 2560 microcontroller in our project. We connected the house to the Internet using ethernet shield. This link allowed us to create a web page that can be used to control individual systems and also inform us about the different states of intelligent elements. Our model includes intelligent lighting controlled via the Internet, button or by motion. Other systems are intelligent blinds controlled automatically by external lighting or manually. Opening and closing the garage door can also be via the Internet or via the RF remote control. As a safety element we used a sensor to capture dangerous gases in the room, and in case of danger an audible alarm sounds. Another system is an intelligent roof that comes out or slides when it is raining. Each room has a temperature sensor that records the temperature and these values are displayed on the website. The use of Arduino in this model was sufficient to control all intelligent systems. Keywords Arduino, Ethernet shield, Intelligent garage, Intelligent house, Intelligent lighting, Intelligent roof, Intelligent shutters I. INTRODUCTION In our model of intelligent house we focused on the most used systems, that is intelligent lighting, intelligent shutters, intelligent garage, and smaller intelligent systems. In the next section, we will focus on the operation, control and the components used in each system. When we created the main program, we used the wiring language, which is a customized C language for easier Arduino programming. For correct and seamless display of information from Arduino on the website, we used the AJAX language and we used html for the website itself. We used the CSS language to edit the look of the html page. After uploading the code to Arduino, inserting the SD card and connecting the Ethernet shield to the router, everything is ready for use. For the control of smart home via the Internet, you need to write the IP address, which was chosen during writing the code. We used the IP address 192.168.1.160. After entering the IP address, the page is loaded. When the Arduino starts first time, the initial values are set. Design of the page is displayed on Fig. 1. II. INTELLIGENT LIGHTING A Description of the Operation Photoresistor is the main component of intelligent lighting, which sends the data based on the intensity of incident light over the analogue input for evaluation. Sensor values are recorded ten times

Transcript of Design and implementation control of intelligent building · 2018-04-08 · Abstract — The...

Page 1: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky

Journal of Industrial Electrical Engineering

ISSN 2454-0900

www.jiee.eu

vol:2 (2018) issue: 1 8

Design and implementation control of

intelligent building

1Mário BARDOŇ,

2Anna HODUÍKOVÁ

1,2 Department of Theoretical and Industrial Electrical Engineering, Faculty of Electrical

Engineering and Informatics, Technical University of Košice, Slovak republic

[email protected],

[email protected]

Abstract — The article focuses on the design and implementation of an intelligent building. Several

companies deals with the realization of such home, that offer their own products and solutions to simply and

efficiently build a new or rebuild the old house into an intelligent building. Companies that offer solutions in

this area have a higher quality and sophistication, but its price is higher. Our effort was to create a smart

home that would be more affordable. For the management of the intelligent system is necessary the "heart",

which controls the whole house. We decided to use the Arduino Mega 2560 microcontroller in our project. We

connected the house to the Internet using ethernet shield. This link allowed us to create a web page that can

be used to control individual systems and also inform us about the different states of intelligent elements. Our

model includes intelligent lighting controlled via the Internet, button or by motion. Other systems are

intelligent blinds controlled automatically by external lighting or manually. Opening and closing the garage

door can also be via the Internet or via the RF remote control. As a safety element we used a sensor to

capture dangerous gases in the room, and in case of danger an audible alarm sounds. Another system is an

intelligent roof that comes out or slides when it is raining. Each room has a temperature sensor that records

the temperature and these values are displayed on the website. The use of Arduino in this model was

sufficient to control all intelligent systems.

Keywords — Arduino, Ethernet shield, Intelligent garage, Intelligent house, Intelligent lighting, Intelligent

roof, Intelligent shutters

I. INTRODUCTION

In our model of intelligent house we focused on the most used systems, that is intelligent lighting,

intelligent shutters, intelligent garage, and smaller intelligent systems. In the next section, we will

focus on the operation, control and the components used in each system.

When we created the main program, we used the wiring language, which is a customized C

language for easier Arduino programming. For correct and seamless display of information from

Arduino on the website, we used the AJAX language and we used html for the website itself. We used

the CSS language to edit the look of the html page. After uploading the code to Arduino, inserting the

SD card and connecting the Ethernet shield to the router, everything is ready for use. For the control of

smart home via the Internet, you need to write the IP address, which was chosen during writing the

code. We used the IP address 192.168.1.160. After entering the IP address, the page is loaded. When

the Arduino starts first time, the initial values are set. Design of the page is displayed on Fig. 1.

II. INTELLIGENT LIGHTING

A Description of the Operation

Photoresistor is the main component of intelligent lighting, which sends the data based on the

intensity of incident light over the analogue input for evaluation. Sensor values are recorded ten times

Page 2: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 9

in one-second intervals. Consequently, the values are averaged to prevent external interference. It is

possible to determine according to the photoresistor, when it is spinning and when there is enough

light. The motion sensors are automatically activated after evaluation of dark. Due to these sensors. the

light switches on or off automatically in the room. After evaluation of enough light, motion sensors are

automatically deactivated to save energy. If it is necessary, they can be activated or deactivated

independently of the outside light.

Fig. 1 Design of the webpage

We can control them by using the green button located in each room, Fig. 2. The white LED shows

the state of the motion sensor - off / on. Another way of controlling is via the Internet, Fig. 3. Manual

buttons are linked to the web page and vice versa. After press of manual green button, the motion

sensor is activated - white LED switches on and motion sensor status is updated on the all devices

where the html page is triggered. When it is controlled via the Internet, the principle is the same.

When the motion sensor is deactivated over the internet, the white LED switches off, so even without

turning on the html page we can see if the motion sensor is activated or deactivated. After activation of

the motion sensors, we can determine the movement in the room even without being in the room, via

the indicator on the html page. The white button is used for manually turn the light on / off

independently of the light / darkness or activation of the motion sensor. The light can also be turned on

/ off via the internet button, Fig. 3. The Internet update principle is the same as the motion sensor

mechanism. The switched off or on light is shown in, Fig. 4. Using the photoresistor, the external

lighting is automatically activated or deactivated. If it is dark, it is activated and if there is enough

lighting, it is deactivated, Fig. 5.

Fig. 2 Control of the lightning using the button

Fig. 3 Control of lightning over the Internet

Page 3: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 10

Fig. 4 Lighting on / off in the room

Fig. 5 Outdoor lighting off / on

Used components

In our model of intelligent lighting, we used two buttons for a room, a 5V white LED, a PIR

motion sensor, a photoresistor, and a relay for switching lights. The light I simulated using a 12V LED

strip.

Description of connection

The diagram of the connection of individual components is shown in the, Fig. 6. For some

components, it is necessary to use the appropriate resistor to adjust the voltage so that the individual

components work smoothly.

Fig. 1 The diagram of connection of button, photoresistor, LED diode, motion sensor a relay.

(In the top left is a button connected to the corresponding 10Kohm resistor, a photoresistor with the

corresponding 10Kohm resistor is connected in the center, the right of the LED diode is shown with the

corresponding 1Kohm resistor, the motion sensor connection is shown at the button, and the relay and the strip.)

Page 4: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 11

III. INTELLIGENT BLINDS

A Description of the Operation

The principle of intelligent blinds is similar to lighting. The basis is a photoresist, which evaluates

whether it is dark or light outdoors. When the outside gets tangled, the shutters are automatically

covered and the it is automatically removed at sunrise in the morning. As well as lighting, the blinds

can be operated manually by a button. There is a black button in the each room, which is used to

remove or cover the blinds independently of the outside lighting, Fig. 7. If the blinds are covered

manually, for example during the day, they will be covered until the next morning when they are

removed again. Their control is also possible through the html page, which also informs about the

current state of the blinds by the statuses: Removed, Covered, Remove, Cover, Fig. 8. Removed or

covered shutters are shown on Fig. 9.

Fig. 7 Control of blinds with a pushbutton.

Fig. 8 Control of blinds over the Internet.

Fig. 2 Covered and removed shutters

Used components

We used for the one room the following components: button, photo resistor, stepper motor 5V

28BYJ-48 and uln2003 driver.

Description of connection

The principle of switching both the button and the photoresist was shown in intelligent lightning,

Fig.6. The principle of stepper motor connection is shown on Fig. 10.

Page 5: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 12

Fig. 10 Stepper motor and ULN2003 driver connection

IV. INTELLIGENT GARAGE

A Description of the Operation

Opening and closing the garage gate is possible via the internet. The webpage also informs us

about the status of the garage gate by the statuses: I Open, Hang Out, Open, Closed, and Obstacle, Fig.

12. The obstacle status indicates the presence of an object in the gate area. If the gate is open, it will

not close or if it is closing, it opening again. The garage door can also be controlled using the 4-

channel remote control via the A button or the B button, Fig. 11. The lighting of the garage is

dependent on the opening / closing of the gate. When it is open, the light turns on automatically and

lights up during the garage door is open. The light goes off when the gate is closed, Fig. 13.

Fig. 11 RF remote control

Fig. 12 Control of the garage via the Internet

Fig. 13 Closed / open garage

Used components

We used the following components: SG90 servo motor, light switching relay, obstacle sensor and

4 channel wireless transmitter, receiver.

Page 6: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 13

Description of connection

The principle of the servo motor, RF remote control, and obstacle sensor is illustrated on Fig. 14.

The connection of the relay is shown on Fig. 6.

Fig. 14 Wiring diagram of servo motor, RF receiver and obstacle sensor

(On the left, the servo motor is shown, the 4-channel RF receiver is connected in the center, and the obstacle

sensor circuit diagram is shown on the right.)

V. OTHER AUTOMATIC SYSTEMS IN INTELLIGENT HOUSE

Security element

A Description of the Operation

From a point of view security, we used one of the basic security element in the house. We used a

MQ-2 sensor that indicate dangerous gases or smoke. The system works on the principle of averaging

over a certain time. The page displays information from the sensor in the form of "norm", "elevated"

and "critical" status. If the sensor detects a critical value, a sound alert will be triggered by the sands at

two second intervals until the sensor starts to read the values that are in the norm or slightly elevated.

Used components and connection

I used the MQ-2 sensor and buzzer YL-44, Fig. 1).

Fig. 15 Buzzer and gas sensor connection diagram (On the left is shown connection of buzzer and on the right is shown connection of MG-2 sensor)

Intelligent roof and temperature

A Description of the Operation

The last of the systems is an intelligent roof, that automatically push out when it starts to rain, Fig.

16. In each room we placed the temperature sensors and a temperature values are displayed on the

page.

Page 7: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 14

Fig. 16 Expanded / retracted roof

Used components and connection

We used the LM35 sensor for temperature sensing, the servo sg90 to open and close the roof, and

a water sensor to capture the amount of water, Fig. 17. The connection of the servos is shown on Fig.

6.

Fig. 17 Wiring diagram of the temperature sensor and the water sensor

(On the left is shown the connection of the temperature sensor. On the right is a water sensor.)

VI. COMPLETE CONNECTION SCHEME

Page 8: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 15

Fig. 18 Complete circuit diagram

Detailed description of analog and digital pin assignments on Arduino mega 2560:

Analog:

pin A0 – Temperature sensor kitchen

pin A1 – MG-2 sensor

pin A2 – Room temperature sensor

pin A3 – Temperature sensor of the bedroom

pin A4 – Photoresistor

pin A5 – Water sensor

Digital:

pin 1 – Validity of data transmission for RF

pin 2 – Relay light room

pin 3 – Relay light bedroom

pin 5 – Relay light kitchen

pin 6 – Relay light garage

pin 7 – Relay light outdoor lighting

pin 8 – Servo motor for garage gate

pin 9 – Servo motor for an outdoor roof

pin 22 – Black button room blinds

pin 23 – Obstacle sensor

pin 24 – White LED diode for room

pin 25 – Button B from the RF remote control

pin 26 – Green button room motion sensor

pin 27 – Button A of the RF remote control

pin 28 – White button room lighting

pin 29 – Motion sensor kitchen

pin 30 – Black button bedroom blinds

pin 31 – White LED for the kitchen

pin 32 – White LED for the bedroom

pin 33 – Green button for kitchen motion sensor

pin 34 – Green button bedroom motion sensor

pin 35 – White button for kitchen lighting

pin 36 – White lighting bedroom

pin 37 – Motion sensor room

pin 38 – Motion sensor of the bedroom

pin 40 – Motor bedroom pin1

pin 41 – Motor room pin1

pin 42 – Motor bedroom pin2

pin 43 – Motor room pin2

pin 44 – Motor bedroom pin3

pin 45 – Motor room pin3

pin 46 – Motor bedroom pin4

pin 47 – Motor room pin4

pin 49 - buzzer

VII. CONCLUSION

The article focuses on the design and implementation of an intelligent building, which will attract

mainly for its price. I have used Arduino mega 2560, which is sufficient for intelligent systems in this

house. With the next expansion of new systems, we would consider using more Arduino to prevent a

system failure. We would use one major Arduino to manage others. Each Arduino would be in charge

of one system. Like everywhere, here is space for improvement too, for example in the reprocess of

individual systems or improvements of the graphical user interface.

ACKNOWLEDGMENT

The support by the project VEGA grant No. 2/0069/15 of the Scientific Grant Agency of the Ministry

for Education of the Slovak Republic is acknowledged.

REFERENCES

[1] Albert T.P. SoAlvin C.W. WongK-c. Wong, (1999),"A new definition of intelligent buildings for Asia", Facilities, Vol.

17 Iss 12/13 pp. 485 - 491 Perm

[2] Valeš, M., 2006. Inteligentní dům. Brno: ERA group spol.s.r.o. ISBN 80-7366-062-8

Page 9: Design and implementation control of intelligent building · 2018-04-08 · Abstract — The article ... a 5V white LED, a PIR motion sensor, a photoresistor, and a relay for switching

JIEE Časopis priemyselnej elektrotechniky / Journal of Industrial Electrical Engineering

ISSN 2454-0900

vol:2 (2018) issue: 1 16

[3] Robert N. Bucceri., 2004. How To Automate Both New & Existing Homes. Silent Servant, Inc. ISBN-13: 978-

0970005731

[4] Zbyšek Voda & tým HW Kitchen., 2015. PRŮVODCE SVĚTEM ARDUINA. Bučovice: Nakladatelství Martin Stříž.

ISBN 978-80-87106-90-7

[5] Available at:

http://rlx.sk/sk/ethernet-module/3276-w5100-ethernet-shield-for-arduino-er-asw51001e.html

[6] Figures edited by:

http://www.letton.cz/Zarizeni_v_inteligentnim_dome.png

http://zschlebnice.sk/kopr/obr/arduino/mega_napajanie.jpg

http://zschlebnice.sk/kopr/obr/arduino/mega_piny.jpg

[7] How to Build a Liquid Level Sensor Circuit with an Arduino, [online], [cit.2017-03-12]. Dostupné na internete:

http://www.learningaboutelectronics.com/Articles/Arduino-liquid-level-sensor-circuit.php

[8] STAN: 28BYJ-48 Stepper Motor with ULN2003 driver and Arduino Uno, [online], 2014. [cit.2017-03-30]. Dostupné na

internete: http://42bots.com/tutorials/28byj-48-stepper-motor-with-uln2003-driver-and-arduino-uno/

[9] How to Build a LM35 Temperature Sensor Circuit, [online], [cit.2017-04-10]. Dostupné na internete:

http://www.learningaboutelectronics.com/Articles/LM35-temperature-sensor-circuit.php

[10] RYDEPIER: Active Buzzer Alarm Type YL-44, [online], 2015. [cit.2017-03-22]. Dostupné na internete:

https://rydepier.wordpress.com/2015/05/24/active-buzzer-alarm/

[11] How To Control the Tower Pro SG90 Servo with Arduino UNO, [online], 2016. [cit.2017-03-30]. Dostupné na

internete: https://www.intorobotics.com/tutorial-how-to-control-the-tower-pro-sg90-servo-with-arduino-uno/

[12] FRISARDIA, Vincenza. – IMBIMBO, P. Bruno: Gerontechnology for Demented Patients:Smart Homes for Smart

Aging. In: Journal of Alzheimer’s Disease. Volume 23, 2011, p. 143–146.

[13] HARPER RICHARD: Inside the Smart Home. London: Springer-Verlag London Limited, 2003. 264 s. ISBN 1–85233–688–9