Photovoltaic System as a Remote Didactic Laboratory for Electrical Engineering Courses

Remote laboratories are increasingly being used in academic courses, especially in science and engineering. New control systems allow the development of even complex experiments with a low cost. In this paper we present a remote laboratory that reproduces a small-scale photovoltaic system, including a solar panels and lights, a charge controller, a battery and a dummy load. A Raspberry PI microcontroller is used to send the different inputs to the laboratory, handling commands, measuring some electrical quantities and provide remote access via the web. The laboratory, developed with the involvement of graduating students, will be used in the Master courses of electrical engineering. Particular attention has been paid on the development of hardware and software, to use the developed laboratory as a model for the realization of other experiments.


INTRODUCTION I.
The laboratory activities play an important role in academic courses in science and engineering. They are able to involve students much in depth in their studies, giving them a chance to experience in practice what they have learned in theory, increasing their interest in the subjects and making them share vivid and interesting experiences. The laboratory activities allow the students to better understand the physical phenomena and the existing difference between the theoretical models and reality.
Although it is always recommended to introduce laboratory activities in the science and engineering studies, this is not always possible, for several reasons. Lack of adequate financial resources for the laboratories' creation and/or maintenance, lack of human resources for the laboratories management, logistical problems in organizing educational activities in presence, lack of equipments adequate to the number to the student population are some of the main problems.
Virtual and remote labs are valuable alternatives to physical labs. They do not allow physical interaction between the students and the experiment, but can overcome certain problems related to physical labs, such as those related to the organization of logistics activities in the presence. They are a good solution to save money, time and space and can also be easily shared between different institutions [1][2][3][4]. These labs play a particularly important role in distance Universities, where the students are spread all over the world and so it is not possible to organize laboratory activities in the presence, but there is still the need to engage the students in experimental activities.
In particular, compared to virtual labs, remote labs have the advantage of being instruments still able to observe reality without the need to adopt simulations, therefore without having to idealize or model a series of typical aspects of the real phenomena. Noises, measurements errors, measurement uncertainty, real behavior of physical components are very important aspects in engineering studies and they can be taken into consideration in remote labs as well as in real labs. So, such experiences are more interesting and challenging with respect to the virtual labs. However, remote labs require the implementation, maintenance and management of an hardware, this aspect is of course absent in virtual labs.
ACADEMIC CONTEXT II.
The International Telematic University Uninettuno [5] offers Bachelor and Master degree programs in several languages, including Italian, English, French and Arabic, and enrolls students from several countries in the world [6]. The Faculty of Engineering is recently working in order to develop some remote labs in order to enrich its offer in terms of didactic supports.
Considering the wish to realize different laboratories, eventually in the different premises of the University, the need to define an internal model for this remote labs has come out. So, some principles has been defined: • Remote access: the laboratory must be fully accessible at distance, every student has to be able to use all the functionalities of the lab, without the physical presence of an assistant. A web interface will be realized, accessible through the University web platform, enabling to fully control the lab. The web interface will be realized in several languages, to allow an easier use of the lab to the students from different countries. Then, the web interface will automatically collect data regarding the lab utilization, in order to provide statistics to the teachers.
• Laboratory As A Service: the laboratory will be realized as an independent module, implemented as a set of web-services and with a high level of abstraction and virtualization [7]. The lab will be managed by means of a Remote Lab Management System (RLMS) able to interact with the University web-platform and with web-platform by means of a middleware. This implementation will facilitate the inter-institutional sharing of labs and the interoperability with heterogeneous systems [8][9].

PAPER PHOTOVOLTAIC SYSTEM AS A REMOTE DIDACTIC LABORATORY FOR ELECTRICAL ENGINEERING COURSES
• Flexibility: the laboratory has to be designed in order to be easily expandable. It has to be possible to easily add new components, new functionalities and new controls. • Language: the laboratory must be available in different languages, in order to be easily usable from students coming from different countries. This requires that the web-interface must be available in different languages. • Cost: in order to produce a series of remote labs at a low cost, a budget of 250,00 ! has been established for the realization of this lab. This limitation is challenging and requires a very good design: low cost hardware and open source software will have to be used. In this way, such a kind of lab will be easily reproducible and could be a reference for all the institutions interested to realize these experiments at limited costs.
Due to the recent activation of a new academic course in energy sources management, the decision to create a remotely accessible solar energy laboratory has been taken. The laboratory aims at representing a small photovoltaic (PV) system, including PV cells, batteries, a charge controller and a dummy load [10]. The laboratory would be an opportunity to face the difficulties introduced by the previously stated constraint and to find standard solution. For this reason the lab intends to be a prototype for the realization of other equipments in the next future,.
In order to increase the benefits of such an activity, the design and implementation of the laboratory has been arranged as a graduation project for computer engineering students. In this way, the laboratory in not only a didactic instrument for the electrical engineering students, but also a live experience itself where the graduating student can acquire new competences, being involved in its implementation and future improvements. In general, this is a successful strategy in order to have a very good engagement of graduating students [11].

LABORATORY DESIGN III.
The laboratory is designed in order to allow the students to perform several experiences.
The laboratory includes some LEDs placed in different positions, two PW cells, a MPPT charge controller, a battery and a dummy load. A Raspberry Pi microcontroller is employed to control the whole lab, to transmit the inputs, receive the outputs and properly connect the lab to the web.
To make the experience more interactive, considering that it will take place in real time, a cam has been included in the system, in order to provide a continuous video streaming of the field of action. With a continuous video streaming, in addition to giving the real perception of what the student is piloting remotely (e.g. lights on/off), it is possible the use of old-style analog instruments, whose data can not be managed in digital but only viewed on the display of the instrument. This choice, that apparently makes the lab less automated, is a strategy to "force" the student to be an active part of the measurement experience. A video streaming of at least 24 fps is available.
In Figures 1 and 2, the system layout is depicted.  In order to perform different kinds of actions, the microcontroller is connected to a set of switches, used to control other devices. In this way it is possible a) to trigger different LEDs, in order to light up the PV cells from different angles: in this way, for instance, the students can study the behavior of the PV cells as function of the lighting angle; b) to connect the two PV in series or in parallel: in this way the students can understand the effect of the two configurations on the produced currents and voltages; c) to modify the system configuration: the students can connect one or two PV cells directly to the load, or they can connect the cells to the charge controller and to the batteries, that can also be connected and disconnected to the load. In this way the student can study the effect that the different system configurations have on the electric parameters.
The quantities to be monitored as "results" of the experience are the electric parameters, namely the voltages and the currents, measured in different points of the circuit. The analysis of these quantities, for example the current provided by the cells to the charge controller versus the one provided by the charge controller to the battery, is interesting to understand the behavior of the components in different conditions.
In Figure 3 a preliminary assembly of the lab is shown, adopted for testing the different components. The choice of Raspberry Pi microcontroller enables to install an operative software and to develop some dedicated software. This characteristic will be used to manage the web-connection, to transmit the output data according to a specific protocol and to make the lab appear as a web application. This is important for the interoperability of the lab with different web-platforms [12].  In Figure 4 the test environment of the web application is shown: it is possible to see the video streaming provided by the webcam on the left, the Python script controlling the Raspberry Pi and providing the output voltages and currents on the center windows and the management of the Raspberry GPIO port status on the right.
Actually, the PV lab web interface is directly used to control the laboratory. The student gets an access from the professor for a specific time slot. This also implies that one student at a time can use the lab.
In order to overcome these inconveniences, currently a Remote Lab Management System (RLMS) is under development: this will allow a more efficient and automatic management of the lab through the University web platform, and an automatic scheduling of the lab usage.

HARDWARE IV.
Hereafter we explain the technical reasons of the choice of the most important components chosen for the implementation of the laboratory.

Raspberry Pi Microcontroller A.
One of the most important aspect is the choice of the microcontroller.  Several microcontrollers are nowadays available at a low price. With respect to other more popular microcontrollers (i.e. Arduino), we have chosen to adopt a Raspberry Pi B because of some advantages for this kind of project: the possibility to install a real operating system (Linux) and to use different programming languages (java, C, C++, Python, Perl, PHP, etc.), an embedded Ethernet connection, two USB port and a UART port that will allow the connection to the MPPT charge controller.
With Linux it is also possible to install many software packages to cover the most different requirements, for example a web-server like Apache, a Database as MySQL and PHP as a scripting engine to create a web server for dynamic applications [13][14].
The Raspberry Pi board also has a very versatile 26 pin GPIO port, providing a 3.3 V voltage in addition to the normal 5 V and the ground. The 3.3 V port, with the ground and two more ports is able to realize the serial port UART (Universal Asynchronous Receiver-Transmitter).
Finally, it is possible to conclude that this choice is a little more expensive with respect to the Arduino boards, PAPER PHOTOVOLTAIC SYSTEM AS A REMOTE DIDACTIC LABORATORY FOR ELECTRICAL ENGINEERING COURSES but enables a simpler implementation of the software and a simpler connection with the other hardware components (no "shields" are required).
The adopted board is shown in Fig. 5.

Raspeberry Cam B.
The Raspberry Pi has a dedicated bus for the connection to a specific camera, shown in Fig. 6, with the following characteristics: • sensor 5Mpixel • fixed focus • 1080p video resolution for HD video up to 24 frames/sec • connection using 15 cm ribbon cable • 25mm x 24mm size (as a stamp) In the realization of our remote lab, this webcam has been used since, in addition to the requirements to provide a continuous stream, it does not use the GPIO ports of Raspberry PI, enabling to have them free for other devices. As an example, a USB webcam would use a USB port, helpful to connect devices or tools needed for experiments. For the experiment it is necessary to choose light sources of high intensity but low consumption, in order to power them with no more than 12 V, avoiding a dedicated power supply.
The choice has naturally fallen on LED diodes. Today it is possible to find a wide range of LEDs with input powers ranging from 1 to 50 W and DC voltages from 3 V. The final choice has been for 10 W LEDs, powered from 9 V to 12 V DC, with a current consumption of about 1 Ampere. These LEDs are actually composed of a 3x3 matrix of LEDs. In addition, these light sources are really small (like a stamp, as shown in Fig. 7) and weightless, so they are really easy to install.
The LEDs have an efficiency much greater if compared to an incandescent lamp. Our LED can produce about 900 lumens with a consumption of 10 W, which corresponds to an incandescent lamp from about 75 W, and have an average life greater than 50,000 hours against 1500 of a common incandescent light bulb.

Switch array D.
The switch array, shown in Fig. 8, consists of a group of 8 switches that allow the Raspberry Pi to drive loads up to 10A 250V. This board is required to drive actuators even with a high absorption without compromising the GPIO port that can not withstand loads greater than a simple LED. Moreover, thanks to the decoupling optoelectronic, the array protects the Raspberry PI from any tension that the driven equipments can send to the microcontroller, affecting its operation.
In the laboratory, actually the switches control the insertion in series and parallel of solar panels and also the 3 LEDs that illuminate the panels with different angles of light irradiation.

Solar cells E.
Two 12 V 15 W solar cells has been chosen for the lab. Since a small power will be produced lighting up the cells with the LEDs, it has been possible to choose relatively small panels (22 cm x 26 cm each) and save space. Then, the chosen output voltage forces the charge controller to find very different working points if the cells are connected in series or in parallel, making the experiment more interesting.
MPPT charge converter F.
Several charge controllers are available in commerce,, with different characteristics. Since the power produced by the photovoltaic system is really low with respect to real applications, it not necessary to look for a device with particular performances. On the contrary, since these devices are not so cheap, the main choice criterion is the budget constrain.

PAPER PHOTOVOLTAIC SYSTEM AS A REMOTE DIDACTIC LABORATORY FOR ELECTRICAL ENGINEERING COURSES
We have chosen an EpSolar Tracer 1210RN, shown in Fig. 9, commonly used for the management of lighting systems. It can accept input voltages up to 100 V, can be connected to 12V or 24 V batteries and provide a maximum current of 10 A. The load in turn can be supplied with a voltage of 12 V or 24 V and a maximum current of 10 A, so the maximum manageable power is around 240 W.
An important aspect for the choice of the charge converter has been the possibility to connect the device to the microcontroller by means of a UART port, in order to access to the electric parameters of the microcontroller [15].

Hardware cost G.
As initial constrain, a maximum budget of 250,00 ! has been allocated for the project. As previously stated, the reduced budget was on of the target of the project.
In Table I, the costs of all the hardware components are shown. Since all the used software is open source or selfdeveloped, the total cost of the hardware is also the cost of the laboratory itself. It is clear that the budget constrain is respected and there is also a margin for a further development of the laboratory. It is worth noting that more that 25 % of the budget is absorbed by the charge controller, even it is a cheap model, however the component is necessary for the some interesting didactic experiences. Some more budget could be saved by using an Arduino board and a common USB web-cam, but introducing some difficulties in the implementation of the hardware and software.
Anyway, for a correct estimation of the project expenses, the cost of human resources should be included. In this case, the cost is not considered since the laboratory is the result of a graduation project and so all the development activities have been carried out by the students.

SOFTWARE V.
As previously discussed, Linux has been used as Operating System. Raspberry PI and Linux are a winning combination in the network, so that a lot of customization of the famous SO is available for this microcontroller. The Raspberry PI Foundation has customized the Debian distribution specifically for the ARM architecture of the Raspberry PI, calling it Raspian. This specific distribution includes many already pre-installed applications that the Raspberry users sooner or later employ, such as the Python environment. To make it user-friendly for those coming from the Windows world, Raspian includes a desktop environment called LXDE, a browser Midory and many other utility software. Also, on the Raspberry Pi Foundation website, it is possible to find other distributions that are customized for Raspberry: the most common are Pidora, based on the distribution Fedora ARM, and Arch Linux, which is extremely light incorporating only the bare essentials and therefore is suitable for experienced users. To simplify the selection and installation of the OS, a software package called NOOBS is distributed.
For the remote lab, it has been chosen to use the Raspian distribution without all the gadgets that make it similar to Windows, because they burdened the system, filling the SD and being unused.
First of all, it has been necessary to activate the minicam. Once enabled, it has been possible to send images to a file or to a streaming server that will make them available on a TCP port. It has been chosen to use a VLC video server.
To get an intuitive graphical interface to interact with the digital GPIO ports, which in the project allow opening and closing the various switches, a program called "WebIOPi" has been chosen, written in Python and freeware. In this way, in a simple window it is possible to set as input and output the ports, verify or set their values to 1 or 0.
As already said, the main program managing the laboratory is written in Python. Basically there was the need to develop two categories of programs, one for opening and closing the digital ports in order to act on the switches, and one to read the measurements of voltage and current supplied by the MPPT charge controller. To open and close the various ports, a Python library called "RPIO" has been used, making really simple the task. The other program is used to query the controller MPPT and print to video the values interesting for the experiment. After several difficulties, the specifications of the communication protocol used by the charge controller have been found, even if they are not provided by the manufacturer.

DIDACTIC EXPERIENCES VI.
The laboratory will be used in Electrical Engineering courses, by graduate students, in order to better understand the behaviour of the photovoltaic cells and of a small PV system in different situations. The students are free to experiment, modifying different parameters of the system. The user interface just avoids configuration settings that may result dangerous for the system.
Beside the possibility to freely experience the laboratory, currently two activities are specifically proposed to the students, in order to focus their attention and to point out some characteristics of the system. Students are explicitly asked to perform these two experiences and to make a report with the measured data, describing their experience.

Variation of the power supplied by the solar panels A.
depending on the angle of incidence of the solar rays The majority of installations of solar panels are made by means of fixed structures, thus giving an orientation of the panel relative to the sun that is not changeable. According to the latitude and taking into account the different trajectories of the sun in the sky during the year, it is possible to decide which inclination to give to the panels in order to maximize the production of electrical energy. Solar panels can be mounted on mobile structures tracking the sun in its movements. However, the mechanical structure of these solar trackers still have prohibitive costs such as to prevent a massive use, in fact, are used only in very few cases where the number of panels is limited and the costs are not a constraint.
In order to understand the effect of the light orientation with respect to the panels, it is interesting to propose to the students a simple experiment. A simple mechanical structure has been created, as shown in Fig 10, supporting the installation of different LEDs at different angulations with respect to the panels.
Currently, three LEDs have been installed at an angle of 15 °, 45° and 90° with respect to the centre of panel. The student can light a LED at a time, measuring the current and the power generated by the panel for every angle.
By the way, in future developments it will be easy to increase the number of the LEDs in order to have more angles.
To evaluate the power generated by the panel, a dummy load of 100 " has been adopted and the generated current is read by means of a tester. In Table II the parameters that the student should observe are shown.  Figure 11. Device used to light the panels from different angles.
As expected, the powers involved are small but still measurable and allow the student to appreciate the effect of the position of the light. It is evident that the tilt affects the power output of the photovoltaic panel, since the power reduces by 51% with an inclination of 45° and by almost 90% with an inclination of 15°.
It's worth considering that, although the LEDs have a particular inclination with respect to the panels, the light rays emitted by the LEDs are not parallel and so the effective incidence angle is not uniform. The experience so is not a rigorous test of the variation of the power supplied by the solar panels depending on the angle of incidence of light rays. Nevertheless, it is possible to observe a result that qualitatively represent what is expected.
MPPT charge controller B.
Since the system is provided of an MPPT charge controller, an experience has been set up in order to allow the students to specifically understand the role of this component.
It is well known that photovoltaic modules have a V/I characteristic with an optimal operating point, where the generated power is maximum. To achieve an efficient system, it is therefore necessary to identify such a point and make the system work with these values of V and I. The MPPT charge controller is able to perform this task, by means of a DC/DC converter able to make the panels work to the maximum power and then transfer it to the load.
The operating parameters that must be monitored are: In this experience the panel 1 in Fig. 2 is always connected to the controller, while the panel 2 can be inserted through the web interface acting on the GPIO25. The data made available by the charge controller can be read on its UART port on RJ45.
In order to understand the MPPT charge controller behaviour, the student can measure the values of voltage, current and power in two different times: one in the time immediately following the lighting of the LEDs in front of the panels (called "Initial" in Table III and IV) and the second after 3 minutes, necessary to the charge controller to find the point of maximum power (called "Stabilized" in the Tables). The experiment can be performed considering one and then two panels connected in series. In Tables III and IV the parameters that the student should observe are shown.
In case of one panel connected to the charge controller, the power transferred to the battery grows to stabilize at a value of 1.6 W. This value corresponds to a power output equal to 2.1 W and it is calculated by the charge controller as the maximum power point. Being the panel voltage only a few volts higher than the battery voltage, the current produced by the panels and supplied to the battery is practically the same, considering a loss of power of 0.5 W (2.1 W -1.6 W) due to the charge controller. In case of two panels connected to the charge controller, some valuable differences can be appreciated. The panel voltage is much higher than in the previous case and this involves a new calculation by the charge controller. In this case the maximum power is found at 3.07 W and the loss amounts to 0.47W (virtually as before). However, this time the charge controller delivers a current to the battery that is more than double than the one provided by the panel (0.21 A versus 0.09 A). In conclusion, this didactic experiment highlights the role of the charge controller in its search for the maximum power point in very different operating conditions and how this behaviour allows transferring maximum power produced by the panel to the load.
Finally, some considerations are necessary on the power dissipated by the charge controller that is about 0.5 W. This value is unacceptable if compared with the powers involved in the tests: in case of single panel the transferred power is 1.6 W, with a dissipation of more than 30 %. However, it must be observed that the consumption of 0.5 W is almost constant and does not depend on the power generated by the panels or the one transferred to the battery. In a real case, if we assume an operating power of 200 W (but it can be much higher), a power consumption 0.5 W would correspond to a 0.25 % over the total power, that is absolutely acceptable estimating that the solar systems equipped with MPPT charge controllers have an efficiency that may be 25 % higher than the systems using other types of charge controllers, such as PWM controllers.

CONCLUSIONS AND FUTURE DEVELOPMENTS VII.
A remotely accessible solar energy laboratory has been designed and implemented, to be used for didactic porpoises in the electrical engineering courses. The implemented model, although it is composed by a limited number of components, is flexible and allows the student to experiment several different situations.
The realized remote lab is useful to study the behavior of a simple photovoltaic system. The two didactic experiments shown in Section VI show some potentialities of the laboratory.
In addition, since it has been designed to be flexible and easily improvable with other functionalities, it is planned to add some in the next future, in order to allow the students to make even more experiences. Some of the future developments that have been already scheduled are: a) the possibility to increase the number of LEDs, in order to have more inclination angles to light the panels. b) the possibility to add blocking diodes and by-pass diodes in the system. In this way, connecting in parallel and in series the two panels, it will be possible evaluate the electric parameters in a more realistic situation. c) the possibility to add a traditional PWM charge converter. By operating on the switches it is possible to adopt the PWM charge controller and the MPPT charge controller alternatively. Comparing the measured electrical parameters, it will be possible to better understand the characteristics of these two charge controllers. d) the possibility to add a small inverter, in order to try to implement a more complete PV system, including an AC part, and to try to understand the problems arising from the presence of the inverter.
In conclusion, the realized lab has been a prototype for remotely controlled labs with a standardized communication protocol and at reduced costs. It will be a benchmark for the realization of similar remote labs in the Faculty of Engineering.