Page 1 of 1

Circuit design help (home heating)

Posted: Sat Jan 24, 2015 3:35 pm
by yfaykya
Hi,

I'm ok (in my own view!) at electronics but there are probably lots of better ways of hacking together what I try and do hence I will ask here.

I am setting up a pi (B+) to use domoticz to control some z-wave thermostats. I also want the pi to control the boiler and 10 other zones (8 underfloor heating zones, HW and another zone). At the moment each zone has a thermostat that is just a relay for 240v AC that feeds back to a a central Zelio Logic PLC (SR1 A201FU) that controls the boiler (also a 240V AC relay) or to another relay board for the UFH that triggers the boiler also. I tested 6V DC through one of these stats and it seems fine too. I have a 16 channel AC relay that I can use to control the boiler and each of the UFH zone actuators (also 240V). Should I just connect all room thermostats to a GPIO IN pin (with protection to drop volt/amps) and then use GPIO OUTs to control the relays for the actuators and the boiler? My relays need ~12V.

Or I could leave the UFH stats control the actuators and just take the out from there to the pi but then I would only know when UFH kicked in and not which one. I lose first 10 pins of the GPIO for the razberry z-wave controller so I might not have enough pins. I also have a ardurino uno I could break out too.

Current setup:

Code: Select all

   UFH 
 [Stat 1] ... [Stat 8]       [Zone 1 (with TRVs]      [HW]   [Zone 2]
          |                           | __________________|_____|
          |                           | 
    [   Relay board ] _________  [ PLC ]  ________________________ [Boiler]  
           |
 [Actuator 1]  ..... [ Actuator 12]
Hope the crappy ascii diagram makes sense! All those lines at moment are 240V AC.

Any advice muchly appreciated!

Re: Circuit design help (home heating)

Posted: Sat Jan 24, 2015 11:43 pm
by Shoka
Most of your description of the existing system went over my head I'm afraid.

Bigger picture though, most of what you describe is operating at 240v mains.

The other signalling you mention is 12V.

Neither of these is compatible with a raspberry Pi directly.

You will have to provide extensive isolation and control gear to interface those sorts of inputs and loads to the Pi.

Probably more practical and flexible is to build a sensor network running at Pi compatible voltages, measuring the temperature in your heating zones, and reading back user settings for desired temperature in each zone, and then implementing interfacing between the outputs of the pi and the heating controls to keep the zones at the desired temperatures.

I'm experimenting with these for the sensor part of my home automation set up..

http://www.adafruit.com/product/1782

That device can be daisy chained directly from the Pi. They read temperature directly as digital outputs, so do not need AtoD conversion, which is not available on a Pi without add on hardware.

I have no idea if it would be practical over the scale of installation you described.

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 5:53 am
by BudBennett
It sounds like you want to replace the current thermostats with the z-wave thermostats and use the domoticz for logging and user interface. I think that you are asking about the best method for interfacing to the PLC and possibly the zone control valves. I have a 9-zone in-floor heating system that has been running for two seasons now, so I have some experience with this part. In the USA the interface voltage is 24VAC, not 240VAC, which is a bit less lethal.

I would just buy two 8-channel Sainsmart solid state relay boards to control your zone valves and interface to the PLC. The Sainsmart relays are optically isolated, will switch 2A @ 264VAC, are controlled from a 3.3V logic signal, and only require 5VDC for a second supply level (not 12V like your relays) which is already available from the Raspberry Pi power supply. I used a 16-channel digital I/O expander (a MCP23017) to drive the inputs of the two Sainsmart boards. The MCP23017 uses the I2C bus for communication and only requires two pins, SCL and SDA.

Good luck,

Bud.

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 11:20 am
by yfaykya
I already have those relays. I want the pi to be the PLC. Not have a separate one. Also I don't think I can have an expander board due to the razberry dongle taking the pins already.
Basically I was hoping to replace current setup with a pi. Also z-wave is only for one zone. And is the trivial part of this in my eyes. For that I just need the pi to turn on boiler.

Also all my thermostats (existing ones) are just relays. They only turn a relay on or off depending on how they are programmed (Danfloss TP4).

Thanks!

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 4:15 pm
by boyoh
yfaykya wrote:Hi,

I'm ok (in my own view!) at electronics but there are probably lots of better ways of hacking together what I try and do hence I will ask here.

I am setting up a pi (B+) to use domoticz to control some z-wave thermostats. I also want the pi to control the boiler and 10 other zones (8 underfloor heating zones, HW and another zone). At the moment each zone has a thermostat that is just a relay for 240v AC that feeds back to a a central Zelio Logic PLC (SR1 A201FU) that controls the boiler (also a 240V AC relay) or to another relay board for the UFH that triggers the boiler also. I tested 6V DC through one of these stats and it seems fine too. I have a 16 channel AC relay that I can use to control the boiler and each of the UFH zone actuators (also 240V). Should I just connect all room thermostats to a GPIO IN pin (with protection to drop volt/amps) and then use GPIO OUTs to control the relays for the actuators and the boiler? My relays need ~12V.

Or I could leave the UFH stats control the actuators and just take the out from there to the pi but then I would only know when UFH kicked in and not which one. I lose first 10 pins of the GPIO for the razberry z-wave controller so I might not have enough pins. I also have a ardurino uno I could break out too.

Current setup:

Code: Select all

   UFH 
 [Stat 1] ... [Stat 8]       [Zone 1 (with TRVs]      [HW]   [Zone 2]
          |                           | __________________|_____|
          |                           | 
    [   Relay board ] _________  [ PLC ]  ________________________ [Boiler]  
           |
 [Actuator 1]  ..... [ Actuator 12]
Hope the crappy ascii diagram makes sense! All those lines at moment are 240V AC.

Any advice muchly appreciated!
Is your heating system Gas or Electric
If your system is gas you have strict safty
regulations to comply with in the UK
All system must be FAIL to SAFE..
In the UK you are in a no go area
unles your are a Gas certified Engineer

I could help with some advice
but , but will not if it is Gas
If you live outside the UK
my advice is employ Fail To Safe
in your circuits.

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 4:17 pm
by boyoh
yfaykya wrote:Hi,

I'm ok (in my own view!) at electronics but there are probably lots of better ways of hacking together what I try and do hence I will ask here.

I am setting up a pi (B+) to use domoticz to control some z-wave thermostats. I also want the pi to control the boiler and 10 other zones (8 underfloor heating zones, HW and another zone). At the moment each zone has a thermostat that is just a relay for 240v AC that feeds back to a a central Zelio Logic PLC (SR1 A201FU) that controls the boiler (also a 240V AC relay) or to another relay board for the UFH that triggers the boiler also. I tested 6V DC through one of these stats and it seems fine too. I have a 16 channel AC relay that I can use to control the boiler and each of the UFH zone actuators (also 240V). Should I just connect all room thermostats to a GPIO IN pin (with protection to drop volt/amps) and then use GPIO OUTs to control the relays for the actuators and the boiler? My relays need ~12V.

Or I could leave the UFH stats control the actuators and just take the out from there to the pi but then I would only know when UFH kicked in and not which one. I lose first 10 pins of the GPIO for the razberry z-wave controller so I might not have enough pins. I also have a ardurino uno I could break out too.

Current setup:

Code: Select all

   UFH 
 [Stat 1] ... [Stat 8]       [Zone 1 (with TRVs]      [HW]   [Zone 2]
          |                           | __________________|_____|
          |                           | 
    [   Relay board ] _________  [ PLC ]  ________________________ [Boiler]  
           |
 [Actuator 1]  ..... [ Actuator 12]
Hope the crappy ascii diagram makes sense! All those lines at moment are 240V AC.

Any advice muchly appreciated!
Is your heating system Gas or Electric
If your system is gas you have strict safty
regulations to comply with in the UK
All system must be FAIL to SAFE..
In the UK you are in a no go area
unles your are a Gas certified Engineer

I could help with some advice
but , but will not if it is Gas
If you live outside the UK
my advice is employ Fail To Safe
in your circuits.

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 4:21 pm
by yfaykya
My boiler is oil. Pretty sure there is a thermostat in there too so even if I left it on 24/7 it would not stay lit. Am in Ireland so pretty much similar rules to the UK.

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 4:55 pm
by BudBennett
As you said, there are many ways to accomplish this. Here's a block diagram (not in crappy ASCII) of what I think you wish to accomplish:
HeatingSystem.png
Heating System Block Diagram
HeatingSystem.png (48.25 KiB) Viewed 2174 times
Since the thermostat wires are already in place I would suggest that you use them and hardwire the temperature sensors to the controller (the Pi). I used thermistors and a multichannel 24-bit ADC that interfaces to the Pi via I2C. And yes, you can stack boards under your z-wave board and still get access to the I2C bus. The thermistors require a trivial amount of input conditioning circuitry. You can also use digital sensors with one-wire interface, but I have no experience with those, and from what I could determine they did not have the resolution that I required. Your situation may allow their use.

I would still employ the digital I/O expander. It is pretty easy to implement, cheap, and easy to code.

Lastly, you will most likely need some kind of uninterruptible power supply, UPS, to either keep the system operating through a power outage or at least shut the Pi down gracefully and power it back on without damaging files.

Here's a teaser plot of what you can achieve (Temp in Fahrenheit):
FamilyRoomSlopeControl.jpg
System Operation
FamilyRoomSlopeControl.jpg (32.76 KiB) Viewed 2174 times
Bud

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 5:10 pm
by yfaykya
Bud: Many thanks for the replies. Just to clarify though that my current stats do not feed back the temp - They just activate a relay when they need heat (twin cable that allows current when heat needed - at moment that is 240V but I tested 3.3V and it was switched too) - each is programmed separately. So I would not need a ADC. Good point on making sure the Pi boots on reboot. I might look at moving the domoticz database off and having rest of filesystems r/o (I have *lots* of 24/7 computers in this house) or perhaps a UPS. Your diagram otherwise is spot on with what I was looking at. Now I just need to get into the nitty gritty :-)

I will probably use a 12V power supply. I also wast to add LEDs in for all zones and boiler for an at a glance view of what is currently on etc. I have been doing that with the boiler for the last week or so (I hooked up an old phone charger to the feed to the boiler and used a voltage divider to take the 7v from the charger to 3.3v for a pi input via a LED. It was a bit noisy signal wise but gave me a nice insight into how much the boiler was being called.

Thanks again!

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 5:19 pm
by yfaykya
To clarify further - I only have UFH downstairs. This is the 8 zones with the relay thermostats.

I also have one zone upstairs for radiators. This is where I am putting in z-wave TRVs. This zone is also controlled by one thermostat that I will probably get rid of and allow the pi control direct. The other 2 zones are hot water and bathroom towel rails. Water is a thermostat on the hot water tank the towel rads are a manual timer.

Re: Circuit design help (home heating)

Posted: Sun Jan 25, 2015 8:17 pm
by Shoka
The reason I suggested those sensors in my original response is that they do not require the ADC in the diagram uptrace, they are
direct digital readout of temperature over a serial bus, and that bus can operate down to 3.3v and below, so can be directly interfaced to the Pi