Thermostats – Part 1

Overview

Having decided to replace the existing thermostats with a set of home-brew ones that can communicate wirelessly, I now need to find out  which hardware is required and get a basic drawing together of how the components will interconnect.

I found the following two websites incredibly useful as they gave an overview of projects other bloggers had completed:

http://mcmicken.ca/tag/arduino-thermostat/

http://www.desert-home.com/p/super-thermostat.html

So it looks like the thermostat will contain the following basic hardware components:

  1.  Main board (micro-controller)
  2. Temperature sensor
  3. Wireless shield
  4. Power source
  5. LCD display
  6. Over-ride buttons
  7. Wall mount
  8. Casing

I am going to start with the micro-controller. This acts as the base where I can then start to work out which components will fit onto it easily and map out how they will interact.

Arduino – Microcontroller

The other day I received a $10 coupon for Radio Shack, so I stopped by and picked up a couple of Arduino boards there. Radio Shack is more expensive than ordering online, so in future I’ll be picking up components on the web.

The boards I picked up were the Arduino Uno:

Arduino Uno

Arduino Uno

and the Arduino Proto:

Arduino Proto

Arduino Proto

The Arduino Uno is an open-source micro-controller and part of the Arduino platform, an easy to programme open source hardware and software environment.

The Uno can have a number of sensors and other components hooked up to it, and then programmed using the Arduino programming language, which is based upon Wiring (an open-source programming framework)

This piece of hardware will act as a good micro-controller for the Thermostat. Newark Electronics (the folks from whom I ordered my Raspberry PI) are also selling the Uno for $25.50 a piece. This makes replacing the existing thermostats a fairly cheap process.

As you can see in the photos above, there is also the Proto. The Proto can be used for designing custom circuits. Having this will allow me to try out some custom circuit designs before I solder components to the Uno.

I’ll now need to hook up the Uno to my Mac and download the development environment so I can start playing around with it.

The book I purchased Programming your home, has some great starter projects that will give me some practice with the programming language and the development environment in general.

The next post will detail hooking up the Arduino and getting a hang of the interface and IDE.

MakerBot – 3D printer on the way

I’m very fortunate in that, the company I work for has a number of electronic enthusiasts, folks interested in 3D printers, and the plain adventurous. After several chats over coffee we came up with the idea of starting a 3D printing co-operative at our work place. The idea is each employee interested buys in, and with the funds we then purchase a 3D printer and material that the co-op members can use.

After doing some research we decided to go with the MakerBot Replicator™ and have it shipped built.  The Replicator™ is a 3D printer that allows you to print in two colors at once and clocks in at around $2000 with the dual extruder.

You can see a picture of it here from the MakerBot website:

 

Makerbot 3D printer

 

Around nine of us got together and raised the funds for the printer, and our company also chipped in extra $500 to help us out. They have also graciously lent us a room to set it up in so we have a place to use it.

There is around an 8 week lead time on delivery, so the printer should arrive around the same time as the Raspberry PI is delivered. With access to the MakerBot I’ll be able to print a case for the Raspberry PI as well as cases for the Arduino Thermostats.

One of my work colleagues is a dab hand at the 3D design on Blender, so we are going to have some training session for the co-op members which should be cool.

Once the printer arrives and I get the opportunity to design some cases on Blender, I’ll post the details on this blog – including links to the 3D OBJ files so those readers interested can re-use them for their own projects.

The Raspberry PI

As anyone who has been reading the tech section of any website will know, the Raspberry PI (version B) was released a couple of weeks back.

The Raspberry PI is a credit card (85.60mm x 53.98mm x 17mm) sized computer that runs a flavour of Linux as its O/S (a version of Fedora I believe has now been released).

The Raspberry PI foundation has the goal of releasing a cheap computer that can be given to school children to encourage them to explore the world of programming. A whole generation of programmers was created off the back of the Spectrum ZX, Commodore 64 and similar during the 1980’s  and there is hope that this could spark a similar interest in school children today and help to boost the UK’s standing in I.T education.

The Raspberry PI foundation is a charity so they have tried to keep the cost of the machine down, the version B is available for $35 in the US. Whilst there was some confusion over prices on the website, due to exchange rates, local taxes and similar, I was able to pick one up via Newark electronics  for exactly $35 – a total bargain!

A quick overview of the hardware specs shows it includes:

  • RCA
  • 2 USB ports
  • HDMI
  • SD card
  • GPIO
  • 256 MB RAM CPU & GPU
  • LAN
  • 700 MHz ARM processor

You can see a picture of it here from the Raspberry PI foundation website:

Raspberry PI version B

Raspberry PI version B

This looks like it would be a perfect tool to include in my home heating system. A machine this small could be placed in a small 3D printed case and mounted to a wall and then connected up to the wireless router via the LAN port. In fact Shapeways already have a 3D printable case ready to go, you can see it here.

The specs show it would also easily handle the sort of algorithms required to optimize the heating system, so it could act as the controller and dump data to the machine that will act as the DB server.

I’ve placed my order and it doesn’t arrive until May, so this will give me time to work on the Thermostats in the interim.

I’ll keep you posted on the Raspberry PI.

Hardware – what we currently have

This morning I have made a quick list of the hardware I currently have or have access to. Looking at this I can then decide which task I want to tackle first and what I need to buy.

We currently have:

  1. A collection of old thermostats
  2. Some old baseboard heaters
  3. A now working pellet stove
  4. A collection of computers and parts
  5. An A/C Unit with a fan and ducts
  6. Various computers, parts, wi-fi and an iphone
  7. Access to a 3D printer

Pellet stove/Baseboard heaters

The pellet stove works great so we will be keeping this. It also has the option of being controlled via thermostat so we could have the system turn it on/off as needed. I’ll be digging through the user manual to see if there is also some way to interface with the stove to grab error codes (for example if the stove runs out of pellets). If not since the error codes are displayed on several LED’s there might be some way of scraping this data via a web-cam and using it.

The baseboard heaters are very inefficient, however these will have to stay for the moment. Once I have built the system to control the thermostats I am going to look at what other options we have for heat/electricity sources, however this isn’t an immediate priority.

A/C Unit

The A/C unit, fan and duct work can be leveraged to pull heat through the house and warm other rooms. I want to be able to control this via the system as well. It currently uses a Honeywell thermostat and controller which is programmable. I’ll be looking through the manual on this  to see if it can be interfaced with, if not I’ll consider replacing the controller with something that can.

This however can wait for the moment as it works pretty well and since we don’t have central heat isn’t of immediate concern.

Thermostats

The thermostats are old, crappy and some look like they have seen better days. They are also a mash of different brands and don’t look very nice. Most importantly they can’t be controlled remotely.

Old thermostat

Old thermostat

Due to their placement they are also susceptible to being knocked into and turned on by accident. A few also have dials that don’t look as if they turn off properly. If you get to work and realize you left one switched on you have no way of turning it off until you get home.

We will be getting rid of all of these.

Computer parts/3D printer

I also have a collection of computer parts and several machines running a range of O/S including Mac Lion, Ubuntu, FreeBSD, XP and Windows 7. Some of this will be useful, however for the device that controls the heating system I want something small and compact, that can be mounted on a wall. We also have internet access and wi-fi of course.

Finally I have access to a 3D printer via a co-operative at my work (more on this in a separate post). I’ll be able to use this to print out cases for thermostats I custom build and any plastic parts I might need.

Summary

My first task is going to be to replace the thermostats. I’ll need to find out exactly how to build one and the parts that are needed.I’ll also need to become familiar with how to wire them up. Once they are working I can then start looking at the controller.

Programming Your Home – Mike Riley

Programming your home

I preordered “Programming Your Home” by Mike Riley and it just arrived. I’ll be posting a review of the book once I have the opportunity to read it.

The book has a selection of exercises and projects to introduce you to home automation, Arduino and related technologies.

You can check it out on Amazon here.

 

 

An overview of the system

A general overview of the system

Having decided to go ahead and build a home-brew system the first step was to decide exactly what I was hoping to achieve beyond the high-level term optimizing. I’ve made a list of the tasks I would like the system to perform and some of the outcomes I want the system to achieve:

  1. It has to be cheap to build. As well as the obvious saving money outcome, I am hoping to demonstrate that anyone can build their own system and it will cost less than spending several hundred dollars per component on off the shelf kit. I am also hoping where commercial equipment does need to be bought e.g. a second pellet stove, the devices we choose are the best value for money (more on this later)
  2. It needs to dump data somewhere I can retrieve it. I want to be able to review the temperature data and re-use it within the system. Having an average temperature for August and one for February and being able to compare these would be useful for example.
  3. It needs to be self optimizing to a point. Using various algorithms and the above stored data, the system needs to be able to switch devices in the house on/off based upon a set of criteria such as: cost, performance, temperature, and in the case of a pellet stove, whether the stove is empty or not (for example if we are out and the stove runs out of pellets, what does the system use as a fail over?).
  4. The system should be controlled via some sort of app that can be run on a PC, Mac and Linux/Unix device. This should include both mobile/tablet and regular devices. For example If I want to up the temperature in my home office whilst I’m at the supermarket, ready for when I get home, I should be able to do this via my iphone.
  5. The device should be networkable, this can include both wi-fi and wired options.
  6. The system should be safe and secure. Both from software perspective i.e. adequate network security and from a hardware safety perspective i.e. the home-brew thermostat isn’t going to fall off the wall.
  7. It should save money on our electricity bill.
  8. It should be extensible. If I wish to zone the system so that it draws its power from say a solar source, some other renewable or from a generator if the power goes out, switching over should be easy. If I wish to add more thermostats, pellets stoves, A/C or software apps this should be easy.

This allows me to break down the development stage into separate components and evaluate what technology I currently have, and what I will need to build and code the system. It also provides a list of criteria on what the system should achieve, so I can check along the way that each stage of development is hitting a goal.

My next step is to take stock of what I currently have and what I am going to need on both the hardware and software front.

Welcome to Intelligent Heating – a journey through home-brew heating

Introduction

This blog will detail my journey through building an intelligent home heating system. Using free and open source software such as: FreeBSD, Python, PostgreSQL and HTSQL, open source hardware such as: Arduino and Raspberry Pi and  a host of other cool additions (including components printed on a MakerBot 3D printer) I am going to overhaul my heating system and blog the progress along the way.

Some background

We currently heat most of our house using a pellet stove. A pellet stove basically burns compressed wood or biomass pellets (in Italy sometimes olive pits) to create a source of heating for your home. A couple of tons of pellets will last us all winter and normally costs between $400 – $600 depending on type and supplier.

img_0202

In February 2012 our pellet stove stopped working. When we spotted a problem with it, we consulted the user manual, took the side off and cleaned the whole stove out including the fan, but this didn’t have any effect, so we called out the repair guy. Unfortunately it was going to take a couple of weeks until he could get to us so we had to fall back on the old baseboard heaters that came fitted when we bought the house.

Old base board heaters

Old base board heaters

Throughout the house we had the thermostats set on the baseboard heaters for around 60 degrees F which supplemented the heat from the pellet stove. After receiving our first winter electricity bill, we decided to cut down on the use of the heaters to keep costs low. However once the pellet stove broke we had little choice but to use the baseboard heaters to keep the house warm, and we soon found out this had costs us a small fortune.

These things are possibly one of the most inefficient means of heating a house. This we discovered after receiving a $600 electricity bill from the UI company for a single month… ouch.

For those of you not aware, Connecticut has some of the highest electricity rates in the country. The 2008 OLR report placed CT in the number 2 spot when it comes to electricity costs. Coupled with the tropical storm Irene last year and the freak October snow-storm CT residents were not only dealing with high kWh costs but also periods of blackouts running into the days due to the damage caused by falling trees.

The combined cost of electricity and lack of service at points led me to investigate, how could we power and monitor our heating systems at minimal cost whilst optimizing our electricity usage and room temperature?

I hope to answer the above questions with this blog, and if lucky be able to demonstrate a cheap and cool way of doing it.