Go Down

Topic: Arduino + Raspberry Pi Thermostat and Zone Control -- Need Guidance (Read 10933 times) previous topic - next topic

jgiebler

Apr 16, 2013, 10:57 pm Last Edit: Apr 17, 2013, 12:50 am by jgiebler Reason: 1
Hello Fellow Forum Members,

As a Pre-cursor to the below post. I DO NOT HAVE ANY CODE as of yet. This post is exploratory and research based at the moment.

I have a desire to do an Open Source "Nest Alternative".

Here is some project background:

I would like to do HVAC Control as well as Zoning Control with the R-pi as the "Brains"
I would like to use the Arduino for Servo Motor Control and Temperature Sensors (Possible "Motion" Sensors as well)

My Understanding of Zoning
  • Each room in a house is a "Zone"
  • Each zone is 'Independently' controlled by temperature sensor.
  • The Zone's HVAC Registers are opened or closed (Partially in some cases) to control room temperature

    I believe that this project will do two things:
    1) Allow me to have a "Learning" Thermostat (Powered by R-pi) that is web-based and open source
    2) Save money by only cooling/heating "Occupied" portions of the house

    So far I have gathered some information from these websites:
    http://www.plainlystated.com/2011/07/building-a-thermostat-using-arduino/
    http://diy-zoning.sourceforge.net/index.html
    http://www.homeclimatecontrol.com/adk
    http://androidthermostat.com/
    http://forums.trossenrobotics.com/tutorials/how-to-diy-128/get-position-feedback-from-a-standard-hobby-servo-3279/

    I believe the R-pi has enough I/Os to control the Relays for the actual HVAC. It looks like I will need 4 relays for my house.
    I plan on then connecting all of the Servos and Various sensors to one or more Arduinos. The R-Pi and the arduino(s) will be about 20m apart. (Arduinos will be mounted in bedroom closet, R-pi will be on the wall in living room)

    I would also like to have a Touch Screen for the HVAC Controls connected to the R-Pi.

    My Questions to this Community.
    1) What pitfalls am I missing? Will I destroy something??
    2) Has anybody done this already (No reason to re-invent the wheel)
    3) What is the best way to do R-Pi <-> Arduino Communication (uART,Serial, RS-485, IP, etc)
    4) Any Recommended Components?
    5) Where should I put the Sensors for each room?
    6) What does it take to build a thermostat circuit? Any other project links would be great!
    7) Anybody else interested in getting involved?

    Thanks so much for taking the time to read this!

AJB2K3

Have you checked out the RPI web site?
there are already expander boards for the Io's

Im actually interested in this, to see what Ideas I can get for modding my central heating
Sorry for the noobish post but my knowledge is 10 years out of date!

westveld

I'm looking into the same thing - my thoughts so far -

My Questions to this Community.
1) What pitfalls am I missing? Will I destroy something??

I'm thinking of leaving the main thermostat in-line with the new controller - maybe set to 80 degrees?
That way if the new controller fails in some way, it won't keep the heat on.

3) What is the best way to do R-Pi <-> Arduino Communication (uART,Serial, RS-485, IP, etc)
i2c ?
http://blog.oddbit.com/post/i2c-on-the-raspberry-pi


Kong

Quote
6) What does it take to build a thermostat circuit?


For my project, in each room (zone) I installed a Honeywell Round on/off thermostat (T87G1006)
It's a power stealing thermostat, so no batteries needed.
I've made a small circuit to give a signal to the input port of arduino.

The benefit of this, is that I don't necesserally need a tablet to control the heating system, also I see the actual temperature on the thermostat.
The best way for mounting a thermostat/sensor: ca. 1.5 meters above floor, watch out for draught and lightbulbs (warmth).

spumanti

Sounds interesting.

I am also thinking about creating something like your setup in my house.

[font=Verdana]3) What is the best way to do R-Pi <-> Arduino Communication (uART,Serial, RS-485, IP, etc)[/font]
For my project I was thinking UART, as it is easy to expand by simply dropping in some xbee modules.
They will directly accept UART communication, making the arduino sub-stations wireless.

! ! ! Please be aware that the RasPi is a 3,3v device, and (depending on the version) the arduino is a 5v device. before you connect the 2, you MUST use a level converter, or you risk frying the PI's IO ! ! !


I found some inspiration here:
http://www.fritz-hut.com/arduinopi-web-based-controller-for-arduino/
that I'm trying to recreate.
So far i managed to get commands sent from the PI's web interface to the arduino using UART, and also using UART+Xbee.

I am nowhere near a working solution yet, so its great seeing others wanting to create something similar

fugalster

I've started a similar project and have it documented on my blog. Not anywhere near complete yet, and I welcome collaborators to bounce ideas off each other. But I do have my raspi successfully controlling my hvac system.

For a start on software, see this post:
http://makeatronics.blogspot.com/2013/04/thermostat-software.html
and a web enabled extension of this code by a fellow hacker:
https://github.com/wywin/Rubustat

For connecting your microcontroller (be it arduino or raspi) to the thermostat wiring, see this:
http://makeatronics.blogspot.com/2013/04/raspberry-pi-thermostat-hookups.html
and this
http://makeatronics.blogspot.com/2013/06/24v-ac-solid-state-relay-board.html

I wish you the best of luck in your project! Hopefully you can get some good work done and share it with the rest of us :)

sundeepgoel

I have made something similar for my house, although the needs are slightly different the concept is the same. I wanted to  :-
1. measure temperature of env and rooms
2. measure Humidity
3. Control Combination of swamp coolers and Window ACs (not central ) using humidex (derived from temperature and humidity)

Did this using a combination of arduinos, nRF24L01+ transreceivers, Mango M2M software (used this for datalogging, graphical display and control). I deployed Mango on a old laptop, however, think you can very easily do that on a raspberry pi as well.

if you want to take a look,  the WIP posts are at  http://fotohobbist.com/blog/arduino-mango-m2m-data-logging/

craigcurtin


I have made something similar for my house, although the needs are slightly different the concept is the same. I wanted to  :-
1. measure temperature of env and rooms
2. measure Humidity
3. Control Combination of swamp coolers and Window ACs (not central ) using humidex (derived from temperature and humidity)

Did this using a combination of arduinos, nRF24L01+ transreceivers, Mango M2M software (used this for datalogging, graphical display and control). I deployed Mango on a old laptop, however, think you can very easily do that on a raspberry pi as well.

if you want to take a look,  the WIP posts are at  http://fotohobbist.com/blog/arduino-mango-m2m-data-logging/


Very nice - thanks for posting. I have not heard of the mango product before but it looks the goods - going to setup the new version of it in a virtual machine now and play with it

Craig

sundeepgoel

#8
Jul 21, 2013, 01:45 pm Last Edit: Jul 21, 2013, 07:17 pm by sundeepgoel Reason: 1
cool, let me know vif you need any help. I will also post on control points and how calculations on raw analog (ADC) values from the arduno can be done within mango vs arduino.
it may also help to read/implement the mesh protocol for the nRf24L01+ modules. I made some modification to it to differentiate between data and command packets.

have started to put together something to get you started at http://fotohobbist.com/blog/remote-data-logging-with-arduino-bringing-it-all-together/ Note : This is still WIP, but should give you some pointers

craigcurtin


cool, let me know vif you need any help. I will also post on control points and how calculations on raw analog (ADC) values from the arduno can be done within mango vs arduino.
it may also help to read/implement the mesh protocol for the nRf24L01+ modules. I made some modification to it to differentiate between data and command packets.

have started to put together something to get you started at http://fotohobbist.com/blog/remote-data-logging-with-arduino-bringing-it-all-together/ Note : This is still WIP, but should give you some pointers


excellent will read through once i have things running thanks.

I use all DS18B20 or DHT11 sensors so will rely on their inbuilt digital temperature numbers. I have a number of the nordic modules and have also susbscribed to the kickstarter for the new Digix product that has them onboard so i will probably use on of them as my central node. I was planning on using maniac bugs nordic libraries as they seem the most comprehensive - did you start there ?

Craig

Craig

sundeepgoel



I use all DS18B20 or DHT11 sensors so will rely on their inbuilt digital temperature numbers. I have a number of the nordic modules and have also susbscribed to the kickstarter for the new Digix product that has them onboard so i will probably use on of them as my central node. I was planning on using maniac bugs nordic libraries as they seem the most comprehensive - did you start there ?



that's not a problem et all, the meta data / computed one is there so that you can also periodically do something with the base data eg.g. compute a hourly average, or control a device etc etc

flyboy

>>My Understanding of Zoning

>>  Each room in a house is a "Zone" --This isn't necessarily true.  Ideally, yes, it's nice to have each room as its own zone, but
>>  in practice, you may need to combine some rooms to make zones.  See reasons below.

>>  Each zone is 'Independently' controlled by temperature sensor.  Yes.
>>  The Zone's HVAC Registers are opened or closed (Partially in some cases) to control room temperature If you can control
>>  the blower CFM, yes, this works well, but in a typical split or packaged system, you should only go full open or full closed and
>>  not try modulating the dampers.


You should be careful how you implement this.  Are you using a split system, packaged system, ductless split, window unit?  With split systems and packaged systems, airflow is very important.  The system wants to run at a specific airflow.  If you choke off too much of your duct system, you can't move enough air.  For gas furnaces, this can burn up a heat exchanger == lots of $$$.  Likewise, in cooling, you can prevent the refrigerant from boiling off in the evaporator coil, which can mean that liquid refrigerant is being circulated back to your compressor.  We all know that you can't compress a liquid, so that causes damage to your cooling system.  Again, lots of $$$.

Zoning is a great way to ensure you have maximum comfort, but it is a very complicated animal.  Be careful and have fun.

Go Up