1 ethernet cable

Hi,

I want to place an arduino nano inside a wall plug as a thermostat. The only cable going to that particular hole in the wall is an unshielded ethernet cable (±30m long) I cannot replace.
The cable runs through a metal tube with 230V cables. (a lot of interference and spikes)

I need to power the arduino from the same cable. (I need to power a few standard red LEDs, a tiny oled display (SSD1306 64x32) and a temperature sensor) So a POE splitter might be an option.

I would like to transmit the temperature reading to another arduino. And maybe a clock pulse so the thermostat knows what time it is. All in all not more than 8bytes of data per minute.

This could be done either over ethernet with an ethernet shield (But this is bulky and expensive but error correction etc) or RS232/RX TX or some other protocol..

Alternatively I could use optocouplers or a digital potmeter I poll every minute for the temperature and a pulse that triggers every hour to keep the time.

What would the wise Arduino community recommend and why?

Well, if you were in America, the electrical inspector would immediately put a RED sticker on your outlet and find the electrical contractor that installed that and put them out of business.

But, since that is not the case.... Can't possible get RS-232 to work, Too long cable with too high capacitance. Very susceptible to noise. Might get by with RS-485 or RS-422 electrical protocol.

In any case where you know you will get errors in the data, you need a protocol to detect those errors and either be able to correct them or cause a retransmission of the data until you do get it right. And to limit errors, the Baud rate will be slow.

Paul

The cable runs through a metal tube with 230V cables.

Here in the U.S. that would be an electrical code violation.

And the other end goes to (or can go to) the heating/cooling system?

(a lot of interference and spikes)

What does that mean? Have you tried Ethernet? I would expect power or digital to work, but I wouldn't send analog audio or video through that cable.

POE sounds like a reasonable solution, but what's the network connection for? Just to get the time? Obviously, if you use the wires for networking you can't use them to control the heating/cooling system so you'll have to build something else to do that.

Alternatively I could use optocouplers or a digital potmeter I poll every minute for the temperature and a pulse that triggers every hour to keep the time.

Where is that pulse coming from? (I don't see how a digital potentiometer fits into the picture.)

Typically a regular non-networked thermostat has between one and three relay contacts to activate the heat, fan, and air conditioning. Programmable thermostats have a built-in clock. And they usually run on batteries. A regular-old [u]mechanical thermostat[/u] doesn't even need power!

DVDdoug:
Here in the U.S. that would be an electrical code violation.

Here in Belgium I think the metal tube with ethernet and 230V is ok since I bought the house and the inspector passed it, so I think I am safe there.

DVDdoug:
What does that mean?

The 230V wiring go to electric shutters with 5A breakers. But every time the shuttersmotors start they generate spikes on the wires.

DVDdoug:
And the other end goes to (or can go to) the heating/cooling system?

The heating itself is controlled by an Arduino Mega. Wit two relays. At the moment it works with a simple thermostat in each room with a knob for the temperature. When the temperature drops below the set value in that room, a circuit is closed to ground and the Mega registers that (with optocouplers for isolation)

I would like to change those old recycled thermostats for an Arduino that can give me a readout of the current temperature and humidity...

DVDdoug:
POE sounds like a reasonable solution, but what's the network connection for? Just to get the time? Obviously, if you use the wires for networking you can't use them to control the heating/cooling system so you'll have to build something else to do that.
Where is that pulse coming from? (I don't see how a digital potentiometer fits into the picture.)

The potentiometer is there to replace the old mechanical thermostat I have installed at the moment.

I want the controlling Arduino Mega to know the temperature in each room so it can log this, put it on a webserver,.. Just for fun.

So I either use POE and ethernet to transmit room temperature from each room to the controlling Arduino Mega, and receive time over ethernet from the controlling Arduino Mega.

I don't want to set the time in every room everytime I have a power failure...

Alternatively I would use the 8 cables of the ethernet cable and connect all 8 of them to the master Mega. No protocol no correction just simple IO's connected to optoCouplers... Noise cancelation would be easy. One would just be the same I already use with my old thermostat... But I misght sent a pulse (from the controlling Mega) to the new thermostat to keep time... (sent one every hour, or only at midnight, don't know yet)

The only problem I see with this method is getting the current room temperature to drom the new Arduino Thermostat to the mega controller...