## 2 System Architecture
### Communication Protocols  
Protocols such as ZigBee and Bluetooth Low Energy (BLE) are used in IoT applications, with all of them serving as wireless communication protocols with specific differences in data bandwidth, power consumption, and accuracy [34]. In terms of power saving, BLE is an improved optimized protocol for low-power consumption, making it ideal for devices that operate with batteries and need to send small numbers of data such as sensor readings. ZigBee, which is another energy-efficient protocol functioning as a mesh networking protocol, allowing multiple devices to be connected over long distances with moderate pacing but consumes more power over large periods of time compared with BLE. Regarding data transmission rates, BLE performs communication rates of up to 1 Mbps, ideal for most of IoT applications, and ZigBee has lower rates of up to 150 kbps but with excellent range and network scalability. In terms of fidelity, BLE is the one that provides value in short-range communications with low error rates especially in point-to-point communications, like ESP32 and Raspberry Pi.  
Bluetooth Low Energy (BLE) is currently the best protocol for simple low-power point-to-point communications, like ESP32 and a Raspberry Pi, although it has limited scalability. ZigBee and Thread are both used for large-scale IoT security advanced-complex mesh connections. Wi-Fi Direct is a protocol that offers high data throughput like media sharing, making it a not-ideal protocol for us to use due to its power consumption requirements and less attractive for sensor-based IoT systems communications.  
Comparing the most popular communication protocols that are used in IoT applications, we can say the following:  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **Specification** \\ \hline Processor & Broadcom BCM2711, Quad-Core Cortex-A72 (ARM v8) @ 1.5 GHz \\ RAM & 4 GB LPDDR4-3200 SDRAM \\ Storage & MicroSD card slot (supports high-speed SD cards) \\ USB Ports & 2 \(\times\) USB 3.0, 2 \(\times\) USB 2.0 \\ Video Output & 2 \(\times\) Micro HDMI (supports 4K resolution) \\ Networking & Gigabit Ethernet (1 Gbps), Wi-Fi 5 (802.11 ac), Bluetooth 5.0 \\ GPIO & 40-pin header for hardware interfacing \\ Power Supply & USB-C, Power consumption: 2.8–7.6 W \\ Operating System & Raspberry Pi OS, Ubuntu, Debian, other ARM-based OS \\ \hline \hline \end{tabular}
\end{table}
Table 1: Raspberry Pi system specifications.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **Specification** \\ \hline Supported Networks & 5G (sub-6 GHz), 4G LTE, 3G HSPA+ \\ Maximum Speeds & 5G: 2.5 Gbps DL, 900 Mbps UL \\  & 4G LTE: 1 Gbps DL \\ Interfaces & USB 3.1, PCIe (some models), UART, GPIO \\ SIM Card Slot & Nano SIM (eSIM support on some models) \\ Antenna & External 4\(\times\) 5G antennas required \\ \hline \hline \end{tabular}
\end{table}
Table 2: 5G module specifications.  
LoRaWAN is the most energy efficient for long-range protocol, low-frequency communication, ideal for remote environmental monitoring, and has a long battery life.
* BLE is ideal for short-range communications with high-frequency, and has ultra-low power consumption requirements.
* ZigBee provides a good balance between range and power, but with higher energy costs.  
Table 3 summarizes the key differences between these protocols.  
The power source of the ESP32 in IoT is batteries. This greatly benefits from BLE's low-energy power consumption, which enables longer operational periods without the frequent need for recharge. In addition to this, the 1 Mbps data rate for BLE is more than enough for compact data strings from the sensors (e.g., temperature, humidity readings), while the point-to-point architecture allows communication with the Raspberry Pi and ESP32 without the overhead from a ZigBee mesh network; a reason that makes it ideal for remote monitoring systems that require low power communication.