Coffee Sense

Assignment 3

Allan Fong, PhD Computer Science
Kotaro Hara, PhD Computer Science





Figure 1: Coffee Survey

According to a 2011 Dunkin Donut and CareerBuilder Survey , scientists and lab technicians are the professional groups that, on average, drink the most coffee daily (Figure 1). We were motivated by this report and our personal curiosity to track the general coffee consumption of the HCIL as well as our personnel coffee consumption. For this assignment, we built a system that will allow us to start monitoring the coffee consumption of the HCIL lab as a whole and at the individual level. This system will let us study interesting questions such as, how does coffee consumption change over time, and is coffee consumption more associated with weather and temperature or with deadlines. Our system can also let people monitor their coffee consumption. This can also lead to interesting questions such as, will people’s coffee consumption change if they can visually see their consumption history. This might provide insight into how different people perceive the benefits of coffee.
Furthermore, this assignment was an opportunity for us to learn about and work with two new systems for us, Bluetooth and RFID.


Our system composed of four parts: 1) the coffee maker, coffee pot, and coffee, 2) Force Resister Sensor (FSR) grid to measure the weight of the coffee, 3) Radio Frequency Identification (RFID) system to identify users, and 4) Bluetooth transmission system to send information remotely to a local server and a visualization display for all users to track the coffee consumption (Figure 2-3).

Figure 2: Coffee Sense system
Figure 3: Coffee Sense and coffee maker


Our system monitors coffee consumption at the communal coffee maker. We placed six Force Resister Sensors (FSR) under the coffee maker in the HCIL (Figure 4-6). We decided to place the FSR in series rather than parallel because the resistors in series allowed us to properly account for the various weight distribution of the coffee pot and the coffee maker. By collecting changes in the weight of the coffee maker, pot, and actual coffee, we would be able to approximate coffee consumption. We decided to use FSRs rather than load sensors because FSRs have a much lower profile and we wanted our system to be minimally invasive, which will make it more acceptable to the lab. The total resistance acted as a voltage divider (Figure 8). When the coffee machine and coffee pot is empty, the resistance is approximately 27kΩ. When the coffee pot is full, the resistance is approximately 13kΩ. We choose a 22kΩ resistor because it provided the most sensitivity for the voltage divider. The voltage is then passed to the Arduino Uno as an analog input.
Figure 4: FSR layout
Figure 5: FSR needed protective cover
Figure 6: Final FSR system


We implemented an RFID system allowing coffee drinkers to “check in” their mug before they get coffee (Figure 7). The user’s mug has an unique RFID button underneath the mug. The user “checks in” their mug by placing it over the RFID reader and removing it. When this happens, the system will blink and beep, providing feedback to the user acknowledging that the mug has been checked in. The user’s information will then get passed to Arduino Uno which will then be sent and stored on a local server via Bluetooth, similar to the coffee weight information.
Figure 7: RFID system
Figure 8: Project circuit


We wanted to incorporate Bluetooth into our assignment (Figure 9). We have not worked with this system before and wanted to learn how to use the system. Getting started with Bluetooth was not trivial and took a lot of time to debug and integrate into our system. However, we were able to get the Bluetooth working and it provided a very nice way to gather our data remotely and store the data on a local server. The Bluetooth connection had to be set up to read and send information at a different rate than the requirements for the RFID reader. This lead to some lag time in the system responses which we will talk about later. Overall, the Bluetooth is a very neat and compact platform to transmit information and was very useful, once we actually got it working.
Figure 9: Bluetooth system


Besides setting up a Bluetooth connection between the laptop and the Arduino, we had to create a local server to store the coffee consumption and user's RFID information so it can be visually displayed from any computer. We created a visualization to monitor the amount of coffee in the coffee pot as a function of time (Figure 10). The visualization is updated every few seconds. The display range for the history of coffee consumption can be adjusted. The visualization update rate can also be adjusted. All the information is stored on the server which can be displayed to view the history of coffee consumption. This is the first version of our visualization demonstrating the basic functionality of our system. For future work, we hope to expand this visualization to visualize individual consumption and also try different visualization formats such as bar graphs, cumulative graphs, etc
Figure 10: Coffee visualization


The goal of our project was two-fold: first to build a system that can allow us to measure and track the coffee consumption in the HCIL, and second to explore and learn about and build something using two new systems to us: RFID and Bluetooth. Furthermore, with the individual check-in system, our set-up can be expanded to monitor and track coffee consumption at the individual level as well. With our system, we have been able to collect coffee consumption data in real-time, as well as implemented a check-in system for users (Figure 11). We have successfully demonstrated the system working though it can still be considered in the prototype phase and some work will still be needed to make this something that can fully be integrated into the HCIL.
Figure 11: Coffee Sense in action

Challenges and Limitations

We faced several challenges through this project, some we were able to solve and some we were able to work around. First, we tried to mount our FSR sensors to a plywood-like board, mostly because they were cheaper and easier to cut. However, that didn’t work because the board got wet really quick and started effecting the readings. As a result, we switched over to more costly plexiglass boards. Furthermore, the uneven weight distribution of the coffee pot and shifting of the maker as you remove and replace the coffee pot can affect the sensitivity and readings of the FSR sensors. We tried our best to mitigate these effects by placing markers on the plexiglass to help with the placement and alignment of the coffee maker.

In addition, the sensitivity of the RFID reader was not what we expected. Our reader was advertised to be sensitive for up to 12 inches. However, in reality, it was only sensitive within 3-4 inches. As a result, we had to create a holder for the RFID reader and place it in front of the coffee maker. Furthermore, the RFID feedback (blinking LED and buzzer) was not as immediate because of the varying update rates between the RFID, Arduino, and Bluetooth. Although we modified our Arduino code to process the RFID tag and provide the feedback right after each other, the feedback was still not as immediate as expected.

Besides technical challenges and limitations, our system would not be able to capture the coffee consumption of all the people in the HCIL for various reasons. First, not everyone use the coffee maker, some people use the expresso machine or bring their coffee from home. Second, people might not always want to check in their cups every time they get coffee. This adds extra work for people and it also means that they have to use the same mug every time. Furthermore, we observed that sometimes people would tend to pour out cold coffee. Our system currently would not be able to tell when coffee is being poured out into a mug or into the sink.

Future Work

Some further work includes implementing an additional system for the expresso machine. There are also many ways to build and expand on the visualization component of our project to make the coffee consumption data more understandable and interactive. We would also like to make the RFID holder case much smaller and less prominent. It would also be interesting in making a similar weight measuring system for individual coffee mugs. This can help track coffee consumption of people who bring coffee from outside the lab.

Some Additional Inspiration and Related Works

Coffee, the elixir of the graduate student, is very important to a researcher’s life and various work has been done to track coffee consumption. We were inspired by these and other types of minimally invasive sensing system. Our system, and other similar systems, can perhaps be used to track other food and beverage consumption, potentially influencing behavior, and encourage healthier life styles.

Below is a listing of some of our inspirations:

Gallersen, H.W., Beigl, M., and Krull, H. “The MediaCup: Awareness Technology Embedded in an Everyday Object,” Handhead and Ubiquitous Computing Lecture Notes in Computer Science, 1999, Volume 1707, 308-310.

Beigl, M., Gellersen, H.W., and Schmidt, A., “Mediacups: experience with design and use of computer-augmented everday artifacts,” Computer Networks, Volume 35, Issue 4, March 2001, Pages 401-409.