Вы находитесь на странице: 1из 4

2015 Online International Confernece on Green Engineering and Technologies (IC-GET 2015)

Implementation of Cloud Server for Real Time Data


Storage using Raspberry Pi

S. Emima Princy Mr. K. Gerard Joe Nigel


M.Tech, Embedded Systems Asst. Professor, Electronics & Instrumentation Engineering
Karunya University Karunya University
Coimbatore,India Coimbatore, India
emimaprincy@gmail.com

Abstract—A private cloud server can be set up in a Raspberry such applications, ECG signal can be acquired in a
Pi which could be used as a storage device for applications microcontroller like PIC or Arduino, which could be then
involving real time signals. Raspberry Pi is a cheaper transmitted to the Raspberry Pi server. Web based monitoring
microprocessor in which cloud computing infrastructure can be can be achieved and the ECG signal of specific patients can be
obtained using cloud platforms provided by specific cloud vendors. recorded and saved in the private cloud with the patient’s
Real time signals acquired by any sensor that measures details in the database.
environmental factors are analog in nature. Using microcontrollers
like Arduino or any analog to digital converters these analog
signals can be discretized and transmitted serially to the Raspberry II. CLOUD SERVER
Pi. Hence Raspberry Pi can be used as a cloud server which serves
as a storage device for real time applications. A. Need for an on-net storage device
Accessing data from anywhere in the world has become a
Keywords—cloud computing; real time signals; necessity nowadays and it is extremely convenient and
advantageous to have an always on-network storage device
I. INTRODUCTION which ensures the benefit of accessing the data from anywhere
Cloud Storage is a backend –as-a-service which provides with just an internet connection. This can be extended to
seamless scalability and it removes the necessity of operating critical applications for example in the medical field where
databases which are distributed in nature. It is a fast and fully data about a patient in the form of real time signals can be
managed service that is specifically designed for internet scale recorded and stored in the cloud server and could be accessed
applications. Cloud Storage has powerful real time notification by the doctor from a different part altogether.
features and hence can be used in applications that are internet The on net storage is extremely beneficial because besides
based. A host computer which is dedicated to be deployed in providing access to different geographical regions through the
many programs and to which different computers are internet it also provides access to multiple clients at the same
connected through a network is called a Server and it can be a time and to the same files. Before the evolution of such
single computer or a series of computers connected together. storage devices, enterprises a huge amount of discrete file
All that is required from a server is to provide connectivity servers typically a hundreds or even had to be separately
through a network for the other computers. From large configured and maintained. Today, when more storage
organizations to smaller sectors a server has now become an capacity is required, on network storage devices can simply be
extremely essential thing that provides all the essential outfitted with larger disks or clustered together to provide both
services that are needed across a network. vertical scalability and horizontal scalability. Many vendors
The key feature of the server is that it can store a large partner with cloud storage providers to provide customers with
amount of data centrally and also it is able to provide access to an extra layer of redundancy for backing up files.
restricted users via the internet across different geographical
regions just by connecting into the same network. There is a B. Owncloud in Raspberry Pi
webserver called the host behind every domain or organization OwnCloud is a free and open source software . Owncloud
private or public to which a specific URL is assigned. When operated similar to that of the Drop-box or google drive that is
that URL is typed in the browser, access to the web server is widely used for storing files for personal use syncing with the
gained for that website. A readable page enabled by the own files on a own server or website. OwnCloud is a suite of
browser is opened and this is done because of the connection client-server software for creating file hosting services and
between the two servers and this enables loading of graphical using them. OwnCloud is functionally very similar to the
pages for the required website. Raspberry Pi as a cloud storage widely used Dropbox, with the primary functional difference
can be implemented in real time applications, for example being that OwnCloud is free and open-source, and hence
ECG of a patient proves significant in the field of medicine anyone can install and operate it without charge on a private
where continuous monitoring and diagnosis is required. In server and except for the disk capacity of the device there are

978-1-4673-9781-0/15/$31.00 © 2015 IEEE


2015 Online International Confernece on Green Engineering and Technologies (IC-GET 2015)

no limits on storage space or to the number of connected best choice since it can be interfaced with the Raspberry Pi.
clients. On the other hand, though Dropbox serves for similar Analogread() is a function in arduino side that reads the
purpose, it is not open source. Raspberry pi is a device which analog value from the analog input port and converts into an
can be turned into a network based private storage device by integer and stores it in a variable called value. The voltage
installing owncloud so that it can be treated as a cloud server value of the potentiometer is obtained from the step size
for transfer of files over the internet. It is a personal cloud that values of the ADC and the floating point voltage can be
runs on the server. Using Raspberry Pi cloud, it is possible to calculated using the below formula,
push sensor data to cloud for real time data storage.
float voltage value   
III. HARDWARE SET-UP 
Raspberry Pi is a powerful tiny computer based on Output is as as viewed in the serial monitor. As the
ARM based microcontroller. It works on Linux distributions potentiometer is changed, the corresponding voltage values
like Raspbian, Debian operating systems. A Raspberry Pi are displayed.
board with a prepared operating system SD card, USB
keyboard, mouse, HDMI display, power supply and cables it
is possible to make the Raspberry Pi to work like a normal D. Wiring Raspberry Pi and Arduino
general purpose computer. Raspberry Pi is a device, which operates in 3.3V whereas
Arduino is a device, which operates in 5V. So whenever
A. OS Installation Arduino is supposed to send a data, there must be a voltage
Raspberry Pi does not have internal storage or built-in divider between the two devices so that Raspberry Pi may not
operating system and it requires an SD-card that is set up to be damaged. Level logic converter can also be used between
boot the Pi. An SD-card has to be connected to the normal the two devices. Even before initializing the RX pin on the
windows machine using a card reader. From the Raspberry Arduino it is held at 5 Volts even because the Arduino is
Pi’s official website NOOBS has to be downloaded and flashed from Arduino IDE through these pins.
unzipped the same in the SD-card after which the SD-card
serves as the internal storage for the Raspberry Pi and using
the NOOBS main menu Raspbian OS can be installed in it. As
soon as the SD-card is inserted in the Raspberry Pi, the device
boots up.

B. Internet Settings
The quickest way to get the Raspberry Pi connected to the
internet is to connect an Ethernet patch cable and to just plug
into the network router. For this to work, the router should be
configured for DHCP (Dynamic Host Configuration Protocol).

x Wired network configuration can be done by making


changes in the configuration file in the path
/etc/network/interfaces. To open the file and see,
using the following command,
sudo nano /etc/network/interfaces
iface eth0 inet dhcp

x Wireless network configuration can be done using


USB Wi-Fi adapters, which are compatible with the
Raspberry Pi. There is a list of USB Wi-Fi adapters
supported by default by the Raspberry Pi.
C. Usage of Arduino Fig. 1. Arduino and Raspberry Pi Interfacing

The Raspberry Pi computer is a digital only computer IV. SERIAL COMMUNICATION


which does not read analog inputs. Most of the measurement Serial communication means only one bit of information
factors from the environment measured using sensors give is sent a time while in parallel communication many bits are
analog value and it is extremely important to read these analog transferred at a time. Serial communication protocol RS-232 is
signals so as to process or store that in a computer. Arduino the widely used and well known means of communicating
has 10-bit ADC on board, with resolution of 0.0049V for serial data from one device to the other. The computers mostly
voltage and in most scenarios this resolution is quite good. do not have means of serial communication hence this
Arduino boards have the serial port/USB for serial protocol is used for serial communication. Also there are serial
communication. Hence for reading analog input Arduino is the
2015 Online International Confernece on Green Engineering and Technologies (IC-GET 2015)
2015 Online International Conference on Green Engineering and Technologies (IC-GET)
USB ports in the computers that use a USB-to-serial driver to
send and receive serial communication over USB. This is how
the Arduino communicates with a computer and other devices.
The Arduino serial port or UART (universal asynchronous
receiver transmitter) is on digital pins 0 (RX) and 1 (TX) in
which RX is used to receive the data and TX is used to send
the data. They have corresponding LEDs labeled RX and TX
that blink when data passes and this is noticeable when a new
sketch is loaded onto the board.
To send data over the serial port on the Arduino, the
Serial object is used to start the serial communication at a
particular baud which is the rate at which the data is
transferred and 9600 is usually the baud rate used unless
otherwise any other required rate is specified.Once the Serial
object has started, then the println and print methods are used
to print information to the serial port.
A. Serial Transmission
The sketch which is used in the Arduino side has
used the port A3 which is an analog pin in which the Fig. 3. Transmitted values displayed in Raspberry Pi terminal
potentiometer is connected which is setup as the input pin. 1 is
the TX pin in Arduino which is configured as the output pin. B. Plotting the values
Analog values which are converted by the function The data from the sensor which is discretized using
“analogRead” into digital in Arduino are placed in the TX pin the Arduino has to be read in Raspberry Pi for which, python
and the same is transmitted to the Raspberry Pi. program can be used. In order to execute the python script
Now the values which are received at the RX pin of through terminal, first it is necessary to navigate to the path
Raspberry through serial communication are to be read from where the python code has been saved and then execute the
the port using python programming. First step is to install py- python script which will write the step values into a dat file.
Serial package which enables the Pi to read serial data. Using the python script these step values obtained can be
sudo apt-get install python-serial written in a dat file and a PNG file showing the plot of the
Here initially the python serial library is called. The sensor values can be obtained.
device in the port ttyAMA0 which is the serial port whose data
is taken and stored in a variable called “ser”. Then the
connection is opened. When the entire process is over, the
connection is closed using,
ser.close()

Fig. 4. Plot from the real time values

V. OWNCLOUD IN RASPBERRYPI
The Raspberry Pi’s low power consumption makes it
well suited to the role of always-on server. Owncloud is a
open source software package that provides remote file
sharing services over the internet and it is similar to Dropbox.
With Owncloud, ownership is retained and since it is installed
Fig. 2. Serial monitor display in Arduino IDE after interfacing with on a Linux platform complete permission for access is given
Raspberry Pi
2015 Online International Confernece on Green Engineering and Technologies (IC-GET 2015)
2015 Online International Conference on Green Engineering and Technologies (IC-GET)
only to the root user. Security and control of the shared data is References
also ensured.
[1] Joonsang Baek, Quang Hieu Vu, Joseph K. Liu, Xinyi Huang, and Yang
A. Owncloud set-up Xiang, (2015) “A Secure Cloud Computing Based Framework for Big
Data Information Management of Smart Grid”, IEEE TRANSACTIONS
Using Owncloud, data can be shared between ON CLOUD COMPUTING, VOL. 3, NO. 2.
devices. Files can be uploaded onto the server and can be [2] Fung Po Tso, David R. White, Simon Jouet, Jeremy Singer, Dimitrios P.
retrieved from it. Owncloud can also be used to share files Pezaros, (2013) ” The Glasgow Raspberry Pi Cloud:A Scale Model for
across the Internet which is one of its best features. Sharing Cloud Computing Infrastructures”, IEEE 33rd International Conference
on Distributed Computing Systems Workshops
the files across the Internet that is, accessing Owncloud on the
[3] Sanjana Prasad, P.Mahalakshmi, A.John Clement Sunder,
Pi from a remote location requires that the Pi should be R.Swathi4(2014),” Smart Surveillance Monitoring System Using
configured with the internet settings. Raspberry PI and PIR Sensor”, (IJCSIT) International Journal of
Computer Science and InformationTechnologies, Vol. 5 (6)
[4] Rashmi , Dr.G.Sahoo, Dr.S.Mehfuz(2013), “Securing Software as a
Service Model of Cloud Computing: Issues and Solutions”, International
Journal on Cloud Computing: Services and Architecture (IJCCSA)
,Vol.3, No.4
[5] Sue-Chen Hsueh, Jing-Yan Lin, and Ming-Yen Lin(2011), “secure cloud
storage for convenient data archive of smart phones”, 2011 IEEE 15th
International Symposium on ConsumerElectronics
[6] Dhaval Chheda, Divyesh Darde, Shraddha Chitalia(2013)” Smart
Projectors using Remote Controlled Raspberry Pi”, International
Journal of Computer Applications (0975 – 8887) Volume 82 – No 16,
November 2013
[7] Michal Kochlan, IEEE Student Member, Michal Hodon, Lukas
Cechovic,(2014) “WSN for Traffic Monitoring using Raspberry Pi
Board”, Proceedings of the 2014 Federated Conference on Computer
Science and Information Systems pp. 1023–1026
[8] https://www.raspberrypi.org
[9] https://learn.adafruit.com/category/raspberry-pi
[10] https://www.societyofrobots.com/electronics_led_tutorials.html
[11] https://pypi.python.org/pypi/RPi.GPIO
Fig. 5. Owncloud admin login [12] http://www.learnpython.org
[13] Rpi Basics.pdf
B. Viewing Files in the cloud [14] BME DSP textbook.pdf
Using python program, a plot was plotted with the serial [15] Python in the cloud.pdf
data obtained in the serial port. The plot was saved in .png [16] Creating a Raspberry Pi based cluster.pdf
format and the same was moved into the cloud. [17] element14, quick start guide for the Raspberry Pi single board
computer.pdf

Fig. 6. Viewing files in owncloud

Вам также может понравиться