jpraus / arduino-opentherm

Arduino library and hardware shield to send and receive data from Opentherm devices
Other
160 stars 42 forks source link

ESP8266 example selftest only shows errors #14

Closed mrWheel closed 4 years ago

mrWheel commented 4 years ago

Jiri,

I'm trying the example selftest sketch but it does not work.

ds1054z-scope-display_2020-05-19_16-04-24

As you can see, Thermostat in (GPIO-16 / Blue trace) does not follow Boiler out (GPIO-14 / Yellow trace). The voltage on Thermostat in is inverted and between 700mV (low) and 2V (high).

Rev.3 board, 5V logic cut, 3v3 logic bridget. Replaced R11 with 4k7 resistor (as provided)

What can I do to make this work? Is it possible to use a level-shifter?

[edited] Somehow I did not catch that the in- and out- signals are inverted by design so with the commented (first) part of the selftest I was under the impression that high in should result in high out and as that is not the case I thought the board was not functioning correct. The other part of the selftest sketch now shows that everything is OK

Boiler outbound, thermostat inbound .. OK
Boiler inbound, thermostat outbound .. OK
Boiler outbound, thermostat inbound .. OK

[Edit2] According to the data sheet of the ESP8266 high and low are defined as: 0BA7B423-21BB-4849-BA84-89B06D7C1EBA

So the high from the shield is only marginal high. Is there a simple modification possible to make high higher? Are two opto-couplers an option? How can I connect them and what dimension serial resister should I use for an optimal result?

jpraus commented 4 years ago

Hi!

Sorry not getting to you earlier. Yes your observations are right - the signals are inverted by design. I am glad you were able to make it work.

As for the 3.3 logic levels - 3.3V version is hacked to be able to run on ESP boards. It works on the most system, something it does not due to the differences in the power supply. However, I made a rev4 boards. And by adding a single BC848C on the input of thermostat the logic levels are fixed.

However if you have an assorted kit of resistors at hand you can try to change the value of R11 to adjust the voltage levels on the voltage divider. Tou can try to use 5k2.

Rev4 schematics: https://github.com/jpraus/arduino-opentherm/blob/master/doc/shield-schematic_rev4.png

Duplicated issue: https://github.com/jpraus/arduino-opentherm/issues/9