Central heating: choose relay and power source

Hello folks!

I am trying to replace the thermostat for the central heating at my parents' house in Italy with Arduino. I am good with software, but I definitely need a hand with electronics!

The project's status is: I’ve got an Arduino with temperature sensors, a display, LEDs, and rotary encoders up and running. But I am missing 2 parts: how to actually switch ON/OFF the central heating with Arduino (a relay?!) and how to power Arduino.

Existing hardware

New hardware and design

Questions on new hardware and design

  • Is a 1-channel relay the right electrical component?
  • If so, is this a good choice?
  • Would I connect it as in my diagram, so the 2 black wires coming from the boiler to COM and NO (normally open)? Are the 2 black wires interchangeable, so I can connect either to COM or NO?
  • And what about the neutral wire? Shall I leave it disconnected?
  • I searched a bit about relay and some people use an external 5V power source to power the relay. This isolates completely Arduino and the load. Is this worth?
  • If I want to completely isolate Arduino and the load then I would need a relay that supports an external power source (set with a jumper) and the one I linked above does not. But these two (first, second) seems to support an external supply, right?
  • If the objective in the previous two points is to protect Arduino from the load circuit, then wouldn’t a fuse between arduino and the relay be enough?
  • Finally: given that currently there are only the 2 black wires (line) and the green neutral, how do I power Arduino without using a battery? I guess there is no way, I definitely need to add 2 more wires: live and neutral, right?

Thank you!
Paolo

Thermostat: Perry TE500B
Gas boiler: VAILLANT ecoTEC plus VMW 306/5-5
Photo

The quality of the relay you provided the link to is very poor and tend to have a high failure rate. You get what you pay for and 1.66€ each is quite quite cheap. I won't recommend a relay because I'm not a qualified HVAC technician but I would stay away from that one.

Once you have found an appropriate relay, you will need several more components.
Overall, I think it will be cheaper, more reliable and safer to just buy a new thermostat.
I'm sure mom and dad will be happier!

Does the existing thermostat really run on 230V? That's high enough to kill, in the US you'd be required to have much more substantial wiring and a safety ground. Here, 24V would be normal for that kind of wiring. Do you have a voltmeter you can use to check it? If it is that high you need to be very careful around it.

In terms of the functioning of the circuit, the relay you show is good, I can't speak to the quality, I'm not sure why jim-p think's it's low quality, it's probably similar to what's in the thermostat now. The relay is a switch and doesn't care which wire is on which side of the switch.

You need 5V DC to power the Arduino. The easiest way to get that is from a wall plug. If there's already power to the thermostat the neatest way would be to use that power and convert it to 5V DC. But that's kind of an advanced project.

The Perry info on Page 14 shows two ways to have originally wired the t-stat to the boiler. On the left is a Contact Closure interface with just two wires and on the right is a Voltage Supply interface that takes three wires. Both also show two wires for the Line connections. Your description and photos don't exactly match either one. You should have either four or five wires (or possibly just two if the Perry can be battery powered.) But there's no scenario shown in the Perry manual that should have just three wires.

It seems that the Perry also needs a Line connection to supply power to it and potentially also to the boiler interface if it wired as on the right.

Where did the Neutral connect originally?

After posting this I realized there's a simple, obvious solution. Assuming you have access to the other end of that wire, install a 5V power supply there. Rewire it so that the three conductors are +5V, signal and common.

I've found that the DHT22 sensor works great for this purpose and is straightforward to implement.

Wow, be very very careful with dcc's suggestion. It directly connects the Arduino to one side of the boiler control circuit which might be a LINE powered circuit.

You could use a relay module like this but replace the cheapy blue relays with the equivalent Omron (or other brand name) (about $5 US).
Relay module

Hi, the very first thing I would do is go to the boiler and install a transformer 250 to 24vac so that you are not working with dangerous high voltage. You can then get power a power supply that will give you 5 volts from the 24vac. you can put your relay right down by the boiler itself. Like this one for instance DPST 1NO 1NC 8 Amp Power Relay Module (AC/DC 5V) from amazon, or many different solid state relays available that can be controlled with 5vdc, directly output from the Arduino.

Even better, is one of these modules Iono MKR - Industrial Arduino PLC - WiFi BLE GSM NBIoT LoRa SigFox FCC. You just plug a MKR1010 in it and you have all kinds of relays and protections built in. You can put a WiFi web-server on the MKR1010 and control it from anywhere in the world.

I assume you going to be using a temperature sensor to control the temperature of the space? With 3 sensors you can have indoor outdoor and supply water temperatures and really tweak the system for great energy savings.

The pumps are generally controlled by a temperature device that turns the pump on after the water gets hotter, some boilers need a minimum temperature to prevent condensation. With the IONO device there are enough relays that you could control the pumps with the input from a supply water sensor too.

Frank I agree that's a better (safer) overall architecture, and mimics how US systems are wired using a low voltage control circuit. BUT doing that makes it harder for all of the local people in Italy to deal with in the future. Repair people won't know how to fix it. Replacing the boiler (or t-stat) becomes an engineering project and not just something any DIYer can do. Selling the home in the future may become much more difficult when the home inspection turns up this "custom design" and the inspector says WTF?

At least with the current approach all of the changes seem to be localized to the T-Stat location and so there's a reasonable chance of installing a normal T-Stat in the future to restore the property's resale value.

Ok, put the relay back at the boiler. Have power and signal both be 5V. That's safer anyway.

1 Like

I've done a project like this, some construction tips:

If you use a DHT22 temperature/humidity sensor, it fits inside a "keystone" style wall plate like is commonly used for RJ45 jacks for ethernet. That allows you to have a nice wall-mount appearance. The Arduino can go in the wall behind the wall plate.

Once you get your circuit working, it will be more compact and reliable if you have it made into a circuit board. I've been using JLCPCB.com, it costs about US $55 to get a batch of five boards made. They provide software called EasyADA which I found quite easy to use to make a simple board.

I find the easiest way to incorporate an Arduino on a circuit board is to use the Arduino Nano Every with headers and put a socket on the board to accept it. The Arduino is Digi-Key part #1050-ABX00033-ND. The socket is two 15-pin headers spaced 0.6" apart. The header is JLC part # PM254-1-15-Z-8.5

Digikey sells a nicely packaged DHT22 (part # 1738-1039-ND). It has a small PCB with all the components you need, you only need to provide power, ground and signal connections from the Arduino. It fits better in the keystone adapter than other versions I've used. It comes with a cable with a 3-wire connector, the matching connector for your PCB board is JLC part # PZ254R-11-03P.

Here's a board I made showing how it goes together.

2 Likes

Just leave it in such a way that you can put it back to original if necessary or alternately, sell it to someone who wants to move into the future.
I think by you putting the devices up where the line voltage thermostat is located, in a living space, is very dangerous. 250vac can jump long distances, not to mention the noise in the electronics without proper isolation will cause numerous problems. If your device causes a fire, you will not be happy. I know it's all easier said than done.

The less changed then the less that would need to be restored.
A home-brewed undocumented Ardiuno one-off science project hardly represents the future.
Yes there are lots of challenges to properly and safely interfacing a wall mount control to a high voltage device. So although I fully recognize how tempting and fun it would be to recreate an Anduino based smart t-stat, the wiser approach might be to just go buy an appropriately safe and certified t-stat designed specifically for this task. Are there really any unique custom features that are worth the risks to safety, quality of comfort and to being without heat? It's no simple thing to design the proper digital filters and temperature control algorithms.

If you put the relay at the boiler and use the existing wiring for low voltage putting it back is very simple.

You can even have just the temperature sensor at the wall and put all of the electronics at the boiler, the DHT-22 sensor I've been using works fine at any distance you'd encounter in a typical house with 18-gauge wire.

Thank you all for the suggestions and the safety warnings!
Thanks to your inputs and some further reading I realized I need to get a good quality relay board. What do you think of the following ones from safety point of view (orderded by my preference)?

Note: the existing t-stat (Perry TE500B), which has been working for ~10 years flawlessly, has an Omron G6RN-1.

Adding some extra info here to comment on your suggestions and warnings:

  • I'm a 44yo software engineer. I know the basics of electronics, played around with Arduino for a few months. I worked with WiFi Sonoff relays a few years ago, automating my awnings, but never worked with Arduino+relays together. I still consider myself a beginner in electronics.
  • The existing t-stat works at 230V, it's an old house and that was the standard until 10 years ago in Italy. It was installed by a professional. Newer t-stat are indeed low voltage.
  • For now I want to connect my custom t-stat with Arduino and a 220v relay and introduce the less change as possible. In the future a professional might help me switching the whole system to low voltage.
  • The existing system includes 2 t-stats in 2 floors. I am changing only one T-stat for the sake of DIY fun. Should anything go wrong, I will install the old t-stat.
  • I've already built the rest of the project with Arduino, T sensors (SHT-85, DS18B20), leds, display and rotary encoders. It works well but it switches on just an LED for now, instead of the actual boiler.

Omron has been around for a long time and are well know for manufacturing quality products, not just relays. I would go with any Omron relay but the Pololu basic will be simpler to use than th Sparkfun one.

Now you need a power source for the Arduino.

1 Like