Integration of a Remote Lab with a Learning System for training on Microcontroller programming

In this paper, there will be presented the design and implementation of the Remote Laboratory (RL) of the Hellenic Mediterranean University (HMU). It will be also presented the hardware which is used and the software running on the RL. Additionally, the paper will present the technologies of the RL used for interconnection with learning platforms and learning analytics, according to the IEEE 1876-2019 standard. The IEEE 1876-2019 standard provides the framework for the design and implementation of RL with learning systems, but not how they can be used in a pedagogical way. So, in this presentation we will address the research question of how the RL can be used in a course of an LMS, which to the best of our knowledge is not presented in other relevant works.


INTRODUCTION
Remote Laboratories (RL) is a subject already described and researched in literature.The main problem as far it concerns the RL, according to [1] online laboratory systems do not follow a common pattern for their design, limiting their scalability, integration, interoperability, traceability, reliability, security, and privacy.For this reason, the standard IEEE 1876-2019 [2] was developed with the purpose of easing the design, implementation, and use of online laboratories for education.
The Hellenic Mediterranean University (HMU) has already participated in a project called "Remote Arduino Labs for Teaching Microcontrollers and Internet of Things", a two-year EU-funded Erasmus+ KA2 [3].Apart from this project, the HMU has also participated in another 2 years funded project called DICYSTECH related to Remote Laboratories.The project offers users remote access to three virtual laboratories in which learners can view and experiment with high-end enabling IT technology and cybersecurity measures in simulated industrial contexts [4].
With the expertise acquired in the domain of RL, the HMU RL evolved into a newer version, using standards, and adding extensions in the design and implementation.The new HMU RL works in dual mode.The first mode is working as a standalone platform, where the user can log in and run predefined activities.The Professor/Teacher can monitor the learning path of every user using the xAPI statements also known as Tin Can API [5].The xAPI statements are stored in a Learning Record Storage (LRS) and the Professor/Teacher consults the user learning analytics.Learning analytics provide the possibility to make decisions on the learning path of each user.The LRS is installed on a different server from the RL and in this way, it is provided a distributed distance learning system.
Secondly, the need to provide the Students of the HMU with a complete course, with learning material, communication tools like forums, chats, virtual rooms [6], and Remote Lab activities, it emerged the need to include the RL in a Learning Management System (LMS), like MOODLE [7].The appropriate way was to use LTI standard [6], [8], in order to use activities of the Remote Arduino Labs as external tools in the course.In this way, when a student completes an activity of a course, he gets the grade for each activity and then, new more complex activities are activated in the course to follow and complete the learning path of the course.
The research question addressed in this paper, apart from the presentation of the RL, is to provide an implementation paradigm on using the RL as an external tool for a Learning Management System (LMS).For this purpose, a lesson was created on the projects' LMS.The objective of the lesson is to teach the use of the RL [9].
The remaining of the paper is organized as follows: Section 2 discusses systematic works on RLs, Section 3 presents the design of the HMU RL, Section 4 illustrates the detail behind our RL Software implementation, Section 5 presents the RL's working rationale and Section 6 demonstrates a course in Moodle LMS.Finally, the paper concludes with a discussion of our future plans for the RL.

WORKS ON REMOTE LABORATORIES
The literature review revealed that there are a large number of consortia around the world working on remote laboratories around the globe.Some of them are: • Online Learning Consortium (OLC) [10], • Global Online Laboratory Consortium (GOLC) [11] and the International Association of Online Engineering (IAOE) [12], • European Consortium of Remote Didactic Laboratories (ECoReDL): the ECoReDL is a consortium of European universities and research centers that develop and operate distance laboratories.Its goal is to improve the quality and accessibility of distance laboratories in Europe [13].• North American Network of Science Labs Online (NANSLO): NANSLO is a consortium of North American universities and colleges that offer distance laboratories to their students.It provides a platform for sharing resources and best practices [14].
Some consortia relate to specific projects such as the following: • iLab Shared Architecture Consortium (iSAC): It provides a platform for universities to collaborate on the creation and use of online labs.

DESIGN OF THE HMU REMOTE LABORATORY 3.1 Hardware and software organization
The HMU RL is a square box like you see in Figures 1 and 2, with dimensions 50cm x 40cm x 45cm which is closed on every surface, to avoid outside light entering and protect from the dust.To have access inside the box, one surface acts as a door and the inside of the box is accessed.For some scenarios it needs to be black in the environment and external light must be avoided.
In Figure 1, we can see the inside of the remote lab, which is divided into two chambers.The top chamber consists of electronic equipment and the bottom chamber contains an electrical panel for an AC 220V power supply, and a pc power supply in order to supply DC power 3.3V, 5V, and 12V.There is also a place to accommodate an access point in case there is no WiFi where the Remote Lab is hosted.In Figure 2 we can see the input of the RL with a network cable and mains power supply cable, which is the only external connection that is required to fully operate.The fact that the RL is a box gives the option, to stack many RLs on top of each other and on the sides like the MICRO in the paper [19].Most of the hardware is included in enclosures, which protect the hardware from dust and help the placement of the H/W in the box hosting the RL.
One of the factors that was taken into consideration in the design and the implementation of the RL was the low cost of the equipment, the same is suggested in the paper [20].It is desired the RL have low cost, in order for, different institutions (universities or schools), to create many RLs, which can do different scenarios and create a network of shared RL between institutions like it is suggested in the paper [8].
The RL consists of a Raspberry Pi 3 Model B+ connected to an Arduino UNO via a USB cable.Depending on different labs and scenarios, the Microcontrollers may belong to the Arduino Ecosystem like Arduino UNO, esp1, esp12, esp32, etc.The RPI 3 hosts the Flask Application web Server.The user is authenticated from the web Application and logs in the RL Application.The authenticated user gets access to the camera Figure 10 and the interaction interface.The camera module is connected to a Raspberry Pi Zero, in this way, the RPI 3 keeps more resources for the Application, and the architecture provides the option to add more cameras from different angles of the RL.The camera module has Infrared LEDs to provide a view even in darkness.In the next section, we will elaborate on the methods and tools of video monitoring for the RL [21].
To upload the sketch from the RPI to the Arduino, the Arduino CLI library [22] is used.The Arduino CLI (Command Line Interface) is a text-based tool that allows users to interact with Arduino boards and projects through a command-line interface.It provides a streamlined way to compile, upload, and manage Arduino sketches and libraries.
The interaction interface is implemented using a Node-Red server running on the RPI.The application sends calls to a TCP Node in Node-Red [23] and it activates relays connected to the RPI digital ports which are connected to an 8 Channel 5V Relay Module High and Low-Level Trigger for Arduino.There are also other projects that have used Node-Red in RL, for different reasons.In the case of [24], because it incorporates a dashboard that directly implements the web interface that is needed for the practices, but they don't cover security issues, or in paper [25] security is applied via the Administrators' account who is monitoring the process.Also, in the paper [26], they use the Node-Red dashboard, but the users' dashboard communicates via the MQTT server with the Administrators' Node-Red dashboard and the administrator allows the implementation of the Remote Experiment, which means that the RL must be attended.
In our case, the web application, which manages user authentication, transmits transparently the commands sent by the user via a Node-Red TCP Node.In this way, security is implemented, and no one must attend the RL.The RL is powered by a Desktop Chassis Power Supply connected to an ATX Terminal Module (XH-M229).In the current implementation, we use 5V and 12V DC power supplies.In future versions, we might use also the 3.3V option.

Remote lab video & sound monitoring
According to the [21], which has conducted research on what are the best practices for video monitoring for remote labs, high-quality video monitoring enhances the effect of user's presence at the site of the experiment.In our case we use two RPI Zero, one has a camera with infrared lights and the other RPI Zero has a simple camera.We use this implementation for the following reasons, firstly the low cost of the RPI Zero with the cameras, which allows us to add more cameras in RL for capturing different perspectives of the RL, or some parts that are in different places of the RL.Secondly, the fact that the RPI Zero has a WiFi connection makes the connection with the application much easier.
Another factor that is essential is sound monitoring, we need to hear what happens in the RL, for this reason, we have added a USB microphone, in order to capture the sound via the RPI Zero, and this way the user has the ability to capture the sound of the RL, which is transferred with the video via HTTP to the user's interface.
In order, to achieve a better quality in the video and the sound delivery, we are working on using Big Blue Button (BBB), Jitsi conference room implementations and also the use of an IP camera, which also provides the functionality of moving up, down, left and right.

REMOTE LABORATORY SOFTWARE IMPLEMENTATION
The RL is designed for working in dual mode.In this section, we will describe what the user can do in each mode.The first mode, from here on will be called "Free LMS Mode" and the second mode will be called "LMS External tool".In the workflow in Figure 3 we can see the actions that the user can do when working in LMS Free mode of the RL.Firstly, the user logs in to the RL.If the user is a new user he must sign in and create the user profile, providing username, password, and email, optional s(he) can provide a profile Figure.
After the user is logged in successfully (authenticated) he can wander around the Lab, monitor, and interact with the working RL.The user can see the available Activities for his profile and can activate any available activity.The activities are provided with the schematic of the exercise and a detailed description of the activity followed by the purpose and the activity learning scope, the activity designer may include other learning material, like video links or documents for downloading.After the user activates the activity s(he) can store the sketch that he has already created in the Arduino IDE environment [27].A sketch stored in the user profile can be compiled and uploaded on the Arduino Microcontroller in the RL.The user can monitor the results of the code that has been uploaded to the Microcontroller.In sequence, he can interact with RLs Sensors and see the results of the code.Each action that the user is performing is logged locally by the application.The user can consult the activity status and see that s(he) is following the correct micro-activities.Micro-activity, is any action that the user is performing on the Remote Arduino Lab.An activity consists of a sequence of micro-activities.One activity is considered completed and passed when the user has performed correctly the micro activities recorded specifically in each activity.In case the feedback s(he) gets from the activity status is not correct, he can alter the sketch, reset his micro activities sequence, and follow the instructions until s(he) gets the required results.Then s(he) submits the activity and gets the activity final mark.The final mark and the passed status are also sent to the LRS via xAPI statement.

RL as an LMS External tool
In the second mode of the RL see the workflow in Figure 4 , as an LMS External Tool, the user logins to RL via the LMS, in our case we have implemented this scenario with Moodle 4.1 LMS [28].The user logs in to the LMS with his account.The users are already enrolled in a course.The course, apart from the learning material, has also activities that must be completed in the RL.When the user chooses the activity, via LTI 1.3 [29], logs in to the RL automatically.If it is the first time that the user is logged in the RL, the user's profile is created in the USERS table of the RL Application, this way the user can also access the RL directly in LMS Free mode.
When the user logs in via the LMS to the RL the Activity he needs practice is already activated.The activity ID is passed from the LMS as a parameter of the external tool.The user has to accomplish the activity as it is described in the course description.The user has to work and test the specific activity and finally submit the activity to get a final mark.The final mark and the status of the activity are sent back to the LMS Gradebook.After successful submission, the user is logged out from the RL.The sequence of the user learning path is in the hands of the course designer in the LMS platform.

Remote Laboratory User Groups and Roles
The user group and role are vital for the RL Application's operation.There are two user groups: Admin and Student.Admins have access to RL at any time and can perform maintenance tasks, configurations, and add activities.Users self-register and automatically join the Student group.Only an admin can change a user's group.
User roles include "owner," "moodleowner," and "spectator.""Owner" has full RL control, while "moodleowner" logs in via LMS and can't activate activities."Spectators" can monitor RL and add sketches to their profiles."Spectators" can remain logged in indefinitely, but "owner" and "moodleowner" have limited time.A countdown timer activates for them, logging them out when it ends, freeing RL for others.

Remote Laboratory Booking System
The RL has integrated a booking system which can be activated or not, by the administrators.When the booking system is disabled, then the RL, allows the "owner" or "moodleowner" to stay logged in for a timeslot.The period of the timeslot is configured by the administrators of the RL and is defined in minutes.When the booking system is activated, the timeslots begin at the start of each hour of the day.The user books a timeslot and when s(he) logs in within the booked timeslot, then s(he) is granted "owner" or "moodleowner" role, otherwise "spectator" role.The user administers the bookings when s(he) is logged in the RL.Bookings can be viewed in a list, added or deleted.

Learning Tools Interoperability (LTI)
Learning Tools Interoperability is a standard created by the IMS Global Learning Consortium [30], which now is named 1EdTech.LTI 1.3 streamlines the process of integrating third-party tools into LMSs by setting standard protocols for initialization, security, data sharing, and additional services.Its use of up-to-date security measures and extensible architecture make it a robust choice for educational technology integration.
The Tool provider in our case is the RL and the Tool Consumer is the LMS, in our example, we implemented it using Moodle 4.1 which is compliant with LTI 1.3.During the process of registration, the Tool Consumer (LMS) registers the Tool Provider with its public key.For the launch process, LTI 1.3 uses OAth2.0 and OpenID for enhanced security.When a user initiates a launch request to use the Tool, the tool consumer generates an identity token.The identity token is a JSON Web Token (JWT), which is signed with the Tools consumer Private Key and it contains key information about the user and the context (userid, username, class ID, etc.).The signed JWT token is sent to the tool provider's OpenID Connect endpoint.Upon receiving the JWT, the tool provider validates it using the public key it got during the registration process.If the token is valid, it allows access to the tool or content.LTI 1.3 often works in combination with LTI Advantage extensions, which allow for additional services like assignment and grade services, names and roles provisioning, etc.The Deep Linking feature allows the tool provider to send back specific content links to be added within the LMS, offering more seamless integration between the tool and LMS.
The paper [18] is a case they have integrated the LTI in order to share RL within a LMS like we do in our RL.For the integration of the LTI in our RL we used the pylti1.3library created by [31].

Experience Api (xAPI) For Users' Learning Analytics
The Experience API (xAPI), formerly known as Tin Can API, is a specification for learning technology that allows for data collection about a wide range of experiences a person has (both online and offline).Developed by the Advanced Distributed Learning Initiative (ADL), xAPI provides a way to store, manage, and share data about learning experiences in a consistent format, and can be used to The xAPI statements can be generated by tools simulations, quizzes, serious games, or learning environments.Depending on the learning analytics required, the designer decides what kind of user activities need to be stored.The xAPI statements are stored in and retrieved from the Learning Record Store (LRS).In the webpage (https://garefalakis.eu/xAPI-Dashboard/examples/verbs2.html),you can view a graph of the statement stored in the LRS of the RL (Figure 5).
Additionally in the webpage (https://garefalakis.eu/xAPI/1.0/original_prototypes/StatementViewer/)you can see the xAPI statement viewer, which can show all statement stored in the LRS (Figure 6).The two webpages are made for demonstration purpose and will be developed in the near future, in the projects' site (https://iot.hmu.gr).

REMOTE LABORATORY WORKING RATIONALE
The main purpose of the RL is to teach students Microcontroller programming specifically in the sector of the Internet of Things (IoT).So, the concept of the RL is for the user to log in to the RL and store an Arduino Sketch in the user's profile.The suggested method to do this action is to write the sketch in the Arduino IDE, check for syntax errors, and consequently paste it in the sketch text area in the RL and save it.After the sketch is stored in the RL, the user can compile it and upload it to the microcontroller installed on the RL, using Arduino CLI.The user can monitor the components connected to the microcontroller and interact with the sensors of the RL.Every RL is an independent hardware system, it consists of an Arduino microcontroller which is already connected with various sensors and can be part of an IoT system.The users can program the microcontroller, as it is instructed in the exercise description.Part of the exercise is the interaction of the user with the RL.The user can activate some triggers or actuators and see the response of the microcontroller.The RL logs the actions of the user according to the activity instructions.When the user completes the required tasks, submits the activity which is graded by the RL, and the user's gradebook is updated.
For better understanding the function, let's describe some examples: suppose that the student has to monitor the presence of lights.There is already a light sensor on the RL.The user knows the connections and wiring of the RL and creates a sketch that when there is no light in the RL, a light must be turned on.In order to test the sketch, the user must be able to interact with the RL and turn off all the lights.The microcontroller via the light sensor understands that it is dark in the RL and reacts by turning on a lamp inside the RL.
Another example, more complex, is the activation of a hot water boiler.The user must create a sketch that subscribes to an MQTT server [32].When the microcontroller gets the message to activate the boiler, activates a relay and turns the hot water boiler on.If the microcontroller gets the message to deactivate the hot water deactivates the hot water boiler relay.The interaction of the user with the RL is to monitor that the hot water boiler is activated when the user sends the trigger command from a smartphone or a web interface [33].The user enters the course and sees the description and the objective of the course.In Figure 7 left window, it is shown the first section of the course, which explains to the user the procedure of logging in to the RL, via Moodle in area A. After the user reads the material in Area A then s(he) is requested to log in to the RL, in Area B, by clicking the hyperlink.After the authentication, using LTI, the user is finally logged in to the RL and sees the RLs' web interface in another browser window, like in Figure 7, the right window.
Being the user logged in the RL, performs the activity that is assigned to him/her and submits the activity by pressing the Figure with the sign "OK", the activity is evaluated by the RL, and the user is automatically logged out from the RL, and can continue reading the course material in the Moodle.
The Figure 8, presents another exercise where the user is asked to upload the code for blinking the RED LED, and the Figure 9, presents all the connections implemented on the Arduino Uno.
Finally the Figure 10 depicts what the user sees when the RLs' lights are OFF and in Figure 11 when the lights are ON.Also, in Figure 11, the arrow point the check box that activates the RLs' Lights.Secondary education teachers will use it for STEM training, and HMU users will have it as a resource in the Sensors Lab.AI-based code assessment is ongoing, with results to be published soon.

Figure 7 :
Figure 7: Moodle Course and RL interface

Figure 8 :
Figure 8: Exercise in the course for LEDs

Figure 9 :
Figure 9: Full schematic of the connections in the RL

Figure 11 :
Figure 11: RL with lights ON • WebLab-Deusto: This is an initiative of the University of Deusto in Spain that offers a collection of online laboratories for different scientific disciplines [15].• VISIR Federation: The VISIR (Virtual Instrument Systems in Reality) consortium focuses on remote laboratories for electrical and electronic engineering education.It provides access to real hardware experiments via the Internet [16].• The project PILAR (Platform for Interactive Learning AR) is a European project funded by the Erasmus+ program.It aims to create a federated platform of remotely accessible laboratories for engineering education [17].• REMLABNET is a free and open-source remote laboratory management system (RLMS) developed by the Technical University of Košice, Slovakia.It allows students and researchers to access and control laboratory equipment remotely, from anywhere in the world with an internet connection [18].