Case Study: The Cup That Knew Too Much
The Cup That Knew Too Much
This project began with an idea: I wanted to make some kind of smart object, as a way to expand my knowledge using an Arduino and sensors and learn some basic electronics principles.
Making a smart cup came to me because it seemed kind of counter-intuitive, using electricity and liquid.
Here's what the setup looked like during development:
At that point, it was "working." In the base is a temperature sensor, a light sensor, and conductive contacts for the tape. Inside the cup, there's a gap in the conductive tape running down each side of the cup which is only connected when the cup is full.
Here's a diagram of what's going on:
The temperature sensor is (very slowly) reading the ambient temperature. It unfortunately responds slowly (the air around the sensor has to heat up, and there's the bottom of the paper cup is an insulating barrier), so testing hot or cold liquids right after another proves problematic for the cup. I used this sensor in the cup.
The light sensor (or photosensor) reads the level of light coming through the liquid (and the cup barrier) and measures its difference from the light coming through an empty cup. For instance: a cup of water has no change in light, whereas a cup of coffee or milk has a pretty large difference in light.
Finally, the conductivity sensor measures the conductivity reading of the liquid in the cup. The circuit is completed when the cup is full, and it sends a raw conductivity reading to an analog pin of the Arduino. Water is conductive, but just so, whereas beer or milk present much higher conductivity readings. Warmer liquids have more conductivity.
Here's what the system looks like for various liquids:
Challenges & Next Steps
A few challenges I think a next version of this project should tackle:
Speedier temperature readings: The current temperature sensor takes quite a long time to cool down or heat up, making readings problematic. This could be fixed by using a more responsive temperature sensor and finding a way to get the sensor closer to the liquid — perhaps a conductive metal coil between the liquid and the sensor.
More precise paramaters: The structure of the code that defines which sensor readings constitute which liquids is based on tests with the current setup. Each new arrangement would have to be re-evaluated, especially for the conductivity readings. Longer conductive copper strips or a less-full cup, for example, could change these readings significantly and produce inaccurate results. The code can be restructured so calibration is easier or even unnecessary.
More reliable opacity readings: With the current setup, the system relies on use of a paper cup so that there's some level of light filtering through the cup and hitting the sensor. However, this requires that the system makes use of a paper cup (not the most durable material) and that the space is lit (meaning it won't work in a dark room). We could replace the light sensor with a way to measure the color of a liquid, which would also allow for an additional level of accuracy (e.g. beer is golden, coffee is black, instead of both reading as dark).
A very early setup to test whether liquids had measurably different conductivty readings
In addition to tackling the above "under-the-hood" improvements, making this a repeatable, usable system is the clearest guiding principle as the cup continues to develop. Building a base that can house the arduino and a power source (like a 9V battery) while offering unobtrusive access for the sensors is key.
Additionally, providing another purposeful output for this (e.g. not just an LED) is an interesting next step. A cup could, for instance, log the liquids it has in it and store that information somewhere. Or calculate the calories inside based on the amount of liquid in the cup (perhaps a scale could be added to the base).