Many recipes for brewing kombucha require arcane rules of thumb, some mystic lore and a bit of tasting along the way, to determine if a batch has brewed. This can range from a few days, in summer months, to well over a week when the outside temperature drops. To make this consistent—and maximize throughput—controlling the temperature through the colder months is key. This is a perfect fit for a Raspberry Pi!

To control heating for your kombucha brewing, you will need the following:

A Raspberry Pi (I use a Model 3B ($36), but I have used my ol' original Model B for similar applications). A heating mat (I use Propagate Pro's 12" diameter Brewing & Fermentation Heat Pad, $25). A DS18B20 temperature probe (I got mine as part of the OSOYOO 2017 Ultimate Starter Working Learning Kit for Raspberry Pi 3 (whole lotta goodies for $21), but you can easily find one for $8). A relay switch (I use DZS Elec's 4 Channel 5V Relay Module ($8), but you only need one channel for this project ($6)). Jumper cables (I soldered a few together to get the length I needed; ~$2). Aluminum (Aluminium :) ) foil. Wide clear tape. An empty Aluminum drink can. Rubber band, large enough to encircle your primary fermentation vessel. Some old towels or other thermal insulation.

First, you will need to set up the software on the Raspberry Pi. I assume the Pi already has a Debian-like GNU/Linux operating installed, you have a way of interacting with a shell terminal, and that you have root ('administrator') privileges.

The DS18B20 temperature probe is pretty neat. It makes use of the '1-Wire' bus interface to send digitized temperature information to the Pi, meaning it doesn't have to be calibrated against a reference voltage etc., which would be a real pain. However, it does mean that you need to set the Pi up to 'speak' 1-Wire (w1) language. This means you'll need to:

Ask your Pi to add the GPIO pins to your Device Tree. Edit the file (as root) the /boot/config.txt file:

sudo nano /boot/config.txt<br>

This uses the text editing program, nano, to edit the file as root (however, you should embrace the dark side and learn vim). Add the following line (and save the changes (Ctrl-X)):

dtoverlay=w1-gpio

Activate the w1 kernel modules, so it can speak 1-Wire lingo:

sudo modprobe w1-gpio<br>sudo modprobe w1-therm<br>

Power off the Pi

Connect your thermal probe

This involves selecting a GPIO pin to be the designated read-out. Here, we take GPIO4. The wiring schematic provided here refers to the Raspberry Pi 3B GPIO pin configuration; please make sure you check your model's pin configuration. You will also need 3.3 V (3V3) power and an Earth (GND). It's safer to connect the jumper leads to both the Pi and the temperature probe when the Pi is powered off.

Restart the Pi

Check your probe identifier prefix

This involves looking at the directories created in the correct device directory:

ls /sys/bus/w1/devices/<br>

This should display 'w1_bus_master1' and some gobbley-gook, which is the serial number (mine says ''28-04169314f7ff"). If the prefix for your device is '28,' then hooray! You don't need to change any code. Otherwise, note the first two digits of this code. We'll edit the script to use this later. The temperature is read out into a file called 'w1_slave' in the serial number directory.

Connect the heating pad to the relay

Note that the heating pad is a mains device, and can be unsafe if you do not perform correct procedure. If you do not feel comfortable dealing with mains voltage, then seek assistance, or do not go on.

We'll be introducing the relay to intercept one of the two leads coming from the mains plug. Separate a segment of the lead, such that each of the two wires is still insulated. Now sever one side, and strip about a half inch of insulation from the end of each side of the cut wire. Now wire the lead into one of the relay channels.

The relay requires power and a switch. Connect GPIO17 to the appropriate switch input (e.g. 'In1'), and connect the 5V and GND to the appropriate locations on the relay (the model should have this labelled).

Power on the Pi and test the relay switch (without connecting the mains)

Make the thermal coupling between the temperature probe and your brewing vessel

You want to make a good thermal 'circuit'. Aluminum foil is a great thermal conductor, but it doesn't have great shear strength (i.e. it tears easily). So reinforce the back side of it with wide clear tape. Making mechanical and thermal contact between this and the sensor will require a bit of ingenuity on your part, but you can handle it.

Place the whole shebang somewhere dark and insulated

I use a few towels large enough to cover the primary and secondary vessels. Ideally this would be a cupboard etc., but you will note that my current set-up is open (this is because I use this Pi for a range of projects; don't worry, I make sure to cover it so it's very snug).

Now you're ready to run the software.