LM92 temperature sensors for home-brewing

For my home-brewing installation, see www.vandelogt.nl, I need to have reliable temperaturesensors to read both the temperature from my hot-liquid tun (HLT) as well as from my Mash/Lauter Tun (MLT). After lots of experimenting, I decided years ago to use the highly accurate LM92 temperature sensors. They are accurate to a half-degree Celsius and use the I2C-bus to directly read in a digital code representing the actual temperature. The challenge is to have this made in a reliable way, since these sensors are used in a humid and high-temperature environment (up to 80 degrees Celsius). To start with: I made a hardware design and a printed circuit board (PCB) with Eagle PCB. You can download the LM92 Eagle Design files if you like (they are released under the CERN Open Hardware License).



The interfacing is done with CON1, which contains the power-supply and the SCL and SDA lines of the I2C interface. The power-supply is low-pass filtered, so any interference is minimized. Address selection is done with JP1. The HLT sensor needs an I2C address of 0x92, while the MLT sensor needs and I2C address of 0x94. This can be hardwired on the PCB, which has the advantage that you only need one PCB for both sensors. The PCB has a diameter of 17 mm, so it fits in a copper pipe of 22 mm. The PCBs have been made by Iteadstudio and are of excellent quality. You can also download the Gerber Files that were used for board production. The picture shows both the component and solder side of the PCBs, two empty and two with components added. The last thing to do is the solder a cable to the blue CON1 connector. For this, I use a Cat5e ethernet cable using the coloured wires as specified in the schematic.


To continu: cut some copper pipe (diameter 22 mm) into pieces of approx. 10 cm long. Solder (use Tin-Silver solder without (!!) any lead) the end-caps to these pipes.


Mount the LM92 board inside this copper pipe (after it has been cleaned and let to dry), make sure that it is working properly and that there are no shorts. Then add clear plaster resin, so that the copper pipe is completely filled. Let the plaster resin dry for at least 2 weeks prior to use. The end-result is a temperaturesensor that can be mounted inside the brewing kettles and that is ready for many brewing sessions to come.

Finally: the software to read in the temperatures from the LM92 devices. I am using an Arduino Uno for this purpose, but not with the Arduino environment, because it is far too limited for any serious software engineering work. I installed Atmel Studio and all firmware for the Atmega328 is done in the C programming language. So the actual source code (i2c.h and i2c.c, see below) contains both the I2C routines (with thanks to Peter Fleury!) as well as the actual lm92_read() routine. The Atmega328 calls this routine every second to read in the actual temperature. The value returned by the routine is in a Q8.4 format, which is effectively the temperature multiplied by 16. This is done to achieve the maximum accuracy from the sensor, while maintaining an integer number.

Downloads in this article:
LM92 datasheet from Texas Instruments
LM92 Eagle Design files made with Eagle 6.3.0
Gerber Files for PCB made by IteadStudio

Any comments, suggestions, questions? Please feel free to comment.