In my house I have a room temperature sensor in every room. They have a small wheel where you can adjust the desired temperature and switches a relay to turn heating on and off. A small motor slowly opens or closes the valve when it’s powered or not.
The sensors are from a German house electric supplier.
Thad bad thing is that once a year one of these sensors dies, and now (after 5 Years) I do not get free replacements anymore.
So I decided to ‘upgrade’ them with gadgeteering power.
[ul]1st of all it must fit to the look and design of the original sensors, so I decided to reuse the housings.[/ul]
[ul]I also wanted a display to show the current temperature.[/ul]
[ul]Humidity sensor is also a good thing if you forget to open the window after taking a shower.[/ul]
[ul]And all the components must fit into the subsurface housing.[/ul]
[ul]Finally I want to add a central device which logs the data of all sensors and can make some more decisions like control heating according to outside temperature, sunshine, …[/ul]
Because of this I decided to use the following components:
[ul]N18 display[/ul]
[ul]3 push buttons to adjust desired temperature[/ul]
[ul]Temperature and Humidity sensor[/ul]
[ul]Medusa Mini[/ul]
[ul]RS485 module[/ul]
[ul]Custom power supply unit to create 5V and 3.3V from the 12V supply (is still missing in pictures)[/ul]
And these for central unit:
[ul]Cobra II[/ul]
[ul]TE35 display[/ul]
[ul]Flash module[/ul]
[ul]RS485 module[/ul]
Because the valves are operated with 230V AC I decided to use a ready to use relay module to switch them. It also communicates via RS485 and uses the Modubus RTU protocol. By this I use Modbus for my sensors as well.
Normally the central unit is the RS485 bus master, polls the data from all sensors and switches the relays.
But because you should never rely on a central unit in house electronics (and I would get killed if heating does not work anymore in the whole house) there is a fallback mode.
As soon as there is no communication on the bus for a couple of seconds, the 1st sensor will automatically switch to fallback mode, and by this is master on the bus. It switches the relay on it’s own then and sends the master token to the next sensor when it’s finished.
The last sensor tries to send the token to the central unit. By this it gets back to normal as soon as the central unit is online again.
Have a look at the pictures to get a feeling how small everything needs to be.
I will post more as soon as I proceed in my project.
And of course I will post code on code share.
Edit:
Here is a list of related Code Share entries I have created for this project.
I will keep this list up to date in the initial post.
Medusa
Enhanced N18 Display driver:
https://www.ghielectronics.com/community/codeshare/entry/849
Enhanced Temp&Humidity driver:
https://www.ghielectronics.com/community/codeshare/entry/850
Modbus RTU library
https://www.ghielectronics.com/community/codeshare/entry/865
NETMF
Master/Slave Modbus RTU/TCP library
https://www.ghielectronics.com/community/codeshare/entry/880
…