# Smart Intravenous Infusion Dosing System
## 5 Smart IV Infusion Dosing System
### Operating Principle  
Two capacitive sensors (9) are attached to the saline bottle (2), one below the other, enabling the detection of liquid levels in the bottle. The upper sensor detects the MAX fluid level, while the lower detects the MIN 1 and MIN 2 levels. The height of the liquid column in the bottle is 145 mm. Accordingly, the capacitive sensors are positioned to cover a liquid column height of 140 mm, which is 5 mm less than the maximum. Thus, this 5 mm height in the bottle cap zone is approximately 25 mL of saline, which drains from the bottle at maximum flow for approximately 30 s. This time was taken into account when forming the alarm states. The sensors (9) for detecting the level of liquid in the bottle are connected to the microcontroller (11), sending signals about the current level of liquid in the bottle all the time. On the other hand, the color sensor (10) enables the detection of the color of the fluid in the IV bottle, indicating the type of fluid--saline, blood or plasma, or urine if the system is used to collect urine or drain the patient in postoperative days. On the basis of the type and volume of fluid contained in the IV bottle, the condition of the patient's veins, and the flow of the selected cannula, the medical staff manually adjusts the infusion flow using a roller clamp (4). All the above parameters directly affect the time the bottle empties, i.e., the time of occurrence of the alarm that gives the signal for the emptied IV bottle. If the bottle is completely emptied and the medical staff does not respond to the alarm for any reason, then the stepper motor (7) is activated by closing the valve (6), and thus the return of blood through the cannula to the IV tubing is prevented, which is essential.  
Figure 5 shows the algorithm of the smart IV infusion dosing system, which is a combination of a system for detecting and signaling liquid levels in an IV bottle and a web application for monitoring and displaying the state of IV infusion in real time at a remote location. After starting the device, the RESET button must be activated in order to set the system to the initial values. The microcontroller then reads the values from both capacitive sensors and compares them with the predefined ones. De facto, the microcontroller first analyzes the signals from the upper capacitive sensor that sends data for the MAX liquid level in the IV bottle and, if this value does not match the defined value for the MAX level, then the buzzer is activated, and the alarm is displayed. On the other hand, if this value corresponds to the value defined in the microcontroller as the MAX level, then the infusion is enabled and the status of the liquid level in the bottle is displayed. The microcontroller further analyzes the signals from the lower capacitive sensor that sends data for the MIN 1 and MIN 2 levels.  
Figure 5: Smart IV infusion dosing system algorithm.  
If this sensor detects the liquid level defined as MIN 1, the alarm is activated, but the system continues to work. On the other hand, if the sensor detects the fluid level defined as MIN 2, then there is 5 mL of liquid left in the bottle. The microcontroller then activates a continuous buzzer alarm, showing the alarm condition on the display, and the infusion flow to the patient automatically stops. Finally, it is necessary to replace the empty bottle with a new one, after which the procedure is repeated or the IV administration is terminated if the therapy is over.