Remote Laboratory, Based on Raspberry Pi, to Facilitate Scientific Experimentation for Secondary School Students

ramon.zarate.moedano@gmail.com Abstract— The pandemic caused by COVID 19 forced education systems to offer their services remotely due to social distancing policies. This article discusses research results on the development of remote laboratory architectures to deliver scientific experimentation in the area of physics for secondary school stu dents using desktop computers or mobile devices. The design of the remote laboratory is based on the Raspberry Pi device, using various sensors and a graphical interface through which access and communication is given. The purpose of the development of this remote laboratory is to provide teachers and students of secondary education access to the development of remote activities for scientific experimentation in physics courses, using low-cost devices and free


Introduction
Throughout 2020, the pandemic caused by SARS-CoV-2 forced schools to close and replace face-to-face interaction with online education in a rush to slow down the spread of the virus. However, after more than a year, there is little consensus on how to ensure continuity of instruction while trying to avoid virus transmission.
Some suggest that closing schools may have little impact on the transmission of the virus, but, at the same time, reopening schools increases mobility and contact among the members of a community, which can lead to an increase in infections [1]. The same study claims that reducing contact among students by 33% daily keeps the rate of infections low.
Still, although strong evidence on the effectiveness of schools closure policies is yet unavailable [2], and with social distancing measures still in place in many regions of the world, the present circumstances highlight the need to have technological means such as electronic laboratories that facilitate educational processes and especially scientific experimentation, in person and remotely, in schools of all levels.
The experimentation processes generally occur in laboratories, a space well equipped to carry out scientific research learning activities [3], where it is easier to formulate hypotheses and design experiments [4], but, in the context of distance learning, laboratories have been inaccessible to students and teachers, and the use of remote laboratories has emerged.
By definition, a remote laboratory is a physical laboratory that can be used remotely [5], meaning that the users and the experiment installation are in geographically separated spaces, and a real experimental configuration is used [6].
This form of remote laboratory work has some associated advantages such as: greater motivation of students for the study of physics [7], a greater acceptance of participating in remote experiments compared to a demonstrative use [6], stimulating the interest of students by having them collect and analyze data directly [8], enabling scientific experimentation in schools where there are no formal laboratory facilities [9], among others.
Advances in computer technology have motivated the use of Open Source Boards as teaching tools that provide an interdisciplinary approach to learning physics, which have proven to be quite practical and attractive for students, and can help improve the understanding of the practical application of laws and principles of basic physics [10]. Besides, their hardware and software features make multiple architectures possible to offer varied options that facilitate remote experimentation [11].
In particular, the use of the Raspberry Pi minicomputer to build a remote laboratory, with which experiments can be carried out, is a good option since it has very low power requirements, small dimensions, and very powerful computing capacity at affordable prices.
In this work, we propose the development of a general remote laboratory architecture based on the use of computers or mobile devices, connected to the internet for scientific experimentation in secondary education.
The architecture proposed for the construction of the remote laboratory consists of a Raspberry Pi OS operating system embedded in a Raspberry Pi 4. This server facilitates remote control of the laboratory and allows user interaction by running some applications.
The proposed experiment is equipped with sensors that can be queried remotely with a web-based application. The user interface was developed using the Joomla! Content Management System (CMS).
The didactic approach of this work relies on remote experiments on heat, heat transfer and temperature, inside a greenhouse, suitable for secondary education in Mexico. Although a detailed analysis of the experiments is not the intention of this article, sufficient information is given to understand the context where the remote laboratory was used.
This paper presents and discusses an architecture to build an electronic laboratory for the implementation of experiments in physics and discusses its use for educational purposes. Electronic laboratory architecture design This work analyzes the feasibility of using the Raspberry Pi microcomputer, model 4 (8Gb), as an electronic laboratory, using its hardware and software features.
In terms of hardware, this SBC (Single Board Computer) has multiple input and output ports, which allows interconnecting a large number of peripheral devices such as a mouse, a keyboard and a monitor. The GPIO (general-purpose input/output) port is of interest because it allows the connection and manipulation of multiple sensors and actuators that are essential for the design and construction of the remote laboratory.
Raspberry Pi devices use the Raspberry Pi OS operating system, a derivative of the Debian Linux system [12], which allows the execution of programs developed in various programming languages such as Python, to manage input and output ports; and PHP, HTML and JavaScript, for the user interface. See Figure 1.

Hardware platform
The experimental module consists of 2 blocks, as it is shown in Figure 2. The first block includes a set of sensors used in the experiment; and the second block belongs to the Raspberry Pi. Inside the first block we find temperature and humidity sensors. The first sensor, model BME280, provides temperature, humidity, pressure and altitude. It is connected to the GPIO port using the I2C protocol, with two cables for communication between devices where one of the cables provides the data; and, the second, the synchronization line or clock [13]. The second sensor, model DS18B20, provides temperature and has a waterproof protective bulb that facilitates its use outdoors. This sensor connects to the GPIO port using the 1 wire protocol, which is an interface that facilitates the connection of multiple devices at the same time by providing data, signaling, and power to lowspeed devices through a single conductor.
In the second block, the Raspberry Pi 4 features a quad-core Arm Cortex-A72 processor, 8GB of RAM, Ethernet port, USB ports, 40-pin GPIO, Wi-Fi, and Bluetooth. Data storage on a 128GB microSD card, HDMI ports and GNU-Linux operating system. See Figure 3 for a complete overview of hardware configuration.

Software platform
At a logical level, all the programs and services necessary for the management and administration of the experiment were installed, see Figure 4. To provide remote access to the device, the http communication protocol and the NGINX (pronounced "engine X") web server are used. The graphical interface was developed on the Joomla CMS (Content Management System), which allows building websites and powerful online applications, being very flexible, customizable and secure.
The database engine used is MariaDB. The information from the graphical interface and the data provided by the sensors are stored here. To collect the data from the sensors, a simple set of web services was developed on the CherryPy (Python) framework, which allows creating web applications with a small and efficient source code. These web services deliver the information in JSON (JavaScript Object Notation) format ready to be consumed by the graphical interface and to be stored in the database.

Fig. 4. Electronic laboratory logic diagram
Finally, it is important to point out that the laboratory connects to the internet through a virtual private network (VPN), which generates a virtual connection between the user and the electronic laboratory, routed through the internet, offering connection security, by not exposing the real access points between users, in addition to allowing remote access without the need for special configuration or a fixed IP. The VPN used was provided by dataplicity.com, which allows control and access to the Raspberry Pi from any device connected to the internet.

Results and discussion
This section explains the access and operation of the remote laboratory and the proposed experiment, on the greenhouse effect, for secondary school students.
When we speak of the greenhouse effect, we refer to a natural phenomenon which implies that some gases, which are present in the planet's atmosphere, help retain part of the thermal radiation emitted by the earth's surface after being heated by the Sun.
To exemplify this, the experiment uses a simple greenhouse consisting of an enclosed space with limited access, and generally intended for the cultivation of plants and vegetables in order to keep some environmental factors such as temperature and humidity under control.
As this experiment does not provide control actions, the electronic lab can handle multiple concurrent connections without user collisions.  Figure 5, users have options to modify the start and end dates, as well as the option to modify the graph view to display data by hours or by days. In the upper menu, the user can navigate to the following web page that shows the data that is being generated in real time by the DS18B20 sensors and graphs with historical data with the intention of motivating the observation and reflection on what happens with the temperature inside and outside the greenhouse encouraging students to compare measurements, refer to Figure 6.
Finally, Figure 7 shows the hardware, circuitry, and wiring used by the remote lab.

Conclusions
Raspberry Pi devices can be used with great success to implement different scientific experimentation activities that require the measurement of variables or natural phenomena as long as the capacity and performance of the device itself is not exceeded.
The great flexibility offered to combine both sensors and actuators as well as other devices allows to achieve complex experimental configurations with great reliability and at low cost, which makes these minicomputers ideal candidates to become essential tools in the implementation of scientific activities in secondary education that require interaction with the environment, continuous operation and, if needed, remote access.
Based on the general configuration proposed for the construction of the remote laboratory, an experimental installation was implemented, for educational purposes, which allowed secondary school students to carry out various scientific activities, through a remote connection using mobile devices or desktop computers connected to the internet through a web browser.
Regarding the pedagogical possibilities, this experiment can have different educational applications, among which the following stand out: • Electronic engineering students as a didactic example of interconnection of sensors and actuators and their control through the Raspberry Pi device. • Computer engineering students as an example of data consumption, in real time, through web servers with remote access. • Teachers and students of basic education as scaffolding for the understanding of concepts such as greenhouse effect, climate change, heat and temperature.
Finally, it is suggested to add user management and administration features that may be useful if the scope of the activity includes learning assessment, or a performance evaluation of the activities carried out by the students with the remote laboratory.