A noninvasive smart wearable for diaper moister quantification and notification

Received Sep 10, 2018 Revised Mar 12, 2019 Accepted Apr 3, 2019 A baby feels uncomfortable in a wet diaper and it can cause health issues such as diaper rash. Diaper rash can be avoided by changing the diaper as soon as the baby urinates or passes stool. In this project, a smart wearable gadget is developed which sends an automatic notification to a caregiver’s smartphone whenever the baby urinates. The proposed wearable detects urination event noninvasively by sensing the temperature rise on the outer surface of the diaper and quantifies the event using a decision tree and a midpoint based k-nearest neighbor (KNN) hybrid classification algorithm. The gadget is a small size, low power, low cost and reusable electronic device that is attached externally to the outer surface of the diaper. The gadget can be used with any disposable diaper, thus no change in the diaper production process or price increase is required. The smartphone app shows the diaper change urgency score and logs all the urination events. This record can facilitate treating diseases where accurate records of urination are required. A prototype of the hardware gadget and a smartphone app is developed and tested.


INTRODUCTION
In the United States alone, 27.4 billion disposable diapers for babies are consumed every year [1] and 75% of parents reported that their infant had diaper rash [2]. Wearing a wet diaper for a long time can be uncomfortable and can cause health issues such as diaper rash, skin irritation and urinary tract infections (UTI). The best way to avoid these health issues is to change the diaper often and as soon as possible after the baby urinates or passes stool [3][4][5][6][7]. Daycare caregivers or parents sometimes forget or do not have time to manually check the diaper condition of their babies throughout the day.
A solution to the above problems is proposed in this paper. In this age of smart devices, most of the caregivers carry a smartphone all the time. In this project, a novel wearable gadget is developed which sends an automatic notification to a caregiver's smartphone whenever the baby urinates. In this work, the proposed wearable gadget detects and quantifies the urination event by sensing the temperature rise on the outer surface of the diaper. Depending upon the quantification of the urination event, the smartphone app calculates and shows a diaper change urgency score from 0 to 100, which helps the caregiver to decide when to change the diaper more efficiently. The gadget is a low cost and small size electronic device that is attached externally to the outer surface of the diaper using hook-and-loop fasteners. The gadget can be used with any disposable diaper, thus no change in the existing diaper production process or price increase is required. The electronic gadget is reusable. The overall system is shown in Figure 1. (c) Data sent to physician online The problems and the proposed solutions are mentioned below. a. Wearing a wet diaper for a long time is uncomfortable and can cause health issues such as diaper rash (known as Irritant diaper dermatitis) which causes skin irritation [1]. It can also lead to bacterial and yeast infections as a moist and warm area are suitable for their growth. The best way to avoid diaper rash and bacterial infection are to change the diaper often and as soon as possible after the baby urinates or passes stool. The automatic notifications with diaper change urgency score to the caregiver's smartphone will alert them whenever the diaper needs to be changed and will prevent wearing of the wet diaper for a long time, ensuring better health and comfort for the babies. b. Approximately 8,700 diapers are used for a baby from birth to toilet training and the total cost of those diapers ranges from 1,862.67 USD to 2,358.97 USD [8]. This is a significant cost and the proposed gadget can help to make better decisions when to change the diaper. The automatic notifications contain the diaper change urgency score -this information will help the parents to change the diaper when the diaper is significantly wet, instead of changing them after fixed intervals. Moreover, the smartphone app will automatically log the urination events in the database and will produce charts showing when and how many times urination and stool passing happened, urination quantity, how many diapers were changed in any day, week or month. This database will help the parents to budget and monitor the cost of diapers in an efficient way. c. In the cases of diarrhea, vomiting, and dehydration, a common question a physician would ask is the number of wet diapers that the baby had. The proposed system will help with this issue to a great deal by keeping the accurate record of the number of wet diapers and urination frequencies. The database generated by the smartphone app can be sent by online to the physician and thus the physician can get the accurate data for better diagnosis of the baby. d. The proportion of working moms in the United States has gone up. As a result, the daycares are getting more populated. The U.S. Bureau of Labor Statistics projects that daycare businesses will have some of the fastest employment growth of all industries through 2020 [9]. The proposed gadget can be a great product for home and especially in daycares where there are several babies and it is difficult for the caregivers to check each diaper condition frequently enough manually. e. In the United States alone, more than 13 million people are affected by urinary incontinence. At least 1 out of 10 people of age 65 or older suffers from incontinence which can lead to disability and dependency [10]. In addition, many disabled people are required to wear adult diapers due to incontinence and their inability to use a bathroom unaided. The proposed system can also be used in places like hospitals and in elderly care facilities, where the inhabitants are unable to change the diapers by themselves. Academic researchers and large technology companies have already entered the expanding field of population health monitoring with the introduction of wearables. In [11], an Intenet of Things (IoT) wearable device is designed to monitor oxygen saturation (SpO2) and heart rate from a website. A complementary metal-oxide-semiconductor (CMOS) based electrocardiogram (ECG) amplifier suitable for low power wearable cardiac screening is proposed in [12]. As an alternative to the external power supply, the work in [13] estimates the amount of electricity produced to power up wearable devices using a piezoelectric actuator. The study in [14] determines the degree of acceptance of these wearables devices among users and physical practitioners. Several commercial products are found for diaper moister detection. A commercial product in Brazil, TweetPee [15], constantly monitors humidity levels and uses Tweeter message for notification. However, a special kind of diaper need to be used for using TweetPee and the size of the gadget is still large and uncomfortable for babies. Sensassure is developing "Talli," [16] a reusable strip that attaches to the outside of standard commercial adult diapers for seniors and it communicates when the incontinence product becomes wet using moisture sensing. Some existing diapers have wetness indicator strip; it changes color when wet. However, if they are covered by garment, they are not visible and remain unnoticed. Several works are found in the literature for automatic detection of diaper moisture. In [17], diaper moisture is detected by inserting wet detector probes inside the diaper. The probes get in direct contact with urine and new sensor probe needs to be used each time a diaper is changed. This will increase the cost and it also makes it less user-friendly. In [18], a hardware is proposed which will be attached to the diaper consisting of the humidity sensor, Microcontroller Unit (MCU) and Global System for Mobile (GSM) module for urination detection. However, the GSM module consumes approximately 2 A current during transmit burst and it is difficult to design a small size coin cell battery operated power supply for this module. In [19][20][21][22], Radio-frequency identification (RFID) circuit based moisture detection system is developed where the disposable sensors need to go inside the diaper, thus new diaper production process is required. This will increase the cost of each diaper and the distance covered by RFID-based systems is only 1 to 1.5 meter. As moister and humidity sensors get saturated quickly after one or two urination, it is difficult to detect multiple urination events on the single diaper.
In the proposed work, urination event is detected and its quantity is classified by sensing the temperature rise at the outer surface of the diaper, so sensors never come in direct contact with urine or stool. That's why the proposed gadget can be reused without replacing any sensor probe at each time the diaper is changed, which reduces the cost and makes it more user-friendly. Moreover, multiple urination events on a single diaper can be detected by temperature sensing because sensors will not become saturated, unlike humidity sensors. The proposed gadget uses Bluetooth Low Energy (BLE) module which consumes ultra-low power and can be operated using the small size coin cell battery and can cover 100 meters [23]. Most smart devices (phones/tablets) today are equipped with BLE hardware, so the gadget can directly communicate with the smart devices to generate notification without the use of any intermediate hardware as used in [17]. Additionally, the proposed system logs the physiological data over time for detailed analysis by the health physician.

RESEARCH METHOD
The normal body temperature of a healthy baby is between 97 to 100.3°F [24]. The ambient room temperature where people and babies generally live is around 65 to 74°F [25]. When urine comes out from the body, they have the same internal body temperature, which is significantly higher than the ambient room temperature. Thus, when a baby urinates on a certain area of a diaper, the temperature of that area is increased and the heat is conducted from inside to the outer surface of the diaper. By sensing the temperature rise of the outer surface of the diaper, urination events can be detected. By extracting the features of the urination such as the temperature signal's peak, slope, energy, rise time, ambient temperature, and the total number of urination in the current diaper, etc. -the urination can be classified as small or large using a classification algorithm. The setup, as shown in Figure 2, is used to conduct experiments for generating a dataset of the feature vectors. and then data is passed to a computer (f) for logging In the experimental setup, diaper [26] is put on a scientific newborn baby model [27], as shown in Figure 2(a). One end of a flexible pipe, as shown in Figure 2(b), is connected to the genital of the model. From the other end of the pipe, artificial urine [28] having a temperature of approximately 99 °F is injected using a large syringe, as shown in Figure 2(c), to mimic urination events. A water bath [29] is used to keep the temperature of the artificial urine fixed to 99 °F during experiments. To mimic a small urination of a newborn, 15±3 mL artificial urine is used, and 60±3 mL is used for large urination, having a flow rate of approximately 3 mL/sec [30], [31]. The temperature of the outer surface of the diaper, Tdpr, and ambient temperature, Tamb, is sensed using the sensor unit, as shown in Figure 2(d). The sensor for measuring Tdpr is faced on the outer surface of the diaper and the sensor for measuring Tamb is faced towards the environment. A thermal insulator material (Styrofoam) is placed in between the two sensors. The analog temperature signals are then fed into a hardware unit, as shown in Figure 2(e). The hardware unit contains an analog front end which consists of amplifier and differential circuits, a microcontroller unit which reads the analog signals using its analog to digital converter (ADC) ports and a UART-USB converter which sends the ADC values to a computer to log data, as shown in Figure 2(f).

Detection of urination event
To generate data, experiments have been conducted by pouring 60 mL of artificial urine having a temperature of 99 °F on the diaper and sensing the temperate rise on the outer surface of the diaper, Tdpr, and its surrounding ambient temperature, Tamb. A plot of such an experiment is shown in Figure 3 When there is no urination -Tdpr and Tamb will have a similar value of ambient temperature. When urination happens -Tdpr becomes larger than Tamb. We can express urination event, Eurination, using (1) where OFFSET is a small value which makes (Tamb + OFFSET) slightly greater than Tdpr when there is no urination.
Equation (1) works for the first urination in the diaper. However, the scenario becomes more complicated for the next urination on the same diaper. After the first urination, the urine is stored in the diaper and as time passes, Tdpr goes down below Tamb due to evaporation process [32], [33]. This phenomenon is shown in Figure. 4. When second urination happens, the Tdpr rises, however, it may not rise above Tamb because Tdpr was significantly low due to evaporation. So, to detect urination event, we compare the rate of change (i.e. slope) of the Tdpr and Tamb. We express urination event, Eurination, using (2), where, OFFSET, is added to avoid false urination event due to noise. The plot of the slope of the temperature signals is shown in Figure 3 (2), multiple urination events can be detected in the same diaper. Let's consider some scenario when the baby is moved from one environment to another environment. If the baby is moved from low-temperature location to a high-temperature location, then the change of temperature for the ambient sensor will be higher than the diaper sensor because the ambient sensor is more exposed to the environment and diaper sensor is thermally insulated from the environment. In this case dt dT dt dT dpr amb  , and it will not be detected as false urination event. This is also true if someone touches the ambient sensor with hand or with any other body part which has a higher temperature than the ambient temperature. If the baby is moved from high temperature to a lower temperature location, then the slope will be negative. We design hardware to make a negative slope to be zero. To have a better sensitivity to temperature change, the slopes are amplified by a factor g. Finally, the equation for urination event detection is expressed using (3), where unit step function u(x) = 1 when x ≥ 0, and u(x) = 0, when x < 0.

Quantification of urination
Along with detection, a novel classification algorithm is constructed to quantify the urination event as small or large. The smartphone notifications will contain the information whether the urination is small or large, and will calculate the diaper change urgency score as expressed in (6). This score will help the caregiver to better decide when to change the diaper.

Generation of training and validation feature vectors
The classifier is constructed by using a training and validation dataset generated by conducting statistical experiments by pouring different quantities (15±3 mL for small and 60±3 mL for large for newborns) of 99 °F artificial urine using the experimental setup as shown in Figure 2. Some of the experiments were conducted with plain water instead of artificial urine; and when compared, no significant change in the temperature rise of the diaper has been observed between the two liquids. The feature vectors used in the algorithm are as follows: a. Ambient temperature, T_amb_event: The ambient temperature's proportional analog to digital converter (ADC) value when the urination event occurred. b. Diaper temperature, T_dpr_event: The initial diaper temperature's ADC value when the urination event occurred. c. Diaper temperature signal's peak, T_dpr_max: It is the maximum ADC value of the Tdpr. T_amb_event, is subtracted from T_dpr_max. After the first urination in a diaper, the urine is stored in the diaper and it cools down as time passes. When second urination occurs, features such as T_dpr_max, T_dpr_sum, dT_dpr_max, dT_dpr_sum etc. reduces due to the mixture of 99 °F urine with the cold urine that is already in the diaper. For successive urination events, the feature values get more reduced. This phenomenon is shown in Figure 5. This is the reason for using Urination Number as a feature in the classification algorithm.  Figure 2, for each of the cases as shown in Figure 6. In Figure 6, C1 is the case where the first urination happened on a clean diaper. C2 is the case where the second urination happened on the same diaper where the first urination classification result, R1, was small (S). In the same way, C3 is the case where the second urination happened and R1 was large (L). Similarly -C4, C5, C6, and C7 are the third urination cases on the same diaper; where R2 is the result of the second urination classification result. The features are scaled to SCALE_F = 1000, so each feature has equal contribution to the classification algorithm.

Midpoint based nearest neighbor hybrid classification algorithm
The proposed classification algorithm is a hybrid of the decision tree, as shown in Figure 6, and a novel midpoint based nearest neighbor algorithm. The existing k-nearest neighbor (KNN) classifier requires to store all the training feature vector samples in memory [34]. Thus, it is not space efficient and not suitable for embedded system applications where limited memory is available. Also, it requires to calculate the distances from the test point to each feature vectorthus it is time consuming when a large number of training feature vectors are used. In the proposed algorithm, only one feature vector, the midpoint vector, for each class label needs to be stored in the embedded system and only two distances (in case of two class labels) needs to be calculated for classifying a test point. Thus it is space and time efficient, and suitable for embedded system application. The proposed midpoint based nearest neighbor algorithm is described below.
For n-dimensional feature data, let's consider the feature vectors 1 (5). Ftest is classified as Lc, where disLc is the shortest; c ranges from 1 to K.
To visualize the concept, a graphical plot of the proposed midpoint based nearest neighbor algorithm is shown in Figure 7. Here, total dimension n = 2, total class label K = 2, and the labels are L1 and L2. Total feature vector samples for label L1, ML1 = 5; and for label L2, ML2 = 5. Here the test point is closer to the midpoint of L2 class than the midpoint of L1 class, (i.e. disL2 < disL1). So, the test point is classified as L2.  . disL2 < disL1). So, the test point is classified as L2.
For classifying urination, a decision tree as shown in Figure 6, is used. A case C1, C2…or C7 is selected depending upon Urination Number and previous urination results Ri. The classifier then uses the midpoint feature vectors for the selected case to calculate the Euclidian distance from the test vector. The feature vector used for the proposed midpoint based nearest neighbor algorithm is [t_rise, dT_dpr_sum, Here, total class label K = 2, and the labels are L1 = Small (S) and L2 = Large (L). If the embedded system is unable to classify an urination due to an error in extracting the features of the test vector, then it is classified as Unknown (U).

Calculating diaper change urgency score
To indicate the urgency of changing a diaper, the smartphone app displays a diaper change urgency score, X, calculated using (6); here TS is the total number of small (S) urination, TL is the total number of large (L) urination, TU is the total number of unclassified (U) urination, NS is the urgency weight for a small urination, NL is the urgency weight for a large urination, and Xmax is the possible maximum urgency value. Here, NL > NS and X value range from 0 to 100.

PROTOTYPE DEVELOPMENT
The prototype system consists of an electronic hardware gadget and a smartphone app. A brief description of each of the unit is given below.

Urination event detector hardware and firmware
Urination event is detected and classified by attaching a small electronic device on the outer surface of the diaper. The key design challenge of the device is to minimize power consumption for longer battery life and making it as small as possible to make it wearable. The hardware and the firmware of the electronic gadget are briefly described below.

Hardware
The block diagram of the hardware is shown in Figure 8. A brief description of each of the hardware blocks is given below.  Figure. 8. Block diagram of the urination event detector and classifier hardware unit. Here AFE is the analog front end, GD is gadget-on-diaper detector switch, NDB is new diaper button, BSY is busy indicator LED, T_dpr and T_amb are the diaper and ambient temperature sensors namely a. Temperature sensors Two thermistors [35], T_DPR and T_AMB are used to sense the diaper and the ambient temperature namely. These thermistors have a negative temperature coefficient and their resistance value at 25° C is 100 kΩ. Two voltage divider circuits as shown in Figure 9 is implemented. Vdpr and Vamb are connected with two analog to digital converter (ADC) ports of the microcontroller. The capacitors, CN1 and CN2 are used to filter out the noise. The analog front end (AFE) is the hardware implementation of (3). AFE contains differentiator, amplifier, and adder circuits as shown in Figure 10(a). The slop of the Vdpr is generated using an RC differentiator as shown in Figure 10(b). The slop is then amplified using a non-inverting amplifier having a gain, g, of 9.55. The amplifier is designed using a low power and small size quad op-amp chip [36]. The chip takes only the positive power supply and it generates 0v when the slop (i.e. the input voltage) is negative. This feature implements the u(x) function in (3). The input offset voltage of the non-inverting amplifier is adjusted using the circuit shown in [37]. The output of the amplifier dVdpr is fed at the -ve pin of the analog comparator (AC) of the microcontroller. In the same way, the slop of Vamb is generated using an RC differentiator and the slop is amplified using an op-amp based non-inverting amplifier of gain, g, 9.55. Then a small voltage, OFFSET, is added with it using a non-inverting summing amplifier and the output dVamb is fed at the +ve pin of the analog comparator of the microcontroller. This AFE is also used in the experimental setup shown in Figure 2.

c. Microcontroller with BLE
A low-power, small-size system-on-chip microcontroller with BLE, CC2541 [38], is used as the processing and wireless communication unit. The CC2541 contains an industry-standard enhanced 8051 MCU, 128 kB in-system programmable flash memory, 8 kB RAM, 2.4GHz BLE transceiver, 8 analog-todigital converter (ADC) channels, ultralow-power analog comparator (AC), and many other peripherals. The CC2541 has low-power sleep modes and it is suitable for systems where ultra-low power consumption is required to increase battery life. The microcontroller consumes only 0.5 μA current during low power sleep mode, and 18.2 mA current during BLE transmitting mode.
The dVdpr and dVamb are fed into the analog comparator of the microcontroller. Whenever the dVdpr is higher than the dVamb, the analog comparator triggers an interrupt which wakes up the microcontroller from sleep-mode. Then the microcontroller reads the features of the urination, classifies it, and sends a notification byte wirelessly using BLE to a smartphone.

d. Buttons and LED
When a caregiver changes a diaper, he/she removes the gadget from the wet diaper, attach it on the outer surface of the new diaper, and presses the new-diaper-button (NDB) to signal the gadget and the smartphone app that a new diaper is put on. The design includes a detector switch, referred to as gadgeton-diaper (GD) that get pressed when the gadget is put on the diaper; and unpressed -when it is not put on the diaper. The gadget also contains a hardware reset switch. A busy LED (BSY) indicates the device is calculating and it should not be removed from the diaper.

e. Coin cell battery
A lithium coin cell battery, CR2032 [39], is used as the power supply unit. It has a nominal voltage of 3 volts and typical capacity of 235 mAh.

Firmware
The BLE software development kit for CC2541 is a complete software platform for developing single-mode BLE applications [40]. The BLE protocol stack, the profiles, and all applications are all built around the Operating System Abstraction Layer (OSAL). The OSAL is a control loop that allows software for the execution of events according to priority. After a task is executed, the system goes to low-power sleep-mode automatically to save power. The system wakes up from sleep mode when an external interrupt is triggered. The firmware is built on a driver layer and an application layer. The driver layer consists of lowlevel firmware for accessing different hardware peripherals such as reading ADC port values, sending data byte using BLE, enable or disable analog comparator (AC) interrupt etc. The application layer access the hardware by calling the functions of the driver layer. The application layer is constructed using a finite state machine (FSM) as shown in Figure 11. Only the midpoint feature vectors for the small and the large class labels for each case (i.e. C1 to C7) are stored in the microcontroller's permanent memory. After the classification, the diaper history, Ri, is saved and a command bytecontaining the urination class information -is sent to the smartphone using BLE. The BLE transmission function contains code for writing to the Generic Attribute (GATT) profile of BLE [41]. It writes the command byte to characteristics of a service. Each characteristic and service has a Universally Unique ID (UUID). The service and characteristics UUID's used are 0000fff0-0000-1000-8000-00805f9b34fb and 0000fff4-0000-1000-8000-00805f9b34fb namely. For this application, the hardware gadget is configured as peripheral (i.e. GATT server) and the smartphone is configured as central (i.e. GATT client). After the command byte is sent using BLE, the FSM goes to the STABLE state and waits for the next urination event.
On STABLE state, if AC interrupt occurs and GD is not pressed, then it means that the AC interrupt occurred without the rise of temperature of the diaper, rather it could be generated from a warm human hand touching the sensor. This is a false alarm and the FSM goes to WAIT FOR STABLE state. During the EXTRACT FEATURE & CLASSIFY state, if the gadget is removed from the diaper (i.e. GD gets unpressed), then feature extraction is not possible and the FSM goes to WAIT FOR STABLE state assuming an unknown (U) class urination. The busy LED is turned off at the STABLE state and is turned on in the other two states to indicate the user not to remove the device.
Whenever the new diaper button (NDB) interrupt occurs, it clears the Urination Number, Ri, and sends a command byte to smartphone indicating a new diaper is put on. According to the BLE protocol [41], several peripherals (i.e. GATT servers) can connect with one central (i.e. GATT client) device. Thus, it is possible for several hardware gadgets to connect to one smartphone using BLE. This feature can be used in daycares -where several babies are monitored with one smartphone.

Smartphone app
The app is designed for the Android platform. The first screen of the app shows a login dialog where the user can log in using a username and password for a baby. It also contains a button for adding a new baby profile. To add a new profile, the user input the baby's username and password. Then, the app scans for the nearby BLE peripheral devices and add them in a list box. The user can then chose the gadget's media access control (MAC) address from the list box and assign it to the profile.
The main screen of the app contains a list-view box. Each record in the list-view box shows the class, date and time of each urination and diaper change event. The app also shows the diaper change urgency score as discussed in Section 2.2.3. This number resets to zero when the new diaper button is pressed on the gadget. The app contains a settings menu where the user can choose urination notification properties such as sound, vibration, and light. The app contains a profile menu using which the baby's username, password, and MAC address can be edited. Also, the current profile can be deleted using a delete profile button.
An Android service [42] runs in the background of the app which handles the BLE data from the gadget. When connect button is pressed in the main screen, it connects to the gadget using the current profile's BLE MAC address. Then it enables notification for the BLE service and characteristics that is used by the gadget to send a command. This causes a data available call back function to be executed in the smartphone whenever the gadget sends a data using BLE. Whenever a new command byte arrives from the gadget -the app logs the class, current date and time of the urination or diaper change event, and adds them to a database. A smartphone notification is generated and a new record is added to the list-view box on the main screen. The diaper change urgency score is also recalculated. The app contains a graph menu where the urination records can be viewed graphically. The user can choose a particular date, and the urination and diaper change events with respect to the time of that day can be viewed.

Urination detection and classification accuracy
The training and validation dataset for the classifier is generated by conducting hundreds of statistical experiments using the setup shown in Figure 2, for each case from C1 to C7. The detection and quantification accuracy of the classifier is shown in Table 1. Here, we see that the first and the second urination on the diaper can be detected always and can be quantified with good accuracy. However, for the third urination, the detection and quantification accuracy falls down due to too much urination already present in the diaper, causing the temperature signal to have less energy, as shown in Figure 5.

Specification of the prototype system
A prototype of the proposed smart diaper system is developed and tested successfully. The printed circuit board (PCB) of the urination event detector and classifier gadget has been fabricated as shown in Figure 12 (a) and (b). The width × length of the prototype gadget is 1.96 × 1.46 inches. The device has been tested by attaching it to the diaper worn by a scientific baby model [27] as shown in Figure 12 (c). Urination events were generated according to the discussion in Section 2, and the device can detect and classify urination events successfully. The current consumption of different components, when a 3V coin cell battery [39] is used, are shown in Table 2. The CC2541 microcontroller will be in a low power sleep mode, Power Mode 3, in most of the time. It wakes up from the sleep mode when the external interrupt from analog comparator triggers due to a urination event. It then transmits the command data to a smartphone using BLE and then again go back to sleep mode. According to Table 2, the total current consumption of the device is approximately 38.45 µA. The battery [39] has a typical capacity of 235mAh. Thus, the device has a battery life of approximately 6,112 hours or 255 days. The total price of the hardware components is approximately 25 USD. The smartphone app has been developed and several screenshots of the app are shown in Figure 13.

Comparison with other works
A comparison with other related works is shown in Table 3. Here, we see that the proposed work has a novel method of detecting urination by sensing temperature. Only the proposed work can detect multiple urination on the same diaper and can classify the urination using a decision tree and a midpoint based KNN hybrid classification algorithm. The proposed gadget is noninvasive, reusable, and there is no need to change the existing diaper production process for using the gadget. The gadget communicates with the smartphone using low power BLE protocol to increase battery life and it has a good range to cover a home or a daycare. The smartphone app keeps all the urination and diaper usage records that can facilitate treating diseases and budgeting diaper costs. Table 3. Comparison with other works TweetPee [15] Talli [16]