=Paper=
{{Paper
|id=Vol-2546/paper14
|storemode=property
|title=Developing a Mini Smart House model
|pdfUrl=https://ceur-ws.org/Vol-2546/paper14.pdf
|volume=Vol-2546
|authors=Nadiia Balyk,Svitlana Leshchuk,Dariia Yatsenyak
}}
==Developing a Mini Smart House model==
198 Developing a Mini Smart House model Nadiia Balyk[0000-0002-3121-7005], Svitlana Leshchuk[0000-0001-6600-7940] and Dariia Yatsenyak[0000-0002-8427-5532] Ternopil Volodymyr Hnatiuk National Pedagogical University, 2, Maxyma Kryvonosa Str., Ternopil, 46027, Ukraine {nadbal, leshchuk_so, yatsenyak_dv}@fizmat.tnpu.edu.ua Abstract. The work is devoted to designing a smart home educational model. The authors analyzed the literature in the field of the Internet of Things and identified the basic requirements for the training model. It contains the following levels: command, communication, management. The authors identify the main subsystems of the training model: communication, signaling, control of lighting, temperature, filling of the garbage container, monitoring of sensor data. The proposed smart home educational model takes into account the economic indicators of resource utilization, which gives the opportunity to save on payment for their consumption. The hardware components for the implementation of the Mini Smart House were selected in the article. It uses a variety of technologies to conveniently manage it and use renewable energy to power it. The model was produced independently by students involved in the STEM project. Research includes sketching, making construction parts, sensor assembly and Arduino boards, programming in the Arduino IDE environment, testing the functioning of the system. Research includes sketching, making some parts, assembly sensor and Arduino boards, programming in the Arduino IDE environment, testing the functioning of the system. Approbation Mini Smart House researches were conducted within activity the STEM-center of Physics and Mathematics Faculty of Ternopil Volodymyr Hnatiuk National Pedagogical University, in particular during the educational process and during numerous trainings and seminars for pupils and teachers of computer science. Keywords: Smart home, Mini Smart House, STEM-projects, Smart- technologies, C++, Internet of Things, technology of management. 1 Introduction The trend of IT development in recent years is Smart-technologies. They are now widely implemented in many industries, in the home and in education. As a result, the modern teacher receives many tools that make the learning process interesting and creative. The development of the Internet of Things (IoT) is an additional opportunity in this aspect, a network concept that contains many devices with built-in transmitters of their physical parameters. The widespread use of these household appliances was predicted at the beginning of the twentieth century, in particular by the eminent ___________________ Copyright © 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). 199 physicist Nikola Tesla [4]. In the early 21st century, the number of devices connected to the Internet exceeded the Earth’s population. Today, the IoT sphere is one of the major global trends. Almost all devices known in the everyday life become part of the Internet and as a result perform new functions. No wonder this industry is considered the driving force of the 4th Industrial Revolution, which is now underway in the world. Therefore, forming an IoT expert – the person who creates the future – is an important educational task. Today, the issue of modernization of the educational process is more urgent than ever. In the context of research, they can be filled through the implementation of STEM-projects, the use of Smart-technologies, exploring the possibilities of the Internet of Things [2]. Smart home technology embodies all of the above concepts. By “smart home” can be understood a system that provides security and resource conservation (including comfort) for all users. In the simplest case, it should be able to recognize and respond to specific situations occurring in the home: one of the systems can control the behavior of others using pre-built algorithms. In addition, the automation of several subsystems provides a synergistic effect for the whole complex [14]. With the increasing computing power of gadgets, many smart home technologies and the Internet of Things have been standardized. Also for them the basic rules and recommendations for the construction of the finished product at the level of both the system as a whole and the individual components were defined. 2 Research apparatus The problem of research is related to the necessity of introducing in the educational process relevant to modern trends the methods and content of training. The purpose of the project is to develop a smart home model, design and create a Mini Smart House. Achieving the goal of the research is possible by solving the following tasks: 1. Analysis of the conceptual apparatus in the field of Internet of Things; 2. Designing the smart house training model and choosing the hardware components that will implement the model; 3. Project development through programming of its modules in Arduino IDE environment; 4. Implementation, testing, debugging of some components of the project. The object of the study is the Internet of Things technologies. The subject of the study is a smart home educational model and its implementation in the form of a Mini Smart House. To achieve this goal, we used a set of research methods: theoretical – analysis of scientific and technical sources, generalization, modeling of information processes occurring in the “smart home”; empirical: observations, analysis of the experience of using IoT technologies; practical methods for software development and testing. 200 The study was tested within the framework of the STEM-Center of the Physics and Mathematics Faculty of the Volodymyr Hnatyuk TNPU, in particular in the educational process and during numerous trainings and seminars for students and teachers of informatics. 3 Results of the study 3.1 Analysis of the basic concepts of the study Smart home is a system that provides security, resource conservation and comfort for all users [13]. In the simplest case, it should be able to recognize specific situations in the home, and respond to them by the developed algorithms. The term “smart home” does not have a clear definition, and therefore is used when referring to any system with automated control of the devices, which simplifies the life of a person and increases his level of comfort. The beginning of the story of the “smart home” can be considered 1961, when Joel Solomon and Ruth Rodale Spira invented and patented a special device for smooth regulation of light – dimmer [5]. The first household electronic automation system was called the “home computer of the Echo IV”, which in 1966 became the first analogue of a “smart home” [15]. The term “smart home” in 1984 was proposed and introduced by the American Developers Association [6]. It was then that prices for electrical appliances began to decline, which made it possible to build high-functionality offices. In the future, scientists and engineers went from theory to practice, introducing more and more objects using this technology. An important feature and property of “smart home”, which distinguishes it from other ways of organizing living space, is that it is the most progressive concept of human interaction with living space, when a person sets the desired environment with one command, and the automation, in accordance with external and internal conditions, sets and monitors the operating modes of all engineering systems and electrical appliances. All functional features of such a building can be divided into three categories [16]: ─ household functions; ─ entertainment; ─ protection and technological security. This system does not require many computers and connections. As experience shows, you can make your home “smart” by your own efforts without making dramatic changes. Thus, it is an ordinary house or apartment (also, it can be an industrial object, a shopping mall, etc.), equipped with a “smart” system that does absolutely any whim, or any desire of its owner and “decides” most household tasks. In such a house it is not only pleasant to live, but comfortable, safe, profitable. Nowadays, in the age of digitalization, the components of the “smart home”, technologies of cloud computing and IoT have considerable pedagogical potential as an object and a learning tool [3; 7; 9; 10; 11; 12; 17]. 201 3.2 Designing a Smart Home Model Functionality, style, comfort, safety are far from being a complete list of what a smart home can do. IoT technologies are implemented in the concept of the “smart home” training model, which should provide convenient management of basic household appliances and the use of renewable power supplies. In our model of “smart home” we propose the following components: ─ a control center (in the form of a tablet or console), which records and interprets data from sensors; ─ motion, smoke, flooding, opening windows or doors, light, humidity, temperature; ─ automatic water taps; ─ temperature regulators for batteries; ─ readers of indicators of counters; ─ video intercom; ─ voice assistants (optional). All of these components have to independently receive data from the sensors and work according to the developed algorithms. Accordingly, the entire process of their operation will be subject to control and management from mobile devices via the Internet. As can be seen from Fig. 1, our model has three levels: commands, management and communications. Fig. 1. Educational model of smart home Mini Smart House embodies a combination of technical, engineering, design techniques, computer and software engineering (computer networks, C programming), and demonstrates practical results. The introduction of such projects into the educational process enables to acquire the skills of modeling the respective processes and to implement similar technologies in real life. Pupils or students will learn a self-created system that ensures the safety, comfort, economy and efficiency of managing their own home and is scaled and customized, ensuring efficiency in 202 managing smart home technology. This integration of academic subjects and the implementation of cross-curricular links will help to prepare the modern specialist. In our “Smart House” model, we can distinguish the following subsystems: ─ communication; ─ alarm system; ─ lighting control; ─ climate control; ─ monitoring of sensor data; ─ cleanliness control (filling the trash can). In order to ensure their functioning in practice, appropriate software modules for all components were developed and optimal development tools were selected (see description in subsection 3.3) based on the selected hardware elements for our model (see Table 1). Table 1. Calculation of the cost of hardware components of the prototype Name Model Quantity Price UAH Temperature and humidity DHT11 1 29 sensor Sound sensor KY-037 1 29 Hercon sensor for door MC-38 1 49 opening Arduino pin extension module I2C на PCF8574T 1 27 LCD 1602 module for Arduino 1602 1 65 Real time clock DS1302-MOD 1 17 Buzzer KY-012 1 18 The engine 1 50 Bluetooth module HC-06 1 100 Ultrasonic distance sensor HC-SR04 1 37 Conductors 30 1 LED 3 1 Arduino Uno 2 209-894 Payless Layout Board MB-102 2 49 Solar battery RF136X110-3 1 120 Plastic 1 40 Plywood 120 Accessories for doors and 10 windows Laser cutting 100 Other supplies 20 203 Our Mini Smart House model should take into account the economic indicators of resource use. By analyzing the relevant data, you can realize the savings of utility bills in a smart home. As the study [8] shows for smart home is characterized by: ─ saving resources: ─ electricity: in the lighting system – up to 60%; in the climate control system – up to 40%; ─ gas and water – up to 40%; ─ reduced operating costs: service savings – up to 20%: cost savings on staff; multiple increase of equipment life; ─ prevention of emergencies; ─ increase of profitability and investment attractiveness: ─ more favorable insurance conditions; ─ when renting – the basis for raising the rent. With the hardware components that implement the model, we have selected the components of the open Arduino hardware and software project. Table 1 lists them and provides a cost estimate for creating a Mini Smart House. 3.3 Practical implementation of the model The practical implementation of the model involves the creation of a layout smart house. The model is a sketch project of the house, which gives an idea of the artistic and stylistic decisions of the building, features of its planning. First of all, we drew a sketch of the house on paper. Then, according to the sketch, the drawing was done in CorelDraw. After completing a detailed drawing of the layout, you need to select the material for its construction. Many different materials are suitable for making a model of home, but it is most appropriate to use foam, wood or solid cardboard. We have decided that wood is the most appropriate material for the Mini Smart House prototype. It is easily machined, reliable and durable. So, we chose the plywood. The prepared drawings for the laser cutting machine made it possible to cut out the details. According to the developed drawings, all structural elements are manufactured. Careful quality work made it easy to connect all the details with each other. After preparation of all the details, a prototype of the house was assembled, fixed with PVA glue and with hot gluing. Moving parts are attached to the curtains that are screwed onto the screws. In general, the prototype looks like this (see Fig. 2). The defining function of any SMART-system is to respond to the environment, the parameters of which are measured using sensors, signals, communications and other integrated elements. The received data is processed through the implementation of program code. C++ programming language is used for programming in the Arduino IDE. 204 Fig. 2. View of the “Mini Smart House” prototype Created code from the Arduino IDE environment we upload to the Arduino Uno board. So we program microcontrollers. Arduino Uno is a widely used open source microcontroller board based on the ATmega328P microcontroller. It includes everything you need to conveniently work with your microcontroller: 14 digital inputs / outputs (6 of which can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz resonator, a USB connector, a power connector, connector for programming within the scheme (ICSP) and the reset button [1]. Three communication protocols can be used to communicate with the Arduino Uno board: ZigBee, Wi-Fi and Bluetooth. Given the instructional model purpose of the Mini Smart House, we have chosen the Bluetooth protocol that will allow you to connect to the system using your smartphone or tablet. The disadvantages of Bluetooth certainly include a small distance of signal propagation. However, in our model, the connection within 10 meters is stable and allows to save low power consumption, compact size and relatively low cost of components. Yes, a low-power transmitter consumes only 0.3 mA in standby mode and averages 30 mA during data exchange. In addition, Bluetooth provides encryption of data transmitted using an 8- to 128-bit effective key and one-way or two-way authentication. 205 Fig. 3 shows a diagram of how we connected a Bluetooth module to an Arduino UNO board. Fig. 3. Bluetooth HC-06 connection scheme The software to connect the Bluetooth module to the smartphone using the following code: #include "alarm.h" #include "claplight.h" #includeint ledpin=12; int BluetoothData; void bluetooth_setup() { Serial.begin(9600); Serial.println("Bluetooth On please press 2-5"); pinMode(ledpin,OUTPUT); } void bluetooth_loop() { if (Serial.available()) { BluetoothData=Serial.read(); if (BluetoothData == 50) { clap_bl = true; last_bl = false; Serial.println("Clap Light On! "); } if (BluetoothData == 51) { clap_bl = false; Serial.println("Clap Light Off! ");} if (BluetoothData == 52) { alarm_bl = true; Serial.println("Alarm On! "); } 206 if (BluetoothData == 53) { alarm_bl = false; Serial.println("Alarm Off! ");} } } So, via Bluetooth, you can control the use of household appliances such as lighting, ventilation, alarms and get sensor data: temperature, humidity, landfill. An example of the implementation of security control Mini Smart House is the development of alarm systems. To do this, we use a Hercon sensor for door opening and a piezo speaker. When the door is opened, sensor sends an electrical signal to the Arduino, which includes a loud alarm sound. You can turn it off or on using Bluetooth connectivity. The corresponding connection diagram of the mentioned components is shown in Fig. 4. Fig. 4. Scheme of the alarm system When the alarm system is on, sensor sends an electrical signal when the door is opened on the Arduino board, from which the sound is output to the speaker. The event processing module is as follows: const int buzzer = 3; const int sensor = 4; int state; // 0 close - 1 open switch int alarm_delay = 500; int alarm_timer = 0; bool alarm_bl = true; void alarm_setup(){ pinMode(sensor, INPUT_PULLUP); } 207 void alarm_loop() { if(!alarm_bl) { noTone(buzzer); return; } if(alarm_timer < alarm_delay) { alarm_timer += 1; return; } else alarm_timer = 0; state = digitalRead(sensor); if(state==HIGH) {tone(buzzer, 1000); alarm_timer=0;} else { alarm_timer += 1; noTone(buzzer); } } The lighting control subsystem provides convenient switching on and off of the light without coming into the switch. To do this, the user should just clapped his hands. The hardware components of this subsystem are a sound sensor and an LED. An alternative way is to control the lighting from your smartphone. The hardware connection diagram is shown in Fig. 5. Fig. 5. Scheme of the lighting control subsystem The processing of subsystem events is carried out by program code. int ledPin = 12; int threshoid= 20; int volume; int v = 0; int knowckSensor = A0; int sensorreading = 0; int ledState = LOW; bool clap_bl = true; bool last_bl = false; int claplight_delay = 50; 208 int claplight_timer = 0; void claplight_setup(){ Serial.begin(9600); pinMode(ledPin, OUTPUT); } void claplight_loop(){ if(clap_bl == false) { last_bl = clap_bl; digitalWrite(ledPin, LOW); return; } else if(last_bl == false && clap_bl == true) digitalWrite(ledPin, HIGH); last_bl = clap_bl; v = analogRead(knowckSensor); if(v >= threshoid) { if ((sensorreading == 0)) { digitalWrite(ledPin, HIGH); Serial.println("Knock!"); sensorreading = 1; } else { digitalWrite(ledPin, LOW); Serial.println("No!"); sensorreading = 0; } //v = 0; delay(50); } } The climate control subsystem uses a temperature sensor and a fan. When the temperature rises to a certain point, the Arduino controller supplies current to the fan, and when the temperature drops the fan shuts off. The schematic diagram of the climate control subsystem is presented in Fig. 6. In our model of smart home implemented the output of sensor data and date and time on the screen. The corresponding subsystem contains a screen, a clock module, sensors. The scheme of their connection is shown in Fig. 7. Additionally, sensor data is sent in addition to the smartphone. The Mini Smart House controls the filling of the waste container with the help of an Arduino board and a proximity sensor. It uses acoustic ultrasonic radiation to determining the distance to the object. This contactless proximity sensor provides high accuracy and stability of measurements. Measurement results are virtually unaffected by solar radiation and electromagnetic noises. Sensor captures the fill level 209 of the waste container and sends a signal to the Arduino. If the fill rate is 80% or more, the message “Trash filled” will be sent to the phone. Fig. 6. The scheme of the climate control subsystem Fig. 7. Schematic diagram of the monitoring subsystem Fig. 8. Scheme of the purity control subsystem 210 Software implementation of the module of the fill level of the waste container subsystem is: #define trigPin 8 #define echoPin 7 #define led 6 int dumpDelay = 0; void dump_setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(led, OUTPUT); } void dump_loop() { dumpDelay += 100; if(dumpDelay < 2000) return; dumpDelay = 0; long duration, distance; digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(3000); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance = (duration/2) / 29.1; Serial.println(distance); if (duration < 300 || (duration >= 500 || duration <= 0)) digitalWrite(led, HIGH); else digitalWrite(led, LOW); } Nowadays, energy-saving technologies are becoming widespread. In the “Mini Smart House” prototype, we use a RF136X110-3 on 5V solar battery connected to a Power Bank battery that nourish our system. 4 Conclusions The analysis of the possibilities of modern technologies in education (STEM, Smart, Internet of Things) has given theoretical and methodological basis for the design of the smart home educational model and development on its basis Mini Smart House. We have created a finished product that combines technical, engineering, design methods, computer and software engineering (computer networks, C++ programming) and demonstrates practical result. Using the approaches described above, we can model relevant processes and implement similar technologies in real 211 life. As a result, students can learn a self-created system that provides security, comfort, economy and efficiency in managing their own home, scalable and customizable, ensuring efficiency in managing smart home technologies. The Mini Smart House project is of practical importance to students and teachers. It can be used in the teaching of various topics in school courses in computer science and physics. References 1. Arduino Uno Rev3. Arduion Official Store. https://store.arduino.cc/arduino-uno-rev3 (2019). Accessed 15 Sep 2019 2. Balyk, N., Barna, O., Shmyger, G., Oleksiuk V.: Model of Professional Retraining of Teachers Based on the Development of STEM Competencies. CEUR Workshop Proceedings 2104, 318–331 (2018) 3. Bremer, A.: Diffusion of the “Internet of Things” on the world of skilled work and resulting consequences for the man–machine interaction. Empirical Research in Vocational Education and Training 7, 8 (2015). doi:10.1186/s40461-015-0021-9 4. daCosta, F., Henderson, B.: Rethinking the Internet of Things: A Scalable Approach to Connecting Everything. Apress, Berkeley (2013) 5. Dimmer. https://en.wikipedia.org/w/index.php?title=Dimmer&oldid=916345104 (2018). Accessed 19 Sep 2019 6. Dingli, A., Seychell, D.: Smart Homes. In: The New Digital Natives, pp. 85-101, Springer, Berlin, Heidelberg (2015). doi:10.1007/978-3-662-46590-5_7 7. Hu, Y., Tilke, D., Adams, T., Crandall, A.S., Cook, D.J., Schmitter-Edgecombe, M.: Smart home in a box: usability study for a large scale self-installation of smart home technologies. Journal of Reliable Intelligent Environments 2(2), 93–106 (2016). doi:10.1007/s40860-016-0021-y 8. Innovatsiinyi proekt “Rozumnyi budynok” Smart (House Innovative Project). https://otherreferats.allbest.ru/management/00006537_0.html (2008). Accessed 15 Sep 2019 9. Kiv, A.E., Soloviev, V.N., Semerikov, S.O.: CTE 2018 – How cloud technologies continues to transform education. In: Kiv, A.E., Soloviev, V.N. (eds.) Proceedings of the 6th Workshop on Cloud Technologies in Education (CTE 2018), Kryvyi Rih, Ukraine, December 21, 2018. CEUR Workshop Proceedings 2433, 1–19. http://ceur-ws.org/Vol- 2433/paper00.pdf (2019). Accessed 10 Sep 2019 10. Koper, R.: Conditions for effective smart learning environments. Smart Learning Environments 1, 5 (2014). doi:10.1186/s40561-014-0005-4 11. Markova, O.M., Semerikov, S.O., Striuk, A.M., Shalatska, H.M., Nechypurenko, P.P., Tron, V.V.: Implementation of cloud service models in training of future information technology specialists. In: Kiv, A.E., Soloviev, V.N. (eds.) Proceedings of the 6th Workshop on Cloud Technologies in Education (CTE 2018), Kryvyi Rih, Ukraine, December 21, 2018. CEUR Workshop Proceedings 2433, 499–515. http://ceur- ws.org/Vol-2433/paper34.pdf (2019). Accessed 10 Sep 2019 12. Modlo, Ye.O., Semerikov, S.O., Nechypurenko, P.P., Bondarevskyi, S.L., Bondarevska, O.M., Tolmachev, S.T.: The use of mobile Internet devices in the formation of ICT component of bachelors in electromechanics competency in modeling of technical objects. In: Kiv, A.E., Soloviev, V.N. (eds.) Proceedings of the 6th Workshop on Cloud Technologies in Education (CTE 2018), Kryvyi Rih, Ukraine, December 21, 2018. CEUR 212 Workshop Proceedings 2433, 413–428. http://ceur-ws.org/Vol-2433/paper28.pdf (2019). Accessed 10 Sep 2019 13. Oliveira, L., Mitchell, V., May, A.: Smart home technology – comparing householder expectations at the point of installation with experiences 1 year later. Personal and Ubiquitous Computing 23, 1-14 (2019). doi:10.1007/s00779-019-01302-4 14. Oteafy, S.M.A., Hassanein, H.S.: Resource Re-use in Wireless Sensor Networks: Realizing a Synergetic Internet of Things. Journal of Communications 7(7), 484–493 (2012). doi:10.4304/jcm.7.7.484-493 15. Prysiazhniuk, A.: Rozumnyi budynok – z choho vin skladaietsia ta chy potriben vam (A Smart Home – What It is Made of and Whether You Need It). Na chasi. https://nachasi.com/2018/06/25/smart-house-faq (2018). Accessed 15 Sep 2019 16. Saushkyn, O.O.: Proekt rozumnyi budynok (The Smart Home Project). http://economstroy.com.ua/mvoprosyiotvety/2303-proektrozumnuybudunok.html (2012). Accessed 15 Sep 2019 17. Spirin, O., Oleksiuk, V., Oleksiuk O., Sydorenko, S.: The Group Methodology of Using Cloud Technologies in the Training of Future Computer Science Teachers. CEUR Workshop Proceedings 2104, 294–304 (2018)