## 3 SMTRPM Design
### Hardware System
#### 3.1.1 Design of Sensor Prototypes  
Each patient node monitors the activity of two sensors, the BT sensor and the HR sensor, and informs other patient nodes about any events. The design of the sensor prototypes is explained in the following. (a) Body Temperature Sensor Prototype  
The BT is a critical measure of the health status of the patient. Typically, the BT can be classified into three categories: hypothermia, which occurs when the patient temperature is below 36.0 \({}^{\circ}\)C; normothermia, which is the acceptable range of 37.5 \({}^{\circ}\)C to 36.5 \({}^{\circ}\)C for the human body; and hyperthermia, which occurs when the patient temperature exceeds 37.5 \({}^{\circ}\)C. Hypothermia is considered a potentially fatal emergency condition, and it is possible that letharge, cardiac arrest, or even coma  
Figure 2: Sink node connected to BT and HR sensors: (**a**) general view of the sink node; (**b**) sink node attached to HR sensor; (**c**) sink node attached to BT sensor. could occur if it is not treated quickly. Hyperthermia is an elevated body temperature due to failed thermoregulation, a situation that may cause organ damage or death [16]. There are many places where the BT may be measured, including the armpit, mouth, rectum, and ears. In general, the armpit is the easiest location to measure the BT, and nurses place a thermometer under the patient's armpit to acquire the BT. For this reason, an elastic band was developed to locate the sensor in the armpit. The prototype for BT measurement was developed for the purpose of testing the SMTRPM; consequently, the medical security protocols that must be followed when testing medical devices in PHIs were not incorporated in the design. The final BT prototype is shown in Figure 3. The prototype is an assembly of an NTC-CL80 thermistor and an elastic band. When the device is placed on the patient, the sensor must be located in contact with the patient's armpit. Conventional digital thermometers use different types of thermistors to acquire the body temperature. The BT prototype was characterized using Equation (1), based on the NTC-CL80 thermistor curve [17]. \[K=(\beta)\Bigg{(}\frac{1}{ln(\frac{R}{R_{0}})+(\frac{\beta}{T_{0}})}\Bigg{)} \tag{1}\]  
where \(\beta\) is the constant of the thermistor material, \(R_{0}\) and \(T_{0}\) are reference points on the NTC thermistor characterization curve, \(R\) is the resistance value of the body temperature, \(ln\) is the natural logarithm, and \(K\) is the BT of the patient in degrees Kelvin. The BT prototype was tested and compared with a commercial thermometer using different \(\beta\) values. Note that \(\beta\) is temperature dependent and is specified between two temperature points on the NTC-CL80 curve. Different \(\beta\) values were compared in order to improve the accuracy of the BT sensor. The body temperature of the test patient was 36.5 \({}^{\circ}\)C when measured with a digital thermometer. The closest match between the instruments was obtained for \(\beta\) = 3260.5, with a relative error value of 0.001. This \(\beta\) value was used in the program implementing the BT algorithm, which is described in Section 3.1.2. Table 2 shows the experimental results from the 30 comparative runs between the BT prototype and the commercial thermometer, which were performed for three values of \(\beta\). Figure 3: BT prototype: (**a**) BT sensor based on an NTC-CL80 thermistor and (**b**) elastic band with the thermistor located to acquire the patient’s BT. (b) Heart Rate Sensor Prototype  
The HR is one of the most critical measures of patient health. In fact, evidence of high HR variability can support diagnoses such as infection, high levels of triglycerides or cholesterol, and lethal arrhythmias [18,19]. The SMTRPM is able to measure the patient's HR through a non-invasive photoplethysmographic sensor shown in Figure 4a. The system detects the heart beats per minute (BPM) and normal-to-normal heartbeat intervals (N-N intervals) from a continuous ECG wave record.