If you have built the Opentherm Gateway and it doesn't work, or you are the cautious type and prefer to check the device step by step before hooking everything up, here are some suggestions on things you can check. For most of these checks you will need at least a multimeter capable of measuring voltage, current and resistance. You will also need a program to communicate with the gateway. This guide assumes you will use my Opentherm Monitor utility for that.

Power supply

The first thing to check is the power supply. Start out with the gateway unplugged from mains power, thermostat and boiler disconnected, and the IC's removed from their sockets. Now measure the resistance between the two terminals of X3. This should be in the order of kΩs. Check for short circuits if it is lower, or broken connections if it is higher.

Now that you have verified that the device will not blow out a circuit breaker, you can connect it to mains power. Be careful not to touch any of the parts that have 220 Volts on them. Check for 5V +/- 1% between pins 5 and 14 of IC1 and pin 15 and 16 of IC2. Also make sure the polarity is correct. You should get a positive voltage if you put the black probe on the pin mentioned first and the red probe on the second one.

Opentherm interfaces

Next measure the voltage on X1. This should produce a value somewhere between 18V and 34.5V. Anything higher means a risk of blowing out IC3. The polarity is not important. If the voltage is correct you can measure the current between the two terminals of X1. It should be between 5mA and 9mA. If you don't have a current setting on your multimeter you can hook up a 100Ω resistor to X1 and measure the voltage on X1. If you remember your high school physics you have probably already figured out that the voltage should be between 0.5V and 0.9V. Change the value of R11 if the current is not within the expected limits. A higher resistor value results in less current.

If you connect pin 3 of the IC1 socket to ground (e.g. pin 5), the current between the two terminals of X1 should be between 17mA and 23mA (1.7V and 2.3V across a 100Ω resistor). Deviations can be corrected by changing the value of R12. You increase the current by lowering the resistor value. Don't start manipulating R12 until the correct value of R11 has been determined (see above) because R11 influences both the low and high current values while R12 only affects the high current value.

If opto-coupler OK1 was not yet installed, remove the mains power and plug OK1 into its socket. Make sure it is placed the right way around. Now use two pieces of wire to connect X1 to X2 and plug the mains power back in. You should now find a voltage between 15V and 18V on X2 (and X1). If you connect pin 2 of the IC1 socket to VDD (e.g. pin 14), the voltage on X2 should drop to between 5V and 7V.

Measure the voltage on pin 18 of the IC1 socket with pin 3 left open and again when it is connected to ground. In the former case the voltage should be below 1.46V (it is actually expected to be 0V). In the latter case the voltage must be above 1.46V (in practice it's usually around 3V).

When finished, remove the wires between X1 and X2. Do not continue until all of the above checks have passed.

Serial interface

If you bought a USB or LAN/Wifi version of the gateway from the web shop, the next two paragraphs are not applicable and can be skipped.

It is now time to plug IC2 into its socket. Temporarily remove the mains power before doing so. Once you have visually verified that the IC is sitting correctly in the socket and is oriented the right way around, you can plug the mains power back in.

IC2 should produce RS232 level voltages of, ideally, +12V and -12V. It doesn't quite achieve this, but you should measure a voltage between 8.5V and 12V on pin 2 of IC2 and between -8.5V and -12V on pin 6 of IC2. Hint: you can easily access ground via terminal 1 of X1. You should also find the negative RS232 level between pin 5 and pin 2 of the RS232 DB9 connector.

Remove the mains power again and place IC1 into its socket. Beware that IC1 is oriented the other way around from IC2. Connect the gateway to your PC or the LAN/Wifi device. For the RS232 version, use a straight serial cable. For the LAN/Wifi version, make sure you have configured the LAN/WiFi interface according to the instructions available on the "Extra information" tab of the web shop site.

Start the OTmonitor program and configure the connection via Options → Connection. For the RS232 and USB versions, you should choose "Serial port" and then select the correct serial port. For the LAN/Wifi version, select "TCP connection" and enter the IP address you assigned to the LAN/WiFi interface and port 1001. Then click connect. Make sure the icon in the bottom right-hand corner of the main window shows an active connection: Note that the icon only shows that the program has successfully accessed the serial port/USB device, or connected to the LAN/Wifi interface. It provides no proof that the whole path to the gateway is in working order. Close the configuration window and access the Log tab. If for some reason you can't use the OTmonitor program, you may use some terminal emulator program on your computer (like hypertherm or minicom) and configure it for the serial port the gateway is connected to at 9600 baud, 8 bits, no parity.

If your PIC has been loaded with the latest gateway firmware, you should see a message saying "OpenTherm Gateway 4.2" when you reapply the mains power to the gateway. If you see only garbage appearing on the screen, there may be a baud rate mismatch. Make sure you have configured your terminal emulator program correctly. If you see only some of the characters (like "OpenThery 4.2"), your serial cable could be too long. Gateways bought from the web shop usually come with the diagnostic firmware loaded. In that case you should expect "Opentherm gateway diagnostics - Version 1.0". OTmonitor will automatically pop up its diagnostics window when it sees this message.

If you see none of the above and you have checked your connection to the PC, verify that the PIC is really running. You should measure the following voltages on IC1: pin1=1.46V (PIC16F88 only), pin2=0V, pin3=4.5V, pin4=5V, pin8=5V, pin9=5V, pin10=5V, pin11=5V, pin12=5V, pin13=5V, pin17=3.0V. If you are running the gateway firmware and have LEDs attached to the device, you should see them flash briefly about a second after applying power to the gateway.

The remainder of these troubleshooting instructions presume that the gateway is running the latest gateway firmware. If you have the diagnostics firmware loaded, you can take this opportunity to run a few of the diagnostics (and note down the results in case you need to report them later). When you are happy with the results, obtain the latest version of the gateway firmware and load it into the gateway using the File → Firmware upgrade option of OTmonitor.

The gateway should detect that no thermostat is connected and report "Thermostat disconnected". A few seconds later it starts generating opentherm messages every second, which it reports as R00000000. In addition to the actual report, OTmonitor will provide a time stamp and translate the message to a slightly more human readable version.

When serial transmission from the gateway to the PC is working, you can try to send a free format command to the gateway via Options → Miscellaneous (also accessible with the F7 key). If you type and enter "PR=B" you should get the date and time the firmware was built. For version 4.2 that is supposed to be "10:04 30-12-2014" ("12:31 02-02-2012" for version 2.1).

Slave interface

With the device still connected to your PC and the OTmonitor program running, connect your Opentherm thermostat to X1. In the Log area you should see "Thermostat connected", indicating that the gateway has detected the presence of an opentherm thermostat. After a short while you should start to see messages like "T80190000" every second or faster. The exact message depends on the thermostat, but it should be a literal "T", followed by eight hexadecimal digits.

If you see nothing, or things like "Error 01" or "Error 03", the reference voltage may be wrong. You can modify it via Options → Settings (F5) or with the VR=X command. where X is a number between 0 and 9. The normal value is 1.458V (X=4), but due to variations in the used components you may have to change it. If you can't find any setting that works, or you need a value less than 1.042V (X<2) or more than 1.875V (X>6) on a PIC16F88, check that R5 and R6 have the right values. Don't forget to click the Set button after every adjustment to actually make the change in the gateway.

It is also possible that your thermostat doesn't produce a perfect opentherm signal. Some users have reported that the Remeha Celcia 20 thermostat suffers from this defect. You can make the gateway less sensitive to some forms of this problem by switching on the "Ignore multiple mid-bit transitions" option ("IT=1" serial command). On a brand new gateway this option should already be on. You may need to set it when upgrading from an older firmware version.

With the thermostat connected, the voltage on X1 should have dropped below 7V, with short bursts upward once a second. During these bursts the voltage jumps to values between 15V and 18V, but you won't be able to register that with a simple multimeter. If you have an oscilloscope you should see pulses of 500µS and 1mS wide.

If you can't get anything other than errors, see if you can get your hands on a different brand or type of thermostat, if only for testing. Perhaps the thermostat does not follow the Opentherm specifications closely enough for the gateway to accept.

Master interface

Connect the Opentherm signal from the boiler to X2, polarity does not matter. You should now see alternating TXXXXXXXX and BXXXXXXXX reports. After a while you may start seeing RXXXXXXXX and AXXXXXXXX reports as well.

If you don't see any BXXXXXXXX reports, you can determine whether it is a hardware or firmware problem by switching the gateway to monitor mode via Options → Miscellaneous (F7) or using the "GW=0" serial command. In monitor mode, the firmware doesn't have to be able to decode the opentherm messages in order to pass them on. So, if things start working in monitor mode, there is a firmware problem. If the thermostat is still unable to communicate with the boiler in this mode, you should focus your debugging efforts on the hardware of the opentherm line drivers. Test #4 of the diagnostic firmware may be of help with that.