Open-source lab hardware: Driver and temperature controller for high compliance voltage, fiber-coupled butterfly lasers

Graphical abstract


Hardware Description
This laser driver board was custom-designed using Eagle PCB (Autodesk, CA, USA) as a 2-layer printed circuit board (PCB), which can be fabricated in any board house or a PCB milling machine. For the PCB presented in this work, we chose OSH Park (Oshpark LLC, OR, USA) as the manufacturer. The individual components are commercial off-the-shelf (COTS), as detailed in the bill of material (BOM), and are directly mounted to the PCB. For people with less soldering experience, there are also companies that offer turn-key solutions and a fully assembled board when provided layout and BOM.
The board is equipped with a Teensy 3.5 microcontroller to power a 14-pin butterfly laser via a commercial laser driver and TEC controller. Its main features are: Low-cost, open-source design Compatibility with lasers that exhibit a high compliance voltage (V f ) of up to 8 V, and up to 250 mA forward current (I f ) Operability in either constant current (CC) or constant power (CP) modes A high precision temperature controller An over-current protection circuit to avoid damage to the laser An onboard microcontroller which allows for remote control and measurement of laser current/power and temperature via serial commands or Ethernet In the following, the hardware is described in more detail.

Microcontroller
At its core, the board is controlled by a Teensy 3.5 development board (PJRC, CT, USA), a USB-based microcontroller development system (Fig. 2). It features a 32-bit 120 MHz ARM Cortex-M4 processor with floating point unit, with 512 and 256 kB flash memory and RAM, respectively. With 58 digital I/O, 27 analog inputs at 13 Bits, two analog outputs at 12 Bits, 20 pulsewidth-modulated outputs, various communication protocols/bus systems such as USB, Serial, I 2 C, SPI and CAN bus, and an SD card, it is well equipped to control and read from a multitude of drivers and integrated circuits. The board also hosts an Ethernet port, as this might be the preferred communication interface for certain applications. All programming is done via the USB port, and the platform is compatible with the Arduino software and its libraries. The source code for this project, including all the required libraries, is made available in the supplementary materials. The Teensy can be powered directly through the USB cable, but here we strongly recommend powering it via its VIN pin by applying 5 V, provided directly by the board. To avoid competition between the 3.3 V provided from the USB and the 5 V from the board, we recommend cutting the VUSB line, which is explained in Section Build Instructions.

Voltage Converters and Current Measurement
The board is powered via a 5.5 Â 2.1 mm barrel connector (J1) or a 2-pin header (EXT_PWR). We recommend applying 12 VDC at the voltage input (VIN), e.g., by connecting a wall adapter with sufficient power such as the Qualtek QFWB-65-12-  US01, which can provide up to 5 A at 12 VDC. The input voltage is directly fed into a voltage regulator (VR1) to convert the 12 VDC input into 5 VDC (Fig. 3). The 3.3 VDC rail is provided by the Teensy's internal voltage regulator. The input voltage is supplied, via a series of low-pass filter LRC circuits (not shown in Fig. 3), to a low-dropout linear regulator (U7) and a low-noise, inverting switching regulator (U11) to provide the positive and negative rails to bias the laser diode. The power to the board can be cut by a sliding switch (PSW), its state indicated by PWR_LED. The board's overall current can be measured by an INA169 (U1) current monitor chip, which can provide useful telemetry about the system and overall current (and hence also power) consumption of the board and its components.

Laser Mount
14-pin butterfly lasers can be directly clamped to the LD quick-release socket. Additionally, the authors recommend mounting the laser package to a heatsink to dissipate excess heat. This board is capable of driving Type 1 butterfly lasers with the following pin assignments (see Fig. 4): The case itself is connected to ground, which is indicated by a notional pin 15 in the schematics. For certain rare applications, the user might prefer an external feedback PD for CP operation. In this case, the PD needs to be connected to EXT_PD, and the traces between the solder jumpers JP1, JP2, and JP3 need to be cut.

Laser Diode Driver
The LD is controlled by an FL500 laser driver chip (U8, Wavelength Electronics, Inc., MT, USA). For the laser to operate, it first needs to be enabled. For safety reasons, the LD can be manually disabled by switch SW2 if the RESET pin is left floating Fig. 3. External 12 V power is supplied through J1 or alternatively the EXT_PWR pin header. The overall current, and hence power consumption of the board, can be measured by U1. VR1 provides the 5 V rail. U7 is an ultralow noise, low-dropout linear regulator which provides the necessary 9 V at VS required from the input 12 V. This voltage is necessary to power the laser controller as well as provide the voltage across the laser diode. Similarly, U11 is a low noise inverting regulator configured to output a small negative voltage at VEERAW. VEERAW, at À0.1 V, and VS provide the rails for various op-amps to control the laser diode.
F. Kehl, V.F. Cretu and P.A. Willis HardwareX 10 (2021) e00240 (Fig. 5). If the SW2 is in the opposite direction, the laser still needs to be enabled by the microprocessor's LD_ENABLE pin. When the laser is ready to be operated, the LD_RDY LED will be illuminated, and when it's actually enabled, the LD_ON LED will turn on as well. As previously mentioned, the laser can be operated in either CC or CP mode, which can be selected by the double-pole, double-throw (DPDT) switch SW1. The respective positions are labeled directly on the PCB. In CC mode, SW1 connects PSET to ground and the analog output of the microcontroller, via some signal conditioning, to the VSET1 input of the FL500 driver. For CP operation, SW1 can be switched in its opposite position, thereby connecting an external PD feedback (PDFB) circuit, which modulates the VSET voltage based on the PD feedback. The maximum photodiode current input for the FL500 is 1 mA. This range can be adjusted with R PD , which is set to 1 kX in this default design (Fig. 6). This resistor can be replaced based on the expected maximum photodiode current with the following equation 1 : The following equation can be used to convert the measured PMON voltage to photodiode current: In either mode, the PD current can be monitored by the microcontroller's analog-to-digital converters (ADC) via PMON, and the LD current via ILAS_MON. To protect the laser from over-current, a current limit can be set by the potentiometer RV_I (Fig. 7). If the limit is exceeded, the power VCC_LASER to the laser driver U8 is cut by the NPN-PNP transistor U15. The set limit can be measured at test point I_MAX, and can be calculated by the transfer function of 0.125 A/V. To get the value in A, 1 https://www.teamwavelength.com/download/Datasheets/fl591.pdf.   . Switch SW1 selects between CC and CP mode. With SW2, the laser can either be disabled manually (e.g., for safety reasons), or controlled via the microcontroller. FL500 (U8) is the laser driver that controls the output laser diode current up to 250 mA by adjusting the voltage out of the LDC1 pin. This voltage output of the FL500 is compared across a 1 X resistor with U4A op-amp configuration. The output at TP4 will give a ratio of 250 mA/2V as a one-toone comparison to the current flowing through the laser diode. U2B further amplifies this value from 2 to 3.3 to utilize the full range of the Teensy ADC. U10B provides signal conditioning for the laser setpoint. U10B can control both CP and CC setpoint, depending on the position of SW1.  . This circuitry allows the operator to adjust the maximum current that flows through the laser diode. The FL500 is capable of delivering up to 250 mA in single-mode operation. Thus, by adjusting the RV_I potentiometer, the VSET input will be attenuated to the value measured at I_MAX at the output VOUT. multiply I_MAX voltage by 0.125. It is recommended to set I_MAX to 0 first and slowly increase the potentiometer to the desired current.

Laser Temperature Controller
Many laser diodes require active temperature control for precise power and wavelength stability. This board is equipped with a MOT3000-25 (U5, Modular One Technology LLC, TX, USA) precision temperature controller for Peltier modules. This driver's internal loop compensation is optimized for laser module assemblies such as 14-pin butterfly packages, provides a maximum output current of ±2.5 A, and temperature stability of ±0.002°C.
The TEC controller can be disabled by switch SW4, if the EN_SS line is pulled to ground (Fig. 8). If the switch is in the opposite direction, the TEC can be enabled remotely by the microcontroller. The laser temperature can either be set manually (''set-and-forget") by the potentiometer RV_T while monitoring test point T_SET, or by setting it via the microcontroller. Switch SW5 lets the user choose between the two options. To convert the set voltage into temperature, the user is referred to the MOT3000-25 datasheet, as well as on how to limit the maximum TEC current and voltage by choosing appropriate resistors for R23, R24, and R27 (Fig. 8). By default, these resistor positions can be left open-circuited. If the laser temperature moves outside a ±1.5°C window around the set temperature, the TEMP_ALARM LED will illuminate and also inform the Fig. 8. Switch SW 4 allows for manual disabling of the MOT3000-25 TEC controller (U5), or for toggling on/off by the microcontroller. Also, the temperature setpoint can either be controlled manually by the variable resistor RV_T, or through an analog signal from the Teensy, depending on the position of SW5. If the laser temperature is outside a ±1.5°C window around the set temperature, the TEMP_ALARM LED will illuminate. If desired, the maximum output current (IMAX) and the maximum output voltage (VMAX) of the TEC controller can be limited by soldering resistors at positions R23, R24, and R27, respectively. The reader is referred to the MOT3000-25 datasheet for the appropriate values. microcontroller by pulling the line TEMP_ALM low. During operation, the object temperature, as well as the TEC current, can be read in real-time by the microcontroller's ADCs via the analog signals OBJ_TEMP and ITEC_MON. Fig. 9 provides an overview of the different functional elements and where they are located on the board. A CAD model of the assembled board, as well as the PCB design files, are provided with the supplementary material. If desired, a CAD file for a 3D printable, custom enclosure for the laser board is provided with this manuscript, comprising a bottom part and a lid (Fig. 10).   Solder all SMD components to the PCB first, followed by soldering all through-hole components and connectors. Solder the eight ''Solderable Nuts" to the annular ring of the through-holes under the laser socket, on the bottom side of the PCB (Fig. 11). The four inner nuts allow for securing the laser. The four outer holes are for the laser socket.

Design
The Corner Standoffs can be soldered to the four corner through-holes if the board is used without the provided 3Dprinted enclosure. If the board is mounted to the enclosure, these standoffs are not required.
Cut the trace between the two solder jumpers at the top right on the back of the Teensy to separate VIN from VUSB, to use the power provided by the mainboard (Fig. 12). Although the Teensy controller itself and other components such as the TEC controller or the Ethernet module could be directly soldered to the mainboard, the authors recommend using female socket connectors for easy replacement. Make sure to mount these components in the right orientation. The network module (U12) is an optional feature and does not have to be installed if no Ethernet interface is required. If this board is used for the first time, it is recommended to skip this step first and go directly to Section Operation Instructions, and then return here before installing the laser. The laser can directly be mounted together with the heatsink by clamping it with the socket's lids. Lasers can be particularly ESD-sensitive, and it is therefore recommended to wear a grounding strap when handling the laser. It is also recommended to apply a small amount of thermal paste between the laser and the heatsink for better heat transfer. Align the holes of the laser, the heatsink, and the PCB and use four M2 screws to secure the assembly to the board. Fig. 11. Solder nuts to the eight through-holes (red circles) to mount the laser (inner four holes) and the laser socket (outer four holes) using M2 screws. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) Lasers are potentially hazardous and can cause damage to eyes and/or burns to skin. The operation of lasers should only be carried out by trained professionals wearing appropriate personal protective equipment and in a controlled environment.

Serial Command List
Below, a list of serial commands that can be sent to the microcontroller. Most commands must begin with {and end with}. Inside the brackets is the command itself. A command consists of a series of identifying characters and an argument separated by spaces. An example command would be { A B 100 }, where A and B are the identifying characters, and 100 the argument. It will be listed in the following format:

Validation and Characterization
A single-mode fiber-coupled 488 nm laser diode (QFLD-488-20S, QPhotonics, MI, USA) with a high, typical forward voltage of 6.1 V and maximum optical output of 20 mW was chosen to validate the board's performance. The laser was operated both in CC and in CP mode over an extended period of time, while the current, power, temperature, and wavelength stability were recorded. The current and temperature were measured using the internal feedback and recorded via the microcontroller. The optical power for CP mode was measured with an S120VC photodiode power sensor in combination with an S120-FC FC/PC fiber adapter and recorded with a PM100USB power meter (all Thorlabs, NJ, USA). The wavelength stability was assessed using an Ocean Optics HR4000 spectrometer (Ocean Insight Inc., FL, USA).
The laser was turned on in CC mode at 0.5 min (Fig. 13). The current of the laser diode immediately stabilized after powering up and was recorded at 5 Hz in CC mode over 30 min. The laser current was set to 70 mA by the Teensy controller, and the resulting forward current averaged at 71.87 ± 0.10 mA. Drift over the duration of the measurement was barely measurable and was on the order of À0.001 mA/min.
In CP mode, the laser's output fiber was connected to the external power meter, and the optical power was recorded at 1 Hz over a duration of 30 min (Fig. 14). The power was set with the microcontroller to a value corresponding to 8 mW. It then settled within a few seconds and then averaged at 7.788 ± 0.004 mW, with a drift of À0.0004 mW/min.
The TEC temperature was set to 25.00°C, briefly turned off after a few seconds to demonstrate settling time, and then recorded over 20 min at 5 Hz (Fig. 15, left). The temperature settled after a few seconds and averaged at 24.69 ± 0.014°C. While the absolute temperature was off by À0.31°C (which is within the 5% resistance accuracy of the butterfly's internal 10 kX thermistor element), the temperature was also within the <±0.02°C as specified by the MOT3000-25 TEC controller. Because it was so marginal, no meaningful temperature drift could be quantified.  The peak emission wavelength of the laser diode was recorded at 1 Hz over a duration of 60 min (Fig. 15, right), with a mean of 484.86 ± 0.76 nm, which is within the laser's specifications of 484-492 nm. While the emission wavelength depends on the laser dye itself, the stability of <1 nm standard deviation is a good indicator for precise laser power and temperature control.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.