0% found this document useful (0 votes)
16 views7 pages

Home Automation Using Pi

This document discusses an IoT-based home automation system utilizing Raspberry Pi to optimize energy consumption in households. It describes the integration of various sensors and a mobile application to monitor and control electrical appliances remotely, thereby promoting energy conservation. The paper also outlines the hardware and software requirements, implementation details, and potential for future enhancements in energy management.

Uploaded by

Arun Rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

Home Automation Using Pi

This document discusses an IoT-based home automation system utilizing Raspberry Pi to optimize energy consumption in households. It describes the integration of various sensors and a mobile application to monitor and control electrical appliances remotely, thereby promoting energy conservation. The paper also outlines the hardware and software requirements, implementation details, and potential for future enhancements in energy management.

Uploaded by

Arun Rawat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Chapter 12

IoT-Based Home Automation Using


Raspberry Pi

Leo Raju, G. Sowmya, S. Srividhya, S. Surabhi, M. K. Retika,


and M. Reshmika Janani

Abstract The idea of sustainable energy imposed people to think of a new alternative
way to conserve energy. With the development of technology and Internet, a new
sensational advancement known as Internet of Things (IoT) was created. This paper
mainly focuses on energy conservation through automation for which sensors and a
microprocessor are used. The appliances are sensed and controlled using Raspberry
Pi for optimal use of electricity in the building. The unnecessary use of electricity
due to carelessness of the customer is identified and can be controlled remotely using
the mobile application.

Keywords Raspberry Pi · Home automation · Internet of Things (IoT) · Energy


management

12.1 Introduction

Internet of Things (IoT) is emerging as one of the most important concepts for
making the idea of “smart city” a reality [1, 2]. It finds applications in various sectors
including agriculture, retail, health, automobile, etc. The most popular application
of IoT is found in smart grids and home automation [3, 4].
Home automation aims to monitor and control the lighting, temperature, humidity
and motion of that particular place by means of sensors [5]. All the sensors are ideally
connected to a microprocessor, thus making the home automation system, which in
turn are connected to a central hub or cloud, and the entire system is controlled by
the user by means of an app [6, 7]. Here, Ubidots is used as a cloud platform which
is used to receive data from Raspberry Pi and stores it [8, 9]. The proposed system
is not limited to home alone. It can be used wherever automation is applicable like
offices, labs and banks [10].
This paper presents an advanced method of home automation by using Rasp-
berry Pi as the microprocessor, several sensors and an app which enables the user to

L. Raju (B) · G. Sowmya · S. Srividhya · S. Surabhi · M. K. Retika · M. Reshmika Janani


SSN College of Engineering, Kalavakkam, Chennai 603110, India
e-mail: [email protected]

© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 155
R. Seyezhai et al. (eds.), Recent Trends in Renewable Energy Sources and
Power Conversion, Springer Proceedings in Energy,
https://doi.org/10.1007/978-981-16-0669-4_12
156 L. Raju et al.

control the electrical appliances, thereby controlling energy consumed in their house.
The paper contains information about the proposed system, hardware and software
requirements and implementation.

12.2 Proposed System and Block Diagram

In this system, Raspberry Pi 3B+ is used as a connecting bridge between the sensors
and the cloud. The Internet connection is established for automation and cloud
computation using IoT as shown in Fig. 12.1.
This figure represents the working block diagram of this project. Different
sensors—LDR sensors, PIR sensors, current sensors, temperature and humidity
sensors—are connected at various points in the house. These sensors require very
little current, and the usage of these sensors can reduce energy consumption drasti-
cally. The information from the sensors is received by Raspberry Pi which is then
sent to the cloud. Based on the information, the device can be controlled by the user
with the help of an Android applications. This information is sent back to the Pi
from cloud which, in turn, serves as the output to the actuators or relays, controls
the devices as per the user’s convenience and hence optimizes energy consumption
in house. The components are given in Table 12.1.

Fig. 12.1 Working block diagram of the project


12 IoT-Based Home Automation Using Raspberry Pi 157

Table 12.1 Hardware requirements


S. No. Components Necessity
1 Raspberry Pi 3 B+ Microprocessor
2 LDR To detect change in light intensity
3 PIR To detect infrared radiations
4 Current sensor Detects current flowing through the circuit
5 Temperature—humidity sensor Detects change in temperature and moisture
content in the atmosphere
6 Relay module Actuator

Fig. 12.2 Hardware model

12.2.1 Hardware Implementation

The hardware model is assembled, and connections are given as shown in Fig. 12.2.
In our hardware model, we have connected Raspberry Pi to PIR sensor, LED
module and motor driver. This is a prototype for the larger scale home automation.
We have controlled the sensors and actuator (motor driver) using Raspberry Pi. Now,
the data obtained from this will be sent to the cloud platform so as to control from
anywhere.

12.2.2 Hardware Prototype

Figure 12.3 shows a simple prototype of a working model of our proposed idea. Here,
we used an LED, DC motor and L293D motor driver (actuator) which is connected
to Raspberry Pi to control it. The motor driver and LED are connected to GPIO
pins of Raspberry Pi. We code in Python IDLE. From time library, we import the
sleep function to set proper delay for simultaneous control. We send signals HIGH
or LOW from microprocessor to the driver. The driver is in turn connected to the
158 L. Raju et al.

Fig. 12.3 Simple prototype

motor and actuates the motor in FORWARD mode when signal is HIGH and LED
is also simultaneously turned on. When signal is LOW, motor is stopped, and LED
is turned off. This simple prototype is a miniature version of the working hardware
model of the paper. The displayed output can also be sent as an alert message in
the mobile application during future enhancements to make it convenient for the
user. The prototype and the programming outputs are shown in Figs. 12.3 and 12.4,
respectively.
The prototype is shown in Fig. 12.3. Here, the motor driver is used to regulate
voltage and send control signals to the DC motor. The 9 V battery is used to power
the motor driver. The LED is connected to Raspberry Pi. When Pi sends actuating
signal, the LED and the DC motor are turned on, and we get output in display as
shown in Fig. 12.4. In this figure, the various control options of the motor and the
LED actions are shown.

Fig. 12.4 Prototype


programming output display
12 IoT-Based Home Automation Using Raspberry Pi 159

12.3 Software Implementation

12.3.1 Internet of Things (IoT)

IoT is the capability to sense, respond and work automatically whenever exposed to
a change from the environment it is kept in, without the need of humans. Internet of
Things (IoT) has simplified our life and has been incorporated in various industries
in various fields. Any thing can be sensed, analysed and controlled remotely across
the world. In an IoT system, sensors will send sensed data to a control centre which
will decide according to this data and sends command to actuators as a response. In
our project also, various sensors send the sensed input to the Raspberry Pi which
sends them to the cloud and hence to the app by which user can control the output
of the electrical appliances.

12.3.2 Cloud Computing—Ubidots

Using cloud, we can send and access data remotely since the information in not stored
locally in any device but is stored in data server from which data can be accessed
from anywhere. In the system, we use Ubidots Cloud platform. Ubidots is a cloud
platform which allows us to send data from a device to cloud by the use of Internet. In
Ubidots dashboard, several variables of devices can be added, and sensed values from
sensors can be stored in the variables. Values from the cloud can also be accessed by
user in app by connecting the app with Ubidots platform. In the Ubidots dashboard,
three variables are created and the values sensed by the sensors are stored in these
variables.as shown in Fig. 12.5.

Fig. 12.5 Ubidots dashboard


160 L. Raju et al.

12.3.3 Smart Mobile Application

The Raspberry Pi is connected to sensors which read the real-time data from the
environment and send it to Pi which in turn sends the data to cloud. This data stored
in the cloud platform is accessed through our app. Thus, the app obtains the current
status of the house, i.e., all the devices which are currently using electricity and also
the power consumed by each, and shows that to the user. Then, the user can control
which appliances to on or off with the app based on information provided. Thus, we
provide an app-based user control. Hence, we can optimize energy consumption in
house and regulate the electricity bill cost of the house.

12.4 Machine Learning—A Intelligent Data Analysis

It helps in predicting values without human intervention. We used multiple regression


and implemented in Scikit larn. Using decision tree regression algorithm, a graph is
plotted as shown in Fig. 12.6. This algorithm gives an accuracy of 99%.
In this figure, two input features are considered for load prediction, namely time
and unit price at every hour. The points represent load and its dependency on time and
price. From this, we can find how much energy is consumed and also predict the future
energy usage. The prior knowledge of energy consumption leads to better planning
for optimal usage and also shifts towards a more sustainable way of managing energy.
We can also include several other features to improve the accuracy of prediction.

Fig. 12.6 Machine learning


data analysis
12 IoT-Based Home Automation Using Raspberry Pi 161

12.5 Conclusion

We have presented an IoT-based home automation system which will work effectively
to monitor the energy consumed in our household and will conserve energy. This
system is wholesome, renewable and proficient. The system not only reduces energy
consumption benefiting economically, but also conserves the energy which could
be used for the future, hence benefitting socially and thereby leading to sustainable
growth of our earth with the available resources. We can further extend our project
to find out the areas which have high level of electricity usage during certain hours
of a day on daily basis and propose a system to conserve and reduce the electricity
usage during those maximal usage hours and ensure optimal use of the resources at
various levels and institution.

References

1. A.-R. Al-Ali, Java based home automation system. IEEE Trans. Consum. Electron. 50(2),
498–504 (2004)
2. V. Patchava, H.B. Kandala, P.R. Babu, A smart home automation technique with Raspberry
Pi using IoT, in International Conference on Smart Sensors and Systems (IC-SSS), Bangalore,
pp. 1–4 (2015)
3. J. Chhbra, P. Gupta, IoT based smart home design using power and security management
system, in 1st International Conference on Innovation and Challenges in Cyber Security
(ICICCS) (2016)
4. C. Mahapatra, A.K. Moharana, L.C.M. Victor, Energy management in smart cities based on
Internet of Things: peak demand reduction and energy savings. Sensors 17(12):2812 (2017)
5. K. Chooruang, K. Meekul, Design of an IoT energy monitoring system, in 16th International
Conference on ICT and Knowledge Engineering (ICT&KE), Bangkok, pp. 1–4 (2018)
6. K. Venkatesh, P. Rajkumar, et al., IoT based home automation using Raspberry Pi. J. Adv. Res.
Dyn. Control Syst. 10(07-Special Issue) (2018)
7. E. Rammohana Reddy, K. Sankara, Internet of Things based home automation control system
using Raspberry Pi. Int. J. Sci. Res. Comput. Sci. Eng. Inf. Technol. (2018)
8. B. Mataloto, J.C. Ferreira, N. Cruz, IoT for building and energy management systems. J.
Electron. 8(7), 763–770 (2019)
9. P. Patel, H. Patel, Various technologies using for smart home automation based on Internet of
Things. J. Res. 05(2) (2019)
10. J. Naik, K. Narare, S. Patil, P. Salve, A.A. Bamanikar, Home automation system using IOT.
Int. Res. J. Eng. Technol. (IRJET) 06(22) (2019)

You might also like