Skip to content

denisw160/CoffeeMonitor

Repository files navigation

CoffeeMonitor

Retrofit the coffee

State: Beta

This project is a showcase for an IoT application that digitizes our "old" / conventional coffee machine. With the help of basic sensors this project shall show how existing "hardware" can be transformed into the modern digital world.

A presentation about the CoffeeMonitor can be found here (under construction).

Why this scenario?

The classic coffee pot is widely used and everyone does not know the problem: if you want to have a coffee, the pot is empty. How good it would be if you knew in advance how much coffee was still available before you went on your way.

The idea

In order to determine how full the coffee pot is, there are different variants to determine this. A simple variant is to weigh the coffee pot. There are already a number of sensors that can be connected directly. If you know the empty and full weight, you can easily estimate the degree of filling of the coffee pot. In addition, I wanted to know how often the coffee pot was refilled. Since the coffee pot has to be removed from the weighing plate, I used a distance sensor that monitors the occupancy of the plate. With the sensor one can count the change of the allocation and/or refilling so. Now the data from the sensors must be processed and made available to the user. For this I use a Raspberry Pi 3, which connects the necessary software and hardware components. The sensors are connected to the GPIO ports. The status of the coffee pot is then published via a web application.

The solution

All sensors are connected to the GPIO ports. This looks like this, for example.

Raspberry complete

A weight cell with a HX711 is used as weighing sensor. In order for the IR distance sensor (FC-51) to work properly, the plate must be provided with two holes for weighing.

Sensors of the CoffeeMonitor

The structure and connection to the Raspberry Pi is as follows

Plug-in board

The details of the electrical connection can be found in the Fritzing file.

The architecture

The software consists of three modules:

  • CoffeeSensor: a Python script that reads the data from the sensors and transmits it to an MQTT broker.
  • CoffeeService: a Spring Boot application (Java) that receives messages from the MQTT Broker and stores them in a MongoDB. The application also provides a REST API to retrieve the data from the MongoDB.
  • CoffeeApp: An angular application that retrieves and displays the data via the REST service.

Optional you can use a ESP8266 as CoffeeSensor. You found the source and the wiring diagram in [CoffeeSensor_ESP][6].

The prerequisites

The following software components are required on the Raspberry:

  • Mosquito MQTT-Broker
  • MongoDB from 2.6
  • Python 2.x and PIP
  • Java 1.8
  • Node.js

The installation can be carried out using the setup scripts.

Features of the application

Display how full the coffee pot is

Full

Some coffee taken

Almost empty

Empty

If the application detects that no more data is being transferred, this is displayed.

The application can be used both on the desktop and on mobile devices.

The configuration of the weights (filling and empty weight) can be set directly in the web application.

The progression of the filling level as well as the refilling can be tracked in the history.