# Democratization of PV Micro-Generation System Monitoring Based on Narrowband-IoT
## 3 IoT Monitoring Solution
### Hardware
#### 3.2.2 DC-Output Voltage: Yndc Hv25 Sensor  
Regarding the DC voltage measurement, the low-cost YHDC HV25 sensor was selected. It allows us to measure voltages up to 1000 V, scaling them to 5 V. Since the analog inputs were used according to the Pycom FiPy microcontroller--working at 3.3 V, it was necessary to include a voltage divider circuit between the sensor output and the analog-pin input. This voltage divider consists of a 56 k\(\Omega\) resistor and two 56 k\(\Omega\) resistors in series. In this way, an output of 3.3 V is obtained for an input of 1000 V, with a sensitivity of 3.3 mV/V. With the aim of calibrating the sensor, a set of measurements were carried out from from 0 V to 1000 V, in steps of 50 V. For this purpose, a symmetrical voltage supply of \(\pm\)12 V and a variable voltage output signal were used together with the 3041A precision multi-product calibrator, see Figure 4. A set of input voltage measurements were compared to the real DC voltage to obtain a calibration curve for this voltage sensor. In a similar way to Section 3.2.1, an additional set of measurements were also collected to estimate the relative error under different boards. By considering that each solar panel had an open-circuit voltage (\(V_{oc}\)) of 50 V, the determined relative error was lower than 3%.  
Figure 3: Current sensor calibration process: comparison of input current vs measured current.  
Figure 2: Current sensor calibration assembly: Transmille 3000A Series calibrator, ammeter, regulated power supply and current sensor.  
Due to the high error obtained in the low range of measurement--lower than 50 V--the option of recalculating the voltage divider was then proposed by the authors. The target was to equate the maximum input of 3.3 V to 800 V to test if the sensor precision could be improved below 50 V. After a series of testing measurements, the option was finally discarded since they did not significantly improve the results, and there was a risk of obtaining a voltage higher than 800 V that could damage the equipment. It was observed that the selected sensor did not provide a suitable voltage output for inputs lower than 50 V. Therefore, a voltage divider was included in the laboratory tests to allow collecting voltage data below such a threshold instead of using the YHDC HV25 sensor. This voltage divider was formed by two resistances: 10 k\(\Omega\) and 1 k\(\Omega\), respectively. The output signal was then collected from the 1 k\(\Omega\) voltage value. Given the high variability of the error for each YHDC HV25 plate, the option of calibrating each board individually, with its own calibration line, was selected. With this aim, Figure 5 compares the calibration process for three different voltage sensor boards. In addition, Table 3 shows the estimated relative errors for these three different voltage sensor boards. As shown in these results, the proposed board has minor accuracy at low voltage levels but high accuracy over the expected operating voltage ranges in medium and small PV installations. Therefore, it is accepted for our proposals.