# An IoT Reader for Wireless Passive Electromagnetic Sensors
## 2 Materials and Methods
### IoT Mini-Computer Layer  
The IoT mini-computer used is the Arduino model MKR1000 [31]. This mini-computer has 28 pins, but only four are needed: _VIN_ for the board power supply, _GND_ connected to common ground of the reader, _A1_ which is proportional to the output of the RF interface (_val_ signal) and _A2_ which is proportional to the periodic triangular sweep function (_sync_ signal). _A1_ and _A2_ are the analog inputs #1 and #2 of the Arduino MKR1000 mini-computer. Both analog inputs have ADCs to digitize the input signals. The ADCs are set to work with 10 bits resolution. The sampling rate is \(1/(120\)\(\upmu\)s) approximately, which is much higher than the sampling rate needed for sampling the detected signal from the sensor and the triangular sweep function. Figure 16: Schematic (**a**) and manufactured SDD (**b**). Figure 17: Characterization of the proposed SDD. Measured reflection coefficient (\(1\,\mathrm{S}_{11}\,\mathrm{l}\)) (**a**) and detected voltage versus the input power for 1.6, 1.75 and 1.9 GHz (**b**). Some operational amplifiers (OA) based circuits are used as signal conditioning before the analog inputs of the mini-computer. Figure 18 shows the used pinout and signal conditioning circuits. The maximum received input power of the SDD is 10 dBm (explained in the previous section), which corresponds to a detected voltage \(V_{DET}\) equal to 840 mV (Section 2.3). Thus, the objective of the non-inverter amplifier configuration connected to the \(A1\) pin is to amplify the output of the RF interface voltage up to 3.3 V, which is the maximum Arduino input voltage. This improves the notch detection by using the whole dynamic range of the Arduino ADCs used for the data acquisition. For this reason, the gain factor \(1+R_{2}/R_{1}\) of non-inverter amplifier is set to 3.55. On the other hand, the purpose of the signal connected to the pin \(A2\) is the digitization of the periodic triangular signal. For this reason, it is necessary to attenuate the signal \(V_{TUNE}\) with a highest voltage at 15.5 V below 3.3 V, which is the maximum Arduino input voltage. In order to obtain this attenuation, two OA-based stages are used in a buffered voltage divider configuration. A voltage divider is placed between two voltage followers in order to eliminate the loading effects. The voltage-divider factor \(R_{4}/(R_{4}+R_{3})\) must set below 0.21 to achieve an attenuated triangular signal with a maximum voltage of 3.3 V at the analog pin \(A2\). The conditioning circuits are implemented by using standard resistors and the LM324N integrated circuit [44], which contains the OAs. Finally, the digitized signals can be remotely monitored through the Internet thanks to the IoT functionalities of the mini-computer. The IoT-R is connected to the Internet through the WiFi interface of the Arduino board. The sensing data can be remotely obtained following the communications protocol shown in Figure 19. In Figure 19a the protocol stack model is shown. The proposed IoT-R protocol is defined as an user command protocol. The communication protocol is mounted over TCP/IP in the application layer. On the other hand, with this scheme the reader has an IP address associated. Moreover, the reader is listening the requests associated to this protocol at port 23 of TCP. The data acquisition through the Internet, between a _SERVER_ and a _CLIENT_, is possible thanks to this protocol. In this protocol, the _SERVER_ is the IoT-R and the _CLIENT_ is the remote device asking for the sensing data.