Monitor and Control of Remote Appliances using Raspberry Pi through IoT

DOI : 10.17577/IJERTV5IS110308

Download Full-Text PDF Cite this Publication

Text Only Version

Monitor and Control of Remote Appliances using Raspberry Pi through IoT

Mr. Bhuvanagiri Viswanadh M.Tech, Embedded System Raghu Engineering College Visakhapatnam

Dr. Ashish Singh M.Tech.,Ph.D.

Dept. Electronics & communication engineering Raghu Engineering College

Visakhapatnam

Abstract Smart homes/offices are those where devices/home appliances could monitor and control remotely. This project proposes an approach to build a system for monitoring and control of devices remotely using the Raspberry-Pi (R-Pi) single-board computer based on IoT. The system monitors information about the surroundings through sensors and camera. It uploads the status and data directly into the Web server, where it can be accessed at anytime and anywhere through internet. The user here will move directly with the PC or mobile through a web-based interface over the webpage, where the appliances like lights, fan and door lock are remotely controlled through easy website. The inputs to the system are PIR sensor, LDR sensor and GAS sensor. LDR sensors detect light, which is used to turn ON/OFF of lights. PIR sensor has been used to detect human beings and GAS sensor is used to detect the smoke or any flammable gases to control fan and camera. The Gas sensor gets sensed when smoke is detected. An email alert will be sent to the user based on the sensor detection. The camera also provides the live video streaming of the area whenever the user wants or if an alert received to him from any web browser in PC or even from mobile in real-time.

Keywords Raspberry-Pi (R-Pi); IoT; Web server

  1. INTRODUCTION

    When you're not in the home or office, nagging little doubts can start to crowd your mind. Did I turn the coffee maker off/on? Did I set the security alarm in office or not? Did I switch off the lights and fans? Are the kids doing their work or watching TV? Imagine that any device in your home that uses electricity can be put in your network and at your command. Whether you give that command by voice, remote control, tablet or smart phone, the device reacts. It is possible to have remote control of all your devices and monitors over the internet incorporating a simple and friendly user interface which contributes to overall security and energy consumption.

  2. INTERNET OF THINGS

    IoT is connecting of physical objects like devices, appliances, vehicles, buildings and other items embedded with hardware, software, sensors and network connectivity that enable all the objects in collecting and exchange of data to work for common goals. On seeing the word internet one can feel a security concern. For our system IoT provides the remote monitor and control of devices in a secure manner.

    A. Related work

    Every user who is bored with the existing system may want that may add more features and run with some more applications. This project is designed to avoid the disadvantages and security concerns of the existing system.

    The proposed system supports more elasticity, comfort capacity and security to the end user. The IoT-based architecture provides high-level security at the communication and information exchange level. It is an approach that is relevant in many different applications such as patient monitoring system, security, traffic signal control or controlling various appliances.

  3. PROPOSED SYSTEM

    The main objective of the proposed system is to design and to execute a cost effective and easy to operate automation system that's capable of controlling most of the devices that sustain in the house/office automation system.

    The proposed system can make use of wired/wireless LAN (Local Area Network) connections between various sensors, hardware modules, camera and server, and various communication protocols between users and server.

    The block diagram of the proposed system is as shown in Fig.1

    Fig. 1. Block diagram of proposed solution

  4. HARDWARE DETAILS

    The system consists of a Raspberry pi board, Sensors and camera.

    1. Raspberry Pi

      The Raspberry-Pi is a credit card-sized single-board computer developed by the Raspberry Pi Foundation in UK to promote the teaching of basic computer science in schools and developing countries. Raspberry pi is controlled by a modified version of Debian Linux optimized for the ARM architecture. Here we are using raspberry pi 3. The setting up of pi consists of selecting Raspbian OS from prebuilt SD card. The prebuilt SD card consists of Raspbian, arc Linux, pidora, open ELEC, RISC OS operating system. After the OS selection we need to configure raspberry-pi using raspi- config command. We can enter into raspberry pi desktop using startx command. The raspberry pi 3 is as shown in Fig.2

      Fig. 4. PIR Sensor

      • LDR:-LDR is acronym for Light Dependent Resistor. It is a optical sensor that detects the light in the surroundings. It changes its resistance based on the light fall on the sensor. LDR sensor is as shown in Fig.4

        C. USB Camera

        Fig. 5. LDR Sensor

        A webcam is a video camera that feeds or streams its image in real time to or through a computer to computer network.

    2. Sensors

    Fig. 2. Raspberry pi 3

    • Gas Sensor:-Here we are using the MQ2 gas sensor which detects the smoke and any flammable gases. It is a semi conductive smoke sensor. It is generally used to detect combustible or flammable gases such as LPG (Liquefied Petroleum Gas), methane, propane, hydrogen gases and smoke. It is well suited for industrial purposes. MQ2 is as shown in Fig.3

      Fig. 3. GAS Sensor MQ2

    • PIR sensor:-PIR sensors are to sense motion, and to detect whether a human or animal (objects that emits thermal radiation) has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use. For these many reason they are commonly found in security systems and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors. PIR sensor is as shown in Fig.4

    Fig. 6. USB camera

    When "captured" by the computer, the video stream may be saved, viewed or sent on to other networks via systems such as the internet, and email as an attachment. When sent to a remote location, the video stream may be saved, viewed or on sent there. Unlike an IP camera (which connects using Ethernet or Wi-Fi), a webcam is generally connected by a USB cable, or similar cable, or built into computer hardware, such as laptops.

  5. SOFTWARE IMPLEMENTATION

    The software implementation starts with the selection of OS for Raspberry pi board. For our purpose we are selecting the Raspbian OS. The configuration settings of the Raspberry pi are made as per the user requirement using raspi-config command. For programming we choose Python language. Python is an easy programming language for users to interface numerous sensors with Raspberry pi. The access of camera output can be done by installing the software called motion in Raspberry pi using the command sudo apt-get install motion. The Raspberry pi desktop and configuration settings are as shown in Fig.7

    Fig. 7. Raspberry Pi desktop

    1. Install and configure Motion software

      The motion software will allow user to create a remote webcam for your Raspberry Pi so that we can view it from any computer remotely.

      1. Installing Moiton software: Here are the steps to install the motion software.

        1. Open the command prompt in Raspberry pi.

        2. Give the command sud apt-get install motion.

        This will take few minutes to download and install the motion software.

      2. Configuring the Motion software: To configure the motion software we have to edit the file motion.conf.

        1. Open the command prompt in Raspberry pi.

        2. Give the command sudo nano etc/motion/motion.conf. and edit the following parameters.

        set "daemon on"

        set "minimum_frame_time 5", this can be modified, depending how often you want to take picture

        set "framerate 100"

        set "webcam_maxrate 100" set "output_normal on"

        set "quality 100"

        set "get_dir /media/webcam/motion" set "webcam_port 8080"

        set "control_port 8081", this matters!!! set "webcam_localhost off"

        set "width 320", this matters!!! set "height 240", this matters!!!

      3. Start/stop Moiton service: Give the command sudo service motion start to start moiton and view the video output in a local network. Give the command sudo service moiton stop to stop moiton.

        The video output in local netwrok using motion is as shown in Fig.8

        Fig. 8. Video output in local network

    2. Python Programming and project flow chart

      Python is a simple and powerful programming language. Python is well suited for programming raspberry pi and to interface with sensors.

      The code always checks for manual or auto mode to operate the system. In auto mode particular threshold will set for GAS and LDR sensor to ON/OFF lights and fans automatically and an email alert will also be sent to the user. In manual mode the user will send the commands to control the appliances. The manual or auto mode will also be selected by user.

      The sensor values also uploaded to the web server which is provided free to any user called www.thingspeak.com.

      The flow chart of the system for controlling appliances is as shown in Fig.9

      Fig. 9. Flow chart

    3. Weaved installer

    The video output of the camera will be viewed only in the local network if only the motion software was installed. To view the video output from a remote network another software called weaved installer has to install in the raspberry pi.

    Weaved is a free IoT services. Weaved services connect you easily and securely to your Pi from a mobile app or browser window. The user has to first create a free account at www.developer.weaved.com and give the same credentials while installing it in raspberry pi.

    The above video output is obtained by giving the IP address in the local browser. The remote video output was obtained after installing weaved installer by login with user id and password at www.developer.weaved.com and then clicking on appropriate channel is as shown in Fig.10.

    Fig. 10. Video output from remote location

  6. RESULTS

    In this work the sensors and camera were successfully interfaced with Raspberry pi and implemented in real time. The images of the system and the outputs are as shown below.

    Fig. 12(b). LDR value in internet

    Fig. 12(c). PIR value in internet

  7. CONCLUSION AND FUTURE SCOPE

The system is well suited for safety monitoring in various places like home, office, schools, banks, hospitals etc. The improvement to the system to be made is machine driven security systems when an accident of fire or any theft may occur.

Fig. 11. Final system

Fig. 12(a). Smoke value in internet

ACKNOWLEDGMENT

We would like to offer our special thanks to Raghu engineering college for providing us the necessary guidance to make this project. I would also like to thank Dr. Ashish Singh M.Tech.,Ph.D, Associate professor, Raghu Engineering College for assisting me to design the prototype and making it reliable.

REFERENCES

  1. Pavithra.D, and Ranjith Balakrishnan, IoT based Monitoring and Control System for Home Automation, Proceedings of 2015 Global Conference on Communication Technologies.

  2. V.Sandeep, K.Lalith Gopal, S.Naveen, A.Amudhan, L. S. Kumar Globally Accessible Machine Automation Using Raspberry Pi, Advances in Computing, Communications and Informatics (ICACCI), 2015.

  3. Download the Required Operarting System in

    http://www.raspberrypi.org/downloads/.

  4. Mr. Pranay P. Gaikwad, Mrs. Snehal S. Golait, Mrs. Jyotsna P. Gabhane A Survey based on Smart Homes System Using Internet-of-Things, 2015 INTERNATIONAL CONFERENCE

    ON COMPUTATION OF POWER, ENERGY, INFORMATION AND COMMUNICATION.

  5. Huu-Quoc Nguyen, Ton Thi Kim Loan, Bui Dinh Mao and Eui-Nam Huh, Low Cost Real-Time System Monitoring Using Raspberry Pi, 2015 Seventh International Conference on Ubiquitous and Future Networks.

  6. D. Vidya Sagar, G. Vyshnavi Vihitha, WebIOPi- Remote Controlled Robot Cam Using Rest Framework, International Journal of Emerging Research in Management &Technology ISSN: 2278-9359 (Volume-4, Issue-8).

BIOGRAPHIES

Mr. Bhuvanagiri Viswanadh is working as intern in Akrivia Automation Pvt Ltd. He is pursuing his Masters in Embedded systems from Raghu Engineering College,

JNTU- Kakinada. He obtained his Bachelors degree from NRI Institute of Technology, JNTU-Kakinada. His research interest includes IoT in embedded system.

Dr. Ashish Singh is currently working as associate professor in the Department of Electronics and communication Engineering at Raghu Engineering College. He obtained his Masters degree from University of Allahabad. He obtained his Ph.D from University of Allahabad. His key area of

research is Micro strip patch antenna and millimeter waves.

Leave a Reply