Since a web-based laboratory has so many benefits over the traditional laboratory experiment. Different web-based laboratories have already been developed by universities over the world.
In general, a web-based laboratory allows users to conduct the experiment by connecting to the server through the internet, which the server is controlling the real experiment in the laboratory.
In Figure 1 below illustrates the block diagram of a general web-based laboratory. Users are students who conduct the experiment. They are connected to the server through the internet. The server hosts the web page of the experiment with a GUI (Graphical User Interface) that allows users to control the experiment. The physical experiment in the laboratory is connected to the server depending on the server’s interfacing hardware’s capability. The video camera connected to the server enables users to observe the real time experiment in the laboratory while operating them.
Figure 1: General web-based laboratory
Project objectives
The aim of this project is to develop a web-based control laboratory to serve undergraduate students in the Department of Electrical and Computer Systems Engineering at The University of Auckland. The developed web-based control laboratory should meet the following requirements:
- During the web-based laboratory experiment, the physical instruments inside the laboratory should not need any personnel’s operation.
- The experiment should be able to conduct using any web browser.
- Students should be able to gain unlimited access to the experiment at any time.
- Students should be able to gain full control to the real experiment instruments.
- Students should be able to observe the real time experiment as it operates.
- Inside the web page, it should contain a detailed list of instructions of how to operate the experiment.
- User friendly with extensive GUI.
- To be able to output correct results in the GUI.
- The web-based laboratory has to be reliable.
Proposed web-based laboratory
The proposed solution of the web-based control laboratory is similar to the other general developed web-based laboratory; except for the control hardware we will be using the Altera DE2 Development and Education board. Figure 2 below shows the block diagram of the proposed solution and the details of each component will be explained in the following subsections.
Figure 2: Proposed design of the web-based control laboratory
Client and server
To implement a web-based control laboratory, the most important element is to establish a communication between the user (client) and the host (server). To achieve this task, socket programming for computer network is essential. Socket programming involves designs of computer programs that can communicate with other programs across a computer network [2].
There are two types of network socket, TCP/IP (Transmission Control Protocol/Internet Protocol) and UDP (User Datagram Protocol).
TCP/IP uses acknowledgement format which ensure all data transmissions from a program on one computer to another program on another computer over the network are reliable and in ordered delivery [3].
UDP does not use acknowledgement format where it focus on speed than reliability, therefore it is unable to provide guarantee of delivery for data transmissions [3].
To operate a web-based control laboratory, it is more critical to have reliable data transmission rather than speed, hence TCP/IP has been chosen for the method of socket programming. Figure 3 below illustrates how a client sends data to the server using the TCP/IP acknowledgement format.
Figure 3: TCP/IP acknowledgement format
The TCP/IP socket application has been implemented using the computer programming language C++ with Windows Socket API (Application Programming Interface) specifications that includes a library with inbuilt definitions and functions.
Server
A server is the host which hosts the web-based control laboratory, in our case is the University of Auckland web server.
The server first creates a socket using the socket() function. After a socket is being created, the server binds the socket to an IP (Internet Protocol) address along with the specified port number using the bind() function. The server then listens for any connection attempts on the socket using the listen() function. When there is a connection attempt from any particular client, the server will accept the connection using the accept() and hence established a TCP/IP socket connection [4].
Client
Basically, a client is the user who conducts the web-based control laboratory. Similar to the server side, the client first requires to create a socket using the socket() function. The client then establish a connection to the server by the connect() function along with the server’s IP address and the port number.
Now that a connection has been established, both client and server can start sending and receiving data within this connection.
Web page
The web-based control laboratory will be conduct inside a web page host by the University of Auckland web server. The web page will develop mainly using the web page language HTML (Hyper Text Markup Language) in Microsoft Visual Studio 2010.
Within the web page, it will contain a GUI that allows user’s input, displays the result and graph plots from the physical experiment. For student’s observation purposes, it will also display the real time experiment inside the laboratory from a live video camera. A similar web page with extensive GUI will be created as in Figure 4.
Figure 4: The GUI that displays the real time experiment with control panel and results [5].
Control hardware
To control the physical experiment in the laboratory, it is essential that the control hardware is capable to read an analog input from the experiment and convert it into a digital signal. From the converted digital signal, we can design different computer algorithms to gain full control to the experiment.
To perform this task, the Altera DE2 Development and Education board (Figure 5) has been chosen as the control hardware. The Altera DE2 board comes with the Cyclone II EP2C35F672C6 FPGA (Field-programmable Gate Array) which is programmable to different hardware and software designs. Depending on specify tasks, hardware and software designs are programmed using the Quartus II and Nios II IDE software packages. The Altera DE2 board also has an analog to digital converter and various I/O (Input/Output) interfaces which are capable for connecting the physical experiment.
Figure 5: Altera DE2 Development and Education board
When the user wants to control the physical experiment, it will process through the following sequences:
- User sends a control command in the web page host by the server through the internet.
- The server receives the command and sends it to the DE2 board through its local network.
- DE2 board receives the command and executes the control to the physical experiment.
Video Camera
A video camera will be mounted in the laboratory connecting to the server. This allows students to observe the physical experiment in real time as they operate them. Depending on project’s time constraint, the video camera may include functions which are able to zoom in, zoom out, pan and tilt. The students can operate these functions in the web page’s GUI while conducting the experiment.
Results and discussions
At the current development stage, a TCP/IP socket connection has been successfully established between PC to PC through the computer network. This enables sending and receiving data between the client and the server. Also, the TCP/IP client application has been implemented in GUI using Microsoft Visual Studio 2010. The GUI is able to read the user’s input as an integer and sends it to the server for a simple mathematics functions. The server then sends the result back to the client and outputs the result as a graph inside the GUI.
Future Work
In the coming weeks, there are two major components remaining for the project. First is being able to control the physical experiment in the laboratory using the DE2 board and the second would be developing the web page with extensive GUI. To implement the project efficiently and on time, the following tasks will be divided equally between partners:
- Establish a bi-directional communication between a PC and the DE2 board using the RS-232 serial interface. This will enable sending and receiving data between a PC and the DE2 board.
- Investigation on how to setup the serial to Ethernet adapter as this will enable send and receive data over the computer network.
- Design the algorithms in computer programming language to control the physical experiment.
- Development of the webpage for conducting the experiment with extensive GUI.
- Investigate how to connect a video camera to the server for live video observation of the real time experiment.
- Test the prototype web-based laboratory over the internet in different locations to ensure the system will operate properly.
- Depending on time constraint, investigations on how to connect the DE2 board to the computer network using the Ethernet interface rather the serial interface. This can eliminate the use of extra hardware (the adapter).
Conclusions
The main objective of this project is to develop a web-based control laboratory.
Although at the current stage, we have only successfully established a TCP/IP connection between a PC to PC. However, a conceptual design plan for the web-based laboratory has been proposed. It is believed that with more research and investigations, a fully functional web-based laboratory will be developed and therefore benefits to the undergraduate student in the Department of Electrical and Computer Systems Engineering at the University of Auckland.
Acknowledgements
I would like to thank my supervisor Assoc. Prof. Sing-Kiong Nguang, second examiner Dr. Nitish Patel and Master student Mr. Yu Sun for providing the support and guidelines throughout the project.
I would also like to thank my project partner Mr. Rashid Hossain for all the work that he has been contributed throughout the project so far.
References
- Mott, R. L., Neff, G. P., Stratton, M. J., and Summers, D. C. S. “Future directions for mechanical manufacturing, and industrial engineering technology programs”, Journal of Engineering Technology., 19(1), pp: 8-15, 2002.
-
Wikipedia. Computer network programming. Retrieved April 1, 2011 from
http://en.wikipedia.org/wiki/Socket_programming
-
Wikipedia. Transmission Control Protocol. Retrieved April 1, 2011 from
http://en.wikipedia.org/wiki/Transmission_Control_Protocol
-
Sockets Tutorial. LinuxHowtos.org. Retrieved April 5, 2011 from
http://www.linuxhowtos.org/C_C++/socket.htm
- Azad, A. K. M., Song, X., Suram, R. S. P., and Nadakuditi., P. “Web-Based Laboratory Experiments: Case Studies”, Department of Technology, Northen Illionios University, 2006.