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.
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.
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.
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 192.168.2.25. The figure below is a diagram of its network configuration:
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.
– 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 192.168.2.25.
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 192.168.2.25.
The front page looks very simple, showing the web title and current water level value.
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 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.