Smart IV/Drip Fluid Level Alert Device – 3D Printed & Easy to Build

by HarshadB9 in Circuits > Sensors

370 Views, 3 Favorites, 0 Comments

Smart IV/Drip Fluid Level Alert Device – 3D Printed & Easy to Build

Picture18.png
b94c6942-84b6-467e-9cc6-52d47a44aca2.jpg

Need for the device:


The need for this device arose from the request of an ophthalmologist, (Dr. Vinay Byadgi (who is also my father) ). In a procedure called Phacoemulsification during the cataract surgery, it is vital that the flow and pressure of the drip is maintained. The the bottle runs out of fluid, it causes chamber collapse, capsule rupture, corneal burn, poor visibility, hypotony, and severe intraocular tissue damage. (For the engineers and non medico people here on Instructables, the consequence is called "Complications" )

Wiki link for Phacoemulsification: https://en.wikipedia.org/wiki/Phacoemulsification


Now obviously we weren't the first ones to figure out that there might be a need for a sensor to alert the staff before the drip runs out. There are machines available which have these features, but they are pricy.

Our aim with this project was to create a device which can be integrated with any machine that did not have the fluid level alert feature. And the device should be easily manufacturable, the components should be available world wide and with ease and low cost. There was no point in making an add-on for a low cost machine which was not low cost.




Supplies

51LVAX9o6GL.jpg
Ender3.png
41Se2WbtrkL.jpg
m3-ss-hex-nut-10pcs-1024x1024.jpg
wing-nut-m3_hu5e9afdcdf68fc4f16167db43ae8dcdb0_24932_1000x1000_resize_q85_box.jpg
product290719110131AM0367-0378.jpg
mfg369 series_sml.jpg
Arduino-Nano-R3-unsoldered.jpg
Screenshot 2025-09-14 105659.jpg
hook-up-wire-500x500.png
Screenshot 2025-09-14 105920.jpg
download-5-7.jpg
209.jpg
grub-screw_p0q4-hl.jpg
mini-usb-cable-550x550.jpg

Supplies required:

  1. XKC-Y25 Water Sensor (Link for purchase in India)
  2. Arduino Nano Mirco Controller (Link for purchase in India)
  3. 5V Buzzer (Link for purchase in India)
  4. Fasteners
  5. M3x20L Socket Head Bolt (Link for purchase in India)
  6. M3x12L Socket Head Bolt (Link for purchase in India)
  7. M3 Hex Nut (Link for purchase in India)
  8. M3 Wing Nut (Link for purchase in India)
  9. M3 Gurb Screw (Link for purchase in India)
  10. Hookup wire
  11. USB Cable (Link for purchase in India)


Tools for Fasteners:

  1. 5.5x7 mm Spanner (Link for purchase in India)
  2. 2.5mm Allen Key (Link for purchase in India)
  3. 1.5mm Allen key (Link for purchase in India)


Soldering tools:

  1. Soldering iron
  2. Solder
  3. Wire stripper


3D Printer

Understanding the Constarints

an-iron-stand-to-hang-saline-bottle-high-to-deliver-saline-via-catheter-to-an-intravenous-patient-lying-on-patient-bed-medical-concept-in-which-doctor-gives-saline-solution-to-patient-through-vein-photo.jpg
shutterstock-saline-700x467-compressor.jpg
istockphoto-1964664015-612x612.jpg
1395b717808a49daaaa7da7cebed98bec654bef4_2_1024x623.jpg
iv-stand-ss-for-hospital-size-5020230725115443.jpg
section11_2.png
51oZHMpbmxL.jpg

1) Use of non contact sensor:

As this device is being built for use in medical environment, we have to ensure that the fluid is not contaminated. This rules out use of any contact type sensor like float type level sensor or ultrasonic level sensor.


2) Immunity to type and colour and labels of the drip bottle:

Since the drip bottles come in a variety of sizes, and bottle materials like glass or plastic, it is necessary that device works with any bottle material. Additionally the labels on the bottles make it difficult to use any type of optic based sensor like IR sensors, laser sensor or LIDAR sensor.


With both of the above points mentioned, use of capacitive sensors is optimum. These sensor do no any light into the environment, are immune to plastic or glass bottles, and work though paper labels. The sensor that I have finally selected is: XKC Y25.


3) Ease of installation on a traditional IV stand:

The device is being built as an add-on to the devices which do not have the feature. In such devices the IV drip is hanged on a normal IV stand. The device is being designed in such a way that the device can be mounted on the stand without any modification to the stand.

Further, the device should be so easy to install that a person who is looking the device at the first time should be install it on the IV stand in a safe and secure way. The device should not come off when the staff is trying to replace the IV bottle during the surgery.


4) Ease to replace the IV drip bottle:

In a traditional setup, the bottle is hanged over a single hook and it is really that easy to replace it as it sounds. Hence it is my aim to develop the device in such a way that the IV drop bottle should be easily replaceable.


5) Ability to adjust the level of the sensor:

Since the the device is being built to work with multiple types of bottles, which can be of different height and length, it is necessary that the alert level of the device should be adjustable. My plan is to add a sensor which can be slid over a length so that it can be adjusted to any level with ease.


6) A convenient power source:

My choice of power source for such a project is USB power. This is because USB power is easily available from power sockets with power adapters, or with standard power banks. This eliminates the need of any internal battery which not only increases the complexity and cost of the device, but also poses a safety hazard as failure to properly regulate the battery can cause smoke and in worst of the cases, can cause fire!

This is not a pleasant situation to have in an operational theater.

Using a power bank is much safer option as generally the companies which make them, like Xiaomi or Samsung are reputable brands which know how to operate these batteries safely even under extreme conditions.

This also gives us the freedom to use any other power bank in case we fail to charge the one we desired to use on the day of the surgery

Making the Electronic Circuitry / Programming

FYVZ8UJMFFQGNP8.png
FFHSQ7AMFFQGH4O.jpg
FGT6IW7MFFQGGDO.jpg
Circuit.png
arduiuno wire.png

This project has almost no active electronic components like BJTs or OpAmps except for the main micro controller.

The micro controller needs to have following features

  1. When the system is powered on, it should give a distinct beep to make the user aware that the machine has booted up
  2. The machine should give out a single beep every 30 seconds to reassure that the system is up and running
  3. When the fluid level falls below a certain threshold, the system should a distinct beep such that OT can be made aware that the level of the fluid has fallen below a critical threshold and it is time to replace the bottle


Issue with using the power bank:

When using a power bank, it is necessary to draw minimum power from it so that it knows that there is a load connected to it. If the load draws too little current from the power bank, the power bank will automatically slip into stand by mode and will shut down. The device that I am describing falls in the second category and is too low powered to be recolonized as a load.

In order to negate this issue, it is vital that we draw some current from the powerbank. By trial and error, I found out that the value of resistance that worked for me was 666 Ohms.


Note that this issue only exists with power banks and not if you are using a power adapter


Code:

//float times[]={};

#define buzz_pin 2
#define sensor_pin 3

bool delay_break = 0;

void break_delay()
{
delay_break = 1;
}

void beep(float times[], int count)
{
bool state=HIGH;
count=count/4;
int i=0;
// Serial.println(count);
while(i<count)
{
digitalWrite(buzz_pin,state);
// Serial.println(state);
delay(times[i]*1000);
state=!state;
i=i+1;
}
digitalWrite(buzz_pin,LOW);
}

void setup() {
Serial.begin(9600);
// put your setup code here, to run once:
pinMode(buzz_pin, OUTPUT);
pinMode(sensor_pin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(sensor_pin),break_delay,FALLING);


pinMode(4, INPUT_PULLUP);
pinMode(5, INPUT_PULLUP);
pinMode(6, INPUT_PULLUP);
pinMode(7, INPUT_PULLUP);
pinMode(8, INPUT_PULLUP);
pinMode(9, INPUT_PULLUP);
pinMode(10, INPUT_PULLUP);
pinMode(11, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
pinMode(13, INPUT_PULLUP);

float start_times[]={0.5,0.3,0.1};
beep(start_times,sizeof(start_times));
delay(5000);
}

void loop() {
if(digitalRead(sensor_pin)==0)
{
float times[]={0.1,0.3,0.1,0.3,0.1,0.3,0.1,2};
beep(times,sizeof(times));
}
else
{
float times[]={0.1};
beep(times,sizeof(times));

double local_delay=millis()+30000;
while(millis()<local_delay)
{
if(delay_break==1)
{
delay_break = 0;
break;
}
else
{
delay(5);
}
}

}
}

Mechanical Design Considerations

Picture14.png
Picture15.png
Picture16.png
Picture17.png
Picture23.png
Picture22.png

Mechanical Considerations:

1) Adjustable Position of the Sensor:

It was important that the level at which the machine sounded the beep could be adjusted very easily and intuitively. The easiest way to accomplish this was to make some slots in the frame and have the mating grooves in the sensor holder. It was also necessary that the sensor is positively locked inside the groove, i.e. it should not come out.


2) Straight frame vs Inclined Frame (Ensuring that the sensor is engaged):

While a nice vertical frame was the first thing that came to my mind when designing this contraption, it turned out that it had some flaws of its own. When it was vertical, the drip bottle was free to dangle and swing about its hook. This meant that the distance of the bottle and the water sensor varied continuously and it was very likely that the gave false alarms when the bottle was settling down after being put up. Additionally, even the slightest of disturbance to the tubes carrying the fluid out could result in a false alarm.

To counter this issue, I made a decision to have this frame on an incline, which had two advantages.

  1. This ensured that the bottle was pressed against the sensor all the time
  2. The continuous contact created enough friction that any unwanted oscillations died out quickly


3) Orientation of parts for 3D print:

3D printed parts are not homogeneous in nature, i.e. their strength varies depending on the direction of the stresses applied. Since this component was to be used in an operation theater, great care and consideration was given to orientation in which all of the components were to be printed in. In fact, a great number of components which could have been manufactured as a single piece in traditional manufacturing methods, had to be split when being manufactured with 3D printing as making the part in one single piece would have compromised the strength of the part.

The best example is the split between the top hook and the top structure. While it was perfectly possible to have them made as a single piece, the poor adhesion between the layers would have most certainly broken the first time I use it.


4) Location of the buzzer:

The buzzer is given in a convenient location such that it wont be damaged in case the sensor is kept upright on a table. Further, the sound coming out of the buzzer wont be obstructed in case it is kept on a table.


5) Clamping the device on to the IV stand.

It is necessary that the device is held firmly on the IV stand. I plan to main holding points for the device.

  1. The top hook which is like an ear, and it goes over a normal IV stand. This ensures that the device is positively locked with the main IV stand and does not accidentally slip down in case the person who installed it hasn't tightened it enough
  2. The friction lock at the base which ensures that there is a certain rigidity to the system
  3. To generate this friction uses a combination of two rings and wing nuts. The design is such that it can accommodate an IV stand rod of upto 40mm in diameter
  4. Refer the step 6 to add the spacers and Bottom Rings

CAD Modeling and Parts

Picture1.png
Picture2.png
Picture3.png
Picture4.png
Picture5.png
Picture6.png
Picture7.png
Picture8.png
Picture9.png
Picture10.png
Picture11.png
Picture12.png
Picture13.png

The CAD entire model for this system is made on OnShape.

The full assembly is attached in the list of the documents below. The file name for the full assembly is: SalineSensor.step .


I have attached images of the CAD model in this step above and the CAD models are attached as attachments below.


In case anyone has suggestions to improve the functionality or the manufacturability of the device, feel free to drop a comment below or reach out to me through instructables or through the google form that you can find on my instructables page.


Assembly

Picture19.png
Picture20.png
Picture21.png

The assembly of this machine is relatively straight forward. However, the general steps are attached below

Steps:

  1. Assemble the Bottom Structure (1) and Top Structure (3) with the Side Frame (2) with Fasteners (10 and 14)
  2. Assemble the Top Hook (6) and Top Structure (3) with fasteners (10)
  3. Assemble the Sensor (17) in the Middle Frame (12) with the Grub Screw (18)
  4. Assemble the Middle Frame assembly on to the main structure with Mind Frame Lock (13) with Fasteners (10)
  5. Add fasteners (9 and 14) to the Bottom Ring Fixed (4) and then add it to the bottom structure (1). Add super glue between the bottom structure and fixed bottom ring fixed
  6. Fasten the Removeable Bottom Ring (7) with the Wing Nut (8)
  7. Program the Arduino Nano with Arduino IDE with the code mentioned in Step 2
  8. Make the electrical connections and put them inside the cavity of the bottom frame
  9. Close the bottom structure cavity (3) with the Bottom Cover (5) with Fasteners (10)


Your circuity is now ready to be tested.



Prepping the power bank:

The system is designed to work with a traditional power bank. This step describes a convenient way to hang a power bank next to the device on to the IV stand so that it can easily powered with it.

  1. Get a normal power bank with which you have tested the device and you know doesn't shut down with the device as the load
  2. Get a piece of Velcro about 25 cm Long. Stick the smooth side of the Velcro on the top of the power bank so that it doesn't hurt when the power bank is being used as a stand alone power bank
  3. On to the other half of the Velcro, add short pieces so that that part can be made inert and can be used as pull tabs to separate the power bank and the Velcro.
  4. Ensure that the pull tab is shorter than the fixed side to that it does not accidentally pull away the part adhered to the power bank with adhesive.


Adding the Machine on an IV Stand

ass1.png
ass2.png
ass3.png
ass4.png
ass5.png
IV Fluid Sensor - Ensuing that the device is firmly secured
ass6.png
ass7.png

1) Remove the wing nuts and the Removable bottom ring from the assembly so that the device can be inserted over the IV stand

2) Hang the device over the horizontal portion of the IV stand

3) Add the removable bottom ring to the bottom structure with the wing nuts

4) Add the Shaft Spacer (15) between the bottom rings and the main shaft and clamp it with the wing nuts

5) Put some weight on the device and pull it down to ensure that it does not break when an actual bottle is placed on it

Link


Power bank:

1) Open the Velcro from one side of the power bank

2) Keep the power bank just below the horizontal stand and then pass the Velcro over the IV stand and secure it on to the other side of the power bank

3) The power bank is now securely attached to the IV stand

4) Plug the USB cable of the device to power bank and your device is now ready for use.


Adding the drip on the stand:

1) For bottles which do not have any particular orientation, like circular glass bottles can directly be hanged with the main hook on the top.

2) For bottles which have a more rectangly shape, check if the orientation is stable with the shorter side of the bottle resting on the device

3) In case the rectangle bottle is not stable, an additional component called "Additional Hook" is given in the list of the stl parts above and this hook will help the orientation of the bottle so that the longer side now rests on the device and is in a stable equilibrium.

Understanding the Beeps/other Videos

IV Fluid Sensor - Falling Fluid Level
IV Fluid sensor - Adjustment of Sensor Level
IV Fluid Sensor - Response when the fluid is out of sensor range.
IV Fluid Sensor - Fluid Acknowledgement Beep
IV Fluid Sensor - Startup + No Fluid Beep
IV Fluid Sensor - Ensuing that the device is firmly secured

Beep alert when the fluid drops below the set level: Link

Adjusting the fluid sensor: Link

Response time of the device when the fluid goes out of the sensor: Link

Acknowledgement beep when sensor detects reloading of the fluid: Link

Startup beep of the device: Link

Ensuring that the device is thoroughly secured to IV stand: Link