|
1.IntroductionTogether with more theoretical courses and activities oriented to the design of optical components, laboratory activities focused on the experimental characterization of photonic devices play an important role in the education of students attending a master degree with specialization in optics. At the Electronics and Telecommunications Department of Politecnico di Torino, an educational laboratory has been set-up in the last years, allowing the students to characterize semiconductor laser diodes and directly investigate fundamental concepts such as laser threshold, laser efficiency, and optical spectra. A typical bench is equipped with an ILX Lightwave 3744B Laser Diode Controller (LDC) for the thermal and electrical tuning of the laser diode, and Agilent 8163A Lightwave multimeter with Agilent 81623 photodiode, and an HP 70950B optical spectrum analyzer. All these instruments are connected via GPIB to a PC. The optical sources characterized by the students are generally DFB laser. These instruments were originally controlled manually (i.e. directly accessing their front panels) or with a collection ofMATLAB® scripts, taking advantage of the Instrument Control Toolbox for the low level communication with the hardware. Acquired data was generally post-processed by the students in MATLAB. We report here on the creation of a systematic program, called Optical Bench Management (OBM), written in Python [1], able to control all the connected devices from a single Graphic User Interface (GUI), greatly simplifying the acquisition, visualization and analysis of the data. Moreover, this program can also operate in offline mode, realistically emulating the behavior of the instruments and reproducing the expected laser source characteristics. It represents therefore an excellent teaching support, since it allows to show to the class real-time experiments even in the absence of the physical hardware, allowing the students at the same time to practice with the measurements directly from their home, which represents a significant advantage in this period of COVID-19 pandemic. The choice between the two operation modes (real or virtualized devices) is simply performed by the user at the program start-up; no specific configuration or operation is needed. 2.Software implementationThe source code is internally organized in three main sections, addressing: the communication with the instruments, the realistic simulation of the laser source and the emulation of the instruments behaviour, and finally the GUI. Concerning the communication with the instruments, great attention has been payed to the development of base abstract classes allowing an easy addition of new instruments connected via GPIB, USB or TCP; each individual instrument is implemented in a class providing the necessary methods and including the communication commands expected by the device. The communication with real GPIB instruments is carried out with methods from the pyvisa package. In emulation mode, the interaction between the instruments has been reproduced accurately. Several threads allow the simultaneous emulation of each instrument on different TCP ports in localhost, not only for what concerns the communication, but also including acquisition delays and set-up times. An interrupt-based protocol is used for data retrieval between the instruments. The LDC together with the OSA and the power meter have open communication channels both with the laser and with the GUI. The emulated laser periodically receives the target current and temperature from the LDC and sends to the instruments its current internal state (actual temperature, emitted power, peak wavelength). These quantities are calculated using phenomenological polynomial models fitted on data obtained a priori from measurements of real lasers. The coefficients of the models are saved in encrypted files distributed to the students: in this way we can differentiate the results of the various groups home-works simply distributing to each group a different set of laser parameters. Finally, the implemented GUI relies on the Tk widget toolkit for the interaction with the user and on matplotlib for the plots. The GUI is modular and can be easily adapted to include additional instruments. It is possible to control individually the main features of each instrument, performing single acquisitions or executing batch measurements with a thermal or electrical sweep. When necessary, the acquired data is elaborated using the standard numpy package. The current set-up and all the acquired data can be stored in text files for subsequent elaborations and discussions. Attention has been paid to the accessibility and usability of the GUI which was designed for inclusivity [2]. The main window of OBM is shown in Fig. 1. The choice of the Python language was driven by many important aspects, in particular: the intrinsic simplicity of the language, the availability of libraries for the control of the hardware at a consolidated stage of development, and the possibility to easily distribute a compiled version of the program for the various operating systems the students could be using. 3.Conclusions and future worksWe developed a tool for the control of instruments typically used for the characterization of laser diodes, with the possibility to completely emulate a measurement bench with realistic results. Future works will include the possibility to customize the GUI hiding or displaying elements according to the specific course, e.g. simplifying its layout for basic courses, and increasing the control possibilities offered to the students in more advanced classes. AcknowledgementsThe Authors thank Gianfranco Albis, manager of the students laboratories (LED) of the Electronics and Telecommunications Department for his help and support. ReferencesG. Van Rossum, F. L. Drake Jr, Python tutorial, Centrum voor Wiskunde en Informatica, Amsterdam, The Netherlands
(1995). Google Scholar
P. M. Langdon, Inclusive Designing: Joining Usability, Accessibility, and Inclusion, Springer International Publishing(2014). Google Scholar
|