# Development of an Energy-Efficient Smart Socket Based on STM32F103
## 4 Experimental Validation and Discussion  
A lab-scale prototype was developed in this section to validate the proposed methodology and test the functional requirements of the energy-efficient smarter socket (see Figure 6). In the experimental validation, a TV set was employed as the host device with a TV receiver box and a stereo system involved as slave appliances. In addition, to evaluate the precision of measurement conducted by the proposed system, error analysis was also included and discussed in this section. Figure 5: Flow chart of the program. Functional testing indicates that the developed system can fully satisfy the control requirements with a response delay no more than 2 s. With the switch on or wake up of the host device, slave appliances were powered on immediately, and the status \"on\" displayed on the LCD module. Figures 6 and 7 illustrate that continues electricity supply in both the host and slave jacks is achieved with the switching on of the host device. While switch or sleeping mode of the host device results in a quick power off in slave appliances within less than 2 s' delay, and the status \"off\" will be displayed on the LCD module. Figure 8 indicates that both the host and slave jacks were powered off after switching off the host device. With the host-slave control mechanism applied, standby energy reduction of electric appliances is then achieved. To test the functional requirements and control mechanism, a scenario analysis was conducted in this research with diverse loads applied to the host and slave jacks. The functions of the smart socket were validated indirectly by measuring the current values of host and slave jacks in different scenarios. As shown in Table 3, with no load applied on the host jack in Scenarios 7-9, the current in host jack becomes zero even if there are loads applied on the slave jacks. Moreover, there is no current in slave jacks in this case. This kind of safety design can ensure the power cutting in slave jacks with the turn off of host appliances. While Scenarios 1, 2, 4, 5, and 10 indicate that continuous current in host jacks is a precondition for continuous current in slave jacks. However, in Scenarios 3 and 6, slave jacks were powered off even if there is continues current in the host jack, as no load applied on the slave jacks. In light of the above, it can be concluded that the current in slave jacks are controlled by that in host jacks, which is the fundament of standby energy reduction and safety-oriented design proposed by this research. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Scenario** & \begin{tabular}{c} **Input** \\ **Voltage (V)** \\ \end{tabular} & \begin{tabular}{c} **Load of the** \\ **Host Jack (\(\Omega\))** \\ \end{tabular} & \begin{tabular}{c} **Load of the** \\ **Slave Jack (\(\Omega\))** \\ \end{tabular} & \
\begin{tabular}{c} **Current in the** \\ **Host Jack (A)** \\ \end{tabular} &
\begin{tabular}{c} **Current in the** \\ **Slave Jack (A)** \\ \end{tabular} \\ \hline
1 & 220.00 & 100.00 & 100.00 & 2.23 & 2.25 \\
2 & 220.00 & 100.00 & 200.00 & 2.23 & 1.11 \\
3 & 220.00 & 100.00 & 0.00 & 2.22 & 0.00 \\
4 & 220.00 & 200.00 & 100.00 & 1.11 & 2.23 \\
5 & 220.00 & 200.00 & 200.00 & 1.11 & 1.11 \\
6 & 220.00 & 200.00 & 0.00 & 1.10 & 0.00 \\
7 & 220.00 & 0.00 & 100.00 & 0.00 & 0.00 \\
8 & 220.00 & 0.00 & 200.00 & 0.00 & 0.00 \\
9 & 220.00 & 0.00 & 0.00 & 0.00 & 0.00 \\
10 & 220.00 & 500.00 & 500.00 & 0.43 & 0.44 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Current values of host and slave jacks with different loading contexts. Figure 6: The developed smart socket. Targeting at the energy saving and economic attractiveness associated with the application of the developed smarter sockets, lifecycle analysis was conducted in this research, considering the embodied cost of the smarter socket and the benefits contributed by standby energy saving.