Skip navigation.

Temperature Controlled Computer Closet

Early in the month, I managed to read my first DS-18B20 temperature sensor.  Over the intervening few weeks, I have been experimenting with using a Python script to read up to ten sensors at a time, and storing the temperatures in a MySQL DB.  Here is a close up of a bank of 11 x DS-18B20 temperature sensors.

Bank of Eleven x DS-18B20 Temperature Sensors

It will also display one of the temperatures onto a Nokia 5110 LCD screen.  You can see the bank of 13 x sensors off to the right hand side:

Nokia 5110 Display - Temperature

For some reason, I can't get the Raspberry Pi to recognise more than ten sensors at a time.  If I have more than ten, it will just read the first 10 it comes across.  I have yet to figure out a fix for this.  [Edit: aparently it's hard coded in the kernel module to ten sensors]  [Edit 204-03-06: You can now set the max number of sensors you want to read - Edit /etc/modules with:    wire max_slave_count=15 ]

I knew heat was going to be a problem, so when our house was built, I had the bricklayers leave two bricks out at the bottom of was going to be my computer closet.  Last weekend, I cut up some left over 90mm storm water PVC pipe and created a cool air inlet and a hot air exhaust.  Both have a 12V DC computer fan fitted to help blow hot air out and suck in cold air, that is, if the outside air is cooler than the closet space.  Here is a ground level view of the outside vents:

Outside View of the Air Vents

To keep out any insects, the above cavity is filled with expansion foam and the large 90mm air pipes are fitted with dual fly-screen caps with extra crushed fly-screen in between them.  The 20mm cable conduit is sealed off underground.

To monitor all of this and to help out with some future projects, I am going to use the Raspberry Pi to do all the grunt work.  At the moment, everything is run off a breadboard, but eventually I will transfer the circuitry to a purpose built board.

Many years ago, I played around with some DS-1820's, but found some of them to be a bit inaccurate, so part of the above testing was to see how accurate a bunch of them could be.  After a week of testing and examining the logged temperatures, I found that all my sensors are all less than +/- 0.3 deg. C from the average temperature:

Initially I found some of them to be out by up to a degree.  It ended up that some of the left hand edge sensors on the bank of 11 were being effected by the Nokia 5110 white LED backlit Nokia 5110 LCD screen.  Laying the breadboard down and turning off the LCD back-light resolved that.  Below is a graph of how ten DS-18B20 sensors differ from their average temperature over a 24 hour period.  They where read once every five minutes and 'Y Axis' is in Deg. Celsius.

Test Sensor Temperature Graph

So, with that all weighed off, this weekend, I made up a four sensor wiring loom.  Here is a close up view of a sensor that is about to be heat shrinked:

Closeup of a DS-18B20 Temperature Sensor

The four sensors cables where then all wired together using Cat5 network cable.  I used the Orange pair for the +5 volts, Blue pair for the 0V/Ground and the Green pair for the sensor data.  The Brown was un-used.  I used a combination of a Linear and Star topology wiring network.  According to the Maxim: 'TUTORIAL 148, Guidelines for Reliable Long Line 1-Wire Networks' document, with good wiring practices, you might get up to 200m of sensors.  In a past project, I had a cable going some 35m to an outside DS-1820 sensor.

Temperature Sensor Wiring Loom 

that will record temperatures from:

  1)  Outside Temperature Sensor   Outside

  2)  Closet Air Intake   bottom of the closet space

  3)  Top Closet Temperature Sensor and Air Exhaust   top of the closet space

  4)  and my computer room - mounted on the back leg of my electronics desk.

A later project will measure the temperature of one of my 180W solar panels, the roof space and a roof space centralised network switch.  It gets pretty hot up there, so by monitoring the air temperature in there, it will give me some empirical data that I can use to see if mounting some roof space air vents might help cool the space.  I might need a DS2482-800 I2C, 1-Wire bus master chip to help isolate each cabling run of sensors.

[Edit: 2013-03-11]

The following weekend I added in the attic cable to measure the roof space temperatures.  The roof is just the locally common, corrugated metal sheeting, so as you can see form the graph below, it can heat up and cool down very quickly.  I have used a RJ-45 junction box, so I can add on a further cable to the Solar PV panels at a later stage.

Attic Temperature Sensor 

 Here is a graph of the first two days of production temperature logging.  At the moment, I am just manually producing the graphs.  Later I will use some python code and gnuplot to automate the data display.

House Temperatures - 5-7th March 2013

Note: you can click on any photo/graph above to view a large version.