Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

Embedded Web Server using Raspberry Pi

CHAPTER-1

INTRODUCTION

Data acquisition systems with remote accessibility are in great demand in industry and
consumer applications. In some applications, human beings have been replaced by unmanned
devices that will acquire data and relay the data back to the base. There are data-acquisition
and control devices that will be a substitute for a supervisor in a multisite job operation.

A single person can interact and even monitor remote work from a single base station.
In some application, system uses General Packet Radio Services (GPRS) for communication
which makes it accessible from any place. A GPRS based portable low cost data-acquisition
system, which establishes a reliable bidirectional connection for data acquisition is detailed
in.
This system uses dummy server for static information, thus optimizing the transfer of
large data. The user can directly log in and interact with the embedded device in real time
without the need to maintain an additional server. The simplest design of data-acquisition
system based on Linux operating system is detailed in [2]. Linux operating system is popular
choice for many embedded real time applications and PC system. There are kinds of
embedded equipments as network nodes, besides PC. Embedded equipments have infiltrated
to the fields of traditional Ethernet.

If user has a permission to access web server, he can refer the correlative information.
It is a challenge that how to access action over IP. [5][9] Introduces solution for embedded
system access to internet through which we can remote access, monitor, maintain
conveniently. Various web servers and its comparison is detailed in [6]. Implementation of
TCP/IP on embedded web server using Raspberry Pi is discussed in [7]. Raspberry Pi
features a broadcom system on chip (SoC), which includes an ARM compatible Central
Processing Unit (CPU) and an On-chip Graphics Processing Unit (GPU, a video core IV).
CPU speed ranges from 700 MHz to 1.2 GHz for the Pi 3 and on board memory range from
256 MB to 1 GB RAM. Secure Digital (SD) cards are used to store the operating system and
program memory in either the SDHC or Micro SDHC sizes. Most boards have between one
and four USB slots, HDMI and composite video output, and a 3.5 mm phone jack for audio.
The Raspberry Pi may be operated with any generic USB Computer Keyboard and Mouse. It
Department of Electronics and Communication Page 1
Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

may also be used with USB storage, USB to MIDI converters, and virtually any other
device/component with USB capabilities. Other peripherals can be attached through the
various pins and connectors on the surface of the Raspberry Pi. In this system Raspberry Pi is
used as main hardware core.

This paper approaches a new system that contains inbuilt data acquisition and
control system (DACS) with online interaction for real time application. It makes the system
more reliable and avoids more complication. This system replaces various complex cables
which are used for data acquisition. Data acquisition systems with remote accessibility are in
great demand in industry and in consumer application.

Today live video streaming technologies are widely used. This technology can be use
to broadcast news, data, online video to connect friends and so on. Much interest has been
invested in taking advantage of live video streaming. Using this system user can monitor
online video streaming of the industry site remotely. Streaming is done by web cam. User can
change different angles of the web cam from any standard browser. This system consists of
two units.

First is master unit which can be placed in the main office of the industry. Second is
slave unit which can be placed in one of the unit of industry. We can place a number of slave
unit as there could be a number of units in the industry. In this paper real time Linux
Operating system is ported in ARM 11(Raspberry pi) processor with any kind of higher end
RTOS. Embedded web server application is developed and ported to the ARM 11 which is
acting as the web server. Web server software is built into Hardware. Almost all network
devices have embedded web servers, which provide a control panel for Configuring the
device. The primary advantage is that Hardware vendors only have to write one program
based on internet standards, and their control panel utility is accessible from any Web
browser on any hardware platform. An embedded web server is like Mini Website, except
that it is not on the Web. However some Web servers may be accessed remotely via the
internet.

PIC microcontroller 16F877A is used as a slave unit to which various sensors are
connected. This controller is very convenient to use. The coding or Programming of this
controller is also easier. Its Operating frequency is 0 to 20 MHz. Power supply voltage is 2 to
5.5V. And has Power-saving sleep mode with 8K ROM Memory in Flash Technology, so the
chip can be Reprogrammed upto 100 times. The cost of this controller is low and its handling
Department of Electronics and Communication Page 2
Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

is also easy. Its flexible and can be used in areas where Microcontrollers have never been
used before as in Coprocessor applications and timer functions etc.

User can monitor reading taken by slave unit and can take necessary action if
required from the remote place. This interactive internet based data acquisition and control
systems provide a way to monitor and adjust using standard web browser and PC. This
system is useful in industry where multiple units are present.

Department of Electronics and Communication Page 3


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

CHAPTER-2

HARDWARE DESIGN OF THE SYSTEM

16*2
LCD Display

Temperature
3 Relays
Sensor

Humidity PIC MAX 232


Sensor 16F877

LEVEL
Sensor
X-bee

Fig 2.1 Block diagram of slave unit

Fig.2.1 shows a block diagram of slave unit. PIC microcontroller is used as slave unit. Three
sensors temperature, humidity and level are connected to 8 channel ADC which is inbuilt in
the PIC microcontroller. Three relays are connected to the slave unit to take the necessary
action if required.

For temperature and moisture sensor set point values are there if the reading exceeds
above set point relay 1 and 2 will be on to control the reading. If oil level increases beyond
the set value relay 3 will be on to take certain action. Current readings of the sensors are
displayed on LCD display which is connected to the microcontroller.

Department of Electronics and Communication Page 4


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

EWS

INTERNET

Stepper Motor

X-bee MAX232
Raspberry PI

Webcam

Fig 2.2 Block diagram of Master unit

Fig.2.2 shows the block diagram of the master unit. Raspberry pi is used as the
master unit. The communication between slave unit and master unit is accomplished by zig-
bee module i.e. The Web cam is connected to the Raspberry pi using stepper motor. It is used
for online video streaming. Using any standard web browser user will be able to see sensors
reading, live video by accessing web page. User also can control various parameters using
web pages through embedded web server. Every client can access the industry directly
without any interaction with additional server and modules.

Department of Electronics and Communication Page 5


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

2.1 SPECIFICATION & WORKING OF EACH BLOCK


 PIC Microcontroller:

Fig 2.1.1 PIC 16F877A Microcontroller

The PIC 16F877A Microcontroller is used in slave unit. It includes 8kb of internal
flash Program Memory, together with a large RAM area and an internal EEPROM. An 8-
channel 10-bit A/D convertor is also included within the microcontroller, making it ideal for
real time systems and monitoring applications. All port connectors are brought out to
standard headers for easy connect and disconnect.

In-Circuit program download is also provided, enabling the board to be easily updated
with new code and modified as required, without the need to remove the microcontroller. All
the necessary support components are included, together with a Power and Programming
LED for easy status indication. Plus a reset switch for program execution and a RS232
connection for data transfer to and from a standard RS232 port, available on most computers.

The PIC 16F877A Controller is the ideal solution for use as a standard controller in
many applications. The small compact size combined with easy program updates and
modifications make it ideal for use in machinery and control systems, such as alarms, card
readers, real-time monitoring applications and much more.

Department of Electronics and Communication Page 6


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

 Sensors:

Fig 2.1.2 Temperature Sensor

Fig 2.1.3 Level Sensor

Fig 2.1.4 Moisture Sensor

Department of Electronics and Communication Page 7


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

LM35 temperature sensor is used to measure Temperature. The LM35 series are
precision integrated-circuit temperature sensors, whose output voltage is linearly proportional
to the Celsius (Centigrade) temperature. Also it generates higher output voltage than
thermocouples and may not require that the output voltage be Amplified.

Sy-HS-220 is used as moisture sensor. Moisture range of this sensor is 30-90%RH.


Level sensor operates on variable resistance principle. As the movement of float of the sensor
takes place its resistance varies accordingly. The change in resistance is in the range of 1
Ohm to 100 Ohms.

 Zig-bee:

Fig 2.1.5 Zig-Bee

Zig-Bee module receives the data serially in RS232 format from controller and sends
it to wireless network. Its low power consumption limits transmission distances to 10–100
meters line-of-sight, depending on power output and environmental characteristics.
Applications include wireless light switches, electrical meters with in-home-displays, traffic
management systems, and other consumer and industrial equipment that requires short-range
low-rate wireless data transfer. For interfacing it with microcontroller we need to build the
circuit because Zig-Bee module understands data in RS232 standard and controller
understands data in TTL format. RS-232 is a standard for serial communication transmission
of data. It formally defines the signals connecting between a DTE (data terminal equipment)
such as a computer terminal, and a DCE (data circuit-terminating equipment or data

Department of Electronics and Communication Page 8


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

communication equipment), such as a modem. The RS-232 standard is commonly used


in computer serial ports. The standard defines the electrical characteristics and timing of
signals, the meaning of signals, and the physical size and pin out of connectors. So we need
to design circuit to make these two compatible with each other. MAX 232 is the name of IC
which is used for 5v TTL to RS232 standard or RS232 standard to 5v TTL conversion.
The MAX232 is an integrated circuit converts signals from RS-232 serial port to signals
suitable for use in TTL-compatible digital logic circuits. The MAX232 is a dual transmitter /
dual receiver that typically is used to convert the RX, TX, CTS, RTS signals.

 Raspberry-pi:

Fig 2.1.6 Raspberry Pi

The Raspberry Pi is a credit-card sized computer that plugs into TV and a keyboard.
It also plays high-definition video. Remote video monitoring using internet is important
feature of raspberry pi. It uses an Secure Digital(SD) card for booting, to store operating
system and program memory. The Raspberry Pi may be operated with any Generic USB
Computer keyboard and mouse. It may be used with USB storage and virtually any other
device/Component with USB capabilities. Other peripherals can be attached to the various
pins and connectors on the surface of the Raspberry Pi. The Raspberry Pi has a Broadcom
BCM2835 System on a Chip, which includes an ARM1176JZF-S 700 MHz processor, Video
Core IV GPU, and was originally shipped with 256 megabytes of RAM, later upgraded to
512 MB.

Department of Electronics and Communication Page 9


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

CHAPTER-3
SOFTWARE DESIGN OF THE SYSTEM

LINUX TASKS

REAL TIME TASKS LINUX KERNEL

RT LINUX

HARDWARE

Fig 3 Real Time Linux run time model

 Real Time Linux:


Real Time Core can run a secondary operating system as a thread, using a small virtual
machine to keep the secondary system from disabling interrupts. Fig 3 shows Real Time
Linux run time model. This is a peculiar model: a UNIX process with a UNIX operating
system as a thread, but it provides a useful avenue to modularity.

Real Time Linux is a hard real time RTOS microkernel that runs the


entire Linux operating system as a fully Pre-emptive process. The hard real-time property
makes it possible to control robots, data acquisition systems, manufacturing plants, and other
time-sensitive instruments and machines from Real Time Linux applications. Real Time
Linux provides the capability of running special real-time tasks and interrupt handlers on the
same machine as standard Linux. These tasks and handlers execute when they need to

Department of Electronics and Communication Page 10


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

execute no matter what Linux is doing. Real Time Linux is Real Time Core with Linux as
the secondary kernel.

Real Time Core with BSD UNIX as the secondary kernel. Real-time applications run as
real time threads and signal handlers either within the address space of Real Time Core or
within the address spaces of processes belonging to the secondary kernel.

The Linux kernel is a monolithic kernel, supporting true preemptive multitasking,


virtual memory, shared libraries, demand loading, shared copy-on-write executables, memory
management, the Internet Protocol suite, and threading.

Real-time threads are scheduled by the Real Time Core scheduler without reference to the
process scheduler in the secondary operating system.

The secondary operating system is the idle thread for the real time system. The virtual
machine virtualizes the interrupt controller so the secondary kernel can preserve internal
synchronization without interfering with real-time processing. Performance is adequate to
allow standard PC and single board computers to replace DSPs in many applications.

 Implementation of Web Server:

Initialization of the web server, such as creating an environment variable, binding a


port, listening a port, entering the loop and waiting for a connection request from a client.
Web server software is built into Hardware. An embedded web server is like Mini Website,
except that it is not on the Web. Some Web servers may be accessed remotely via the
internet. When there is a connection request from a client, web server is responsible for
receiving requests and saving related information. After receiving the request, Boa analyses
the request and it process it accordingly.

Department of Electronics and Communication Page 11


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

CHAPTER-4
ADVANTAGES

Limited processing capacity and the problem of poor real time and reliability of DAS
System has been overcome by the substitution of embedded ARM Processor for single chip
method to realise interactive data acquisition and control (IDACS). This IDACS System can
able to measure signals and can control the remote devices through reliable protocols and
communication network. It makes the system more reliable and avoids more complication.
This system uses RTOS Multi-tasking operating system to measure and control the whole
process. And the Embedded web server mode requires less resource usage, high reliability,
security, Controllability and Portability.

Department of Electronics and Communication Page 12


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

CHAPTER-5
APPLICATIONS

 ARM based EWS for agriculture application


Here we used this embedded web server for data acquisition in agricultural field
monitoring. Data acquisition plays an important role in real time control and online
supervisions. Monitoring agricultural parameter remotely is most important criteria for
maximizing production. In various internet application based on client/server architecture, it
is better to use embedded web server other than PC server for decreasing volume, cost and
power consumption. This Embedded WEB server can be used in various application like
industrial, medical and agriculture.

 EWS based automation


Instead of PC based servers, ARM processor based servers are becoming trend of
today’s market. Cost reduction is achieved using ARM processor along with Ethernet module
as Embedded Web Server. Idea is utilized for monitoring and controlling maximum no. of
either home appliances or industry devices. Without using a computer, Ethernet module can
communicate to the owner of the overall system, who is able to manage appliances from any
location outside. Different sensors installed at working place help in sensing real time
environmental conditions like Temperature, humidity, lighting control, Irrigation, heating
&HVAC, Home theater, surveillance, motorized blinds etc.

 EWS for monitoring weather


A design of embedded web server based on Ethernet technology for remote
monitoring of weather parameters is presented. This web server monitors parameters viz.
temperature and humidity and transmits this information in the form of HTML web-page.
They used the input sensors LM35 semiconductor temperature sensor and SY-HS-220
humidity module have been employed, providing accuracy about 1 centigrade and 2.

Department of Electronics and Communication Page 13


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

 EWS for monitoring Home appliances


A development of a low-cost electronic prototype, which is design for monitoring and
controlling home appliances via web browser is given . At the same time, users can monitor
the security situation at home in real-time through different sensors installed at the home.
They used low cost WIZ220IO as the embedded web server for implementation of the
prototype remotely via internet.

 EWS for monitoring temperature and CO2 in industry


The system which consists of an ARM cortex processor LPC1768 with an integrated
Ethernet interface and the whole system can function as a web server .They used this system
to monitor the temperature and concentration of CO2 in the industry. For monitoring
temperature and gas concentration they used LM35 temperature sensor and CO2 gas sensor.
The web page shows three data. The first data is the temperature, second data is concentration
of CO2 gas and third data shows that the motor for fan control is on when the temperature has
rosen above a cut of value the fan becomes on to cool the remote industrial area.

Department of Electronics and Communication Page 14


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

CONCLUSION

With the rapid development of the field of industrial process control and the wide
range of applications of network, intelligence, digital distributed control System, it is
necessary to make a higher demand of the data accuracy and reliability of the control system.
This embedded ARM system can adapt to the strict requirements of the data acquisition and
control system such as the function, reliability, cost, size and remote access.

This system operated by data acquisition and control mode to acquire the signals and
control the devices remotely. Embedded web server mode is used to share the data with
clients in online. Both modes are efficiently carried out by real time multi tasking operating
system. This system can be widely applied to cotton, electric power, petroleum, chemical,
steel, and transportation, electronic electrical industries.

Department of Electronics and Communication Page 15


Godutai Engineering College for Women, Kalaburagi
Embedded Web Server using Raspberry Pi

REFERENCES
[1] P.Ferrari, A. Flammini, D. Marioli, E. Sisinni and A. Taroni, An Internet based interactive
embedded data aacquisition system for real time application, IEEE Transs. Instrument
measurement, vol. 54, no. 6, Dec.2005.

[2] Manivannan M, Kumaresan N, Design of on-line interactive data acquisition and control
System for Embedded real time application, Proc. IEEE International Conference on
Emerging Trends in Electrical and Computer Technology, pp. 551-556, 2011.

[3] Prof.S.S.Wagh, Pradeep V.Kalge, Remote monitoring and control of industrial parameters
Using Embedded web server and GSM, Indian Journal of applied research, vol. 3, pp. 214,
Jul. 2013.

[4] Dejan Raskovic, Venkatramana Revuri, David Giessel and Aleksandar Milenkovic,
Embedded web server for wireless sensor network, IEEE 41st Southeastern Symposium on
System Theory, pp.19- 23, Mar. 15-17,2009.

[5] Mo Guan, Minghai Gu, Design and Implementation of an Embedded Web server based on
ARM, IEEE International Conference on Computer Science Education, 2012, pp 479-482.

[6] Hong-Taek Ju, Mi-Joung Choi and James W. Hong, An efficient and lightweight
embedded Web server for Web-based network element management, International journal of
Network Mgmt, pp. 261-275, 2000.

[7] Bhuvaneswari.S, Sahaya Anselin Nisha.A, Implementation of Tcp/Ip on Embedded web


Server using Raspberry Pi in industrial application, IJARCCE, vol. 3, pp. 5240-5244, Mar.
2014.

Department of Electronics and Communication Page 16


Godutai Engineering College for Women, Kalaburagi

You might also like