Embedded Web Server for Water Level Monitoring (Part-II)

This post is continuance of the first section, which this time will be more focused review on the software and implementation of the whole system.


TCP/IP Stack

This embedded web server device uses the TCP/IP stack that is created by Pascal Stang, and then I modify that tailored to the needs of the system. This TCP/IP stack module make programming easier because there are already much programming functions for networking.

Programming languages
Development of Embedded web server uses two programming languages​​, let’s say C language for ultrasonic sensor communication and writing TCP/IP stack, and Javascript for displaying web page. The usage of the C language for programming the microcontroller due to more flexible of its use, as well as the library for microcontrollers are widely available. In this project the author uses avr-libc library that supports the AVR microcontroller series. While the use of Javascript in this case because it is easier to plot a graph on the web page of water level measurements.

Free and Open Source Software (FOSS)
The entire project using Free and Open Source Software (FOSS), including the Operating System that uses GNU/Linux Ubuntu, EAGLE for PCB design, avr-libc for the library of C programming language, GNU binutils and avr-gcc as a compiler, gEdit as an editor in programming, and avrdude as a tool to download the *. hex file into the microcontroller.

Network Configuration
These experiments are still within the scope of the LAN, using two personal computers and one notebook that acts as a client, as well as 4-port wireless router that acts as a hub / switch. Embedded web server already gives a chance to have an IP address The figure below is a diagram of its network configuration:

Network Configuration

Sensor placement
Ultrasonic sensors are placed as high as 25 cm from the bottom of the plastic water container. Paralax Ping ultrasonic sensor works by emitting a 40 KHz ultrasonic waves toward the object, after crashing the object then the wave will be reflected back toward the sensor then received by the receiver. The length of time taken by this wave will be calculated by the microcontroller as the value of water level.

Testing Result
– Ping command
This test method serves to determine that the device is detected in the network. Notebook client send the ping command to embedded web server device that have an IP address

Ping Reply

– Webpage
This test method will displaying measurement data via web page, which contains front page, graphic data, and text data. I am using Google Chrome web browser to displaying the measurement web page, just typing IP address of embedded web server device on the address bar, that is

Front Page

The front page looks very simple, showing the web title  and current water level value.

Graphic Data

As figure shown above, graphic page displaying the history of measurement value for water level.  Including displays time, date and minute of the measurement.

Text Data

Text data will show us the historical data of water level maeasurement. The same as graphic data, it is including date, month, year, and also time when the measurements were taken.

This simple Embedded Web Server device based on AVR ATMega168 can be used for telemetry system, which can minimize hardware usage and conserve electrical power. In addition to reducing global warming due to low resource usage.


I'm not a geek, nor a techie

Posted in Embedded Systems
2 comments on “Embedded Web Server for Water Level Monitoring (Part-II)
  1. Mukesh says:

    Nice Post. I want to use this project as a college project.
    So, Please give me full documentation including source codes. please

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: