Sunday, January 15, 2012

Project finished!

This is it! The OpenTherm JeeNode/Arduino interface is finished! and all ready to roll!

The prototype had been working for almost two months now, and finally the boards arrived from fabrication, I think the result was worth waiting for, and worth doing it! I got three identical boards, so if I mess up one I can go on with the next:


Bare boards

Very simple, but very effective :)
I thien collected the components, whe to buy the optocouplers, and incorrectly bought the 4N35 instead of the 4N27 that the prototype used, but only realised after they were already soldered, so I tested it, and they work fine! crisis averted:

All ready for assembly


Mounted everything, both the JeeTherm, and a JeeNode v4 I had around still to be assembled, and put it all in the enclosure:

Assembled, and in the enclosure, attached to the JeeNode


Another view


Had to fiddle a bit more to get the screen fitting in the cover, and connected to the JeeNode:

All ready for action


Checked that it all worked, and got it connected, instead of the prototype. It is now running happily:
Talking to the boiler

I am quite proud of the final result, it looks good and well packed, and I tried not to cut any corners this time, took my time, and tried to do it patiently...very often I end up messing up things in the rush to get them finished.

It is now in beta test phase, if it works well for the coming days, then I will attach it permanently, now it is still floating :)

Already thinking of the next project!

27 comments:

fmartens said...

Looks really nice. It does replace your thermostate right?

fmartens said...

http://thuis.eneco.nl/energie-besparen/toon-thermostaat :-)

Alex said...

Hello!

Indeed it does replace the thermostat. In fact, I haven't had a normal thermostat for years. I have a zone system I built myself, and a server determines the need for heat from the boiler. Until now I was then controlling the boiler in On/Off mode, this new OpenTherm control replaces the On/Off switch. Now the central node (my server) determines a water temperature setpoint, which is then sent to the boiler.

Thanks for the Toon link! I hadn't heard of it yet! That is my next project, to make a nice dashboard to display all the info - see an older post where I show a bit of it - I have all that data available, just need to make it look nice.

Alex said...

PS: I might get some more inspiration from the Toon, and from this one:

http://www.nikohomecontrol.be/bediening/touchscreen

And some others, these things are starting to pop up like mushrooms!

fmartens said...

Alex,

Could you give a breakdown in costs and a price(estimate) for the PCB? If your jeenode opentherm device works like planned, then you should be able to write something competing with Toon (by Eneco). The sensors measuring gas, electricity and water could be connected to another jeenode. Both Jeenodes can connect to a server and that server does the rest right?

Freddy

Davy Landman said...

wow! This is awesome!

I was also building my own thermostat using arduino, and was just researching the opentherm side of the application.

Are you planning on sharing the source/schema's?

My source of both server-side and arduino-side can be found here: https://github.com/DavyLandman/ardmostat

Cheers,
Davy Landman

Alex said...

Hello Freddy,

Indeed, it would be quite easy to build something like the toon. At this moment I have all the pieces in place, and I have now started building a dashboard (a toon). Somewhere in the blog you can find a couple of initial versions of the dashboard, but now I have more ideas.
As for cost, the PCB I had made costed I think aroung 7 euro (I haven't payed it yet, still witing for the bill from my friend who ordered it for me), but if I would do it again, I would include the Atmega and radio in the same PCB, to reduce the volume of the enclosure. Overall I think it would cost maybe 20 euro to build the whole thing, another 20 euro, tops, for the gas and electricity meters.

Further, with these tablets running linux these days, you could probably run the whole thing (server) from a tablet hanging on your wall. I might do a post about that possibility...

Alex said...

Hello Davy!

I also searched for about 3 years, before gathering enough info and courage to be able to do it myself.

My source for the jeeNode is also in github:

https://github.com/amvv/ArduinoOpenTherm

The schematics are somewhere in the blog, and soon I'll post the final documents in the blog.

http://jaagpad.blogspot.com/2011/09/opentherm-circuit-diagram.html

Davy Landman said...

Hi Alex,

I want to add opentherm support later on, did you find a place which documents the requirements for a simple two-wire ON/OFF approach?

Cheers,
Davy

Alex said...

Hello again Davy,

For On/Off bpoiler control, all you need is a short circuit of the boiler cables. The OpenTherm protocol provides for this backward compatibility for allowing installers to quickly check for correct function, and of course, for backward compatibility with old thermostats.

To be on the safe side of things, I would then just use an optocoupler to switch it on and off. You get galvanic isolation (assuming you are powering your arduino externally) and reliability. You could also use a relay, but those require higher switching currents, and are more prone to failure de to the mechanical nature.
An optocoupler like the ones I used, 4N35 or 4N27, or almost any other I guess, would do the job just fine.

fmartens said...

Hi Alex,

You could have an opentherm-node and a metering-node. Both nodes can report to a 'master'. The opentherm-node could reside near the boiler and the metering-node could reside in the 'meterkast'. Both nodes are not visible but their data can be stored on any given NAS. Hiding the nodes gives the advantage that size does not matter anymore since you would use a nice tablet or phone to do the visualization.

part 1

fmartens said...

part 2

You mentioned that you would combine the atmel and opentherm interface on one board because of the size but what about "Using standard" modules. How much are you going to win when you are combining both modules on one board? I think that using a plug design will attract users to 'copy' your designsince they already might have a jeenode.

How are you getting the opentherm data visible on your tablet, are you using a USB node to communicate with the jeenodes?

You also mentioned that you were working on the 'interface'. Is it screenshot ready?

part2

fmartens said...

final part (300 word limit):

I love the jeenode approach, stuff might be a bit more expensive that the Eneco stuff but you can say that you almost build it yourself.

I read, via a link on your site, that you are thinking of a version 2 of the plug? Is the Atmel and radio already included in the version 2 design?

Regards and thanks for the nice posts on your blog.

Freddy

Alex said...

Hello Freddy!

Indeed you could do it with two jeenodes, that is a bit how I have it, only the meters are connected to an arduino, since my home server is right next to the meterkast, and there were no JeeLabs when I started this stuff. I also indeed have a JeeNodeUsb in the server listening to the JeeStuff - a weather station I made myself, a door lock controlled by a JeeNode, and now the Boiler controller.
All these feed data into the server, which also listens to FHT traffic using the FHT100PC.
With all this data available, it is indeed just a matter of visualisation - this is the dashboard, as I call it.
Now it is a series of pages, not very pretty or dymanic, but I am indeed working on a better one. There is a screenshot in the blog somewhere, but I have new ideas...it might take some time.

Version 2 of the OpenTherm is only to get it powered from the bus, to avoid the little brick near the boiler, but that is low priority at the moment. I have a prototype made by a friend, but with the cold weather outside, I am not trying anything new in the boiler!! We'll have to wait for the "dooiaanval"! This new board is also a Jeenode shield at the moment. I'll see how I do it later, you do have a point regarding modularity.
I'll try to do a post about these things soon, also with an explanation of my systems here at home! :)

Alex said...

In the links, on top of the blog there is a link to another blog: Coffee, bits and bikes, there you can find the opentherm v2 explained!

fmartens said...

Hi Alex,

I am not allowed to fiddle till the temperature is a little higher in the Randstad :-) Today, I took a DKU5 and hooked it up to the Remeha Avanta and it works :-)

BTW someone from a domotica site is refering to this project: http://blog.hekkers.net/2012/02/11/low-temperatures-opentherm/

But the reason for posting a comment is because I am curious what kind of sensors you are using in the Meterkast. Are you using a CNY70? Are you willing to share the schematics and could you elaborate a bit more about the configuration in your meterkast?

Groetjes,
Freddy

Alex said...

Hey Freddy!

Indeed the temperatures were too low to play with the boiler! I also need to make some small software updates, to the controller, but did not dare doing it in the last weeks! maybe this weekend!

In the meterkast I am indeed using a CNY70 for the gas metering, and a simple LDR for the electricity, since I got a new meter which has a led blinking every Wh. Pretty simple. I'll try to put some pictures...if I have any...
Do you have any such automation already in place?

Greetings,

Alex

fmartens said...

Hey Alex,
I don't have the hardware yet but this is my plan:
1) In the meterkast, I will have a jeenode doing the gas and electricity meter using 2 CNY70's It will also use an DS1820 to measure the ambient temperature. It will send the data using RF12B to an Arduino.
2) The arduino will sit below my Remeha Avanta. It will read the diagnostics bus using a serial connection. I am only interested in the data, I don't want to control anything. The arduino will read the values from the heater and from the RF12B module and store it in a timestamped format to CF. The same application will read the CF and store that data onto my Synology when it is available.
3) On the Synology, I could use your application/dashboard :-)

I will start the project as soon as I have some time available.

Cheers,
Freddy

fmartens said...

Hi Alex,

I found a nice link about Toon: http://www.renewable-energy-now.org/2012/01/eneco-verkoopt-toon-voor-inzicht-in-uw-energieverbruik/

It says to think twice before getting Toon. So, your setup at home is basically equal to 'Toon'.

wph said...

Hi,

Do you have a description of how you measure your gas and electricity use?

Mirko Ugolini said...

Hi Alex,

Great Job.

Just a question.
I do not own a jeenode modele.

So I wonder if it also works with a Normal Arduino Board?

Regards

Mirko Ugolini

Alex said...

Hello Mirko,

It will also work with an Arduino, but you must adapt the resistors to the 5V of the Arduino.

According to the latest developments, you should also put a resistor across the LED on the top optocoupler, of about 100Ohm, to facilitate the reception, see

http://jeelabs.org/2012/11/28/snooping-with-an-optocoupler/

Sorry for the delayed reply!

Mirko Ugolini said...

Hello Alex,

Great job !!!

I'm starting to port your code in classic Arduino Leonardo.

My gool is to realize a shield for that device and one Android App for control it over internet by REST messages.

But there's something that I would ask to you.
in your repository:
https://github.com/amvv/ArduinoOpenTherm

you report:
<>

and in the code I found that this method (OT.setPeriod(OTPERIOD);) does not belongs to original OpTh.h library


It seems that you personalized the OpTh.h library.

Could you explain me that issues

Regards

Mirko Ugolini

Alex said...

Hello again Mirko!

Indeed I added a function to set the period in the code, instead of hard coded.
I have now put my version on Github, you can check it there.
If I remember well, boilers might have slightly different periods, so you can run a detection cycle, and the set the period to that value.
When you have a gateway just snooping the traffic, you can run this detection many times and then average the result. If, like me, you are replacing the thermostat entirely, it is more trickly. In the loop of the sketch there is a commented out part that reads the period.

Let me know if you need further assistance!

Maurits Bloos said...

Hi,

Any change this could be converted to be used with a NodeMCU?
So you can have a true WiFi Thermostat ?

Alex said...

Hello Maurits,

I don't see why not! I don't know much about the NodeMCU, but if it has 2 IO pins, and is fast enough to generate the manchester encoding, which I'm sure it is, it can be ported.

Maurits Bloos said...

Any chance you could send me the list of the items used to built it ?
So I can work on getting this connected to a NodeMCU ?