Pages: [1]   Go Down
Author Topic: Determine Size of Glass  (Read 703 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FSR ?

By size do you mean physical dimensions or volume capacity
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

FSR, Force Sensitive Resistor aka a scale

And by size i mainly would like volume but finding the dimensions i can get a good enough volume to determine whether or not to pour the liquid.  I am going to be using one IR sensor to determine the location of the top of the glass.  But just looking for ideas as to ways to get dimensions and/or volume
Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 66
Posts: 2474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You have a mechanism (IR) to detect the top of the glass, could you also have one to detect the level of liquid and just ensure it stops before top of glass.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The liquids are being mixed so if I stop it early it wont be the same drink and not taste right.  Need to know before the liquid is dispensed in order to ensure the drink can be dispensed
Logged

Yorkshire England
Offline Offline
Sr. Member
****
Karma: 2
Posts: 267
Arduino good init
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably not practical at all but i'm sure you could determine the volume of the glass using sound. By using a small speaker and microphone you should be able to capture a impulse response representative of the inside of the glass. Then using the appropriate algorithm determine it's volume/shape/..material even maybe. No idea if it could be done with an arduino or not but the whole reverb market is quite advanced you can create reverbs based on a selection of volume/dimension/material so i don't see why it couldn't work the other way especially as your dealing with a limited range of items, ie drinks holders.
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1376
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Take 2 steps back and simply use one size of glass.  Sometimes we are guilty of over-complicating the blindingly obvious.  OK not the answer you want but it is one that works
Logged

Brisbane, Queensland
Offline Offline
Newbie
*
Karma: 0
Posts: 26
Hello
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the glasses are a known type, you can predetermine the volume based on the height from your IR sensor.  That would require a standard set of glasses being used (ie you couldn't just grab any old glass).

Ie - the shot glass has a 30ml capacity, and 30ml would be selected when the height is detected to be, say, 50mm high.

It's not calculating the volume of the vessel though.

Another "out there" method could be to fill the glass to overflowing with water, draw a vacuum with the glass in the vacuum chamber, and measure how much air is sucked out, then empty the glass and draw the vacuum again, which should give you the difference in volume.

On second thought, skip the vacuum.  Use a sensor to detect when the glass overflows, work out how much water flowed before the glass overflowed (time and pressure/flow rate), tip it out and dispense the drink.

I don't know if this helps but I hope it did, in some way.

Ash
Logged

UK
Offline Offline
Shannon Member
****
Karma: 222
Posts: 12549
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume the glasses would all be symmetrical about the vertical axis, the right way up and of similar wall thickness.


You could use a contact sensors to locate the inside or outside edge of the glass - half a dozen sensors arranged in pairs at different heights would give you enough information about the profile to estimate the volume. Internal sensing would be more accurate but might introduce hygiene issues.

Logged

I only provide help via the forum - please do not contact me for private consultancy.

Norfolk UK
Offline Offline
Edison Member
*
Karma: 66
Posts: 2474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The liquids are being mixed so if I stop it early it wont be the same drink and not taste right.  Need to know before the liquid is dispensed in order to ensure the drink can be dispensed
Can you mix proportionally instead of one liquid at a time so no matter how much you dispense, it's the correct ratio.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Offline Offline
Newbie
*
Karma: 0
Posts: 30
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

just a theory here smiley-razz what if u have light placed at the bottom of the dispenser lighting upwards through the glass to a sensor above the glass, that way you can use LDR's to calculate the width of the glass, then u could use an IR to read the height of the glass smiley

take the two parameters and do width * height to find the volume! smiley-grin
Logged

Norfolk UK
Offline Offline
Edison Member
*
Karma: 66
Posts: 2474
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
take the two parameters and do width * height to find the volume!
Does not work for wine glasses.
Logged

There is no such thing as a stupid question but there are a lot of inquisitive idiots.

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17262
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like an incredibly difficult and complex task to be able to dispense a given amount of liquid into a container of unknown capacity, without overflow. Or is the objective to fill a unknown vessel to 100% of it's capacity without prior knowledge of it's total capacity? Which is just as incredibly complex. And what is the FSR doing? Allowing you to know how much liquid mass (by weight) has been dispensed over a given time? If so FSR are pretty non-linear for good mass weighing purposes, strain gauges or load cells are the desired sensor to use for that purpose.

I have seen used in chemical labs such a system used to detect and measure the actual liquid hight as a beaker was being slowly filled. It was called (if I recall correctly) a 'meniscus follower'. If was basically a sensitive optical detector that looked through the side of the glass beaker and could detect the difference looking through a clear glass if there was liquid or just air in the light beam, even if the liquid material was clear (magic I guess, something about reflective index maybe). The optical sensor was on a vertical servo feedback arrangement that would allow the sensor to move up along with the slowly moving height of the filling liquid. However even this application did not allow liquid to continue flowing until overflow, but rather stopped after a fixed amount of liquid had been distilled into the test vessel.

 I think you need to rethink the objectives and either come up with some reasonable compromises on it's specifications/capabilities.

Lefty
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9470
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds way overdone. As previously mentioned, use glasses of a standard size. Edison's engineers had a similar issue calculating the volume inside a light bulb. Edison just removed the end of the bulb, filled the bulb with water, and then pored the bulb water into a graduated cylinder to read the volume. Get a glass like you are foing to use and manually calibrate the level vs.volume of the glass.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Yorkshire England
Offline Offline
Sr. Member
****
Karma: 2
Posts: 267
Arduino good init
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It could be seen as over done but then you possibly need to supply disposable containers all of the same size. A drinks machine were you bring your own cup/glass.  Dispensers in super markets perhaps to cut down on packaging.
Logged

Pages: [1]   Go Up
Jump to: