key: cord-0059532-9qms3zwf authors: Ruo Roch, Massimo; Martina, Maurizio title: vrLab: A Virtual and Remote Low Cost Electronics Lab Platform date: 2020-12-17 journal: Applications in Electronics Pervading Industry, Environment and Society DOI: 10.1007/978-3-030-66729-0_24 sha: 2affbe8e3fb0256daff402a7617987e61596c5ea doc_id: 59532 cord_uid: 9qms3zwf SARS-CoV2 pandemic stressed the need to increase adoption of remote teaching. Technical courses, specifically electronic engineering ones, suffered the miss of real lab experiments directly carried out by students. In this paper a new approach is presented, based on the usage of very low cost experimental boards, which act both as a measurement instrument and a programmable prototype circuit. A first board, targeted to analog and digital electronics courses experiments, has been designed, and is described in this paper. Starting from the spring of 2020, SARS-CoV2 pandemic hit China, Italy, and the rest of the world. Lock down countermeasures were mandatory, to mitigate virus spread among the population. It means that teaching 'in presence' was stopped, too, in schools of every rank, from primary, up to universities [1] . Current Internet capabilities allow to overcome difficulties related to lectures, as videoconferencing is a well established technique [2] , even if there are some challenges coming out when the number of attendants goes beyond some hundredths, if direct interactivity is desired (we are speaking about real time lessons, and not just playing recorded videos) [3] . Nowadays, host virtualization and private or public clouds are already used inside universities, allowing to deploy into the campus remote access to computing platforms [4] , even at supranational level [5] . Moreover, web applications allowing to exploit interactivity in simulated environments like Moodle [6] are of widespread usage, and can be used to introduce exercises and simulated laboratory experiments, in which students can interact with virtual objects, changing their parameters, and simulating the behaviour of the so modified experiments. Electronics engineering courses are natural candidates for these kind of webbased tools. As an example, in analog and digital electronics courses students can design circuits, either via schematic capture or Hardware Description Languages (VHDL, Verilog, SystemC). Later, they can perform analog, digital, or mixed signal simulations, utilizing web interfaces to the standard simulation tools (Spice, Modelsim) [7, 8] . What is anyway missing in this approach, is the contact with real world objects, which, according to us, is fundamental to acquire specific engineering skills. In fact, developing design capabilities requires to acquire the following abilities: a) Design space exploration b) Simulation of the designed system c) Verification of compliance to a previously defined high level reference model through every refinement step d) Hardware verification, with limited debugging capabilities e) Characterization of the hardware system Points a) through c) can be easily accomplished with the web based methodologies described above. But the last two items are nowadays not affordable at all. First of all, it must be emphasized that simulation can not fully substitute measurements performed on the real circuit. In fact, the major drawback of simulation performed inside courses is the lack of coverage of the tests, mainly due to student inexperience, and time shortage. So, hardware verification is a must. Moreover, the ability to diagnose real circuits faults is a typical high value engineering skill, which must be pursued. And it requires skills on both real measurements instruments usage, and personal development of fault search methodologies specifically targeted to digital or analog circuits. Last, real signals are usually very different from simulated ones, sometimes in surprising ways for a student, and it is important to be able to visualize them in a realistic manner, as sampled by a real measurement instrument, including noise and other artifacts. A possible solution to these requirements would be to give to students access to physical devices on which to perform lab work, but, at the same time, to learn measurements instruments usage, too. In this context, there are two different possibilities: -Universities buy, and send to students, a 'lab kit' built-up by a set of boards suitable to lab needs. As an example, one MCU board, one FPGA board, a digital oscilloscope, a power supply, etc. This approach has problem from the point view of cost, as the number of kits must be greater then the number of students which are following courses using the kits itself. In fact, in contrast to what happened with 'in presence' labs, no sharing is possible for lab appliances, as they are physically at home of the student. Moreover, there are logistics, problem, too, due to the complexity involved in the delivery of kits to students before course starts, and to collecting them after course end. And things can be even worse, if students are located in different cities, or countries (at Politecnico di Torino, one half of the students comes from different regions, and one 10th from different countries). -Universities suggest the above kit to students (like it happens for a course text book). Of course, this solution was affordable only if total kit cost would be low, acceptable for students balance. And this is the problem. In fact, it is quite easy to find low cost experimental boards which can be used to implement the experiment, typically MCU based (Arduino, Nucleo), with prices in the range of 10-20 USD. But there are very few low cost boards suitable for programmable logic development (anyway around 100 USD each), and, worst, it is nearly impossible to get a set of low cost measurement instruments, suitable for reasonably sophisticated experiments (minimum is around 200 USD) The main reason for which no suitable solution has been found is mainly related to the fact that systems building a kit are not developed with teaching in mind. They are general purpose boards, designed for small scale prototyping, or for technology evaluation. And as such, they have much more hardware than needed, i.e. their cost is not at a minimum. Equally, measurement instruments are true, complete, sophisticated devices, with overabundant features, i.e., again, they are too expensive. The basic idea to fill the above gap is the development of a technology, a platform, specifically targeted to teaching labs, aimed to minimize unit cost, but fulfilling electronics labs requirements. It will be realized as a mix of hardware/software components and it could allow three different usage models: -The students use it at home. No additional hardware must be required, except for the experiment platform itself and a personal computer (laptop or desktop). -The students use it in the campus labs. This can be a duplication of existing lab equipment, but this choice allows to use the same course material in different situations, i.e. remote labs or 'in presence' ones, and avoid biases between on-site and off-site students. -The student is at home, but can have Internet access to the experiment deployed inside university labs. A critical point is to mimic, as far as possible, the same user interface as in preceding use cases, to maintain a uniform usage experience. In the following sections, a possible solution is proposed. First of all, a generic architecture is described, then a first case study implementation is presented. The basic idea is to develop a hardware device with two sections. The first one, called desk area is to resemble a typical lab desk, integrating the functionalities of a digital storage oscilloscope (DSO), a multimeter and a programmable analog signal generator. Moreover, in this section the teacher can load special purpose devices, e.g. test beds for the lab experience carried out by students. The second section (student area) must be instead the equivalent of an experimental board, on which students can carry out the experiment itself. The board must be easily connected to a computing device (PC, Raspberry, etc.), where high cost computational tasks can be performed. These tasks are, as an example, signal analysis algorithms (FFT, noise filtering, digital protocol analysis), data presentation to the user, and virtual instruments controls. The integration of custom hardware and software running on the computing device is the key to minimize cost of the overall system. In fact, repetitive costs (hardware), are minimized, at the expense of designing PC software, but the latter can be developed through an Open Source model. This choice introduce a further possibility, i.e. to involve computer science students in the development of this software, too. It fulfill another teaching activity, well integrated inside an IT degree, even if not strictly required by initial specifications. In this architecture, students can access the experimental board ether directly, or through the Internet, where a Raspberry PI or a laboratory server expose the user interface. The overall architecture is depicted in Fig. 1 . To assess feasibility of the proposed approach, a first system has been designed, specifically aimed to electronics engineering courses in a master degree. Target courses are related to embedded systems design, low power digital electronics, programmable logic, and bio medical electronics systems. Skills acquired by students will be mainly in the field of HDL design methodology, MCU hardware/software integration, embedded systems firmware development, analog and digital data acquisition and processing techniques, hardware/software low power design. A high level block diagram of the board is visible in Fig. 2 . Three main blocks are visible, the USB interface (STLinkV3MODS, at extreme left), the student area (upper half), and the desk area (lower half). The two sections are linked by a 32 bit general purpose bus, which is freely usable by experiments. This part is built-up by a commercial module, STLinkV3MODS, produced by STM. First, it is used as a serial high speed (15 Mb/s) communication channel toward the PC. The serial channel is connected to the desk MCU, to exchange commands and data, used mainly to control the virtual instruments, and to collect acquired measurements. A second function of this block is to control, through a standard ARM SWD interface, the student MCU. In details, this link is used to allow MCU programming, and real-time debugging of firmware designed and loaded by the student. This area contains three main devices: -Desk MCU. Based on a 32 bit ARM low power device (STM32L496), it contains a firmware, which implements the low speed portion of virtual instruments (multimeter, analog signal generator, and DSO), parse commands received from the USB interface, and interface to the teacher FPGA. The DSO is implemented through the internal ADC of the MCU, while a two channels DAC is used to generate arbitrary analog signals. The ADC is used to implement the virtual multimeter, too, used to measure supply currents drawn by students devices. The same MCU can host teacher provided test benches, too, to assess the validity of signals generated in the student area. -Desk FPGA. An Intel Cyclone 10 LP low power FPGA, with up to 25k LEs, implements in hardware high speed portion of the virtual instruments. As an example, it samples digital input channels of the logic state analyzer, generates digital sequences for the digital pattern generator, and stores them into the high speed RAM storage. It works as a bridge, too, between the MCU and the RAM storage. This way, MCU can save multimeter or DSO acquired samples. And can get samples from the RAM storage itself, to supply it's internal analog signal generator. The FPGA can host teacher provided custom test benches, too. -RAM storage. An 8 or 16 MByte RAM is provided, as a generic data store. Due to limitations on costs and package pins, a HyperBus device has been chosen, managed by the FPGA. Please notice that the desk FPGA can also be used to expose to students an arbitrary bus protocol, like SRAM, DRAM, etc., emulating a real memory device. The student area is implemented with an MCU, and one FPGA, identical to the ones used in the teacher block. On the general purpose bus there are also connected some switches, LEDs, and an I/O connector used to link the board to external breadboards, or external custom circuits. Last but not least, there is an Arduino compatible connector, used to integrate board functionalities with low cost expansion boards (motor drivers, power I/O, displays, accelerometers, bluetooth transceivers, etc.). Last, an important feature of the board is that students can program both FPGA and MCU using standard programming tools (STM32CubeIDE for the MCU, and QuartusPrime for the FPGA), which are available at no cost. In this work, a custom experimental board has been described, which will be used to allow lab access to students of electronics courses in the master degree of Electronics Engineering at Politecnico di Torino. The designed architecture is able to fulfill design requirements, and achieved the following targets: -Flexibility. Everything is fully programmable, both on the student and on the teacher side. It means new experiments and new virtual instruments can be freely implemented just changing the firmware of the MCUs and FPGA configuration. -Scalability. Devices were chosen to allow 'family migration'. As an example, the same footprint can host FPGAs ranging from 6k, up to 25k LEs. And the same applies to MCUs, in which the same device can be used with different internal memory sizes. And the HyperRAM, too. It means a 'university edition' of the board, used in campus laboratories, can be built maximizing available hardware resources (and cost). And a 'student edition' directly bought by students will be realized with minimum cost hardware. -Low cost. As the board is specifically designed for teaching, its cost is in the order of 70 USD. It is remarkable, as it substitutes an entire set of boards and measurement instruments. Board design is now completed, and prototypes are currently in production. Figure 3 is a 3D rendering of the assembled board. Few components are missing (USB-C connectors, LCD display, and DC/DC converters IC's) as their 3D models were not available. Overall size is 160 × 100 mm (Single Eurocard format). Connectors on the right allow to pickup student area digital signals. The same apply for the big bottom connector, carrying analog signals of the same section. In the upper right corner, the light green block is the USB interface. The board itself will be used by students in real courses, starting from November 2020, and feedback will be collected to possibly refine the system. The flexibility given by the designed architecture allows to forecast further usages, implementing different virtual instruments, just with firmware and FPGA configuration changes. As stated above, this could be the target of IT courses, too, which were not included while defining system specifications. The same applies for the refinement of the PC software used as user interface. It will be customized according to course needs. Last, at the end of 2019, an IEEE standard was approved, specifically related to virtual laboratories [9] , and a possible development is the integration of the developed board to this standard. COVID-19 in Italy: current state, impact and ICT-based solutions Comparison of traditional and web-based education -case study Virtualization technologies in web conferencing systems: a performance overview Teaching in the cloud -microelectronics ubiquitous lab (MULAB) MECA, the microelectronics cloud alliance Implementation of LogicSim in LMS moodle In: Implementation of electronic design automation software tool in the learning process IEEE Standard for Networked Smart Learning Objects for Online Laboratories