Home Projects Arduino Monitoring OpenTherm communication with Arduino
23 | 02 | 2012
Monitoring OpenTherm communication with Arduino

When I learned that the new heating appliance I had installed in my home communicates with the room thermostat using an actual protocol (as opposed to 'switch on'/'switch off' commands) I became very interested in finding out if it would be possible to listen in on those communications and do interesting stuff with it.

The protocol in question is called OpenTherm (TM). From the OpenTherm website: "OpenTherm is the name of a non-manufacturer-dependent system of communication between modulating HVAC heating appliances and room thermostats. The system consists of a  communication protocol and an interface specification. OpenTherm is futuristic system, which combines simple installation techniques with high functionality and future expansion possibilities.".

It seemed that nobody in the Arduino community had tried to read it yet, so that made it an interesting challenge.

Contrary to what the name suggests, the OpenTherm ('OT') protocol is not open in the sense that its specifications are available for implementation by anybody. Manufacturers of heating, ventilating, and air conditioning (HVAC) equipment may request a copy of the protocol from the OpenTherm Association, 'for evaluation purposes'. The rest of the world will have to make do with information that others gathered and posted on the internet. I found enough information to get me going.

Project setup

This project contains the following parts:

  • an electronic circuit that sits transparently between the heater and the room thermostat, converting the electrical signals into levels suitable for processing by the Arduino
  • the Arduino, which processes the electrical signals into data that can be displayed

Note that this allows me only to listen to the communication. I'm not manipulating any commands, or injecting commands of my own.

Disclaimer: I did this project entirely to satisfy my own curiosity, using data available for free on the internet and electronics and software I built myself. You may use the information in this article for your own purposes, and at your own risk. The software published in this article is released under the GNU Public License.
I will not accept any responsibility for whatever damages might occur from using or applying the information in this article, or from following directions therein.

Short protocol description

The OT protocol is a means to transfer data between a master device (for example, the room thermostat) and a slave device (the heater device). Data exchange is done in a request/reply fashion, where the master initiates the communication and expects a reply from the slave within a certain period of time. If the data is incomplete or corrupt it will be discarded and the conversation ends. If the communication is ended prematurely, or when the slave does not reply within the time specified in the protocol, the master will resend the request to the slave.

What I saw in practise (communication between a Honeywell Chronotherm thermostat and an Intergas heater) is that a considerable percentage of requests is not answered by the slave. When that happens, the master will just repeat the request a couple of times in the hope of a reply, before giving up and requesting some other data type.

The protocol specifies that at least one message per second should be posted by the master.

The data that is exchanged consists of 32 bits (so, 4 bytes of data), to which are added a start- and a stop bit, and it is Manchester encoded. A frame consists of a number of blocks of data:

  • 1 start bit (always 1)
  • 1 parity bit (set in such a way that there's an even number of 1s in the entire message)
  • 3 bits for the message type
  • 4 spare bits (which are all 0)
  • 8 bits data ID
  • 16 bits data value
  • 1 stop bit

OpenTherm frame description

The message type specifies the kind of message: there are master-to-slave and slave-to-master messages. The master can either request some kind of data value (a 'read data' request, for example: boiler water temperature), or it can order the slave to set a certain parameter to a  new value ('write data' request, for example: to deliver hot water or to fire up the heater burner).

The slave acknowledges the master's request, either by replying with the requested data ID's value, or by ackowledging (repeating) the 'write data' request.

The data ID consists of one unsigned byte of information, so a total 255 data IDs is possible (2^8 - 1). The protocol defined 127 data IDs, the rest are available to vendors, upon request.

For more details, refer to the OpenTherm Protocol Specification.

Electrical implementation

The connection between the heater and the thermostat consists of two wires and is set up in such a way that it does not matter how they are connected (i.e. the polarity is protected). The heater provides power to the thermostat over these wires.
To communicate to the slave, the master device changes the voltage on the wire. To communication back to the master, the slave changes the current through the wire. The voltage/current levels are as follows:

logic 0 logic 1
voltage ≤ 7V 15-18V
current 5-9mA 17-23mA

The voltage levels are too high to be used by Arduino directly, and hooking up your own electrical circuitry to (expensive!) hardware is not advisable without taking due precautions to prevent damage. Luckily, an old issue of Elektuur magazine contained an electrical circuit that takes care of both of these issues: voltage/current levels are transformed to Arduino-compatible levels and optocouplers take care of electrical separation of the heater and Arduino circuits. And even though the article is quite old, the PCB for it can still be ordered, which I did, to make life easier.

I adapted the circuit a bit for my needs: changed one resistor value (discussed below) and I removed a couple of diodes that had become unnecessary. I also added two MOSFETs to invert the final signal, giving it the same polarity as the signal from the heater/thermostat. Here is the Eagle schematic (the Eagle file can be downloaded from the Downloads section, below), click to enlarge.

Eagle schematic for OpTh-listener

The heater is connected to X1 and the thermostat to X2. The polarity is not important: D1 - D4 take care of that. IC1, an LP2950, creates a stable reference voltage of 5V. Do not use an 78LS05 because it won't work!

Master to Slave communication: voltage monitoring

IC2B compares the voltage levels at R7/R8 and R1/R2 (which is fixed at 2.5V). When the voltage at pin 6 of IC2 rises above the (fixed) voltage at pin 5 (signal goes HIGH), the output of IC2B goes low, switching on the LED inside the optocoupler OK2. The darlingtons in OK2 will conduct and the output pin 6 goes LOW. The gate of MOSFET Q1 goes LOW too, the MOSFET stops conducting and the voltage level at its drain goes HIGH.

The reverse happens when the voltage at pin 6 of IC2 drops below the level of pin 5.

The current, modulated by the slave, results in a potential (voltage) difference over R4. A high current through R4 results in a large voltage drop, and the output of IC2A will go LOW. Etcetera.

Putting it together

Both MOSFET outputs are combined at the inputs of IC3A, which is one gate of the quad OR gate 7432N. There are two reasons for this:

  • I want to use one Arduino input for monitoring both signals.
  • When the voltage is modulated, this affects the current too. This can be seen as small spikes that run parallel with the slave-to-master communication. By combining the results of both signals in the OR gate, these spikes are made to disappear in the regular signal.

When an oscilloscope is connected pin 3 of the 7432N, you can see the communication going over the line, as a square wave, see the photograph of my scope's screen, below.

When I first looked at it, the waveform was not symmetrical: the time that the signal was high was quite a bit lower than the time it was low. This is probably caused by tolerances in the signal and tolerances in the circuit. I wrote a small sketch, OT_dutycycle (see Dowloads section), to measure the dutycycle of the signal, and it was about 20%, IIRC. By changing the value of R8 from the original value of 33k, to 15k, I obtained a duty cycle of ~49%, which is close enough to perfect.

Signal at JP2


OT listener

Above: The OT listener application: top left the PCB for reading the OT communication with connections for heater (top) and thermostat. Bottom left Arduino Duemilanove with protoshield stacked on top, powered by an external 7.5V adapter. The protoshield has a mini breadboard for the quad OR gate and the two MOSFETs with their resistors. To the right the 4x16 LCD.

Decoding the Manchester signal

I found a really good functional description of the Manchester code and of a method for decoding Manchester signals of arbitrary length. It is written by Zoran Ristic from mikroElektronika, for  a PIC18F452, using mE development systems and compilers. I based my library on his description and code.

Because it took me some time to find anything useful to help me on my way and because his description is quite good, I asked Zoran for, and received, permission to quote from his work. The original set of files (description and mikroBasic/mikroPascal code) can be found here.

Note 1: The logic levels in this article are the reverse of the logic levels used in the OpenTherm protocol, where a transition from high to low is logic one, and a transition from low to high is logic zero. I took that into account when I wrote my own code.

Note 2: For Arduino I chose to use 16 bit Timer1 because with the selected prescaler of 64 it provides both a good resolution (of 4 μs) and a long sampling time (i.e. the time it takes for the counter to roll over). In contrast, if 8 bit Timer2 were used with a similar resolution, it would rollover at 1020 μs. For nominal measurements this is OK, since the nominal OpenTherm signal period is 1000 μs. However, the protocol allows for a deviation of +15%, resulting in a theoretical maximum period of 1150 μs. If an HVAC installation were to exceed our limit of 1020 μs, the Arduino application will not be able to measure the signal.

' * Project name:
' ManReceiver6
' * Copyright:
' (c) mikroElektronika, 2005 - 2006 (ZR)
' * Revision History:
' 20060913:
' - initial release.
[...]
Theory:

Manchester code is a form of line code where each bit is represented with two voltage levels. As a result
of convention, logic one and logic zero are represented in the following way:

- "Logic one"
___
|
| <--- transition from low to high
___|

- "Logic zero"
___
|
| <--- transition from high to low
|___

For example, the sequence of bits 110-10011010 is represented as:

<T1><T1>< T2 > < T2 > < T2 ><T1><T1> < T2 ><T1><T1>< T2 > < T2 > < T2 > <T1>
___ ______ ______ ___ ___ ______ ______
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
__ | |___| |______| |___| |______| |___| |______| |___

| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
1 1 0 1 0 0 1 1 0 1 0


Note: It is just a convention of polarity. There is also a possiblity that voltage levels are inverted, i.e.
logic one is transition from high to low and logic zero is vice versa. This, however, does not influence
general conclusion in this example.
It is important to identify two characteristic periods of duration, T1 and T2. The relation between the
two should be: T2 = 2 T1.
Manchester code carries information about bit rate and this is very useful to make transmitter and receiver
synchronized. However, two levels per each bit require double the bandwith for transmition. These two
arguments are crucial for deciding whether to use the code or not.

The following example shows how to:
- Measure T1 and T2
- Decode Manchester bits
- Identify change in bitrate
- Store incoming bits into useful data format

The example consists of two parts. Part one measures T1 and T2, while part two is decoding the incoming bits.

1. Measuring T1 and T2.

Incoming signal is expected on RB0 [interrupt] pin. PIC is configured so that each rising edge of the signal
generates interrupt. When the first rising edge is detected, TIMER1 is reset to zero and then started. When
the second rising edge is detected, TIMER1 is stopped and the value of TIMER1 is stored. The process is
repeated 10 times, though this can be changed. Each time a new value of TIMER1 is compared to the previous value.
If the new value is less then the previous value, the new value is taken for T2. This algorythm
is not very safe in case of noisy signals, but it is simple enough for demonstration. User should consider
calculating average value for T2.

2. Decoding incoming bits.

Once T1 and T2 are known it is now easy to start sampling the incoming signal. Interrupt on RB0 is turned off,
since it is not needed anymore. Timer1 is now configured to make interrupts each T2 seconds (a single bit lasts
exactly T2 seconds). In order to make Timer1 generate interrupt every T2 seconds, it is necessary to make it
count from 0xFFFF-T2 (timer makes interrupt when it rolls over 0xFFFF). Technically speaking, we should subtract
T2 from 0x10000, but since TIMER1 is 16bits in length then we take the value 0xFFFF. First of all, we wait for
the rising edge of the signal. The assumption is that this is a start bit. When the edge is detected we start
TIMER1 and let it run. Each time TIMER1 rolls over the value 0xFFFF it will generate interrupt (T2 seconds have
elapsed). At this moment we shall sample our signal. Do not forget that when Timer1 rolls over, it will start
counting from 0x0000. Therefore, we have to preload it again with the value of 0xFFFF-T2 in order to get correct
sampling intervals. Beware that we started sampling immediately after the rising edge is detected. This can cause
us trouble, because the moment of sampling can fall exactly in transition zone of the pulse, thus increasing
chances to get errornous results.

In order to solve the transition zone problem, we shall start sampling some time after the rising edge is detected.
The best moment for this is T1/2 seconds after the first rising edge, i.e. in the middle of T1 interval.
This is how correct sampling should look like:

| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| ___ ______ ______ ___ ___ ______ ______ |
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | |
___| |___| |______| |___| |______| |___| |______| |___

| | | | | | | | | | |
|< T2 >|< T2 > |< T2 > |< T2 >|< T2 >|< T2 >|< T2 > |< T2 > |< T2 >|< T2 >|
| | | | | | | | | | |
sample sample sample sample sample sample sample sample sample sample

Note that sample moments fall exactly on the right polarity of the pulse. Therefore, if the level of the signal
is logic high at the moment of sampling, then we can be sure it is a logic one that we sampled. All the same,
if the level of incoming signal is low at the moment of sampling, then this means we are sampling a logic zero.
[...]

OpTh library

I wrote a library for Arduino, OpTh, to access the contents of the OpenTherm communication, once the signal is converted to a level that Arduino can work with (for example, by using the schematic discussed above). The library gives access to each functional component of the OpenTherm frame: parity, message type, data ID, data value, etc. You may download it from the Downloads section, below.

For an example of how to use the library, refer to the OpTh listener application section and the corresponding code in the examples folder that is packaged with the library. The table below gives a brief description of the functions that are available in the library. For a more detailed view take a look at the code, which has a lot of comments.

Note that OpTh uses Timer1 and INT0. This may affect the implementation of (the rest of) your project, depending on what resources you need for that.

Functions

Function

Description

Syntax

OpTh() Creates a new variable of type OpTh. OpTh OT = OpTh()
measureOtPeriod() Measures the period of the OpenTherm signal. OT.measureOtPeriod()
getPeriod() Returns the value measured by measureOtPeriod. long p = OT.getPeriod()
waitFrame() Wait for the next frame. OT.waitFrame()

readFrame()

Read the bits that make up one frame.
Returns 0 for failure of 1 for success and sets an error message.
byte success = OT.readFrame
errmsg() if readFrame() returns 0 then errmsg() can contain the reason for the error. char *msg = errmsg();

getFrame()

Return the 'raw' frame as an unsigned long. unsigned long frame = OT.getFrame();
setFrame() Set the frame manually. Can be convenient if you receive the frame (wirelessly)
from another Arduino and you want to use OpTh functions to access its content.
unsigned long f = 0x28005555;
OT.setFrame(f);
getParity() Returns the parity bit (0 or 1). byte par = OT.getParity();
getMsgType() Returns the message type. byte msg = OT.getMsgType();
getDataId() Returns the data ID. byte data_id = OT.getDataId();
getDataValue() Returns the data value. unsigned int data_value = OT.getDataValue();
isMaster() Returns 1 if the frame is sent by the Master device and 0 if it's sent by the
Slave device.
if (OT.isMaster() ) {
Serial.print("M");
}

OpTh listener application

The OpTh listener application for Arduino, included in the examples directory of the OpTh library, measures the period of the OpenTherm signal and, using that, continuously monitors the communication between the heater and the thermostat. The output of a selected number of messages (status, temperatures) is formatted and sent to a 4x16 LCD screen.

The following sequence of events is displayed on the LCD photographs below:

  • start-up of Arduino
  • measurement of the period of the OpenTherm signal
  • display data when it becomes available
  • central heating (CH) active
  • domestic hot water (DHW) demand
Initialization screen The period of the OpenTherm frame has been measured Waiting for data
Room set/actual temperature, boiler water temperature,
no central heating demand
Room temperature increased to 20°C - increased
CH setpoint
CH setpoint still rising
Central heating is active Central heating is active - flame is on Central heating is active - flame is on, new room setpoint is displayed
Domestic hot water demand - flame on Domestic hot water demand - flame on, boiler
temperature increasing
Domestic hot water demand - flame on, max. boiler temperature reached

Statistics

For 24 hours I recorded the traffic between thermostat and heater, and I found out that only a small subset of the 127 allocated data IDs is used. Also, some data IDs are exchanged more frequent than others, and some are always 0.

A total of 86391 requests was sent by the room thermostat in those 24 hours, and 49244 replies were sent by the heater. Some requests had to be repeated a couple of times before the slave answered, and some were not answered at all. In all, 34689 valid request/reply pairs were sent, an average of about 24 per minute. The table below breaks those 34698 valid requests down by data ID.

data ID description count % of total
0 Master and slave status flags 5133 15
1 Control setpoint: CH water temperature setpoint 10661 30
9 Remote override room setpoint (1)
1096 3
14 Maximum relative modulation level setting (%) (2)
1000 3
15 Maximum boiler capacity (kW) / minimum boiler modulation level(%) (1) 3 0
16 Room setpoint (°C) 366 1
17 Relative modulation level (%) (1) 2550 7
18 Water pressure in CH circuit  (bar) (3) 2 0
20 Day of week and time of day 157 0
24 Room temperature (°C) 513 1
25 Boiler flow water temperature (°C) 9955 29
26 DHW temperature (°C) (1) 45 0
27 Outside temperature (°C) (3) 15 0
28 Return water temperature (°C) (1) 83 0
56 DHW setpoint (°C) (1) 1057 3
57 Max CH water setpoint (°C) (1) 1057 3
100 Remote override function (1) 1005 3

(1) Value always 0
(2)
Value either 0 or 100%
(3)
Values out of bounds

Modulation visualized

Many 'traditional' central heating systems operate in an ON/OFF mode: when there's a heating demand, the heater is switched on. When the heating demand is over the heater is switched off. But with a combination of certain Honeywell room thermostats and suitable heaters, both of which must support the OpenTherm protocol, a modulating heating system can be made.

The graph below shows how this works for the system installed in my home. It displays the value of the CH setpoint (Y-axis) sent by the Master, as a function of time (X-axis). The measurements are taken on a weekday morning, and run from 05:25 to 08:00. It can clearly be seen that the thermostat modulates the output of the heater by sending it higher or lower temperature set points.

Click to enlarge.

CH command settings illustrating heater modulation

Downloads

References

Comments (65)
  • Wouter Wolkers  - Great work!

    Very nice work! I've been looking into something like this, and will surely be building this one! Thanks for the time you put into it, I'll let you know how I get on with building this device.
    I've also put up a posting on the domoticaforum, so probably some other people will check your article.

  • Martijn  - Enjoy!

    Thanks for the compliment :) I hope you'll enjoy tinkering with it as much as I have and I'd be interested to know y

  • alex  - Control the boiler

    Hello!
    These are great developments with respect to the last time I checked this about a year ago!

    I guess the circuit would have to be adapted to allow it to also control the boiler, but do you think your library, with the arduino would be able to send commands as well?

  • Martijn

    Hi Alex,

    I apologize for keeping this short - I don't have a lot of time at the moment to dive into this ;)

    I guess this library (or at least my write up of the decoding process) can be used as a starting point for building your own OpenTherm commands and sending them to the boiler. It's probably even easier to send OpenTherm commands than to decode them. You probably want to use an interrupt to create a stable time base for the 'hacked' boiler signal. But the same interrupt you'll also need for receiving the 'normal' signal. I don't know if continuously switching the INT configuration will cause trouble (with the extra overhead cycles involved) - I don't have that much experience with Arduino).

    Would be an interesting project though.

    In this project, the Arduino is positioned transparently between the thermostat and the boiler. If you want to be able to send commands to the boiler, you'll want to proxy everything that comes from the thermostat, i.e.: intercept it and determine what you want to do with it (block/replace with your own command, or pass through).

    It has been done with a PIC, (link) so why not with an Arduino?

    Personally, I don't want to mess with my boiler. For one, it works fine as is, and also because I'll be moving out of this house within a couple of months.

  • alex

    It is me again!

    more than a year later, but I managed to control the boiler with an Opentherm Arduino interface. I used your library to do the decoding of the replies and for other inspiration, so I just wanted to leave a thank you here!!

  • Martijn

    Hi Alex,

    I checked your site - good work, talking to the boiler! I like your dashboard concept as well - both graphically and in concept.

    Are you making this project for the heck of it ('because you can') or are you aiming at improving the control of the heater?

    Martijn

  • alex

    Well, I am making it because I want to see if I can, and because I would like to improve the control of the boiler and have a zone system at the same time...but I liked the "for the heck of it", in the end it is always for the heck it! I guess one could always bu a off-the-shelf system and get a guy to install it, but it is much more fun to learn how these things work!

  • PavelP  - other values

    Hi.
    I've found other message types here:
    http://www.amit.cz/support/cz/aplikacni_poznamky/ap0028_cz_01.pdf
    3 - configuration (probably contains states as heating on, dhw heating on, burner on, dhw heating available)
    19 - water flow (read)
    33 - exhaust temperature (read)

  • Martijn

    Hi,

    There are indeed more data IDs than those listed in the table above. Search the internet for a document called "Opentherm Protocol v2-2.pdf", it lists all of them.
    My guess is that either the vendor of my heater equipment did not implement these IDs because the hardware is not installed (for example: exhaust thermometer), or that they are sent at a time when I wasn't measuring (for example: heater power switched on).

    Thanks for the addition though, I don't understand Czech but for others it may be a good addition :)

  • T. Hanks  - Nice writeup!

    nice writeup!

  • Frans  - changing periods

    Hello,

    great information you show here. It helped me a lot. I just only had a problem that part of the signals were stable and some not. Reason was that the period of the master and the slave were not the same (for the master 990 us, for the slave 1020 us).
    So I had to addapt the library with a system, that I switched over the times and now it works perfect.

    Thanks again for the work you have done.

    Greetings, Frans

  • Martijn

    Hi Frans,

    Thanks for your comment. I'm glad my write-up was useful for you.

    It's a nuisance I imagine that the master/slave signals in your setup are not symmetrical. The OpenTherm spec doesn't say they have to be, though, so I guess I was lucky ;)

    It never occurred to me that master and slave signals might be asymmetrical. Otherwise I would probably have made it so that both signal times were measured independently.


    Martijn

  • Sijmen  - changing periods

    Hello Frans,

    Ive build Martijn's schematic with two potmeters. But somehow I've still got problems with boiler timings.
    Perhaps I've got the same problems.

    Can you share your library modifications?

    Greetings,

    Sijmen

  • Freddy Martens  - Arduino shield

    Hi,
    I really love your article but I do have a question. Do you have the arduino shield available containing the complete schematic?

    Freddy


  • Martijn

    Hi Freddy,

    There exists (as far as I know) no shield for this.
    The circuit board for the basic electrical schematic (less my own add-on) can be bought through the Elektor webshop search for the PCB number which is listed in the references, above). The rest you have to add on yourself.

    I think it would be a great idea if this application became available as a shield for Arduino but I don't have the time to do that myself. Moreover, I moved house and my current room thermostat does not talk opentherm so I can't rebuild what I did without investing in a new thermostat :S


    Martijn

  • Anonymous

    Hi Martijn,

    I,ve fiddled a little with eagle and one of my 'skilled' co-workers, in fact he is my manager, is going to create the PCB for your schematic. I'll keep you posted.

    Freddy

  • Martijn

    Freddy,

    That's a really cool thing of your manager to do. I guess he still has the Christmas spirit :)

    I think there'll probably quite some interest from hobbyists in the Benelux for this PCB because there isn't much OpenTherm stuff around.

    Even though I don't have an OT thermostat anymore right now, I'd still be interesting in a PCB like this because I'm thinking of getting a modulating thermostat again in future. So, yeah, keep me posted.


    Martijn

  • Anonymous

    Are you willing to verify 'our' eagle files since it is based on your efforts also.

    I will keep you posted.

    Freddy,
    Close to Stroopwafel city, The Netherlands.

  • cDR

    A PCB would be a great after Christmas gift indeed!

  • Martijn  - re:
    Anonymous wrote:
    Are you willing to verify 'our' eagle files since it is based on your efforts also.

    I can give it a try :)

  • Anonymous

    Hi Martijn,

    Off topic: De beste wensen voor 2011.

    I am still fiddling with the design. Are the resistor values for R1, R2 and R3 ok or are these subjected to changes.

    Note: I changed the package for C1 in the schematic.

    Regards,
    Freddy

  • Martijn

    Hi Freddy,

    And the best wishes, for you, too!

    The values for R1, R2 and R3 are dimensioned in such a way that specific voltage levels apply at the junctions R1/R2 and R2/R3.

    The values you see in the schematic are taken from the source schematic, which someone put up here: http://www.domoticaforum.eu/uploaded/bwired/OpenThermostat.pdf.

    If the voltages in your setup are not the same as those in the Electuur schematic then you may have to change the values for R1, R2, R3 until they are OK.

    Does this answer your question?


    Martijn

  • Anonymous

    Hi Martijn and all other readers,

    The story about R1, R2 and R3 are clear to me. I needed the information for the PCB design. A website mentioned the use of potentiometers.

    I do have a finished design and we will create a prototype this week. The PCB is double sided. I do have a single sided version but that version is a bit trickier to develop.

    I will finalize both designs soon, the will be available free of charge but a case of beer is appreciated :-)

    I'll let you know the results as soon as I have build the board.

    Freddy

  • Anonymous

    Hi Martijn, the single sided pcb is a bit wider than the arduino uno, that is because 2 lanes run along the outer connectors. This is the only disadvantage of the single sided design.

    Do you, or any other reader, have a suggestion where to put the eagle files of both versions?

    Regards,
    Freddy

  • Martijn

    Hi Freddy,

    At first I thought I'd offer to host the Eagle files on this website.

    But then I thought it might be a much better idea to host it at the
    Arduino Playground, "a wiki where all the users of Arduino can contribute and benefit from their collective research." In that way you have control over it, you reach a much bigger audience and you can accompany the schematics with additional information, a link to this page, etc.

    The friendly people on the forum may also help you with any questions you have regarding designs, best practices, etc.

    Unfortunately I don't own an Uno - only Duemilanoves. My electronics stuff is still in moving boxes, new floors and walls have higher prio :(

    Martijn

  • kaba  - opentherm monitor

    it is a good project
    i try some project too
    it is possible to look here:
    openthermmonitor.ic.cz,
    but it is write in czech language... :-(

    kaba

  • Martijn

    Hi Kaba,

    I like the photos on your site, very descriptive. But the schematic with the red/green lines is a bit confusing ;)

    Unfortunately my Czech isn't good enough to understand anything :(

    It looks like you put both signals on one output. Do you get good results with that?


    Martijn

  • Anonymous

    Could you add an english section?

    @Kaba: I am curious why you removed one 6N139?

    @Martijn: Are you willing to host the eagle files?


    Regards,
    Freddy

  • Martijn

    Hi Freddy,

    Sure, I can host your Eagle files. If you are willing to provide some sort of contact information (email address) so that people with questions can contact you directly.

    Out of curiosity: where do you have the physical PCBs made?

    Martijn

  • Anonymous

    Martijn, I am a bit puzzled. Kaba removed R5, D5 and IC2. Do you understand why he did that?

    The prototype PCB has been made by my manager using a microwave and fluids since his heater for etching broke down :-)

    Freddy

  • Martijn

    I'm puzzled too.
    It's a cheaper solution though. No idea if it would work as good.

  • Anonymous

    Hi All,

    I received the first version of the PCB. It is a double sided PCB and I already made some changes. Some are cosmetic and some were required.

    I would like to know if there are people who have objections against the double sided PCB. I have a single sided laying around but I need to update that one alse.

    @Martin: I changes the package types for Q1 and Q2 to make routing easier.

    I will post an URL shortly to show off the PCB.

    I will also order the parts soon to build the proto type. I'll keep you posted.

  • Martijn

    That's pretty quickly!

    It's for Uno, right? I don't own one of those. I really recommend posting on the Arduino forum, they have a lot more traffic than this site, so a bigger chance of getting useful feedback.

    Greetz,

    Martijn

  • Anonymous

    Hi Martijn,

    It will be for the mega also.

    Photo's at: http://picasaweb.google.com/freddy.martens/arduino

    Take a close look at the PCB, where the digital I/O's are. You can cut the trace at pin 8 and select an I/O of your choice by soldering the dot on the line to the corresponding address pin :-)

    Freddy

  • Freddy

    Hi Martijn,

    More images on http://picasaweb.google.com/freddy.martens/arduino

    I am currently building the proto, I'm waiting for the last parts to arrive.

    I've already modified the PCB a little. It contains a few flaws. A few pads are too small and the capacitor (mkt) pinout is not correct. Wrong spacing.

    Don't mind the soldering skills, it has been a while since I last touched a soldering iron :-)

    Freddy

  • Martijn

    Ha, I see on your Picasa site that you're a home improvement guy too ;) Those renovated stairs look good - mine will look crap when the carpet comes off...

    But that aside.

    That shield is coming around nicely! I like the extra touch of the rounded-off notch on the right. Pads are indeed a bit small but the traces look solid. Wouldn't you rather use IC feet then soldering them straight to the board, especially on a proto?


    Martijn

  • freddy

    Yep, I am a home improvement guy :-)

    I will use sockets when the components cost more than 2 euro's :-)

    Freddy

  • Anonymous

    Off topic.

    The stairs will be very easy. There are special profiles for sales in the DIY stores, you can use your own laminate and you should use "High Tack" made by "Den Braven" in "Oosterhout" to fix it.
    You only need to clean the stairs a little. Careful with "High Tack". It has a very high initial adhesion.

    Freddy

  • Martijn

    [OT]
    Having renovated a pair of 50's stairs in my previous house (I still smell the fumes of burning paint) I'll definitely look into this for my current house (which also has thick layers of carpet on the stairs - ugh).
    [/OT]

  • Anonymous

    [OT]
    Do you need help :lol: It might consider it if you are living close to Stroopwafel city in Holland. :D
    [/OT]

  • Martijn

    Thanks for the offer.
    I'm not too far away, but I like to see myself as pretty handy with stuff like wood and laminate :)

  • Freddy  - Why did you need to change the 33K resistor to 15K


    Martijn,

    Why did you change the value of the resistor from 33K to 15K?

    Freddy

  • Martijn

    Hi Freddy,

    It's in the text: "When an oscilloscope is connected pin 3 of the 7432N, you can see the communication going over the line, as a square wave, see the photograph of my scope's screen, below.

    When I first looked at it, the waveform was not symmetrical: the time that the signal was high was quite a bit lower than the time it was low. This is probably caused by tolerances in the signal and tolerances in the circuit. I wrote a small sketch, OT_dutycycle (see Dowloads section), to measure the dutycycle of the signal, and it was about 20%, IIRC. By changing the value of R8 from the original value of 33k, to 15k, I obtained a duty cycle of ~49%, which is close enough to perfect."


    Martijn

  • Anonymous

    Can i perform the same test without Scope, i don't have one.

    I can finish the PCB on tuesday when all goes well.

    PS, my manager who created the PCB mentioned that reducing the resistance from 33 to 15K was "een brutale (maar wel werkbare) methode om het schakelmoment..." That was also the reason for asking the question. I will consult with my manager if there is a better way.

    Well, we are on the home stretch :-) Hopefully I can do some opentherm next weekend.

    Freddy

  • Martijn
    Freddy wrote:
    Can i perform the same test without Scope, i don't have one.

    You could use the Arduino code I wrote that measures the dutycycle. It's in the downloads section. It does some sampling and then writes the result to the Serial output.

    Freddy wrote:
    PS, my manager who created the PCB mentioned that reducing the resistance from 33 to 15K was "een brutale (maar wel werkbare) methode om het schakelmoment..." That was also the reason for asking the question. I will consult with my manager if there is a better way.

    Heh heh. There's probably a reason somewhere that the dutycucle wasn't 50%. But, hey, I'm no electrician, and if it works and there's no black smoke then it works for me. Having said that - I would be interested to know why this solution does not have your manager's approval, and if there's a better way :)

    Freddy wrote:
    Well, we are on the home stretch :-) Hopefully I can do some opentherm next weekend.

    Freddy

    Good luck, and have fun!


    Martijn

  • Freddy  - PCB is ready, it's time for testing

    Hi all,

    I completed the PCB and it's still a prototype. I assembled it to find out if there were any problems/flaws during assembly. There are a few thing that I need to solve in the board layout:
    1) Pads are too small for a number of components.
    2) Soldering the address selection must be improved.
    3) The height of the headers is a problem, the 2 condensators are higher than the header.

    I will download the libraries and test the PCB. More to come.

    Photo's are available at: http://picasaweb.google.com/freddy.martens/arduino#

    Any comments are welcome, but don't judge my soldering. It has been a long time since I last touched an iron :-)

    Freddy

  • Andreas  - Arduino-Shield for OpenTherm

    Hi Freddy,

    did You finish the Arduino-Shield? Is it possible to get a PCB or assembled Shield from You?

    Wish to hear from You

    Andreas

  • Joost

    Hi Freddy,

    I'm also interested if there is a shield or PCB available. Could you let us know whether you were able to finish your work on it?

    Thanks.

    Joost

  • Martijn2

    How is the testing coming along?

  • Anonymous

    Not so good, too little time and a change of plans. The misses is pregnant and that shuffled my priorities :-) I need to finish some stuff around the house first :-)

    Freddy

  • Martijn

    Freddy, gefeliciteerd!
    Babyroom before testing :)

  • Marc  - monitoring heater

    Hello,

    i want to monitor my opentherm heater over the internet. i have a holiday home in hungary with an opentherm boiler. i want to monitor roomtemp en flowtemp. can anyone help me please.

  • Martijn

    Hi Marc,

    I have some experience with databases and webapplications, so for remote monitoring I would probably build something like the above to et the data from the heater system, and then add a webclient based on the Arduino Ethernet Shield.

    The webclient gets its data from the OpenTherm monitor and then it would call a webapplication somewhere on a server of yours, to transfer the data.

    The webclient would only make an HTTP request, in the form of, for example, http://yourdomain/yourapp/monitoring.php?temp=xx&flow=yy.

    Your monitoring.php script gets the data and inserts it into a local database.

    Then use an application of your choice to access the database and format the data in a form you like.

    I hope this makes a little sense for you. If not, then you have a steep learning ahead ;)

    But then, there probably are off-the-shelf home automation tools for what you, but they cost $$ and aren't as much fun as building something yourself...


    Martijn

  • marc  - re:

    I have now idea what your talking about. But it looks that your dutch.

    Can you please reply in simple dutch?
    do you know where i can get the finished components?

    Thanks

    Martijn wrote:
    Hi Marc,

    I have some experience with databases and webapplications, so for remote monitoring I would probably build something like the above to et the data from the heater system, and then add a webclient based on the Arduino Ethernet Shield.

    The webclient gets its data from the OpenTherm monitor and then it would call a webapplication somewhere on a server of yours, to transfer the data.

    The webclient would only make an HTTP request, in the form of, for example, http://yourdomain/yourapp/monitoring.php?temp=xx&flow=yy.

    Your monitoring.php script gets the data and inserts it into a local database.

    Then use an application of your choice to access the database and format the data in a form you like.

    I hope this makes a little sense for you. If not, then you have a steep learning ahead ;)

    But then, there probably are off-the-shelf home automation tools for what you, but they cost $$ and aren't as much fun as building something yourself...


    Martijn
  • Anonymous  - re: re:

    Hi Marc,

    marc wrote:
    I have now idea what your talking about. But it looks that your dutch.

    Can you please reply in simple dutch?
    do you know where i can get the finished components?

    Thanks

    If you have no idea what I'm talking about then my suggestion to build something from scratch is no good to you ;)

    As far as finished components are concerned: I don't know of any, but Google is your friend.

    Martijn

  • somebody  - Nice!

    Hi,

    I am trying to make my own OT interface, but I have a problem. My master won't start. I Get a single 1 from my master, i am trying to using an arduino and my com-port on my pc.
    Do anyone know what i have to send to my master to let him 'allive'??
    I am sending just logic 1 and logic 0's my home made pcb make it to OpenTherm signal.

    Thanx,

  • Martijn

    Hi,

    Without knowing what you're doing exactly it's a bit difficult to suggest a solution for your problem.

    Have you checked out paragraph 6.1 in this document and the document that describes the OpenTherm protocol?

    Martijn

  • Fabian  - M:0:0

    Hi Martijn,

    Great work on the monitor !

    I've build a OT gateway from a different website which does work on other heaters but shows some errors when receiving messages from my Intergas heater and was hoping to use this monitor setup to monitor the messages which cause the erros on my other gateway but so far i'm only getting M:0:0 on the serial debugging output.

    I've hooked up a logic analyzer, created some screenshots and pictures from my setup, but didn't want to scr*w up yourwebsite layout so i've uploaded them somewhere else External link

    Could it be that the arduino sketch isn't getting the dutycicle properly ?
    DEBUG is set to 1 but it's not showing int(p).

  • Fabian

    :(

    after some fiddling around the monitor seems to be working. Unfortunately it seems the Intergas heater has timing issues while the burner and/or pump is running.

    Arduino serial output

    Has anyone noticed these before ?

  • Martijn  - re:

    Hi Fabian,

    Compliments on the pics you made with your logic analyzer. Nice squares.

    Fabian wrote:
    :(

    after some fiddling around the monitor seems to be working. Unfortunately it seems the Intergas heater has timing issues while the burner and/or pump is running.

    Arduino serial output

    Has anyone noticed these before ?

    I'm glad you figured out how to get the output before I went in to look at the code: I moved house and heater and I don't have the OT application anymore ;)

    My heater did not have data issues when the burner/pump wass running. Can you see (scope) if the pump has an impact on the stability of the power used by the OT?

  • Fabian  - re: re:
    Martijn wrote:
    I'm glad you figured out how to get the output before I went in to look at the code: I moved house and heater and I don't have the OT application anymore ;)

    My heater did not have data issues when the burner/pump wass running. Can you see (scope) if the pump has an impact on the stability of the power used by the OT?

    Back to an on/off thermostat ? :0

    Unfortunately i don't have a scope. I do have another arduino which i could use as arduinoscope. I'm not sure yet what the best way is to transform 30V down to 5V without loosing the detailed information (.1 voltage drops).

  • Anonymous  - re: re: re:
    Fabian wrote:

    Back to an on/off thermostat ? :0

    No. Never.
    I switched to a modulating Remeha heater w/ matching thermostat. It's Opentherm enabled but I reused the compents from my OT monitor for something else again.

    Fabian wrote:

    Unfortunately i don't have a scope. I do have another arduino which i could use as arduinoscope. I'm not sure yet what the best way is to transform 30V down to 5V without loosing the detailed information (.1 voltage drops).


    Re Scope: I meant the Saleae screendumps :)

    Not sure what you mean with the 30V - 5V transformation.

  • Robert  - Great help

    Hi Martijn,

    I've known about your OpenTherm project for quite some time but now that I've finally started doing something with the information I found here, I thougth it would be nice to leave a message and tell you what a great help your OpenTherm project has been (ehh, *is*). I started with the Elektor OpenTherm Monitor just like you and this weekend I hope to see the right information appearing on my LCD ;-) And if all goes well, the next step will be building the OpenTherm Gateway, the one that's also listed in your references. Thanks for sharing your project!

    BR,
    Robert

  • Martijn  - re: Great help

    Hi Robert,

    Robert wrote:
    Hi Martijn,

    I've known about your OpenTherm project for quite some time but now that I've finally started doing something with the information I found here, I thougth it would be nice to leave a message and tell you what a great help your OpenTherm project has been (ehh, *is*).[...]

    Thank you very much for leaving your comment :) I'm glad to read that all this info is helpful.

    I hope you enjoy your project as much as I did mine, and if all goes well you should have a lot of fun this weekend!

    Are you planning to build an Arduino-version of that gateway?


    Martijn

  • Robert

    I'm having lots of fun, no matter the results ;)
    I don't know if I'll build an Arduino version yet- if the gateway as it is now works as I expect it to, I don't think I will. But if I want to do things different, I will.
    For now, I'm struggling with bad start/end bit- and parity-errors and trying to find out what's causing them....

Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):S
Security
Please input the anti-spam code that you can read in the image.
Last Updated on Sunday, 30 October 2011 14:37