I’m nearing completion of stage 3 of my home instrumentation project, and thought it was about time I mentioned it here.
The intention is to be able to tell, from anywhere at any time, the vital statistics of our house, and to be able to look back and see what’s happened in the past.
I’ll be posting some of the code and some how-to type docs in future but for now a description will do.
Inception
To start, let me set the scene. We live in a weatherboard bungalow with a 45° pitch tin roof, built during the 1930’s. It had no insulation at all when we bought it, although we’ve subsequently added under-floor polystyrene and glass fibre cieling bats. The house has wooden joinery and is pretty draughty. Winter is our enemy.

This project started a few years ago when a man from HRV home ventilation systems came to our house and promised us that his system could get warm, dry air from our roof space all year round.
I suggested to him that as our roof cavity was a) very large and b) not sealed as in more modern homes (good airflow was how they dealt with condensation under the tin in those days, as there was no impermeable barrier beneath it. In fact there is a large vent near the peak) I would be surprised if there was any hot air to be had during winter, when we needed it.
He continued to assure us that yes, all would be fine and for only $5,500 (!!) we wouldn’t have to go through our $300 of firewood each winter (bargain!) and for only $300 per year they’d even maintain it for us.
Now I’m no accountant, but somehow I don’t see the value proposition there.
Having sent him on his way without a sale, I got to thinking; Was the air in our roof really warmer and drier in winter? I set out to find out.
Stage 1
What I needed were 2 temperature and humidity sensors, one in the roof cavity and one outside, and a way to record and display the results.
I went hunting and found 2 things which made this easy.
First, the 1-wire data transfer protocol. This was originally developed by Dallas Semiconductor and it has 3 key features which make it perfect for this task; it has a very large range (in excess of 30m), a single wire both provides power to the slave devices and transfers the data, and the slave devices are relatively cheap and numerous.
Second, www.hobby-boards.com. This guy has built a number of excellent 1-wire based sensors and peripherals which are well supported in Linux.
Having purchased a USB 1-wire host adapter and 2 temp/humidity sensors I went to work running the necessary wiring and building the back-end.
For data collection and graphing, I used Cacti running on my home media PC (running Ubuntu LTS).
The 1-wire devices are accesible in Linux as files in a virtual file system. I hacked up a shim for snmpd to make the values I needed accessible via SNMP, to simplify the collection by Cacti. The result is a nice historical graph which will store data for over 2 years.

So after 6 months of data collection, I proved to my own satisfaction that the air in my roof is, as I suspected, almost identical to the outside air and for the most part is cooler and damper than the air inside the house.
Stage 2
So now I have the basis of a data collection network, what else could I do with it?
Having answered my roof-air question, I moved the sensor from the roof to the bedroom and added another in the lounge. This allowed me to see roughly how effective our newly added roof and under-floor insulation was. I could clearly see when the fire was lit how quickly the house warmed, how that heat moved around the house, and how quickly it dissapated when the fire went out.
I then added a barometer and an anemometer, to keep an eye on the weather.

Up till this point the sensors had been arranged as a single linear chain, however all these extra sensors placed around the house meant I needed a more complicated network. Enter the hobby-boards 4 channel switch. The sensor network now resembles a star configuration.
Stage 3
I’ve been interested in our household power use for some time, wondering what uses the most power; basically where all my money is going and why one months bill is different from another.
Helpfully my power company recently installed a new digital power meter. This meter has a flashing LED which pulses 1000 times per kilowatt hour (kWh) so I figured, if I could count those flashes I could measure, very accurately, my power usage throughout the day.
So that’s exactly what I set out to do.
Up till now all the hardware I’ve used has been bought pre-assembled, all the custom work I needed to do was in software. This new challenge however required a device to read the LED pulses and I couldn’t find anything which would do what I needed. Lucky for me my father has been working with electronics most of his life and drew me a simple circuit I could make up myself which used a LM311 comparitor chip and a light-sensitive resistor to turn the flashing lights into a nice output which I could plug into a 1-wire counter.

So having mocked it up on a prototyping board, here’s the result:

Taking it even further, I’m storing the raw counter data in a database so I can display statistics for different periods:

Now I know exactly how much power I’m using during the day and when. I can estimate my use for the day, or the month and I can see exactly what’s going on.
The Future
Where to next? Well I need to move my little circuit off the proto-board and onto a permanent, soldered, board. I also need to purchase an extra 1-wire counter because at the moment I’ve repurposed the anemometer (wind speed) reader.
I’d like to add sensors to the windows in the house, so I can make a status board to show if they’re open or shut.
I’ve also recently purchased a Raspberry Pi and I would like to move the data collection and display away from my media PC (which is quite power hungry) to the Pi, which can live in the patch cabinet and draws very little power. I think the small factor configuration could also be turned into a commercial product.
If you are interested in doing any of this yourself, please don’t hesitate to contact me, I will be posting the source code for all my customised bits-and-pieces once they’ve been cleaned up and commented.
Luke.
