OTGW temperature sensor testing

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
IanW
Starting Member
Starting Member
Posts: 2
Joined: Fri Jan 17, 2025 11:31 pm

OTGW temperature sensor testing

Post by IanW »

Hello all.

I'm hoping someone can help me "bench test" a DS18B20 temperature sensor attached to my Opentherm Gateway, without needing to connect the OTGW to a boiler or thermostat. So far all my attempts to get a non-zero temperature reading have failed.

The OTGW is from Nodo Shop (PCB version 2.4, with PIC16F1847) and is running firmware 6.6. I am using the PC-based monitor tool, also version 6.6.

The hardware has been modified as described, that's to say jumpers JP1 and JP2 are no longer bridged, and there's a 4.7 kohm pull-up to GPIOA on GPIOB. I've confirmed that both GPIOs can be driven independently to 0V and Vcc (using GA/GB=1/2) and read back correctly using PR=I. A DVM confirms that the correct voltages appear on the outputs.

My test procedure is:
  • leave the gateway disconnected from a boiler or thermostat
  • connect a DS18B20 temperature sensor to GPIOA (Vcc), GPIOB (data) and GND
  • power up the gateway via USB
  • connect the PC-based monitor via USB COM port
  • configure the GPIOs for the temp sensor (GA=2, GB=7)
  • confirm the configuration with PR=G (reports 27)
  • configure the temperature sensor to be outside temperature (TS=O)
  • confirm the temperature sensor configuration with PR=D (reports O)
  • request the outside temperature with PR=E (reports 0.0)
I'd expected this would cause the gateway to read the temperature from the DS18B20 sensor and report it. However, PR=E always reports 0.0.

Scoping GPIOB shows that it remains at Vcc throughout: there are no transitions at all (other than the expected positive edge during start-up). It seems that the gateway is not communicating with the temperature sensor, even when the PR=E command is issued.

Not surprisingly, replacing the DS18B20 with a different one makes no difference to the behaviour.

I wonder whether the gateway software is not communicating with the temperature sensor because it has no connection to a boiler or thermostat.

In short: is it possible to test operation of the DS18B20 temperature sensor without connecting to a thermostat or boiler, and if so how should this be done? If there is a mistake in my test procedure, please let me know.

Many thanks,

Ian
hvxl
Senior Member
Senior Member
Posts: 2020
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW temperature sensor testing

Post by hvxl »

The OTGW PIC is just a very simple processor. It can only do one thing at a time. The firmware was designed to minimize the risk that it would need to do two things at once, like handling an Opentherm message while it is communicating with a temperature sensor. Both of which require rather precise timing.

The Opentherm specs prescribe that the thermostat must leave a gap of at least 100ms between receiving a message from the slave and sending a new message. That is one of the rare opportunities the OTGW gets to do something else without the risk of being interrupted. This is when the firmware talks to the temperature sensor. But that means that it only happens after it receives (and possibly forwards) a message from the boiler. Without a boiler connected it never happens.

I guess it should be possible to also talk to the temperature sensor immediately after sending a message to the boiler. There is supposed to be a gap of at least 20ms before the boiler sends a response. But some exchanges with the temperature sensor may take up to 15ms. That could be cutting it close if a boiler doesn't exactly conform to the standards. This is why I picked the safer option. I admit I didn't consider your (entirely reasonable) use case.
Schelte
IanW
Starting Member
Starting Member
Posts: 2
Joined: Fri Jan 17, 2025 11:31 pm

Re: OTGW temperature sensor testing

Post by IanW »

Thanks for your quick and helpful reply. Understood; that being the case, I can stop fretting about the failure of my test.
Post Reply

Return to “Opentherm Gateway Forum”