APPLICATION OF LINEAR REGRESSION METHOD TO PREDICT MICROCONTROLLER-BASED INFUSION FLUID VOLUME USING IOT

Infusion is a medical device under certain conditions used to replay lost fluids and balance the body's electrolytes. In emergency condition for examples in patients with dehydration, severe metabolic stress that causes hypovolemic shock, acidosis, dengue hemorrhagic fever (DHF), burn hemorhagle shock and trauma,infusion are needed immediately to replace lost body fluids. The manufacture of this system use two LM393 Optocoupler Infrared Sensors. Infrared sensors detect deteeted objects, namely droplets. If no droples are detected, the infrared sensor will not work or is a cut-off condition. This system is the Internet of Things (IoT). With the platform used, Ubidots, so that monitoring can be done with a smartphone. A warning will be send the infusion level has reached 100ml, so Ubidots will automatically send a notification in the form of an E-mail.


INTRODUCTION
At this time man does everything more practically, quickly and efficiently.So that tool technology that was previously made manually began to be abandoned in use in society (Rice & Pennington, 2024).One example of an intravenous fluid monitoring device.In the field of Health, the provision of intravenous fluids is very important in helping the patient's recovery process during the healing period (Ezinne et al., n.d.).In general, infusion monitoring tools are still carried out by nurses manually, where nurses still have to check intravenous fluids into the patient's room if there are obstacles such as running out of intravenous fluids can have a bad impact on patients (Dornan et al., 2024).
Where the application of intravenous fluid monitoring tools in patients is expected to make it easier for nurses on duty to check (Sabena et al., 2024), check and process infusion monitoring data in the form of intravenous fluids in each patient (Rog et al., 2024).The nurses on duty do not need to come directly to the patient's room to check each patient's room (Chellam Singh & Arulappan, 2023).To support this intravenous fluid monitoring tool, and how to integrate the infrared sensor into the infusion with a microcontroller (Ray et al., 2019), which can monitor intravenous fluids directly, which then the results of drip fluid data will be sent to the system used by nurses via android (Safitri et al., 2021).With this tool, it can make it easier for nurses to check intravenous fluids (Jeffery et al., 2024).Because this tool will help nurses more easily and does not take much time, especially when handling COVID-19 patients in isolation rooms and other rooms.(Muljodipo et al., 2015).
The function of the infusion is very important for the patient, so the installation of the infusion must be done correctly to avoid complications that can affect the patient's condition (Saraswastini et al., 2024).Where the nurse should check and monitoring of intravenous fluids should be done by the hospital nurse properly (Agúndez Reigosa et al., 2024).A problem that often occurs after infusion is the exhaustion of the intravenous fluid attached to the patient (NATALIANA et al., 2022).(Batalipu et al., 2024) is an alumnus of the Padang State Polytechnic, Department of Electrical Engineering, D4 Electronics Study Program, class of 2017, entitled "Internet of Things Based Patient Infusion Monitoring".The device uses NodeMcu ESP8266 as a microcontroller and the load cell sensor is used to weigh the infused liquid displayed in the ubidots application (Hassan, 2020).As for the sender of notifications when the intravenous fluid <50ml using android.
Istiqomah ( 2020) is an alumnus of the Padang State Polytechnic, Department of Electrical Engineering, D3 Electronics Study Program, class of 2017, entitled "Infusion monitoring with SMS notifications based on load cell sensors and GSM sim 900".This tool uses Arduino uno as a microcontroller and load cell sensor is used to weigh intravenous fluids while for SMS senders as an alert using GSM sim 900 and warnings in the form of buzzeer alarms, the monitoring display is displayed in the form of LCD and in the form of LEDs.Infusion monitoring with SMS notifications only works under certain conditions that have been set so that nurses only know the volume of infusion fluid when it will run out (Safitri et al., 2021).
To overcome this problem, a system is needed that is able to monitor automatically and provide an indication When the intravenous fluid installed in the patient is almost exhausted (Trenholme & Pang, 2024), a follow-up must be done by paramedics so as not to cause problems in the patient (Przybylska et al., 2024).This system works according to the procedure as it will be able to notify the android to the nurse if there is a run out of intravenous fluids (Swedarma et al., 2023).

RESEARCH METHODS Linear Regression
Regression analysis is one of the methods that exist in statistics and is still widely used today, the main purpose of this regression analysis process is to see the causal relationship that occurs between one variable and another.The causative variable of regression is also known as variable X, the explanatory variable.While those affected are known as variable Y (Harsiti et al., 2022).The formula for the linear regression method is: Where: y = predicted variable a = constant b = regression coefficient x = supporting variable

System Design
Tool design begins with creating a block diagram which explains in general how each component works for the tool to be designed with each block based on theoretical and need-based foundations.The design of these blocks simplifies the testing process and avoids system errors from the tool.

Figure 1. Block diagram tool
Based on the block diagram figure 1 of each block diagram above is as follows: in the system designed on infusions 1 and 2 functions as an object to be inputted by 2 infrared sensors.Infrared optocouplers LM393 1 and 2 function as droplet detectors released by IV fluids 1 and 2. Arduino functions as input and output data processing of sensors where the resulting data will be displayed on the LCD and sent to the ESP32 NodeMCU using serial communication.NodeMCU ESP32 receives data from Arduino and sends that data to ubidots.LCD, LED and Buzzer are outputs that will adjust the data process that has been programmed.Ubidots displays the volume in real time and will send you a notification.

Mechanical Design
The author makes a minimal mechanical design so that this tool can be used with maximum results.On the pole using iron with a length of × width × height = 180cm × 2cm and on electronic blocks using acrylic with a thickness of 3mm and a length of × width × height = 20cm × 15cm × 10cm.

Figure 2. Tool Mechanical Design Flowchart
A flowchart is a sequence of instructions for creating a program.The creation of this flowchart is useful to facilitate the creation of programs.It can be seen for the overall flow chart shape of this tool as follows:  An error of 11.6% was obtained because the volume of infusion drops released was not always the same and also the light also affected so that sometimes the infrared beam was not blocked by the droplets so that the droplets were not read.

LED Testing
This LED test aims to find out that LEDs can be connected to microcontrollers and can run well according to the expected display of the program that has been created and can be used, In table 3 it can be seen that the output voltage of the first LED is 3.83 volts and the second LED is 3.84 volts.The voltage is found because of the presence of a resistor of 220 ohms as a resistance so that the voltage is an obstacle so that the voltage produced is not up to 5 volts.

Buzzer Testing
Buzzer testing aims to find out that the buzzer can be connected to the Microcontroller and can run well according to the sound expected by the program that has been created and can be used.The results of the measurements in table 4.5 prove that the buzzer has a voltage when active.From the measurement results above, it was analyzed that the buzzer has a voltage of 4.8 V to be able to actively issue alarm sounds.

LCD Testing
LCD (Liquid Cristal Display) testing aims to find out whether the LCD (Liquid Cristal Display) can be connected to the Microcontroller and can run properly according to the expected display of the program that has been created and can be used.LCD controls on RS, E, D4, D5, D6, and D7 are connected to I2c with SCL and SDA outputs connected to NodeMcu on pin D5(SCL) and pin D4(SDA).It can be seen that measurements on TP1 produce an output voltage of 4.83 volts and on TP2 produce a discharge voltage of 4.84 volts.In order for the LCD to display characters (letters, numbers, etc.) the microcontroller IC is programmed.The program inserted into the microcontroller IC is a program that is useful for displaying characters (letters, numbers, etc.) on the LCD layer.
From the measurement results, it can be analyzed that I2C on the LCD has 2 serial data.The point here is that the circuit is able to send data to each other, where data from I2C is sent to Arduino and will be received again I2C appears on the LCD.In I2C on this LCD the output is in the form of SDA (Serial Data) and SCL (Serial Clock).

Ubidots Interface Testing
This test is carried out to see whether the communication between the microcontroller system and ubidots has been connected so that the sensor data display can be monitored through the ubidots application.The interface on ubidots uses the function of the dashboard on the ubidots web which can later also be accessed using a smartphone application.

Figure 4. interface on Ubidots
Figure 4 shows the interface display on ubidots, this view consists of a realtime time interface, a gauge widget as the display output of the volume.This interface has also been equipped with a database device so that all incoming data is stored in the database.

Figure 5. Notifications on smartphones
Figure 5 is a notification of the patient's infusion to the nurse via E-mail message as a warning to the nurse to immediately replace the intravenous fluid.The message will be sent if the infusion state is at a volume of 100 ml.

Linear Regression Method Testing
After several experiments to find out how many drops in total 1 500ml infusion tube, an average of 8843 drops was obtained.From the calculation above, a formula for the relationship between the number of drips of infusion fluid and the remaining volume of infusion fluid is obtained using the linear regression method, the table of the relationship between drips of infusion fluid can be seen in table 7.In table 9 of error error calculations, it is performed to find the error value between the residual volume in theory, and the residual volume in a measured manner.9 is the calculation of the percentage error of the residual volume theoretically, with the residual volume measurably, when calculated the value of the number of droplets as much as 8843 with the remaining droplets close to zero ml.It can be seen that the error read is no more than 0.04%.When using droplet data of 10,000 with droplets remaining close to zero, the error read is quite large at more than five percent.
At the time of the total droplet experiment of 8843 with a linear regression method to predict the remaining infusion fluid, the remaining volume of infusion fluid obtained received a 0.04% less error.So here is used a total number of droplets 1 tube of 500ml infusion amounting to 8843 droplets so that the error obtained is not too large.

CONCLUSION
On this occasion the author draws several conclusions from design, testing and analysis.This LM393 infrared optocoupler sensor uses high and low digital data where the logic is high then the output voltage is 4.8 volts and if the logic is low then the output voltage is 0 volts.The buzzer will activate at 4.8 V active when the intravenous fluid is blocked and when the infusion is almost exhausted.Using the linear regression method with a total number of droplets 8843 it can be seen that the error read below 0.04% and using droplet data in theory is 10,000 with the remaining droplets close to zero, the error read is quite large which is above 5%

Figure
Figure 3. Working Flowchart

Table 1 .
Sensor Voltage TableTo find out the droplets of 1 infusion tube, several experiments were carried out then calculated the average of the experiments.The following experimental table counts the number of droplets of 1 infusion tube with 1 ml = 20 drops.

Table 3 .
LED Testing

Table 5 .
LCD Testing

Table 6 .
The Relationship of the Number of Droplets with the Remaining Volume to the Total Droplets

Table 7 .
The description of Linear Regression

Table 8 .
Relationship between drip of infusion fluid and residual volume of infusion fluid using linear regression

Table 6 .
Error Value