Arduino Beer/Fermentation Helper

I started brewing beer about a year ago, and just recently started to use an Arduino to help. Right now it is basically a handy stopwatch, keeping track of primary fermentation time, secondary fermentation time, bottle time, and overall time. Other useful information is ambient room temp and humidity, and I am using an air quality sensor to monitor CO2 release of the airlock, used to monitor fermentation activity. Time since the last airlock activity occurred is shown, along with the maximum airlock activity interval.

To do list:
Saving time data to EEPROM, in case of a power fluctuation.

Temp control with a heater (for now I will be doing this with a stand-alone arduino, but would be nice to use on the beer helper Arduino).

Ambient temp/humidity may be useful data, but along with temp control, liquid temp is needed.

Wifi/Bluetooth connectivity to another Arduino for data monitoring from multiple beer helpers. My brew station is in the basement, it would be nice if I could check on all the brews remotely without having to go to the basement.

Components used:
Arduino Uno

Sainsmart 1602 16x2 LCD with buttons
http://www.sainsmart.com/sainsmart-keypad-shield-1602-lcd-module-v3-display-for-arduino-mega-2560-1280-uno-r3.html

Sainsmart MQ135 Air Quality Sensor

Sainsmart DHT11 Temperature/Humidity Sensor

Hopefully this can help some fellow homebrewers! Also, if anyone uses this and finds any issues or has any updates or ways to make this more useful for homebrewing, please respond on this thread so we can keep this updated!

Beer_Helper_V3.ino (15.1 KB)

camronnie:
To do list:
Saving time data to EEPROM, in case of a power fluctuation.

I'm not sure an eeprom is appropriate for this. An SD card is more commonly used for regular data. It is easier to use and had better life expectancy. If you intend to use an ethernet card, they usually include an SD card socket.

Temp control with a heater (for now I will be doing this with a stand-alone arduino, but would be nice to use on the beer helper Arduino).

There may be good reasons for a separate Arduino, but they are not evident. One Arduino can handle many temp sensors.

Ambient temp/humidity may be useful data, but along with temp control, liquid temp is needed.

The DS18B20 is a good choice for liquid temps

Wifi/Bluetooth connectivity to another Arduino for data monitoring from multiple beer helpers. My brew station is in the basement, it would be nice if I could check on all the brews remotely without having to go to the basement

I believe you are better off with an NRF24 for an Arduino network. They are similar in cost and performance to bluetooth. An Arduino base station communicates with the outside world via Wifi, cable or bluetooth.

Id be careful with having "humidity". Beer is a closed system brew is it not? The general humidity in a beer brewing vessel is always 100%, regardless of the outside humidity.

Also outside temp is no use, you only care about the beer temp. They are independent factors. If you want to know the temp and H of your room FOR OTHER USES, then yeah...got for it.

The temp sensor above is a good choice.
An NRF24 is a nice comms chip as well for arduino. Maybe use a second arduino with a buzzer/alarm and an LCD on a wall somewhere like in the living room?

An SD card is better for regular data. EEPROM only holds so much...and then it is filled. No enough space for the amount of data you may be after.

I personally for a greenhouse, have a bluetooth connection between the arduino and a Raspberry Pi. The Pi gets the data via a python script and places it in a mySQL database. I installed APACHE on the Pi so I have a webserver showing my data.
Next I will be making an android app that can query the mysql data and set an alarm off on my mobile if the temp drops below 2degC. for example.

Slight update, I am working on updating my code for new hardware, hopefully the hardware will be in this week and I can test it out over the weekend with a new brew batch.

New hardware includes a real time clock, thermistor, and relay board.

The real time clock will be used for time stamps instead of using millis. I figured this would be an easier approach to monitor elapsed time, especially when brewing a lager with 14+ weeks of overall time.

I am attempting to use a thermistor for temperature information, before attempting submerging the suggested temp sensor. My reasoning behind this basically just boils down to ensuring that my fermentation vessels are still sealed, and I don't accidentally leave a way for bacteria to enter just to collect the liquid temperature. I think placing a thermistor on the outside of the vessel, attached with some aluminum tape of something, should provide a temperature value that is close enough. I currently have stick on temperature tape on the fermentation vessels, and those seem to work well enough, it can't be much different than that.

The relay board will then be used, along with the thermistor, to control my heating pads for ale primary and secondary fermentation during the colder months. For this first attempt, I will not be using a user adjustable temperature set point, the set point will just be a value within my code, that is appropriate for ale fermentation.

I do not have an SD card setup for data logging, but I think for this version I will try using EEPROM to save timestamps. I know this isn't the most sustainable, but at least I wouldn't lose the information of start/end time of stages in case of a power failure. I think this could get me by until I familiarize myself with storing data on an SD card.

To do list:

I am interested in what Johnny010 said about being able to query the collected data of the greenhouse. I would be interested to know if it would be possible to store data on an SD card, and then when I boot up my desktop computer basically dump that data to my desktop, so I could visualize the data, to see how the airlock activity is changing over time. Storing data on an SD card or sending/manipulating that data is something I have not done before.

camronnie:
I started brewing beer...

I share the idea, man. (+1) :slight_smile:
Sorry for OT.

Instead of a thermistor you may look at something like this:

Since it's threaded you could still have a sealed environment. All you'd have to do is pick up a thermocouple breakout like this one from adafruit:

thelegendofman:
Instead of a thermistor you may look at something like this:
3m Stainless Steel Probe K Type Sensors High Temperature Thermocouple 10ft for sale online | eBay

Since it's threaded you could still have a sealed environment. All you'd have to do is pick up a thermocouple breakout like this one from adafruit:
Analog Output K-Type Thermocouple Amplifier - AD8495 Breakout : ID 1778 : Adafruit Industries, Unique & fun DIY electronics and kits

I'll keep the threaded idea in mind, that may work, but the temperature range of that thermocouple is too high for the application. A threaded port may work for primary fermentation, when I use a plastic bucket, but would not work for secondary when it is racked into a glass carboy.

I've finished my code for the new hardware, and it is working very well I think!

Hardware:
Arduino Uno
Sainsmart 1602 LCD/button shield
Sainsmart 2 channel relay board
Sainsmart MQ135 air quality sensor
Beer heater
Adafruit DS1307 RTC
Adafruit 10k thermistor

Basic overview:
For each stage in the beer process the RTC will create a timestamp of when the stage started, and then the stage duration is calculated by reading the current RTC time.

The thermistor measures the temperature of the brew vessel, and will display different temp average values for primary and secondary fermentation. Based on the setpoint (user adjustable while in program) and an operating window of +/- 2*, the relay will either turn the heater on or off.

During primary fermentation, after 12 hours, the air sensor will start looking for fermentation activity. The current airlock interval can be displayed, along with the maximum interval seen.

Still to come:
Wireless communication to another arduino to check on the information without having to physically be in the brew room.
Datalogging, to visualize the data during the brew process. This may replace using another arduino to check on the brew.

Beer_Helper_V4.ino (22.6 KB)

Well I started to use this version for a new beer batch, temp control worked perfectly, I'm very excited to see how this batch turns out, being able to hold the correct temp.

However, I noticed my time calcs were giving me some strange numbers... Here is an updated program, with calcs that appear correct from forcing time differences to check the cals.

Beer_Helper_V4.11.ino (23.6 KB)