CoffeeBot monitoring with Arduino

So, after I described using an instrumentation amplifier to take strain gauge readings using an Arduino, what was all that theory for? To measure the amount of coffee in the DoES Liverpool coffee pot from the next room over of course. A “Coffee Bot” if you like!

Reading the contents of a coffee machine has precedent on the internet; the inspiration for the very first webcam was the Trojan Room Coffee Monitor that was installed in Cambridge University Computer Laboratory from 1991 to 2001. So now in DoES Liverpool, we have an online record of the amount of coffee in the coffee machine from the weight measurement of the machine, pots and water.

The DoES Liverpool CoffeeBot
The DoES Liverpool CoffeeBot

A set of bathroom scales lives underneath the coffee machine in the kitchen, connected to an Arduino Ethernet that measures the weight, calculates the number of cups of coffee in the machine and sends the data out to Xively. All the measuring electronics of the scales has been bypassed and the Arduino measures the mass of the water in the coffee machine by reading resistance change from the strain gauges at each corner of the scales, via an INA125 instrumentation amplifer. Detail on connecting the instrumentation amplifier to the Arduino is shown in the ArduinoInstAmp repository in GitHub and I’ve written about it previously.

Refresh the page to update
The live feed from the DoES Liverpool CoffeeBot (refresh the page to update)

The circuit used to run the CoffeeBot is the same as the one used reading strain gauges from the INA125 that I’ve detailed previously. The only additions are a normally grounded push button feeding into pin 2 and an LED and resistor with the anode lead coming from pin 5. The code is at

To make the information useful without having to be in front of a computer, a remote monitor for the scales polls the Xively feed regularly for the latest values of the number of cups and displays the results on a dial gauge in the main room of DoES. While it is possible to find out the amount of coffee available from anywhere with internet access, the usefulness of the information does diminish as you get further away from the machine. The optimum condition for using the CoffeeBot would be out-of-sight of it, but still in the same building.

While collection of the level of the coffee in the machine is an interesting exercise and it’s nice to know if there’s coffee available before getting up, there are some more practical uses once the data has been collected. Averaging the number of cups consumed during each day might give guidance on when to stop making coffee in the afternoon, and how many cups to make in the last pot. Tracking total cups made would mean that it’s possible to determine how regularly coffee beans need to be purchased so as to keep them available, but still fresh.

Up-to-date and historical information on DoES’s coffee usage is available at and full details of the Arduino code used to run the CoffeeBot and it’s monitor is available on

6 thoughts on “CoffeeBot monitoring with Arduino”

  1. This device also needs to control a camera to capture and publish the culprit who always takes the last cup without making.

    1. Hmmm… I think that might be a social problem, rather than a technological one!

      Although a webcam with movement detection sending timestamped images to a server might cover tracking who uses the coffee machine. Legal implications or social exclusion are left to the creator!

  2. Patrick,

    Thanks for this project, it’s given me lots of useful information for a project I’m undertaking to use some Lidl bathroom scales hooked up to an Arduino in order to display the volume of water in a container [homebrewing content!].


Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>