Determine size of glass

Trying to figure out the best way to determine the size of a glass that is placed on a FSR. The problem im having is the wide range of different glass sizes. I need to be able to get the size so that there isnt an accidently spillage of fluid. Any Ideas?

Posts: 11
Joined: Wed Nov 14, 2012 3:29 am

Re: Determine size of glass

Are you trying to gauge the capacity of the glass based on the weight? If there are big differences in weight, the FSR should be able to distinguish between them, but it is not really good at precision weight measurement.

Posts: 62195
Joined: Sat Feb 07, 2009 10:11 am

Re: Determine size of glass

Not trying to distinguish glass size by weight, but will need weight detection still, if the FSR isnt very precise what would be a better option?

Posts: 11
Joined: Wed Nov 14, 2012 3:29 am

Re: Determine size of glass

if the FSR isnt very precise what would be a better option?

Strain gauges are what they use in electronic scales. But they are a little trickier to interface than the FSR. The signal is very small and requires amplification.

I used a simple mechanical balance in the Arduiwino 2.0. It was calibrated such that a 4-oz pour would tip the balance and trip a microswitch. I have also used ultrasonic sensors to measure the liquid level in the glass, but one drop of liquid splashed on the transducer is enough throw off the reading.

If you can describe what you are trying to do in more detail we might have some other suggestions.

Posts: 62195
Joined: Sat Feb 07, 2009 10:11 am

Re: Determine size of glass

Basically Im going to have a mixed drink dispenser, Im going to have a bunch of different liquors hooked up and dispense the right mixture for a selected drink. My plan was to figure out the amount of each dispense based on weight. Doing it based on weight since the flow rate is controlled by pressure (or gravity for the second version im making for a friend) and can change. Since some drinks have small amounts would need pretty accurate scale.

Posts: 11
Joined: Wed Nov 14, 2012 3:29 am

Re: Determine size of glass

Since some drinks have small amounts would need pretty accurate scale.

Going by weight, I think a strain gauge is probably your best bet. I'm not sure if the ADS1115 http://www.adafruit.com/products/1085 has enough gain for a strain gauge. But I'll working on the tutorial soon, so I'll try to hook one up & check it out.

Other options for precision measurement include positive displacement pumps such as syringe pumps & peristaltic pumps. The ones I use in biomedical instrumentation are pretty expensive, but the principles of operation are pretty simple and you could probably fabricate one economically if you don't require microliter resolution.

Posts: 62195
Joined: Sat Feb 07, 2009 10:11 am

Re: Determine size of glass

What about using an actual digital scale with serial output?

Can probably find one with a smaller capacity...

Here's someone who hacked a scale on their own:

http://jdesbonnet.blogspot.com/2010/10/computer-interface-to-low-cost.html

tastewar

Posts: 353
Joined: Thu Mar 17, 2011 10:16 am

Re: Determine size of glass

Also, SparkFun has a load sensor that from the comments, it sounds like someone has been able to use to pick up the weight of a pen. But no nice tutorials or ready made supporting software like Adafruit...

https://www.sparkfun.com/products/10245

tastewar

Posts: 353
Joined: Thu Mar 17, 2011 10:16 am

Re: Determine size of glass

You need an inamp with that. Cheapest one is INA126PA AFAIK.

zener

Posts: 3948
Joined: Sat Feb 21, 2009 2:38 am