# Smart Tags: IoT Sensors for Monitoring the Micro-Climate of Cultural Heritage Monuments
## 2 System Architecture and Design
### Hardware Components  
The smart tag includes an ESP32 micro-controller [18], which is the main processing unit and hosts the sensors. The sensors connected to the smart tag are the Sensirion-SHTC3 [19] and the SAMYOUNG SY-DS-1L [20]. Both sensors have been evaluated, and they record reliable measurements with high sensitivity. The Sensirion-SHTC3 provides air temperature and relative humidity measurements and has low power consumption. The SAMYOUNG SY-DS-1L is used to determine the wet/dry condition on the building walls. The smart tags connect to the middleware, where an MQTT broker is installed, as a client and publish the data via pub/sub MQTT protocol. The connection is established by the SIM7020 module that provides NB-IoT network connectivity. The smart tags are powered based on a power management module, including a rechargeable battery and a solar panel, to ensure that they meet the requirements for autonomy and long operational life. An external power source via micro-USB is also supported to ensure smart tag operation. The ESP32, shown in Figure 3, is the main processing unit of the smart tags that controls all its functions. It is a low-cost solution that includes a powerful Xtensa 32-bit LX6 Dual-core processor, it has sufficient memory, it supports WiFi and Bluetooth connection and it can be configured to be low powered. The specifications are as follows:  
* Xtensa 32-bit LX6 Dual-core processor and Ultra low power co-processor;
* WiFi (2.4 GHz-2.5 GHz), Bluetooth 4.1--BLE;
* 448 KB ROM, 520 KB SRAM, 16 KB SRAM in RTC;
* Current Consumption: WiFi Tx packet: 160-260 mA, Idle mode: 30 mA, Deep-Sleep: 10 \(\mu\)A;
* Operating temperature : \(-40\) \({}^{\circ}\)C to \(+85\) \({}^{\circ}\)C.  
Sensirion-SHTC3, shown in Figure 3, is a low-cost digital sensor that measures the temperature and relative humidity with high accuracy. The chip consists of a capacitive humidity sensor, a bandgap temperature sensor, analog and digital signal processing, an A/D converter and calibration data memory. The communication with the ESP32 is managed with the digital, fast communication interface I2C. SHTC3 has also the capability to be set into a low power mode when it is not used. The specifications are as follows:  
* Temperature: \(-40\) to +125 \({}^{\circ}\)C \(\pm\) 0.2 \({}^{\circ}\)C;
* Humidity: 0-100% \(\pm\) 2.0% RH;
* Current Consumption: Measurement (Low power mode): 270-570 \(\upmu\)A, Sleep mode: 0.3-0.6 \(\upmu\)A, Average (one measurement per second): 0.5 \(\upmu\)A.  
SAMYOUNG SY-DS-1L, shown in Figure 3, is a resistive analog dew sensor with a resistivity that increases exponentially with the relative humidity. The dry/wet condition of the walls can be determined based on the increase in the sensor's resistivity. If the resistivity is increased exponentially, the condition is wet; otherwise, it is dry. The threshold is determined based on sensor characteristics. The communication with the ESP32 is established via the ADC port to convert the analog value of the sensor into a digital measured value using firmware. The specifications are as follows:  
* Humidity: 0-100% RH;
* Current consumption: 20 \(\upmu\)A;
* Standard characteristics: 10 k\(\Omega\) Max. at 80% RH, 100 k\(\Omega\) Max. at 93% RH, 200 k\(\Omega\) Max. at 88% RH. The power management unit consists of a rechargeable Li-Ion 18650 3000 mAh battery, a 6 V-1.2 W solar panel, a TP4056, shown in Figure 3, charging module responsible for the battery protection and the charging of the battery using the solar power and, lastly, a voltage regulator that powers the ESP32 with steady voltage of 3.3 V from the battery. With a 3000 mAh battery, the smart tag can operate for about 6 months without sunlight. Using the solar energy to recharge the battery, the operational life of the smart tag can be further extended. The specifications are as follows:  
* Voltage Supply: 4.5 to 5.5 V;
* Battery protection;
* Output charging current: 1 A adjustable;
* Output voltage: 3.7-4.2 V;
* Charge precision: 2%.