Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
The origin of Web server comes from the requirement of a Client trying to access data
which is made through HTTP (Hypertext Transfer Protocol) so that the web server can
process, store and send the data on the request of client. Although the vital role of Web
servers is to provide data it can also in some instances accept data from clients. Traditional
methods make use of Unix and Linux workstations1 , typically requiring, large database
storage systems occupying large area and high setup cost2 .
The sole purpose of this paper is to overcome the area and cost constraints which can
be cut down and the system can be made more efficient. The Embedded web server provides
services with minimum computing resources. The embedded industry has hardly evolved in
past years. 8-bit microcontrollers are the bread and butter for the industry but slowly now
more and more devices are not only gaining popularity but these embedded systems is also
getting smart enough to be able to connect them to a network2.
The embedded web server should be relatively small in size and easily integration
with many devices and Raspberry pi is fit for that. Although they have limited hardware and
storage capa bilities, these hurdles hardly matter and it is still capable enough to perform vital
tasks with these limitations. Internet is starting to get into day to day life of everyone and has
become an integral part of our life. Users all over the world, is it home or industry want to
access their devices remotely using the internet technology.
The expectation that embedded web server carry with it is that it should be able to
replace the personal computers and give way to enhancements in all the parameters which
will boost the overall efficiency of the system. These parameters which provide an upper
hand over the traditional computers are listed in Table 1. The data which is available on the
embedded web server should be secured in the sense that any unidentified person should not
be allowed unless his authentication is verified. The information provided by the module is
collected and this data can be displayed on web pages3 .
These pages are basically located in the memory. Here the need of Raspberry pi over
microcontroller can be understood from the fact that whenever an IP address is entered by the
user on the address bar user intends to access the data collected by server. The embedded
server will provide dynamic data whenever requested by the client.
CHAPTER 2
SYSTEM DESIGN
The arm processor present in the Raspberry pi provides the platform for data
acquisition, the control unit and the embedded web server. Figure1 depicts the working of
embedded web server in a nutshell. The embedded web server is continuously monitoring the
temperature values from DS1820 temperature sensor and placing them on the server. This
task is accompanied by a control action on server side if the client also intends to do so. The
Raspberry pi has to continuously serve the asynchronous interrupts4 . The system is designed
such that any particular increase in temperature over a predefined threshold will turn the
control device off and this is accompanied by sending an e-mail and SMS to the user.
The embedded web pages are written and designed in HTML. These pages are
designed user friendly to avoid unnecessary complexities on client. The client on the other
side can access a remote device using embedded web server, all the client has to do is to login
to the page using a valid user name and password and within second he is able to access all
the data.
2.2.1 Raspberry Pi
Raspberry pi is a credit card sized computer developed in the UK. It is different from
that of the regular computers because it’s not only small in size but also has the ability to
integrate itself with electronic components which is of vital importance when designing an
embedded web server. It overpowers the traditional microcontrollers in the sense that it has
high capacity of RAM and a powerful processor which makes it an ideal choice for handling
embedded applications. The need to use Raspberry pi as an embedded web server can be
understood from the fact that to control a device, microcontroller is good pick but to do the
same remotely pi stands out due to its 512Mb capacity of RAM and to be able to provide a
clock frequency of 700 MHz. There are multiple ways of using Raspberry pi right from
controlling an LED to getting a basic understanding of operating system. It is the best way to
experiment with the board and get an idea of the working from inside. It has in-built
compilers for good number of languages and the best support is for the language python as pi
in Raspberry pi means python. This module is also best in the sense that the price to afford
this platform is low Like other computers Raspberry pi also needs an operating system and
the OS which it uses is Raspbian. Digital and analog output is provided by HDMI port. The
processor has some features which require special device drivers and that is not available in
its Linux Distribution.
The sensor used is DS1820 a Digital Thermometer which provides a 9–bit to 12-bit
temperature readings preferably controlled by user. The DS1820 can measure temperature
over the range of –55°C to +125°C in 0.5°C (Resolution) increments. Information is sent
from the DS1820 over a 1–Wire interface, so that only one wire needs to be connected to
GPIO pin which avoids unnecessary wirings.
SQLite is one of the public domain software packages that provide database
management system. SQLite has a unique ability of being lightweight when it is compared on
platforms like complexity, administrative overhead involved, and amount of resource usage.
SQLite’s small code size and conservative resource use makes it well suited for embedded
systems running limited operating systems.The Apache HTTP server software or a program
runs in the background on an operating system. It provides user with multi-tasking and
services to other applications that connect to it, such as client web browsers. The Apache
Web server provides a full range of Web server features, including CGI, SSL, and virtual
domains.
The software utility Cron is a time based job scheduler in UNIX like computer
operating systems. It is used to schedule jobs (commands or shell scripts) to run periodically
at fixed times, dates, or intervals. It has the capability to start the execution after recovering
from a power failure.
CHAPTER 3
METHODOLOGY
The system should be able to acquire data from remote areas, store and should be in a
position to reproduce the data whenever demanded by the client at the other end. DS1820 is
the sensor used for acquiring temperature. There is even a provision for controlling an
electronic component from the client end which is demonstrated by controlling an LED. The
methodology is such that there are temperature sensors and LED in the remote area which are
connected to the Raspberry pi module which acts as a Mini-computer in this case.
This will be continuously monitoring the sensors and storing it in the database using
SQL which is a light weight Database Management System. Since data is stored at a very
high frequency, lot of unnecessary data is stored continuously in the Memory leading to
filling up of memory space. To avoid this undesired event Cron Job is used which is basically
a job scheduler in UNIX like operating System. This helps in scheduling and updation of data
in database at a fixed time interval that can be decided by the user. So every five minutes (as
defined by user) the Cron job automatically executes the program and stores temperature
values in the database.
The client on the other end is able to access the data using a Login page where
authentication of his ID is checked using a Password if they do match client will not be
allowed to access the data. After acquiring the temperature sensor values they are compared
to that of threshold values and on the basis of comparison if they exceed the device is turned
off and vice-versa. This simultaneously is accompanied by a control action to another device
connected on the embedded web server which can be exercised by client. This is depicted in
Figure 2.
This paper focuses mainly on device controlling task which is the upper hand when
compared to the already existing systems wherein the communication takes place only in one
direction and to make this system more user friendly Bidirectional connectivty is provided.
Thus it provides user with multiple options of controlling a device from remote area which
plays a vital role when considering that switchingoff a device can avoid a catastrophic event.
The person at the client end can access the current as well as the previous data. To make the
data Comprehensible, it is displayed as a graph for the ease of the user as shown in Figure 3.
CHAPTER 4
EXPERIMENTAL RESULTS
Which can extended to many users depending on the size of the RAM system has.
Figure 6 shows the control switches designed at the client end so that the client can control
the device from a remote area.The control action can be, controlling a LED or a motor from
the client end.
CHAPTER 5
SYSTEM MERITS
The method of using single chip data acquisition has a limitation in processing
capability and also lags in producing reactive output. Conventional web servers demand large
amount of memories and area which lead also to an increase in cost. A comparison between
existing and the proposed system is shown in Table 1.
The problem of Size, cost and power consumption are overcome by using the
Raspberry Pi module as it does well in all the domains in which the conventional systems
fail. Using Raspberry Pi as web server we are not only able to receive data from server but
also able to control a device present in a remote area through proper authentication.
CONCLUSION
REFERENCES
1. Manivannan M, Kumaresan N. Embedded web server and gprs based advanced industrial
automation using linux rtos. Int J Eng Sci Tech. 2010; 2(11):6074–81.
2. Choi M-J, Ju H-T. An efficient embedded web server for web-based network element
management. Network Operations and Management Symposium, 2000. NOMS 2000. 2000
IEEE/ IFIP; 2000 Apr; Honolulu. p. 187–200.
3. Lin T, Zhao H, et al. An embedded web server for equipments. 7th International
Symposium on Parallel Architectures, Algorithms and Networks; 2004 May 10–12. p. 345–
50.
4. Raskovic D, Revuri V, Giessel D. Embedded web server for wireless sensor networks. 41st
Southeastern Symposium on System Theory; 2009 Mar; Tullahoma. p. 19–23.
6. Patinge S, Suryawanshi Y, Kakde S. Design of ARM based data acquisition and control
using GSM and TCP/IP Network. 2013 IEEE International Conference on Computational
Intelligence and Computing Research (ICCIC); 2013.
7. M Poongothai. ARM embedded web server based on DAC system. 2011 IEEE
International Conference on Process Automation, Control and Computing (PACC); 2011.