How to detect size & shape of a cup

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
lanewsa
 
Posts: 6
Joined: Fri Dec 31, 2021 10:57 pm

How to detect size & shape of a cup

Post by lanewsa »

Hello experts.

I'm in the process of building yet another cocktail mixer, with a few enhancements compared to other cocktail mixers I've been exploring.

I need to figure out how to sense/detect the size/shape of a cocktail glass. As I see it, there are three basic shapes/sizes I need to determine:
1/ small tumbler
2/ large tumbler
3/ martini glass

One technique I thought about is to mount a sensor on a vertical rack and move from bottom to top of a designated space. Once the sensor does not get interrupted by the glass (or plastic) medium, I know I've reached the top of the object and can therefore calculate the height of the object. Simultaneously, I could detect the "shape" if the sensor detects that the distance between the sensor and the object is changing.

It all seems doable but I am hoping that experts out there have a better solution. Any guidance would be gratefully accepted!

Thanks.

User avatar
adafruit_support_bill
 
Posts: 88040
Joined: Sat Feb 07, 2009 10:11 am

Re: How to detect size & shape of a cup

Post by adafruit_support_bill »

Using break-beam sensors - either a fixed array or combined with a scanning mechanism should allow you to determine the basic shapes.

Another approach would be to use a Raspberry Pi with a camera and some image recognition software. You could train it on a variety of glass shapes.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”