I have sort of a strange project (don't we all...) but I was wondering if anyone here could suggest what the appropriate sensor combination would make this work.
I am trying to make a system that will keep a bag of liquid between 1/4 and 3/4 full. I plan to have the bag filled by a peristaltic pump and a bulk container of liquid, and there is already a system that pulls the liquid out of the bag as needed. What I need to determine is when the bag is 1/4 full (and ideally, when it is 3/4 full as well) so that I can program the pump to turn on and off accordingly. The bag is sealed and clear, stored in a plastic enclosure (which I will be modifying) and the liquid is opaque.
I was thinking that I could measure a) the weight of the liquid, b) the extinction of light shone through the bag, or c) attach a "fin" to the bag, have it stick out of the enclosure and measure the travel of the fin between the bag being full and empty.
Thanks in advance for any ideas!
Measuring the fluid level in a sealed bag
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Measuring the fluid level in a sealed bag
All of the methods mentioned could probably be made to work with some calibration. You could also use a pressure sensor at the top of a tube extending down into the liquid. An increase in liquid depth would cause a corresponding increase in air pressure.
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: Measuring the fluid level in a sealed bag
If it hangs from a spring then you could possibly sense the position with a snap action switch (aka Microswitch). Would take a little bit of mechanical design but could work reliably.
-
- Posts: 4
- Joined: Mon Mar 24, 2014 6:36 pm
Re: Measuring the fluid level in a sealed bag
After playing around with the bag some more, I think that a flex sensor might do the trick. The bag is about 3 inches wide, and the cross-sectional height (of the upper half of the bag) varies between 0.163 and 0.355 inches between the "empty" and "full" states. Does this seem like enough of a difference to detect with the short flex sensor?
- adafruit_support_bill
- Posts: 88090
- Joined: Sat Feb 07, 2009 10:11 am
Re: Measuring the fluid level in a sealed bag
From your description of the requirements, extreme accuracy is not necessary here. You should be able to calibrate a flex sensor to give you a reasonable indication of bag fill.
-
- Posts: 4
- Joined: Mon Mar 24, 2014 6:36 pm
Re: Measuring the fluid level in a sealed bag
An update:
While the flex sensor was definitely able to measure the bag filling, there is a drift in the sensor that makes it impossible to use for this purpose. In my application the bag is going to be filled, then slowly depleted over the course of a day (and when it gets too low it will be refilled by a pump). With the flex sensor the drift when leaving the bag filled was enormous. I measured the resistance at 50 ml increments, where my desired fill range was between 50-150 ml, up to 200 ml. At 200 ml the resistance value would decrease over about 20-30 minutes to closer to the 150 ml, and when it was decreased to 150 ml in the bag, the resistance was equivalent to 50 ml at filling. While it might be possible to compensate, what I have read online is that there is a variability in this product, that when combined with this drift would make it impossible to put this system in place and have it work accurately for any length of time.
While the flex sensor was definitely able to measure the bag filling, there is a drift in the sensor that makes it impossible to use for this purpose. In my application the bag is going to be filled, then slowly depleted over the course of a day (and when it gets too low it will be refilled by a pump). With the flex sensor the drift when leaving the bag filled was enormous. I measured the resistance at 50 ml increments, where my desired fill range was between 50-150 ml, up to 200 ml. At 200 ml the resistance value would decrease over about 20-30 minutes to closer to the 150 ml, and when it was decreased to 150 ml in the bag, the resistance was equivalent to 50 ml at filling. While it might be possible to compensate, what I have read online is that there is a variability in this product, that when combined with this drift would make it impossible to put this system in place and have it work accurately for any length of time.
- jcgoodman
- Posts: 107
- Joined: Thu Jan 23, 2014 6:03 pm
Re: Measuring the fluid level in a sealed bag
I say, measure the weight of the bag. Simple solution is to hang it from conductive rubber and measure the resistance:
https://www.adafruit.com/products/519
You could also set up a balance that triggers a microswitch, or buy a "load cell" that's designed to measure force, but that's more expensive and complicated.
https://www.adafruit.com/products/519
You could also set up a balance that triggers a microswitch, or buy a "load cell" that's designed to measure force, but that's more expensive and complicated.
Please be positive and constructive with your questions and comments.