Electronics > Projects, Designs, and Technical Stuff
How to measure the amount of liquid water in a thin tube (like a syringe)
drcubes:
I'm trying to accurately measure the amount of liquid sugar water in a narrow tube. To give some background I am a biologist studying energetics and biomechanics in hummingbirds. In the past we have measured the amount of nectar a hummingbird drinks by filming a clear tube such as a syringe body or pipette with a camera and later reviewing the footage of hummingbirds drinking and recording where the meniscus of the fluid is on the tube (the tubes need the gradation markings).
However, you might see how this is very time consuming as we get hundreds of "flower" visits per day and video analysis is a very tedious process. I am relatively proficient electrical engineer in that I have worked on many robotics projects and work (I was a mechanical engineer before switching to biology) but I am struggling to find good solutions to measuring the amount of liquid in the tubes. The goal is to accurately measure the amount of nectar (sugar water) drank per drinking session of a hummingbird to the nearest .01 milliliter but I'll take what I can get. A big plus would be if it would be a fast enough measurement that I could use the same sensing device as feedback for automatically refilling the tube with a peristaltic pump.
Some current and past tests and approaches I have made:
- IR led and IR transistor linear array along the length of the tube. The idea being that due to either the slightly different level of transparency of sugar water compared to air (and its snell index) that more IR light would pass through the air than the water and I would get a changing value as the nectar was drank (or filled back up). The results were lackluster as there was an extremely minimal change in reading the analog values of the transistors. I also tried a method where I shined IR light into the tube at different angles and had a single transistor at the back end (picture included) of the tube to measure the total IR light change, and although I got changing results the values were sinusoidal as the liquid was removed or added (not noise but actual values) and measurements were still not consistent enough.
IR Device
- Capacitive sensing: I wrapped a single layer of aluminum foil around the syringe body and soldered a wire to the aluminum. I then used the 2 pin capacitive touch sensor measurement method to measure the change in capacitance as the fluid level changes in the tube. This method has a lot of promise and I am still working with it but there are some major flaws. The values do change significantly enough to measure come changes but the baseline value jumps a lot. I realize I could keep re-zeroing the measurement through the day or so as the baseline changes but I worry about non-linear changes in the signal as well the difficulty of recalibrating where fluid level is in the tube compared to the measurement value. I have yet to try the built in 1 wire capacitive sensing method that some of my boards provide but I am working on this now.
Capacitive Device
- Linear CCD and line laser: I am waiting on my linear CCD (TCD1304DG CCD Linear Image Sensor) to arrive in the mail but I am attempting to shine the line laser through the clear tube with nectar (sugar water) in it and place the ccd on the opposite side so that I can measure the intensity of light going in to the other side. This is similar to some fancy devices already on the market that are currently way out of my research budget such as some of the Keyence laser edge sensor and through beam sensors. I have no results yet for this but I can update this post when those come in. Any suggestions on this method are welcome.
- Digital scale: I have done very little on this front so far but I have a beam-shaped load cell with strain gauges on it and a strain gauge amplifier. No tests with this but my primary concerns are that the gauge will not have high enough resolution to detect the amount of liquid change from a single feeding. ( < 1 gram change per feeding event)
In all I am looking for any suggestions for methods of measuring fluid in a narrow tube with accuracy, repeatability, and relatively quickly (although speed is the least important of the 3) and although my budget is not small I am not looking at big priced sensor products (soft cost cap of $200 just for sensor components).
I am using some standard microcontroller boards such as the Adafruit ItsyBitsy M0 and an assortment of ESP32 dev boards for now but open to suggestions.
hendorog:
Pressure sensor might work if the syringe is large enough diameter.
The other option I can think of is an ultrasonic level sensor.
Edit: Instead of a complex sensor to measure the amount consumed, perhaps you could use a single sensor of some sort to determine the fill point - and then calculate the volume dispensed from the pump cycles?
DaJMasta:
Since it's sugar water.... could you use a food safe dye and then do it optically? You'd have to make sure dye was also safe for the birds, but I assume one of the commonly available ones would probably work well.
I'm wondering if you could get crafty with this.... maybe use a chiller and look at the liquid level height with a thermal camera (works fine with just evaporative cooling in a normal glass, but could be challenging with a small enclosed tube).
Maybe even by weight? Hang the tube on a sensitive scale, fill it, wait for a drink, measure again for the difference, refill. You'd probably need some very high integration times (or DSP filtering) to null out error from wind or whatnot, but it could be probably be made to work. It helps in this case that they don't land to feed! And if load cells aren't an option for sensitivity (nor force sensitive resistors or pressure sensors and a pneumatic suspension or something), you could also just for for a simple balance and a way to measure the deflection angle. A good balance scale can be very sensitive and repeatable.
Maybe you can get your peristaltic pump to introduce periodic bubbles - say one every 10th of a mL - and then just monitor the flow of the bubbles (though I don't know if this would deter feeding at all). You'd probably have to go out of your way to keep the feeding tube level as well, which could be problematic.
phil from seattle:
how wide is the tube? perhaps you could use ultrasonics to measure the level though noise would be a big issue.
I know that in my feeder, there are bubbles as they draw down the nectar. You could detect the bubbles. Though it takes multiple feedings to generate one bubble.
Or, you could measure the pressure in the tube. As they feed it will drop until it pulls some air into it. There is probably a model that relates pressure drop to amount of nectar taken.
Still in all these, the changes are so small that you'll be fighting noise.
wilfred:
How important is it to know with such precision how much each bird consumes each visit to the feed point?
Could you achieve your aims with a count of feed sessions and divide that into the total fluid consumed and work with the average. I am assuming a humming bird just takes what each flower has to offer until it is percieved easier to move to the next flower. ie the quantity consumed is a function of nectar available and not the nectar the bird requires. But then I'm not studying the feeding habits of Hummingbirds.
It might be easier to count feeds and just measure fluid consumed from the resevoir once per day. You'd have to find another way to ensure "nectar" is always available though. That may be a simpler problem.
Admittedly without complete understanding of your aims I am thinking of an approach where you deliver nectar via capilliary action to the feed point and control the resevoir level to control the flow to the feed point. Do you just have to present a droplet at the feed point? It might be easier to sense the formation of the droplet. Or maybe drop a bead into the resevoir to raise the fluid level the same amount as the drop the bird just consumed and hence force another droplet to form.
I'm just trying to turn the problem around to achieve what I think might be easier to solve and more reliable and cheaper. But I also don't know what you're ultimate aims are.
Navigation
[0] Message Index
[#] Next page
Go to full version