# Development of an Energy-Efficient Smart Socket Based on STM32F103
## 5 Precision Testing and Error Analysis  
Regarding the functional requirements, the voltage and current measure module play a critical role in the control logic operations. This section was developed to validate the precision of the measurement unit and identify the sources of errors. Figure 9 illustrates the results of monitoring voltage displayed on the LCD module. An adjustable AC source was employed to provide an input voltage of 178.00-251.00 V for accuracy testing. It was observed that the errors between measured and real values are less than 3.00%. Further investigation also indicates that the errors presented as a random distribution with a range of \(-\)1.05-2.85%. As there is a linear relationship between the input and output voltages shown in Equation (1), a possible explanation is that the errors are attributed to the characteristics of circuit elements. Therefore, precision improvement for the developed smart socket system could be achieved by using electronic elements with higher design and manufacturing qualities.  
Current in the host and slave jacks is another important parameter for the control operations and overcurrent protection mechanism of the smart socket system. Therefore, the precision of the current monitoring unit is of great concerns. In the experimental phase, resistors of 100 \(\Omega\), 200 \(\Omega\), 500 \(\Omega\) and 1000 \(\Omega\) were employed as loads to validate the accuracy of current measurement in the host jacks. With a supplied AC voltage of 220 V, the real values, monitoring data and errors of current in the host jacks then can be obtained as shown in Figure 10. It was observed that the error between real value and monitoring data is up to 3.00%, with all the recorded errors fall in the interval of \(-\)1.00-3.00%. In addition, the errors are presented with a near linear distribution, which is consistent with the relativity of input-output current shown in Equation (2). These linear errors can be eliminated by applying calibrations on the raw data collected by the monitoring units.  
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Description** & \begin{tabular}{c} **Operational** \\ **Power (W)** \\ \end{tabular} & \begin{tabular}{c} **Standby** \\ **Power (W)** \\ \end{tabular} & \begin{tabular}{c} **Daily Operating** \\ **Hours (h)** \\ \end{tabular} & \
\begin{tabular}{c} **Lifecycle** \\ **Operational Cost (\%)** \\ \end{tabular} &
\begin{tabular}{c} **Lifecycle** \\ **Standby Cost (\%)** \\ \end{tabular} \\ \hline TV & 100.00 & 1.80 & 5.00 & 2190.00 & 149.80 \\ TV receiver box & 10.00 & 9.20 & 5.00 & 219.00 & 765.60 \\ Stereo system & 60.00 & 10.00 & 5.00 & 1314.00 & 832.20 \\ Smart socket operational & 1.00 & 0.80 & 5.00 & 22.00 & 66.60 \\ Total operational & 171.00 & 21.80 & 5.00 & 3745.00 & 1814.20 \\ Smart socket embodied & & & & & 37.00 \\ PCB (Printed Circuit Board) & & & & 6.00 \\ Components & & & & & 14.00 \\ Shell and Packing & & & & & 5.00 \\ Patch board & & & & & 12.00 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Lifecycle assessment setting and results.  
Figure 9: Voltage outputs and errors with various AC inputs.  
With respect to the error analysis for current values of slave jacks, similar experiments were established in this research with loads, including 100 \(\Omega\), 200 \(\Omega\), 500 \(\Omega\) and 1000 \(\Omega\) resistors integrated invalidations. As shown in Figure 11, the recorded errors fall in the interval of \(-\)1.00-3.00%, and proportional to the input current in the slave jacks. Moreover, these types of near linear errors could be calibrated.