Feb 22, 2023

Sensor device to monitor bottle fermentation

We have developed a prototype of a sensor device that should help to brew Kombucha that tastes better and doesn't explode.

Kombucha in Bottles, picture by Labra.studio.Kombucha in Bottles, picture by Labra.studio

When Kombucha is fermented inside a bottle as part of the second fermentation, a strong pressure might build up over time. When such a bottle is simply opened, all Kombucha might escape quickly (e.g. shooting to the ceiling), or the opening process has to be done really slowly. But this way, the opening might take the better part of one hour.

A solution is to open the bottle regularly to release the excess pressure so that it doesn't get too high. Kombucha brewers call this very vividly "burping". At the same time, this burping seems to be counterproductive to the fermentation as it interrupts the second fermentation process. So one wants to do it only when really necessary, for example, when there is the danger of an exploding bottle. So you put a pressure gauge to just one bottle of the batch to get an idea of the build-up. If care has been take that all bottles are filled and kept in similar conditions, that might be enough, we presume.

Our customer Labra.studio wants to take this to the next level and automatically monitor the pressure, store it in a database, and then add some processing and nice visualization so that they can do that job with ease, monitor it remotely and, at the same time, gather more knowledge, determine other environmental factors that cause the excess pressure, and improve the whole fermentation process. Phew!

Long story short, here is what they got:

Sensor device by Defsystem to monitor bottle fermentationSensor device by Defsystem to monitor bottle fermentation The hardware consists of a pressure transmitter by BB Sensors, Donaueschingen, Germany, connected via I2C bus to an ESP32 system, in this case a compact M5Atom Lite by M5Stack. Pressure data is collected at regular intervals of 300 ms and the RGB LED is illuminated accordingly. The color legend is:

0 bar — magenta
1 bar — blue
2 bar — cyan
3 bar — green
4 bar — yellow
5 bar — red
Between those values, the color is blended according to the outside of the HSV color wheel. This makes it easy to get a good impression of the pressure levels at a quick glance.

The exact value together with a timestamp (retrieved via NTP) is stored once a minute via HTTPS over Wi‑Fi to a database backend. The initial setup is easily done via a smartphone app with our Wi‑Fi provisioning via Bluetooth BLE, which also allows to switch to other Wi‑Fi networks later.

This is a first action picture by Labra.studio:

Kombucha bottles with analogue gauge (left) and digital sensor device by Defsystem (right), picture by Labra.studioKombucha bottles with analogue gauge (left) and digital sensor device by Defsystem (right), picture by Labra.studio

Data storage and initial visualization

As per customer request, the device uses the graph database Dydra by Datagraph GmbH as database backend. The sensor readings are transferred to Dydra as JSON data via REST calls over HTTPS and stored as N-Quads describing SOSA oberservations.

Initial visualization of the sensor data by Labra.studio, picture by Labra.studioInitial visualization by Labra.studio, picture by Labra.studio

Labra.studio already surprised us with some initial visualizations of the sensor data realized as notebooks in Observable. Please note that this is just some very early work.