NH3 temperature monitor


Somewhere in 2009 my father-in-law, Fritz, asked if I knew of some way I could monitor the temperature of several ammonia lines on an anhydrous ammonia applicator. Immediately I thought of Dallas Semiconductor 1-wire temperature sensors. But what controller to use? PIC? AVR? Something else? At this point I had read a little about the Arduino boards, and with a little more research I bought an Arduino Duemilanove and some DS18B20 temperature sensors.

Unfortunately I finished the unit a couple weeks too late to integrate into the applicator. I stayed behind from a family reunion for a few days to finish -- I took a vacation day, went to my office, shut the door and finished up the firmware. It was actually an awesome vacation day because I never had time to work on the firmware at home and always wanted to work on it when I had things that needed to be done at work.

The unit has a bunch of Dallas Semiconductor DS18B20 1-wire temperature at the end of some cat5 wire. Those are sealed up with a few coats of dip-it plastic coating. I had no idea what the operational environment would be other than cold, hot, wet, dirty, abrasive and in general, harsh. There are commercial manufacturers for industrial quality 1-wire temperature sensors but they're relatively expensive, especially when you don't know if your project will serve its purpose at all.

The enclosure is a generic weatherproof electrical handy box from Home Depot. The arduino is mounted on the bottom. Additionally I have a +12 to +5 regulator in the box to power the 1-wire sensors. You can also run the sensors in parasitic mode, but they read much more quickly when they are bus powered.

The backlit 4x20 LCD display shows the various temperatures of the sensors and the buttons handle menu navigation.

The buttons are from Radio Shack. I had them in the junkbox. They have to be the shittiest buttons I've ever used. The metal barely wets and the switch body melts when you solder it.

But I digress...

In operation, the unit displays individual sensor temperatures and beeps and blinks if one or multiple temperature sensors fall outside of the average temperature of the rest of the sensors. That range adjustable via menu entries and stored in nvram for next time. The operator can silence the beeping once it starts. If the condition clears, the beeping will restart on the next error. There are a couple of other menu options and some other junk that happens in the code but those are the highlights. Less than 750 lines of code are involved.


June 2010

Got a call from Fritz with some questions about connecting the sensors to the unit. I was able to refer to my source code and get him the right answers.

A day later I received another call from Fritz -- my unit had detected and alerted him to a temperature anomaly in a fraction of the time that it would have otherwise taken for the problem to manifest itself. Success!


There is room for improvement with this project. Individual temperature sensors are enumerated on startup and again if a sensor is added or removed. There's no functionality to associate a sensor with a location. Alarming is done via a generic piezo beeper. Using the Arduino PWM functionality for irritating musical beeping would be a healthy direction for feature creep.

I really wish I could find a decent LCD shield. Those that I've found assume a 2x16 and I want a 4x20. The other display options tend to be either expensive, too small, or constructed from unobtanium.


Sun Jul 29 21:49:16 CDT 2012

Where were you two years ago???

Phi-2 shield?

This page last modified Sun Jul 29 21:50:03 CDT 2012 by timc!

go back