… Development of Remote Instrumentation and Control for Laboratory Experiments using Handheld Devices

— The unprecedented growth in Internet technologies has created revolutionary changes in the use of collaborative learning tools with remote experimentation. These tools enhance the experiential learning aspects of engineering education. Laboratory experiments are integral part of science and engineering education. Automation is changing the nature of these laboratories, and the focus of the system designer is on the availability of various interfacing tools to access the laboratory hardware remotely with the integration of computer supported learning environment. Work on laboratory experiments and project works requires access to expensive hardware equipments. The high cost of these instruments along with time consuming development process of experimentation in the educational process creates a significant bottleneck. There is a need for the development of remote laboratory using which the users can access the laboratory instruments and the programmable devices remotely on their smart phones/tablets to perform the laboratory experiments. This implementation avails laboratory facility for complete twenty four hours a day and will increase the productivity of the laboratory hardware and measuring instruments. This paper presents the detailed architecture and the implementation details of remote laboratory by which user can perform laboratory experiments remotely. Develop mobile based remote laboratory where user can access remote laboratory on his smart phone or tablet to perform the experiments. Software application is developed on Android platform for the implementation.


Introduction
With the advent of wireless technology, mobile phones are being used for many other applications other than communication. Mobile applications are being developed for aiding students, teachers and universities in academics. Apps are developed for research application which consolidates the journals across the publishers and allows user to read as a single interface. The increased power and capabilities of the mobile operating systems and the smartphones, it is possible to access the desktop remotely from a smart phone or the tablet. This provides mobility to the user to access the laboratory server from anywhere within the network operating range. Software applications are developed to provide remote access to the desktops where user can get complete access of the remote computer from a mobile phone or a tablet.
Remote laboratory allows users to access the laboratory instruments including the programmable devices remotely to perform their laboratory experiments. The existing remote laboratories on Digital Signal Processor hardware uses either the server machine to control the test instruments using GPIB interface or control is established through the DAQ cards [1][2] [3]. This makes architecture more specific and cannot be reused for other laboratory implementations. This implementation avails laboratory facility for complete twenty four hours a day and will increase the productivity of the laboratory setups and measuring instruments. Remote instrumentation laboratory for DSP training uses client server methodology and connects multiple clients to the server using Virtual Instrument application [2]. Thin Client Server manages input and outputs between client and servers. Remote access tool [9] used for this type of laboratory implementation is selected based on real time access parameters like data speed, security protocol and ability to establish multiple user environment etc.
Proposed architecture is more generic and uses customized interface board to interface server machine with the test instruments and unit. By making minor modification on the interface card and adding test instruments, whole setup can be used for other laboratory implementations. This makes remote architecture more generic and capable of adopting new requirements with few minor modifications in the setup. It provides controlled server access to multiple clients using the mobile application developed using Android Studio.
Remote access facility is provided through the server machine using webserver has limitations on the usage of software and less control on the hardware [5] [6]. Proposed architecture uses remote access method which provide complete controlled access to the server machine where user can access all the softwares and data in the server machine. This tool also provides the log history which details out the client machine details with login and logout data. This paper describes the design and implementation details of development of Remote Instrumentation and Control for Laboratory Experiments using Smart Phone Application. Paper is organized as follows. Section II describes Remote Laboratory architecture. Section III details out the remote access tool used for the implementation with client server access methods. Section IV describes the LabVIEW user interface developed for the remote client access and control. Section V describes mobile application development to access laboratories remotely. Section VI provides a case study for setting up and programming a microcontroller board using the same test setup. Conclusions are drawn at section VII.

Generic Remote Laboratory Architecture
The generic remote laboratory is designed to provide remote access to test unit, test and measuring instruments and the required software at distant location. Detailed Interface architecture of remote laboratory is as shown in Figure 1. Remote clients are connected to the laboratory server via mobile application developed on the smart phone or the tablet. Microsoft remote desktop or Radmin tool is used for remote access implementation as it is best suited for real time applications. User interface is developed using LabVIEW on the server machine which communicates and controls the test/measuring instruments and interface hardware DSP kit and microcontroller kits. Customized hardware interface board is designed and developed which acts as interface between the Data Acquisition cards in server machine and the unit being tested.
Camera is connected to server machine which provide continuous video of the experimental set-up to the remote user logged onto server machine. Power and position of the camera is controlled by LabVIEW VI located on the server machine.

Remote Access Methods
Remote access technologies currently available have their own pros and cons. Selection of the tool is based on its end application. Available remote access tools and methodologies includes Team Viewer, Remote desktop access, Virtual network computing, Web server and Radmin. Each tool is investigated for its ability to meet the virtual laboratory implementation requirements. The tool selected should operate with maximum reliability and provide high security.
Based on the comparison and analysis, Radmin tool is one of the best tools available for Remote Laboratory applications. This supports simultaneous multiple user access and data transfer between the machines. It is suitable for real time applications [12].
Radmin server software is installed in the server machine and Radmin viewer on the client machine. Server and client software required is of lower cost. Client software can be installed in any number of systems. Multiple users can work and watch simultaneously on single server machine. This tool also provides the log history which details out the client machine with login and logout data.
Radmin server on the server machine is switched ON for remote access enable and admin can set access permissions for specific remote computers using server configuration window. On client machine, Radmin viewer application is triggered and the remote server machine is identified by its IP address. Server access user ID and password are entered into security window to get complete access of the server machine. This provides first level security for the remote access system.
For the remote access through the smart phones or the tablets, customized android application is developed using Android Studio. Microsoft remote desktop app is being called internally based on the remote laboratory application need. Using this app the connection can be established to the laboratory server PC to perform the lab experiments and to files and network resources.

Remote User Interface Using LabVIEW
User interface developed using LabVIEW can be used for remote accessing, data sharing and other desktop sharing operations between two remote computers. It supports most of the operating systems like Windows, Linux, Mac OS, Android, Windows RT, Windows Phone and BlackBerry systems. It is the freeware which can be used for non-commercial applications. It allows user to establish Virtual Private Network connection with partner. It facilitates data acquisition using DAQ cards to capture analog and digital data.
For remote laboratory implementation, user interface is developed using LabVIEW. This user interface developed is loaded on to the laboratory server machine to which the test kit and all the test/ measuring instruments are connected. Many VIs are developed and interlinked to each other to provide secure laboratory connectivity to the remote user. User login VI checks for the user credentials to provide access to the main operating window as shown in the Figure 2. It has additional tab for administrator login is provided. This allows administrator to add new users, change password and deletion of the existing users. Once the user login with valid user ID and password, the control is routed to main VI as shown in the Figure 3. This window provides access to all the hardware and softwares to conduct laboratory experiments with live visual images. The main user interface developed has customized buttons to control below mentioned features

Power supply control
Power input to DSP kit is controlled using the power button on the user interface. This sends command to the power relay on the interface board which switches the power input to the DSP kit.

Code composer Studio
This button will launch code composer studio software. User needs to select the workspace location from user interface and configure the code composer studio using target information. Target can be connected by selecting a proper connection and device type on the user menu. Code to be executed is written in new source file and further built, debugged and run on the target to perform the experiments.

Reset
As part of the code execution using code composer studio, a control to reset the DSP controller is provided which can be used while debugging the code. Remote reset on the hardware can be achieved by designing reset circuitry on the interface board. It is controlled remotely using the Reset button on the LabVIEW user interface. This button sends command to the Reset relay on the interface card.
Remote machine in the laboratory is loaded with the LabVIEW VI that is developed for this application. LabVIEW run time engine can be installed if we are installing only the executable file developed.

Interface Card
Data acquisition card required for the interface is placed on PXI chassis and connected to the server. This chassis allows user to add additional data acquisition cards based on the future requirements. All lines on DAQ cards are controlled using LabVIEW user interface. DAQ card is selected based on number and type of IO and control lines required for the interface. Interface card is customized to route the control and data signals from user interface to DSP kit and test instruments via relays.
Interface card block diagram is as shown in Figure 4.

Fig. 4. Interface Card Block Diagram
All lines form DAQ card is routed to interface card via 68 pin interface connector. Interface card comprises below mentioned blocks

Relay driver
Darlington transistor arrays in ULN2803A are used to drive power and reset relays. Digital output signals from DAQ card are routed to relay driver circuit. OUT1 and OUT2 signals from relay driver circuit is connected one of the coil on the relay. It provides the grounding path to the coil voltage when it is triggered. Digital signals at the input of relay driver circuit is controlled by the power supply and reset button on the user interface.

Power relay
This relay controls the power input for the DSP kit. User commands the power input using power supply button on the LabVIEW user interface. Digital output line DO1 on DAQ card is configured for the power button. Signal from the DAQ card is driven using relay driver circuit and is fed to the coil of power relay. Enabling the power button will provide grounding path for the relay circuit and relay will be switched to link 230VAC to the input of the DSP kit power adapter. Power input control relay circuitry developed on interface card is as shown in Figure 5.

Reset relay
User need to reset the DSP kit while flashing the code as part of the experiment. Reset button on LabVIEW user interface is provided to offer this functionality. This button will trigger the digital output line DO2 on DAQ card and further, the signal is driven from the DAQ card using relay driver circuit and is fed to the coil of the reset relay. Trigger on OUT2 line from relay driver will provide grounding path to the relay coil voltage and triggers relay which shorts the two reset lines on the DSP kit. Additional reset button is also provided on the interface card to perform hard reset. Reset control relay circuitry developed on the interface card is as shown in Figure 6.

Mobile App Development
Mobile app is developed using Android studio to provide access to remote laboratory. Code is developed to create new user account and store the data in the database. For secured login, network link established to connect the remote laboratory PC using smart phone or the tablet.
Below mentioned algorithm used to develop mobile application for remote access  With valid user id and password, user is routed to next window where it will provide access to remote laboratory. User will be directed to laboratory server machine through this window.
App lists out all the available laboratory server machines on the network. User can select the specific laboratory machine based on the experiment being conducted. With valid login credentials of the laboratory machine user can have complete access of the laboratory machine. User interface developed using LabVIEW is installed on the laboratory server machine. Remote client can use this user interface to get control of the laboratory test setup along with test instruments and can conduct the experiments remotely.
New user signup option is provided in application where user can enter his credentials and create new user account as shown in the figure 8 To prevent the unauthorized access a database is created for the authorized users with their names and email ids. While signing up user has to provide his name and the email id. The data provided will be verified in the database and new account will be created for only the authorized user. The application administrator will have the complete control of the database.

Remote Access Experimentation
To demonstrate the generic application of the remote laboratory test setup, a microcontroller board is programmed remotely using the same test setup and verified for the functionality. Microcontroller board is connected to the server and two reset lines from microcontroller board is connected to interface card as shown in figure 8. Remote app installed on the smart phone is used to login in to the laboratory machine. This is the customized app developed using Android studio to provide remote access to the laboratory server machine. Valid user credentials are entered in the App login window as shown in the figure 9. This provides the first level security to avoid unauthorized access to the remote lab server. New user can create his account using valid user data using "Sign Up Here" button. Client user is logged into server machine using mobile application. Server machine to be accessed is identified using its ip address. Server access user id and password is entered into security window to get complete access of the server machine.

DAQ
LabVIEW user interface is opened on the server machine to get access to the DSP board. Live visual images of the controller board is displayed as part of the user interface. Controller board is powered ON using the control on the user interface. Further, code composer studio application v6.1 is opened to start the programming. TI resource explorer of code composer studio is opened and workspace is selected on the popup window as shown in figure 10. Target is connected by selecting a proper connection and device type on the user menu. New project file is opened and code for blinking LED is written and further built, debugged and run on the target in the source code entry window as shown in the Figure 11. Program functionality is verified by observing the LED blinking on live image capture.

Conclusion
Design of virtual instrumentation of remote laboratory is presented with the detailed architecture. Laboratory experiments can be performed remotely by logging into the laboratory server machine using LabVIEW user interface. Power ON/OFF and Reset functions on test kit can be controlled remotely using DAQ cards and relays on interface board. This implementation facilitates the remote access of the DSP laboratory hardware and visualizes the real experiments on the user smartphone/tablets. This implementation avails laboratory facility for students all over the day for entire year. This will increase the productivity of the laboratory setups and measuring instruments. As the laboratory requirements changes with the change in the syllabus, the laboratory developed is capable of adopting new requirements with few minor modifications in the setup. Further this facility can be extended to perform other laboratory experiments and project related activities. This architecture is independent of the operating system being loaded on the remote laboratory machines as we are accessing the complete remote machine instead of specific application. Smartphone/tablet application is developed in Android platform which is most common IOS used in all the mobile phones and tablets. As this mobile application is customized as per the requirement, further this app can be integrated with collaborative learning features and multi user access facilities.