TheGeekery

The Usual Tech Ramblings

Tinkering With Temperature

Sometimes my blog is all over the place. Mostly work related, and other times it springs back to stuff about me, or stuff I’m working on outside of work. This is a cross-over project I’ve been working on (and something I’ve wanted to play with for a while). A temperature sensor…

Right, doesn’t seem to exciting does it? Maybe not for some, but I have an unusual interest in information and data.

We recently had an A/C failure in the office, which triggered our A/C unit to alarm, and out control unit for the A/C to alarm, and for some odd reason, not start the secondary A/C. Looking at the logs, it appears the time from outage to Jeremy forcing the backup A/C online was about 2 hours. Not too bad, but we’d have picked up on it a little earlier if we’d had a remote environment sensor, something I keep trying to get but keep getting denied on.

So I set out to look at cheap alternatives. First stop was Instructables1. This is where I stumbled across a couple of different ideas, but the one that popped out of my head was this little project. This is a very simple example of using the Dallas 1-Wire system2, a resistor, and a couple of diodes.

The really cool thing about this example is the author demonstrates the expansion of the system from a single sensor to multiple sensors by simply adding more DS1820 sensors to a CAT5e cable3.

So with some scheming, I grabbed a couple of DS18B204 sensors from hacktronics, and the rest of the components from Mouser Electronics, increased the count a little to allow for mistakes, and a home model, and set out to build a simple temperature sensor.

The little image above shows 3 of the DS18B20’s connected to an Arduino (hidden off shot). It clearly looks more than the “1 Wire” that the name hints at it using. However, what’s happening here is the power is being fed in on the same line that the data requests come in (pin 2) on, and pin 1 and 3 are grounded.

I built on the idea from the original project, and decided to figure out a nicer package for it. I figured this would actually be quite perfect for an RJ45 case, a collection of network cables (allowing me to vary the length to the sensors), and a single central point of collection. This sparked an idea in my brain, a hub for data collection. Then it struck me, repurposing the chassis of an old Linksys workgroup switch. This is a 6 RJ45 port switch, with only 5 operating at once, but it was perfect. A quick schema modification, and the use of an old Cisco serial cable (the ones that go from serial port to RJ45 connector) and a few more inexpensive parts from Mouser, and you can build a mini-temperature hub.

I’ve built schematics, now all I have to do is get some board, etch it, and solder the parts to it, and I’ll be all set. I’ve tested the theory out on breadboard, and it works great. With the use of the hub, I can put the DS18B20 sensors on the end of short cables and use standard network cables to place them as far away as 100m.

I’ll post updates, and more pictures as I finish the product, but it’s turning into a fun little project for me, yes yes, I know, I’m a nerd.


  1. If you’ve never seen this site, it rocks for a lot of home stuff, and general ideas on projects

  2. Now owned and manufactured by [Maxim][10]

  3. The 1-wire system has addresses on each device allowing you to talk to specific devices

  4. By the way, these are incredibly small

Comments