Quad Temperature Sensor for Homebrewing

I was looking to utilize the Spark Core to monitor temps while brewing beer. I generally brew multiple batches at the same time, and being able to keep an eye on all the temps at a central location would be convenient. Then there are a ton of ways to improve upon it once I’ve gotten that far.

With the help of @Julian, who had some previous experience with the Adafruit MAX31855, I was able to connect PlayingWithFusion.com’s MAX31855K-4CH to the Core. It is a K-Type 4 Channel Breakout board. I recently had a successful test with a single thermocouple. More thermocouples are on order so that I can do some tests with all four.

Here is the current code, thanks to @Julian
It currently works with the single thermocouple. I will be adding some changes when I have the other thermocouples.

This is an example for the Adafruit Thermocouple Sensor w/MAX31855

 Designed specifically to work with the Adafruit Thermocouple Sensor
 ----> https://www.adafruit.com/products/269

 These displays use SPI to communicate, 3 pins are required to
 Adafruit invests time and resources providing this open source code, 
please support Adafruit and open-source hardware by purchasing 
products from Adafruit!

 Written by Limor Fried/Ladyada for Adafruit Industries.
 BSD license, all text above must be included in any redistribution

include "math.h"
include "Adafruit_MAX31855/Adafruit_MAX31855.h"

int thermoCLK = A3;
int thermoCS = A2;
int thermoDO = A4;
double thermotemp = 0;

Adafruit_MAX31855 thermocouple(thermoCLK, thermoCS, thermoDO);

void setup() {
 // Register a Spark variable here
 Spark.variable("thermotemp", &thermotemp, DOUBLE);

 // open serial terminal and press ENTER to start
 while(!Serial.available()) SPARK_WLAN_Loop();

 Serial.println("MAX31855 test");
 // wait for MAX chip to stabilize

void loop() {
 // basic readout test, just print the current temp
 Serial.print("Internal Temp = ");

 double c = thermocouple.readCelsius();
 thermotemp = thermocouple.readCelsius();
 if (isnan(c)) {
 Serial.println("Something wrong with thermocouple!");
 } else {
 Serial.print("C = "); 
 //Serial.print("F = ");


I hope to eventually add an LCD to view the temps as well as make the temps viewable on my phone/laptop. I’ll keep everyone posted.


Hi, fellow brewer here :slight_smile: Just a heads up that the brewpi project will be fully supporting the spark, and will track mulitple ferments simultaneously.

I’ve been looking for a way to control fermentation temps and am close to building my HERMS setup for brewing. I was going to order a BrewPi Shield tonight and then saw that @Elco was working on a Spark Core solution. I have heard from many fellow brewers in my Brew Club that use the BrewPi and swear by it’s ability to keep within 0.1 Degree C. I would take a look at his project for sure.

Another brewer here!

A long time ago I built up a quick circuit for simple monitoring and uploading to the web (So I can view it on my iPhone and get alerts when the temperature is out of bounds). Originally I had three thermistors on it, adding another (up to the number of digital pins the Spark has) would be simple. I ended up dropping it down to just a single sensor, only plugging in the other two when I’m cold-crashing or lagering – one for the brew, one for the air coming out of the chiller, one for the ambient temperature.

Someday I’ll write up the full project. The gist is that I used three DS18B20 Digital temperature sensors with the DS18B20.h and OneWire.h libraries on the spark core, and some very simple code. Basically set up using DS18B20 ds18b20 = DS18B20(digitalPin); then take a bunch of readings with ds18b20.getTemperature(); (It’ll be in C) and average them to get rid of some noise. Then post those to the internet!

See the project running live here (obviously I’m not fermenting anything at the moment!): http://4drillsbrewery.com/ferment/

One other note, I tried thermocouples but I found the one wire sensors to easier to use, especially in calibration. The thermocouples are really picky with voltage and how you hook them up. The promise is more accuracy but only if everything is perfect.


1 Like