## 2 Materials and Methods
### Logics and Operation of the System  
The system's operating principle involves the switching of resistive loads to which the voltage from the photovoltaic panel is applied, allowing for the acquisition of its characteristic curve. The switching of resistive loads was achieved using an 8-channel relay module and 8 resistors with 100 W power ratings each. Each resistor was individually connected to each channel of the relay module so that when all eight channels were active, all resistors would be associated in parallel. Since the channels can be switched on or off individually, there are two possible states for each resistor, resulting in a total of 28 possible combinations/resistances, which means 256 distinct resistor associations. Thus, through programming in ArduinoTM, it was possible to vary the equivalent resistance of the resistor association (resistive load) by activating different channels of the relay module at each moment in time, enabling the acquisition of voltage and current values from the photovoltaic panel applied to different resistive loads. To facilitate data acquisition, an LCD shield with a keypad was added to the ArduinoTM module. Each relay was associated with an index of a binary vector of eight. For each combination among the 256 possibilities, the combination index was converted into binary,  
Figure 3: Data acquisition system: (**a**) sketch and (**b**) final assembly. Figure 2: Voltage divider. consisting of zeros and ones. The binary value was then inserted into the vector, so that when a value equal to 1 is in a certain position of the vector, the relay associated with that position would be active, considering the resistor connected to that relay in obtaining the equivalent resistive load. Table 2 illustrates representative binary input configurations, indicating which resistors are activated and the resulting equivalent resistance connected to the PV panel. Each reading from the system provides voltage (V), current (A), and power (W) data from the electric generator. A full sweep of all 256 combinations would take over eight minutes (approx. 501 s), making the measurement highly susceptible to errors from fluctuating solar irradiance and temperature. To address this, 23 combinations were strategically selected to cover the panel's entire operating range, with increased measurement density near the expected maximum power point (MPP). This ensures that the \"knee\" of the I-V curve is accurately captured, which is critical for determining the panel's peak performance, while reducing acquisition time to just 45 s, minimizing the effects of environmental variability. Notably, the first measurement corresponds to the open-circuit condition, where all relays are deactivated and no current flows, allowing direct acquisition of the open-circuit voltage (\(V_{oc}\)). Additionally, at lower voltage levels, the output current tends to remain constant and approximately equal to the short-circuit current (I\({}^{\text{sc}}\)), making it straightforward to infer this parameter even if it is not directly measured through a zero-resistance configuration [39]. These combinations were defined using an 8-bit binary sequence, where each digit (0 or 1) represents whether a specific resistor is switched off or on, respectively. Figure 4 presents the steps for automatically generating the resistive loads and performing voltage and current measurements, while a pseudocode is presented in Appendix A Algorithm A1. The experimental setup is powered by distinct sources to ensure stable operation. The Arduino Mega 2560 board and the ACS712 current sensor are powered directly via a standard USB connection to a computer, which also facilitates data logging. To prevent overloading the board's power output, the 8-channel relay module is energized by a separate, dedicated 5V power supply. The data sampling protocol for each resistive load is executed to ensure measurement stability. The process consists of 10 main reading cycles.