Application of Cloudbridge Automation using

0 downloads 0 Views 2MB Size Report
status of their residential/industrial machinery and sensors. The second part is ... Keywords—Raspberry pi, Cloud Computing, Cloud based. Automation, Web ... home/office/industrial owners have started to implement automation ... from any location through Internet. ... the role as a local server and microcontroller to make a.
2017 IEEE Region 10 Humanitarian Technology Conference (R10-HTC) 21 - 23 Dec 2017, Dhaka, Bangladesh

Application of Cloudbridge Automation using Raspberry Pi M. M. Aktaruzzaman Electrical & Electronic Engineering American International University-Bangladesh Dhaka, Bangladesh [email protected]

S. M. Badhan Electrical & Electronic Engineering American International University-Bangladesh Dhaka, Bangladesh [email protected]

Sarwat Adnan Electrical & Electronic Engineering American International University-Bangladesh Dhaka, Bangladesh [email protected]

M. R. Alam Electrical & Electronic Engineering American International University-Bangladesh Dhaka, Bangladesh [email protected]

Most. T. A. Begum Electronic & Telecommunications Engineeering Rajshahi University of Engineering & Technology Rajshahi, Bangladesh

observed and operated through this system. In addition, it can be used in residential areas; for example, if someone left his/her home or working places and forget to switch off his/her electrical appliances, still, he/she can check and control the status of his/her home appliances through web while staying outside.

Abstract—With the rapidly increasing demand of technology in today’s world, cloud computing plays a very significant role. In this paper, a worldwide accessible Cloud based automation system is presented and implemented using Raspberry Pi. The proposed system can be used in industrial sectors to reduce the waste of electric power, and providing notification in case of fault or abnormal disturbances in the industry. Moreover, the system would be useful for the handicapped people to control the electrical appliances of their home/industry without anyone’s support. The proposed work includes the design and prototype implementation of a Cloud based Automation technology. This system consists of two major units: first one is the Web Server or Cloud where user can locally and remotely monitor the current status of their residential/industrial machinery and sensors. The second part is the ability to control that machinery from suitable remote location and able to give proper instructions to the system. This system is more scalable and reliable than other typical automation system. The proposed Cloud based Automation system would be an effective solution to provide a proper 24 hours monitoring and control system for industrial as well as individual customers. Keywords—Raspberry pi, Cloud Computing, Cloud based Automation, Web Server, Sensor.

The main objective of this work is to implement a complete control system which can be applied to control home appliances, offices and machines of industries from any remote location through Cloud using Raspberry Pi. If someone forgets to check the status of his/her home devices (whether switches are on or off) or industry machinery, the proposed system will allow the flexibility of checking the status through internet as well as providing necessary commands to activate/deactivate the devices as per requirement. Moreover, for safety purposes, alarm monitoring is a concern for the industrial sectors. In this context, the automation system can be incorporated with sensors (temperature sensor, humidity senor, smoke/gas sensor, etc.) to provide 24 hours online monitoring from a remote location. Lastly, the implemented system is cost effective and reliable. Taking the wide-range applications into account, Cloudbridge automation is regarded as an effective solution.

I. INTRODUCTION

II. DETAILS OF EQUIPMENT USED IN THE DESIGNED SYSTEM

At present, automation system is one of the most convenient topics. Over the last few years, many home/office/industrial owners have started to implement automation system on their properties to control electrical appliances [1-4]. However, most of those automation systems are only accessed by local connectivity like RFID, Bluetooth, Wi-Fi [5-7]. Now-a-days, Web becomes a common interface for all smart devices. To this end, this work proposes a costeffective Web based control system which can be accessed from any location through Internet. The proposed solution can be applied in industries where the status of machinery can be

The automation system includes several equipment; the description of the primary equipment is presented in this section. Basically, the main components are Raspberry Pi, Global web server, Push switches and sensors. Raspbian (Linux based) operating system is used to operate the Raspberry Pi. Python, PHP, MySQL, HTML, CSS languages are used to design and program the whole system. In the following subsections, a brief summary of the components is presented. A. Raspberry Pi

978-1-5386-2175-2/17/$31.00 ©2017 IEEE 63

2017 IEEE Region 10 Humanitarian Technology Conference (R10-HTC) 21 - 23 Dec 2017, Dhaka, Bangladesh

associated with the electrical or electronics equipment and a few electrical components.

The basic purpose of building a Raspberry Pi is to develop the modern education. The popularity of the Raspberry Pi comes from a combination of the computer’s small size and affordable price. In the proposed system, Raspberry pi plays the role as a local server and microcontroller to make a communicating bridge between Physical Interfaces and Web Interface.

Fig. 3. User’s Dashboard showing sensor outputs.

The block diagram of the proposed system is illustrated in Fig. 4. The system includes the sensors for alarm monitoring and electrical switches, whose status (on/off condition) are required to be checked and then, to send activate/deactivate commands accordingly. In summary, based on the direction of work-flow, the algorithm of the whole automation system can be narrated in the following ways:

Fig. 1. Raspberry Pi 3 Model B [8].

B. Web Application and Interface Web Interface is designed using HTML, CSS programmed with PHP, MySQL languages and it starts with User Login panel to authenticate user access where user can login with their E-mail address and Password [9]. If user’s E-mail address and Password matches with the user’s details stored in the database, then he/she can proceed to the Project Dashboard or maintenance panel. C. Dashboard After Logging in through user login panel (see Fig. 2), users can see the Dashboard shown in Fig. 3, where all the sensor’s outputs are fetched from a table of database using PHP functions. There is a primary menu bar on the left side and a secondary menu bar on the upper right corner of the webpage. In Dashboard, the sensor outputs are shown using two data-types in two rows. First row contains Float data-type and second row contains the Integer data-type outputs.

Fig. 4. Block diagram of Cloudbridge Automation.

a) User initiated status monitoring and activation/deactivaton operation: As shown in Fig. 4, a user can check the status (on/off) of electrical switches, which can be connected to the residential/industrial electrical loads, if he/she can get access to the internet via computer or any smartphone or tablet devices. Firstly, user needs to open the webpage or Dashboard of the system where authentication would be checked from the database. If authentication is passed, then in the webpage, user can see the status of all electrical switches whether they are switched on or off. Basically, Raspberry Pi maintains the database of electrical switches’s status and the status is updated whenever any switching on or switching off operation is conducted. Secondly, upon checking the switch-status, user can turn on/off any switch by sending command through webpage as per requirement. b) Triggering of fault/disturbance alarms and sending notification to the user:

Fig. 2. User login panel.

Sensors, for instance, Temperature sensor, Smoke sensor, Humidity sensor, etc., can be placed in the residential/industrial locations and these sensors can be integrated to the Raspberry Pi via Arduino. A script is embedded in Raspberry Pi to check sensor’s status in real-

III. WORKING PRINCIPLE AND HARDWARE IMPLEMENTATION As the purpose of the designed system is to develop cloud controlled automation, so the system must include at least a web server, analog interfaces, such as, switches or push buttons, sensors and relays to sense the results of any test

64

2017 IEEE Region 10 Humanitarian Technology Conference (R10-HTC) 21 - 23 Dec 2017, Dhaka, Bangladesh

time. If Temperature or Smoke sensors indicate any alarm by exceeding the threshold set in the script/program, an e-mail is sent to the user notifying the alarm. As per requirement, several e-mails can be sent to different users whose e-mail addresses are configured in the scripts. In the following section, hardware implementation is briefly presented. In sections III-A to III-C, connections of electrical switches to Raspberry Pi, Raspberry Pi to Arduino, and Arduino to Sensors are discussed. Section III-D explores an application, namely, Room Manager, hosted in a webpage through which the status of electrical switches in two different rooms are observed and controlled.

Fig. 6. Raspberry Pi to Arduino connection.

C. Arduino to sensor connection

A. Electrical Switch to Raspberry Pi connection The diagram of Fig. 5 shows the connection between physical switches and Raspberry Pi. GPIO pins 6, 13, 19, 26, of Raspberry Pi are connected to the physical switches and they are running as input pins. GPIO pins 24, 25, 22, 23, are connected to the relays according to the input pins. If any of the electrical switches is turned on through web interface or by pushing the switch physically, the corresponding input pin of Raspberry Pi senses the ground. Then, Raspberry Pi triggers the corresponding GPIO pin to be LOW and updates the database table’s corresponding column. Simultaneously, this LOW GPIO pin triggers the corresponding relay to close the circuit by establishing the ground connection of selected load (electric bulb).

Fig. 7. Circuit diagram showing Arduino to sensor connection.

Fig. 8. Demonstration of hardware implementation.

Fig. 5. Circuit diagram showing the connection between physical switches and Raspberry Pi.

B. Raspberry Pi to Arduino connection An Arduino Uno is connected to Raspberry Pi through the USB serial connection, see Fig. 6 for illustration. More details of the Arduino Uno pin connection can be found in [10]. The Arduino Uno prints all data in Arduino Serial 9600. Raspberry Pi collects those printed data through Raspberry Pi USB ACM port. A python script is developed to collect those data and update two databases table’s corresponding columns according to the status of the sensors.

Fig. 9. Flow Chart of Internal Processes

As shown in Fig. 7, Arduino Uno is connected to the DHT-11 Temperature and Humidity sensor, MQ2 Gas/Smoke detector sensor and MQ5 Gas sensor. Analog Pins of the Arduino Uno are connected to the DHT-11, MQ2 & MQ5

65

2017 IEEE Region 10 Humanitarian Technology Conference (R10-HTC) 21 - 23 Dec 2017, Dhaka, Bangladesh

an operating system, so it was not feasible to virtually simulate the programs before implementation. Secondly, it was really a difficult task to make the whole system worldwide accessible as well as ensuring its online security. Static IP can be a solution but it cannot provide the freedom. Therefore, in the designed system, processing of digital signal to data and from data to digital signal is conducted with help of worldwide accessible database server. As expected, web based automation will be a daily part of human life and hence, in this paper, the successful implementation of the Cloudbridge automation system is demonstrated which can serve the humanity in the following ways: • At times, it becomes difficult for handicapped people to reach their hand near the electrical switches of home appliances, so, this control system can easily solve their problem. In addition, the Cloudbridge control system ensures human comfort. • Now-a-days, the risk of accidents due to Gas Leakage, cylinder explosion, has substantially increased which causes a massive loss of human lives. In order to take necessary action prior to occurring this kind of situation, this Cloudbridge automation system would be an effective solution. • The real estate companies can use the proposed system for security purposes. They can integrate the system to the apartments before handing it over to their customers.

sensor. However, Arduino Uno stores the input in digital format. One Arduino Uno Digital pin is connected to MQ2 sensor’s Digital Out pin to get the pulse of sensing Smoke/ LPG gas and if smoke is sensed, then it triggers a PHP E-mail script to notify the user through E-mail. The demonstration of the hardware part of the whole automation system is shown in Fig. 8. In summary, the whole internal processes are illustrated in Fig. 9. D. Room Manager Considering the switches of two different rooms: Room A and Room B, two room management webpages are configured in the website as shown in Fig. 10. The details of current status of the loads are fetched from the database tables corresponding to room A and room B using PHP functions. A user can manage and control their room’s electrical and electronics appliances through user-friendly web interface. In the webpage, there is a virtual switch which indicates the current status of the loads. A user can turn on or off their appliances by clicking the on/off button in the webpage. These virtual switches work in the same manner of physical switches by triggering a function to turn the GPIO pin high and update the corresponding column of database table. (a)

REFERENCES [1]

K. Gill, S. H. Yang, F. Yao and X. Lu, “A zigbee-based home automation system,” in IEEE Transactions on Consumer Electronics, vol. 55, no. 2, pp. 422-430, May 2009. [2] Sriskanthan, N., F. Tan, and A. Karande., “Bluetooth based home automation system,” Microprocessors and microsystems, vol. 26, no. 6, pp. 281-289, Aug. 2002. [3] Sadre, Ahmad, Donald F. Baechtel, and Mark S. Graber, “Integrated control system for industrial automation applications,” U.S. Patent 5,485,620, issued January 16, 1996. [4] Braun, Scott D., “Security system and method for an industrial automation system,” U.S. Patent 7,530,113, issued May 5, 2009. [5] N. Vikram, K. S. Harish, M. S. Nihaal, R. Umesh, A. Shetty and A. Kumar, “A Low Cost Home Automation System Using Wi-Fi Based Wireless Sensor Network Incorporating Internet of Things (IoT),” 2017 IEEE 7th International Advance Computing Conference (IACC), Hyderabad, India, 2017, pp. 174-178. [6] A. G. Ismaeel and M. Q. Kamal, “Worldwide auto-mobi: Arduino IoT home automation system for IR devices,” 2017 International Conference on Current Research in Computer Science and Information Technology (ICCIT), Sulaymaniyah KRG, Iraq, 2017, pp. 52-57. [7] D. Sunehra and V. Tejaswi, “Implementation of speech based home automation system using Bluetooth and GSM,” 2016 International Conference on Signal Processing, Communication, Power and Embedded System (SCOPES), Paralakhemundi, 2016, pp. 807-813. [8] T. Verry, “What is the Raspberry Pi? – ExtremeTech,” ExtremeTech, 2017. [Online] [Accessed: 15- Jan- 2017] Available: http://www.extremetech.com/computing/124317-what-is-raspberry-pi-2 [9] “PHP: Preface - Manual,” Php.net, 2017. [Online][Accessed: 01- Apr2017] Available: http://php.net/manual/en/preface.php [10] “IBM Cloud,” IBM, 17-Oct-2016. [Online].[Accessed: 01-Apr-2017] Available: https://www.ibm.com/cloud-computing/learn-more/benefitsof-cloud-comps

(b)

Fig. 10. Room Manager Webpage indicating light2 of GPIO 25 is on: (a) web page view and (b) Physical output.

IV. DISCUSSIONS AND CONCLUSION Implementation of the whole automation system was a challenging task. Firstly, Raspberry Pi is a mini computer with

66