Arduino Controlled Networked Thermostat
As the colder months set in we all naturally start to think about heating the house. Down here in South Canterbury, things are starting to get a little chilly lately.
Our family house has a log burner installed which, as well as being cosy, is an efficient, sustainable and cheap form of heating. For the past couple of years we have enjoyed the warmth of our fire in the living area but the temperature in the bedrooms wasn't quite up to par, especially at night.
Our living area is quite large (10m x 5m) with a chapel ceiling at 4.5m high, which makes for a large volume of heated air sitting around up there where no one can really feel it - what a waste! I've measured the temperature up there and with the fire going it quickly gets up to 35° - 40° C. To combat this wastage I recently installed a heat transfer unit which moves the air from the living space ceiling down to the bedrooms. This is a simple system, consisting of a fan mounted in the roof space, some well insulated ducting, and ceiling vents.
Now of course I could have purchased an off the shelf thermostat to go with the system but what fun would that be? It would also require a new 240V circuit wired up, with the associated electrical inspector fees. I decided to whip one up using an Arduino, a temperature sensor, and a Solid State Relay (SSR). To make things a little more interesting, I also added Ethernet capability.
To save the electrical regulation complications, I used the existing wiring from an old ceiling fan, this just required a replacement switch on the wall. I designed the unit to degrade gracefully, this means that if there is no network connection it will behave just like a normal on/off switch as people would expect. With the network connection though things get a little more interesting with the following features;
- Automatically start and stop fan dependant on temperature
- Ability to set/adjust on and off temperatures remotely
- Override automatic mode (force fan on or off)
- Send temperatures to a web server for logging
Here you can see a picture of the assembled unit, inside you can see the Arduino/Ethernet combo (bottom right), a 12V power supply to run it (top right), and the SSR (top left). Coming out each end is the ends of an off-the-shelf extension cord and out the side is the Ethernet and temperature sensor cable.
Here's a sample of the basic web page output from the Arduino itself.
Like any good project the code is open source. Like a lot of projects it was hacked together rather quickly and re-used various snippets, in other words it isn't that pretty. It's always better to release early than never to get around to releasing at all though right? You can find the code available on launchpad for now; http://bazaar.launchpad.net/~hads/+junk/heat-transfer/files
Although the code is a little messy it does have some good examples of storing configuration data in EEPROM, running a web server as well as a client at the same time, using the DHCP, DNS and DallasTemperature libraries. If anyone has any questions about getting it going, or better yet suggestions/comments/criticisms/patches, then by all means feel fee to comment below!
As well as a private server here, I've been uploading the data to the new ThingSpeak service, they have a neat charting API to visualise the output data;
In the very near future we'll have a new product from Freetronics, the EtherTen, which is an Arduino and Ethernet shield all built into one board. This is the perfect type of project for it and would allow you to save money on the components too.
I hope this is an interesting little project for you, I'll try and find some more time in the future to share some of the other home automation projects I've installed around our house - Hadley
Warning: This system involves mains (240V) voltages which can kill you. If you're going to try this at home please exercise caution.
Cheers
Shane
Cheers
Shane
Yes it is a little odd isn't it. There's two rooms side by side with the middle wall having a fake chapel ceiling. A picture will explain better so here;
http://twitpic.com/4qfy8s
with the grey part being roof space. Very convenient for installing the ducting.
Cheers,
hads
Would you have an updated code that works with the newer Arduino libraries. I'm still dabbling with Arduino code and having issues with the code not working under IDE 1.04. The Ethernet libraries have changed and I'm getting errors with the above code.
I have a similar problem to use and want to vent hot air out of the roofspace.
Cheers,
Alastair
It's not much of a change, I do have the code somewhere, send through an email and I'll dig it out for you next week.
Hadley