Coffee pot watcher

With some new staff at the office, we seem to be going through coffee very quickly.  It was suggested that we find a way to track our coffee usage through the day, or be able to offer a system by which someone can see how much coffee is left in the pot.

With some thoughts in mind, and looking forward to a new project I started with a trip to my local Walmart.  There I bought a bathroom scale (HomeTrends; $20) and brought it home to take it apart.  The easy part was taking it apart….   the hard part was coming to terms that the electronics it contained were useless…   😉   I found very little useful parts within however and found myself scanning the Internet for how I could possibly make use of the scale to do my bidding.

This is what I found inside the scales enclosure.

20160312_123500

That black blob in the middle keeps guys like me from being able to inspect and use the scales electronics!  The gold pads along the top connect to the LCD display, and I found that connection was just a piece of rubber with minute conductive traces (ie. no solder!).  Never knew such a thing even existed..  it’s called an elastomeric connector.  That’s what’s super cool about stuff like this, always something to learn around the next corner…  😉

Turns out that most scales use strain gauges at each corner to weight items, and in a nutshell the gauges allow a very small about of electricity to pass through.  This voltage is so small that my multimeter was not even able to read it.  During my research I learned about and looked into what is referred to as a wheatstone bridge, which boils down to the 4 strain gauges being attached together in a loop.  There are three wires on each, so 2 wires go off to neighbouring gauges and one wire from some of the units is either for the application of the reference voltage or for the measuring of the voltage coming back out of the bridge.

The bridge looks like this:

Wheatstonebridge.svg

VG is the sense wires and where the bridge connects to the ADC.

At first, I tried to use the Adafruit ADS1015 but found that 12 bit resolution was not enough to pick up the minute variations in the voltages.   It would sense when I placed several cans of beer on the scale, but the resolution appeared to not be sure whether there was anywhere from 1-3 cans on the scale.   Next I tried the MCP3424 from RoboShop.  This ADC device has a 18 bit resolution and I used every single bit to obtain the readings that I managed to get from the scale.  I think that an even higher resolution would be better, but the 18 bits did the job for me.  Essentially this means that I am shifting the ADC value 18 times to obtain the readings that I was able to finally get from the scale.  At the low end of the scale, the reading is 60uV (0.00006 V) and at the high end it is 250uV  (0.000250 V) – not much of a difference!

This video highlights the first coffee test..

Readings are send to a web site every 5 seconds, using the Adafruit CC3000 Wifi shield.  In the production version, the readings will be obtained ever 5-10 minutes.  The Adafruit RGB-LCD allowed me to view the results of the tests without having to use my computer.

Here’s a graph showing the beer and coffee tests over the evening.  (No beer was consumed during testing…  😉

Graphing results

Future work will involve the development of an Android application, and a simple PHP script to send notifications to our HipChat coffee room..

Scripts so far are attached below:
coffeeWatcher.ino
recordWeight.php