Best system for heating automation

Hi there.
I'm planing the automation of the heating system on my house. I need to sense an input from the heating thermostat (that is located on the dining room. The installation is already made through 230v.
Now I have the possibility of doing the sensing at 12v (power supply voltage) or at 5v (from a buck converter).
My question is which is better? If I use 5v I won't need a voltage divider to reduce the feeding voltage to the arduino. But I don't know if I will have any trouble taking into account that the cables of the thermostat run through several meters (15m aprox)

As the voltage will be constant (from the power supply) I will only need resistors (I wont need diodes to protect the arduino from voltage spikes, am I right?)

The biggest question, what are those sensors?

septillion:
The biggest question, what are those sensors?

I think I haven't explained myself correctly:
It's something like this:


And this is the schematic:

Where caldera is the heating boiler.
At the moment this contact runs at 230V because it actuates directly on the boiler. But I can put 5v or 12V through that contact (in theory it should work either way). So my question (more regarding the best way for simplicity and for the arduino) is wether to use 5V or 12V.

If I understand this correctly it's basically an on/off switch.

If so, treat it as such. Remove all connections, wire it as you would a standard button/switch: input pin on one side, Arduino's GND to the other, and enable the pull-up resistor.

wvmarle:
If I understand this correctly it's basically an on/off switch.

Yes.

wvmarle:
If so, treat it as such. Remove all connections, wire it as you would a standard button/switch: input pin on one side, Arduino's GND to the other, and enable the pull-up resistor.

Ok, so then I won't have any trouble due to the large wire? I just wire the "switch" like this (normal pull down resistor)?
.

Button between pin and GND, then you don't need that resistor (just enable the built-in one). HIGH = button unpressed, LOW = button pressed in that case.

I would not worry about voltage drop. So 5V pull up should be fine.

I WOULD worry about noise though. Long(er) wires are fine antennas. So I would add a 1k at the input of the Arduino and do some filtering in code. Or (/and) add a cap between GND and the input as well.

wvmarle:
Button between pin and GND, then you don't need that resistor (just enable the built-in one). HIGH = button unpressed, LOW = button pressed in that case.

I'm planing to use this arduino mega board (or similar): https://www.tindie.com/products/FuzzyStudio/naked-mega-2-arduino-mega-2560-compatible-board/. It doesen't have pull up resistor (as I understand).
The reason I want to use this board is due to space. I want to fit it in a DIN cabinet which has limited space.
Taking into account that, wouldn't it be better to use a Pull down system? this way it will only consume energy when the heating boiler is on.

A mega has pull ups.

And why you would use a large Mega if you say space is an issue I don't know...

MBC99:
Taking into account that, wouldn't it be better to use a Pull down system? this way it will only consume energy when the heating boiler is on.

  1. energy use is very little. Nothing compared to what the heater uses.

  2. it's only saving energy if the ON time is more than the OFF time, which I seriously doubt.

septillion:
I WOULD worry about noise though. Long(er) wires are fine antennas. So I would add a 1k at the input of the Arduino and do some filtering in code. Or (/and) add a cap between GND and the input as well.

Ok to 1k at the input (altough if not recomended I will use a pull down setting)
I think I will stick with the capacitor only; I can defend on electronics but on programing regarding Arduino I'm not that good. Although it's quite intuitive if you have programmed in Java or/and C.

Regarding the capacitor I understand you ground it to bypass all the high and medium frequency signal that the cable may have picked to ground, am I right? what capacity do you recommend?

Now I read it back you can indeed read it in two ways. But the 'or (/and)' was referring to the code. But I would defiantly add the series resistor as well to protect the inputs.

wvmarle:

  1. energy use is very little. Nothing compared to what the heater uses.

  2. it's only saving energy if the ON time is more than the OFF time, which I seriously doubt.

Taking into account I live in Spain and we use the heating only for like 6 months and the thermostat is not active all the day (obviously). So if that is the only point in using pull up rest asured it will save more energy if its pull down :slight_smile: .

For point number 1 (and indirectly 2) take into account that this circuit will work all year, so to make things perfect I'd like it to consume as less energy as posible (I know that it won't be noticeable on the electricty bill, but anyway). And so, the thermostat will be off much more time.

The circuit I plan to design will also be powered during sumer because the hot water suply is also produced by the same heater. Here you have an image of the hidraulic system in case you wonder :):

IMG-20180906-WA0010[6418].jpg

I should take back what I said. Pull up or pull down doesn't matter for the power consumed by the switch. You got me confused :slight_smile:

Either way, when the switch is closed, current flows through resistor and switch. When it's open, no current. Regardless of which way it's wired.

Using a pull up or pull down does not change the energy consumption...

What does change that is if you use the NO or NC contact of the thermostat. If you use the NO contact the current will only flow if the thermostat is active. No matter is that's pulled up or pulled down. If you find that hard to imagine, draw it and try to draw the current path.

But still, the heater probably uses more energy in 10 seconds as would the pull up in a whole year...

septillion:
Now I read it back you can indeed read it in two ways. But the 'or (/and)' was referring to the code. But I would defiantly add the series resistor as well to protect the inputs.

So the circuit would be like the image I attach, right? Which would be the capacitor value?

08-10-2018 17_04_00-Window.png

wvmarle:
I should take back what I said. Pull up or pull down doesn't matter for the power consumed by the switch. You got me confused :slight_smile:

Either way, when the switch is closed, current flows through resistor and switch. When it's open, no current. Regardless of which way it's wired.

septillion:
Using a pull up or pull down does not change the energy consumption...

What does change that is if you use the NO or NC contact of the thermostat. If you use the NO contact the current will only flow if the thermostat is active. No matter is that's pulled up or pulled down. If you find that hard to imagine, draw it and try to draw the current path.

But still, the heater probably uses more energy in 10 seconds as would the pull up in a whole year...

So then, if the counsume the same if the switch is open no current flows from the 5v to the arduino pin in pull up system right?

septillion:
But still, the heater probably uses more energy in 10 seconds as would the pull up in a whole year...

True. Only the circulation pump draws 80w

MBC99:
So then, if the counsume the same if the switch is open no current flows from the 5v to the arduino pin in pull up system right?

correct

MBC99:
Only the circulation pump draws 80w

So no need to worry about power consumption of the pull ups. They are multiple order out. They probably fall well withing the marges of the power of both the heater and the pump :stuck_out_tongue:

septillion:
So no need to worry about power consumption of the pull ups. They are multiple order out. They probably fall well withing the marges of the power of both the heater and the pump :stuck_out_tongue:

Ok, so as I see you have a predisposition to Pull up I will use pull up :slight_smile:

Now I just need to find out the capacitor value

10k and 1k for resistors I supose is correct.

septillion:
And why you would use a large Mega if you say space is an issue I don't know...

This question sliped through.

Because as I've said this is part of a larger design; I want to have as many I/O as posible.
Also because arduino UNO has very few analog inputs (which are cirtical for temperature reading).

For example, I atach the PCB and scheme for the relays (Which I have designed looking in diferent Arduino forum's threads :))