## 5 Results
### Energy Consumption Analysis Experiments for SNs  
To evaluate energy consumption, the Power Profile Kit II from Nordic Semiconductor was utilized to measure the electric current consumed by the SN nodes. Energy consumption tests for the SNs were conducted using a supply voltage of 1.8 V, and an initial transmission power of 0 dBm. The Power Profile Kit II is a high-precision micro-ammeter connected in series with the power source and the SN. The Power Profile Kit II is also connected to a computer via a USB port, and the measurement results are visualized through a graphical interface provided by Nordic Semiconductor.  
The energy consumption tests were conducted without the BME-680 and the soil moisture sensor, focusing solely on the BLE beacon's consumption. This approach compares with related studies focusing similarly on beacon consumption. The results of each test were determined by 60 individual measurements, and then statistical analyses, including the mean and the standard error of the mean, were calculated for the energy consumption in each test scenario.  
Comparative energy consumption experiments were conducted to determine the energy consumption of the BLE beacon and the optimized embedded software. These experiments compared the beacon's energy usage when using firmware routines from the manufacturer's SDK in an RTOS versus firmware routines in bare-metal. Initially, the beacon's consumption was measured in idle mode, followed by transmission mode for a 3-byte advertising message, with a transmission power of 0 dBm, and only one active BLE channel (channel 37). Table 2 summarizes the results of these beacon evaluations.  
Thus, the optimizations achieved through bare-metal embedded software significantly minimize energy consumption compared to RTOS-based firmware. Therefore, we decided to proceed with the bare-metal firmware for subsequent experiments.  
Afterward, energy consumption was analyzed by focusing on the impact of varying the BLE Packet Data Unit (PDU) payload size. It is important to note that the maximum allowed payload size is 31 bytes, divided into 3 bytes for the Flags field and 28 bytes for the actual data. The test was conducted with advertising messages being transmitted at 1-s intervals, inheriting the previous experiment's transmission power and channel configurations. Figure 8 illustrates the obtained results.  
Another evaluation of energy consumption conducted, as depicted in Figure 9, involved analyzing the relationship between the transmission power of the SN and its energy consumption. The Nordic nRF52840 SoC allows the BLE transceiver transmission power to be adjusted from \(-12\) dBm to 8 dBm.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Firmware** & **Sleep Mode (\(\mu\)))** & **Tx Mode (\(\mu\)))** \\ \hline RTOS & 13.4 & 24 \\ Bare-Metal & 2.25 & 11.8 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparative analysis of beacon power consumption: bare-metal firmware vs. RTOS firmware.  
Figure 8: Relationship between energy transmission consumption of the SN and PDU Packet size.  
Figure 9: Relationship between energy transmission consumption of the SN transmission power.  
The final energy consumption assessment by \"FloatingBlue\" architecture is related to the projection of the SN's battery autonomy concerning the beacon's transmission power, as depicted in Figure 10. For this, a 1050 mAh and 3.7 V lithium battery was considered, the same specification used in the functional tests of the architecture.