## 4 Experimental Setup  
The laser driver circuit design follows the stages of a control system. Therefore, it is divided into a controller, actuator, the system or plant, and a measurement element that provides feedback to the controller with the operating conditions of the system. The different stages of the driver and its electrical diagram are shown in Figures 6 and 7. Figure 5: Convergence analysis of the system output at the stability limit conditions (\(T_{i}=T_{s}/2\), and \(\eta K_{p}=1\)) for numerical controllers by (**a**) [PERSON]’s rule, (**b**) the trapezoid method and (**c**) [PERSON]’s rule and \(y_{0}=2\), \(y_{sp}=10\) as fixed parameters of the system. Figure 6: Experimental setup of the low-cost laser driver. The actuator is a current source [24] operating in the active region of a bit transistor. The current that flows through the laser from the transistor collector is the same as the current on the resistor \(R_{1}\). Thus, the references 1 (\(V_{ref1}\)) and 2 (\(V_{ref2}\)) potentials define the current on \(R_{1}\) as follows:  
\[I_{LD}=\frac{V_{ref1}-\left(V_{ref2}+0.6\right)}{R_{1}} \tag{26}\]  
The \(V_{ref1}\) is a fixed voltage source that supplies current to \(R_{1}\) and the laser, while \(V_{ref2}\) can be adjusted through a digital potentiometer (AD5175) that has a 10-bit resolution (1024 positions) and a nominal resistance of 10 k\(\Omega\). As a result, when the potentiometer is set to its maximum resistance (1023 position), \(V_{ref2}\) reaches its maximum value as well. At this point, the transistor operates in cutoff mode, causing the laser's supply current to drop to zero. Furthermore, if the potentiometer is set to its minimum (0 positions), which is approximately 0.3 k\(\Omega\), \(V_{ref2}\) reaches its minimum causing the maximum current through \(R_{1}\) and the laser (20 mA). Nevertheless, the minimum \(V_{ref2}\) should be higher than the maximum laser operating voltage to prevent the transistor from entering the saturated region. In this case, the transistor operates in the active zone, resulting in a linear relationship between the laser supply current and the position of the digital potentiometer (as shown in Figure 8). Finally, \(R_{1}\) is calculated to ensure that the maximum current over the laser remains below the manufacturer's current limit. Figure 7: Electrical schematic of the proposed low-cost laser driver. The measuring element is made up of an internal probe (photodiode) of the laser diode that senses the emitted light power. The photodiode is reverse-biased to obtain a linear response of the current generated by the photodiode and the sensed power. The current from the probing photodiode is converted to a voltage and magnified by a trans-impedance amplifier and an inverting operational amplifier, respectively. The amplified voltage is finally injected into a 16 bits analog-digital converter or _ADC_ (ADS1115) that generates the feedback signal for the controller. Figure 9 shows the calibration of the feedback signal referenced to the optical power measured directly at the output of the laser using a power meter (Newport, Model 840-C) tuned to a wavelength of 650 nm. In addition, the figure shows that the photodiode of the laser is robust to temperature, and thus the calibration is transversal for the sensed temperature range. The linearity of the actuator and measurement element relationships are shown in Figures 8 and 9. These linear relationships allow the implementation of a controller using the value of the resistance of the potentiometer as a control signal and the voltage of the trans-impedance amplifier as a feedback signal. Finally, a \"Sparkfun ESP32 thing\" was used as a controller for its low cost and low power consumption. Figure 8: The linear experimental relationship between the control signal (current supply) and signal actuator (potentiometer positions) at varying operating temperatures.