jpraus / arduino-opentherm

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

Support for SAM D21 based microcontrollers (Arduino Zero) #29

Open floriaanpost opened 3 years ago

floriaanpost commented 3 years ago

This pull request adds support for SAM D21 based microcontrollers. It was tested with a Sodaq Sara 412 AFF board, but it should work with an Arduino Zero as well, but I don't have one around. A voltage divider is needed to make incoming communication from the thermostat work. The only change in the code is interrupt code specific for SAM D21.

jpraus commented 3 years ago

Thank you! Will merge it into the library. What voltage divider is needed and where?

floriaanpost commented 3 years ago

The issue was that the voltage at MASTER-IN was about 1.2V for a low bit (if I remember correctely) which is not low enough for the SAMD21 processor to be seen as a logical low. I used a voltage divider from that pin to ground, with resistors of equal size to scale it down to half that voltage. But maybe you have a better solution?

IgorYbema commented 2 years ago

The issue was that the voltage at MASTER-IN was about 1.2V for a low bit (if I remember correctely) which is not low enough for the SAMD21 processor to be seen as a logical low. I used a voltage divider from that pin to ground, with resistors of equal size to scale it down to half that voltage. But maybe you have a better solution?

I believe this https://github.com/jpraus/arduino-opentherm/issues/20#issuecomment-925286258 fixes this also