Main Site Documentation

Room temperature sensor using Gadgeteer(ing) modules


#1

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


#2

Nice work. I’d be interested to see the front panel for this.

I’ve been looking at make up a touch panel with the G120 and a 5" LCD that would be a drop in for the existing light switches. My biggest issue just now is that there is no neutral line! A little re-wiring is on the cards for this!

As for the front panel, I will design this in Alibre Design that I have and then send the 3D file to Shapways to get it rapid prototyped. I’ve already used then before for simple home projects and it looks much better than a hand cutout panel! :slight_smile:


#3

I will cut out the original front panel, insert a plexi glass front, spray paint the back side of it (except for the display area) and drill 3 holes for the buttons.
I tried this an a similar housing and it worked quite well.
But I have not done it for the real ones so far.


#4

I have played with tiny housings with cerb and temp sensor, and realized that the heat coming from power supply and cerb made it impossible to get realistic readings inside the cabinet. Consider another temp sensor with a probe you can put as external as possible…

Havent found any yet…


#5

This is something I’m thinking from the beginning of this project.

The sensor is more or less at the same position as from the original part.
It’s behind the display and the air can ‘flow’ from left to right.
The display backlight is turned off after a couple of seconds, and turned on on the next button press (at least at night).

The power supply is as far away from the sensor as possible in the sub surface part of the housing. Also I will try to choose componentst hat will not heat up too much. The original sensor converts 230V AC into some DC voltage inside the housing.

I will build up a full prototype on my table and compare temperature with external device for a while before I build them into the house.


#6

Great use for Medusa!


#7

Yes, but it’s not a simple task.
The 2kByte RAM is the bottleneck for me. Without PROGMEM I would have failed already, and the program is not finished yet. The fallback and Modbus Master mode isn’t implemented so far.


#8

I have added a list of related code share entries for this project to the initial post.
I will keep this list up to date.


#9

Added a link to my Modbus library for NETMF/Windows
https://www.ghielectronics.com/community/codeshare/entry/880


#10

You can get some really tiny(10mm.sq) and low power fans that could be used for sampling.

http://uk.farnell.com/multicomp/mc34113/axial-fan-10mm-3vdc/dp/1758248


#11

Looks interesting