The first thing you’ll probably want to do when adding a Raspberry Pi to your brewing system is read temperatures. Temperature is one of the most important aspects in the brewing process and reading accurate temperatures can really improve the beer you make. I use the very popular DS18B20 sensor (http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf).
They are great for brewing because they are cheap, accurate to +- .5°c and are easily obtained already packaged inside stainless steel thermo wells. These thermo wells can be added to brew kettles, HLTs, carboys, etc. Here are a few I currently use in my brewing and fermenting setups:
A DS18B20 inside a 4” thermowell on the ‘out’ side of my HLT. Apologies for the dirty stainless. I’m not the cleanest brewer.
A DS18B20 inside a 24” thermowell in a carboy (the probe enters through a different hole than the airlock.. this picture is somewhat misleading). This is measuring fermentation temperature and is connected to Raspberry Pi controlled SSRs. More on that in the future.
These sensors use the common 1-wire protocol. To quote wikipedia (http://en.wikipedia.org/wiki/1-Wire):
In layman’s terms this means we can read multiple DS18B20 sensors on the Raspberry Pi using only 3 wires (one signal, one ground, one voltage). There is a minor issue when using these sensors, however. The GPIO pins on the Raspberry Pi do not support hardware-based 1-wire communication. However, the latest version of the Raspbian OS contains kernel support for software-level “bit-banging” for 1-wire. All you really need to know is that the sensors work.
Wiring up one or more DS18B20s to the Raspberry Pi isn’t very hard at all. All you’ll need is some wire and a 4.7k pull up resistor (yup! only one resistor is needed). For more information on pull up resistors, head to Wikipedia: http://en.wikipedia.org/wiki/Pull-up_resistor.
The following wiring diagram shows two 18B20s wired up to the Pi. You can reduce this to one sensor or extend it to as many sensors as you like. I use 3 in my brewing process and haven’t hit any limitations.
It’s easier to wire these up using some female breadboard wires like these: http://dx.com/p/30cm-breadboard-wires-for-electronic-diy-40-cable-pack-80207
You can also use something like the Adafruit Pi T-Cobbler Breakout Kit: http://www.adafruit.com/products/1105
Here are a couple shots of a sample probe containing a DS18B20 wired up directly to a Raspberry Pi:
The 4.7K pull up resistor is slightly obscured in this picture, but it is wired between the yellow (data) and red (3.3v) line.
A closeup of the connections to the Raspberry Pi.
Now that we have our temperature sensor(s) wired up the next step will be to write some code to read our temperature values! Check back soon.