Difference between revisions of "HP Tips & tricks during installation and troubleshooting"

From OpenMotics
Jump to navigation Jump to search
(47 intermediate revisions by the same user not shown)
Line 115: Line 115:
 
!<div align="center">57</div>
 
!<div align="center">57</div>
 
|Last received Temperature setpoint 7 from Master, when this setpoint changes, this eeprom location will be updated
 
|Last received Temperature setpoint 7 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">88</div>
 +
!<div align="center">58</div>
 +
|Last received Thermostat Mode 0 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">89</div>
 +
!<div align="center">59</div>
 +
|Last received Thermostat Mode 1 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">90</div>
 +
!<div align="center">5A</div>
 +
|Last received Thermostat Mode 2 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">91</div>
 +
!<div align="center">5B</div>
 +
|Last received Thermostat Mode 3 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">92</div>
 +
!<div align="center">5C</div>
 +
|Last received Thermostat Mode 4 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">93</div>
 +
!<div align="center">5D</div>
 +
|Last received Thermostat Mode 5 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">94</div>
 +
!<div align="center">5E</div>
 +
|Last received Thermostat Mode 6 from Master, when this mode changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">95</div>
 +
!<div align="center">5F</div>
 +
|Last received Thermostat Mode 7 from Master, when this mode changes, this eeprom location will be updated
 
|-
 
|-
 
!<div align="center">240</div>
 
!<div align="center">240</div>
Line 143: Line 175:
 
!<div align="center">F6</div>
 
!<div align="center">F6</div>
 
|Eeprom Protected Area: Number of errors found during production testing
 
|Eeprom Protected Area: Number of errors found during production testing
 +
|-
 +
!<div align="center">248</div>
 +
!<div align="center">F8</div>
 +
|When this Byte==255 then the [[PID default Values]] will be loaded and programmed in Eeprom
 +
|-
 +
!<div align="center">249</div>
 +
!<div align="center">F9</div>
 +
|Sensor Type: This byte will configure the sensor type and the NTC sensor table that needs to be loaded. When Sensor type=0 (or =255) -> Sensor Table Alibaba will be loaded, when Sensor type>0 -> Sensor Table Acalbfi will be loaded
 
|-
 
|-
 
!<div align="center">250</div>
 
!<div align="center">250</div>
 
!<div align="center">FA</div>
 
!<div align="center">FA</div>
|Sensor debugging via local UART (on the HCAC module itself) disabled (==255) or enabled (!=255)
+
|Sensor debugging via local UART (on the HVAC module itself) disabled (==255) or enabled (!=255)
 
|-
 
|-
 
!<div align="center">251</div>
 
!<div align="center">251</div>
Line 206: Line 246:
 
!<div align="center">265</div>
 
!<div align="center">265</div>
 
!<div align="center">109</div>
 
!<div align="center">109</div>
|PID0 HEATING: PID I Clamp (MSB) -> Clamp value to avoid windup
+
|PID0 HEATING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">266</div>
 
!<div align="center">266</div>
 
!<div align="center">10A</div>
 
!<div align="center">10A</div>
|PID0 HEATING: PID I Clamp (LSB) -> Clamp value to avoid windup
+
|PID0 HEATING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">267</div>
 
!<div align="center">267</div>
 
!<div align="center">10B</div>
 
!<div align="center">10B</div>
|PID0 HEATING: PID OUT Clamp (MSB) -> Clamp value Output value
+
|PID0 HEATING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">268</div>
 
!<div align="center">268</div>
 
!<div align="center">10C</div>
 
!<div align="center">10C</div>
|PID0 HEATING: PID OUT Clamp (LSB) -> Clamp value Output value
+
|PID0 HEATING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">269</div>
 
!<div align="center">269</div>
Line 232: Line 272:
 
|PID0 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
|PID0 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
|-
 
|-
 
 
!<div align="center">272</div>
 
!<div align="center">272</div>
 
!<div align="center">110</div>
 
!<div align="center">110</div>
|PID0 Reserved for future extension
+
|PID0 HEATING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in [[System Value]] Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
 
|-
 
|-
 
!<div align="center">273</div>
 
!<div align="center">273</div>
 
!<div align="center">111</div>
 
!<div align="center">111</div>
|PID0 Reserved for future extension
+
|PID0 HEATING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">274</div>
 
!<div align="center">274</div>
 
!<div align="center">112</div>
 
!<div align="center">112</div>
|PID0 Reserved for future extension
+
|PID0 HEATING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">275</div>
 
!<div align="center">275</div>
Line 305: Line 344:
 
!<div align="center">289</div>
 
!<div align="center">289</div>
 
!<div align="center">121</div>
 
!<div align="center">121</div>
|PID0 COOLING: PID I Clamp (MSB) -> Clamp value to avoid windup
+
|PID0 COOLING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">290</div>
 
!<div align="center">290</div>
 
!<div align="center">122</div>
 
!<div align="center">122</div>
|PID0 COOLING: PID I Clamp (LSB) -> Clamp value to avoid windup
+
|PID0 COOLING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">291</div>
 
!<div align="center">291</div>
 
!<div align="center">123</div>
 
!<div align="center">123</div>
|PID0 COOLING: PID OUT Clamp (MSB) -> Clamp value Output value
+
|PID0 COOLING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">292</div>
 
!<div align="center">292</div>
 
!<div align="center">124</div>
 
!<div align="center">124</div>
|PID0 COOLING: PID OUT Clamp (LSB) -> Clamp value Output value
+
|PID0 COOLING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">293</div>
 
!<div align="center">293</div>
Line 334: Line 373:
 
!<div align="center">296</div>
 
!<div align="center">296</div>
 
!<div align="center">128</div>
 
!<div align="center">128</div>
|PID0 Reserved for future extension
+
|PID0 COOLING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in [[System Value]] Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
 
|-
 
|-
 
!<div align="center">297</div>
 
!<div align="center">297</div>
 
!<div align="center">129</div>
 
!<div align="center">129</div>
|PID0 Reserved for future extension
+
|PID0 COOLING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">298</div>
 
!<div align="center">298</div>
 
!<div align="center">12A</div>
 
!<div align="center">12A</div>
|PID0 Reserved for future extension
+
|PID0 COOLING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">299</div>
 
!<div align="center">299</div>
Line 403: Line 442:
 
!<div align="center">313</div>
 
!<div align="center">313</div>
 
!<div align="center">139</div>
 
!<div align="center">139</div>
|PID1 HEATING: PID I Clamp (MSB) -> Clamp value to avoid windup
+
|PID1 HEATING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">314</div>
 
!<div align="center">314</div>
 
!<div align="center">13A</div>
 
!<div align="center">13A</div>
|PID1 HEATING: PID I Clamp (LSB) -> Clamp value to avoid windup
+
|PID1 HEATING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">315</div>
 
!<div align="center">315</div>
 
!<div align="center">13B</div>
 
!<div align="center">13B</div>
|PID1 HEATING: PID OUT Clamp (MSB) -> Clamp value Output value
+
|PID1 HEATING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">316</div>
 
!<div align="center">316</div>
 
!<div align="center">13C</div>
 
!<div align="center">13C</div>
|PID1 HEATING: PID OUT Clamp (LSB) -> Clamp value Output value
+
|PID1 HEATING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">317</div>
 
!<div align="center">317</div>
Line 432: Line 471:
 
!<div align="center">320</div>
 
!<div align="center">320</div>
 
!<div align="center">140</div>
 
!<div align="center">140</div>
|PID1 Reserved for future extension
+
|PID1 HEATING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in [[System Value]] Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
 
|-
 
|-
 
!<div align="center">321</div>
 
!<div align="center">321</div>
 
!<div align="center">141</div>
 
!<div align="center">141</div>
|PID1 Reserved for future extension
+
|PID1 HEATING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">322</div>
 
!<div align="center">322</div>
 
!<div align="center">142</div>
 
!<div align="center">142</div>
|PID1 Reserved for future extension
+
|PID1 HEATING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">323</div>
 
!<div align="center">323</div>
Line 501: Line 540:
 
!<div align="center">337</div>
 
!<div align="center">337</div>
 
!<div align="center">151</div>
 
!<div align="center">151</div>
|PID1 COOLING: PID I Clamp (MSB) -> Clamp value to avoid windup
+
|PID1 COOLING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">338</div>
 
!<div align="center">338</div>
 
!<div align="center">152</div>
 
!<div align="center">152</div>
|PID1 COOLING: PID I Clamp (LSB) -> Clamp value to avoid windup
+
|PID1 COOLING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">339</div>
 
!<div align="center">339</div>
 
!<div align="center">153</div>
 
!<div align="center">153</div>
|PID1 COOLING: PID OUT Clamp (MSB) -> Clamp value Output value
+
|PID1 COOLING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">340</div>
 
!<div align="center">340</div>
 
!<div align="center">154</div>
 
!<div align="center">154</div>
|PID1 COOLING: PID OUT Clamp (LSB) -> Clamp value Output value
+
|PID1 COOLING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
 
|-
 
|-
 
!<div align="center">341</div>
 
!<div align="center">341</div>
Line 530: Line 569:
 
!<div align="center">344</div>
 
!<div align="center">344</div>
 
!<div align="center">158</div>
 
!<div align="center">158</div>
|PID1 Reserved for future extension
+
|PID1 COOLING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in [[System Value]] Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
 
|-
 
|-
 
!<div align="center">345</div>
 
!<div align="center">345</div>
 
!<div align="center">159</div>
 
!<div align="center">159</div>
|PID1 Reserved for future extension
+
|PID0 COOLING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">346</div>
 
!<div align="center">346</div>
 
!<div align="center">15A</div>
 
!<div align="center">15A</div>
|PID1 Reserved for future extension
+
|PID0 COOLING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
 
!<div align="center">347</div>
 
!<div align="center">347</div>
Line 722: Line 761:
  
 
Let's start configuring a PID filter:
 
Let's start configuring a PID filter:
*Step1: First we need to know if we're going to program a Heating or cooling PID filter. In our example we're going to program filter 1 in heating so we need to look at Eeprom byte 304-319(DEC) -> See eeprom table at the beginning of this document.
+
*Step 1: First we need to know if we're going to program a Heating or cooling PID filter. In our example we're going to program filter 1 in heating so we need to look at Eeprom byte 304-319(DEC) -> See eeprom table at the beginning of this document. So let's program PID filter 1 in Heating:
 +
eeprom write 79 1 126 0 253 1
 +
For PID0 and PID1, please use different temperature sensors. For the same PID, the same sensor can be used for heating and cooling.
 
*Step 2: Let's start with linking the temperature sensor (we're going to sensor 5 so program 5 in byte 304)
 
*Step 2: Let's start with linking the temperature sensor (we're going to sensor 5 so program 5 in byte 304)
 
  eeprom write 79 1 126 0 304 5
 
  eeprom write 79 1 126 0 304 5
*Step 3: Let's now program the output (we're going to use output 0)
+
*Step 3: Let's now program the output (we're going to use output 2)
  eeprom write 79 1 126 0 305 0
+
eeprom write 79 1 126 0 305 2
 +
Every time you make an eeprom write in an eeprom filter space, you'll see the feedback of the programming on the UART console of the HVAC module:
 +
-----------------PID1 H CONFIG---------------------------------
 +
  Kp=1792 Ki=128 Kd=256 Ti=255 I_Clamp=100 Out_Clamp=255 Min_Max_Setpt=1: --.-
 +
  PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
 +
---------------------------------------------------------------
 +
You can see that Sensor 5 and Output 2 are programmed, pid debug and pid filter are disabled.
 +
*Step 4: Let's now program the PID parameters
 +
** Kp=4 -> MSB=4 (256*4), LSB=0 -> Kp=1024
 +
** Ki=1,5 -> MSB=1 (256*1), LSB=128 (0,5=0.00390625*128) -> Ki=384
 +
** Kd=2 -> MSB=2 (256*2), LSB=0 -> Kd=512
 +
 
 +
eeprom write 79 1 126 0 306 4
 +
OK
 +
eeprom write 79 1 126 0 307 0
 +
OK
 +
eeprom write 79 1 126 0 308 1
 +
OK
 +
eeprom write 79 1 126 0 309 128
 +
OK
 +
eeprom write 79 1 126 0 310 2
 +
OK
 +
eeprom write 79 1 126 0 311 0
 +
OK
 +
On the HVAC UART console, we get this:
 +
-----------------PID1 H CONFIG---------------------------------
 +
  Kp=1024 Ki=384 Kd=512 Ti=255 I_Clamp=100 Out_Clamp=255 Min_Max_Setpt=1: --.-
 +
  PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
 +
---------------------------------------------------------------
 +
We see the correct PID parameters.
 +
* Step 5: Let's write 6 in the Ti parameter (How often the I filter needs to be executed before being updated)
 +
eeprom write 79 1 126 0 312 6
 +
Result on the HVAC UART Console:
 +
-----------------PID1 H CONFIG---------------------------------
 +
  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=100 Out_Clamp=255 Min_Max_Setpt=1: --.-
 +
  PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
 +
---------------------------------------------------------------
 +
* Step 6: Let's now write the clamping values of the I filter (to avoid windup) and the Out value (P+I+D). MSB and LSB values needs to be written. I clamping will be set at 80 and Out value at 255.
 +
eeprom write 79 1 126 0 313 0
 +
OK
 +
eeprom write 79 1 126 0 314 80
 +
OK
 +
eeprom write 79 1 126 0 315 0
 +
OK
 +
eeprom write 79 1 126 0 316 255
 +
OK
 +
Result on the HVAC UART Console:
 +
-----------------PID1 H CONFIG---------------------------------
 +
  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt=1: --.-
 +
  PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
 +
---------------------------------------------------------------
 +
*Step 7: Let's now set the PID execution time. This is the time between 2 execution runs of this PID filter. Since you also have the sensor timing (the time between 2 measurements of all sensors - see Eeprom byte 251), we need the measurement of the sensors to be faster then the execution of the PID filter so make sure the PID execution time is higher then Eeprom byte 251:
 +
eeprom write 79 1 126 0 317 27
 +
*Step 8: Let's now program the Maximum setpoint this PID filter (in Heating) will accept. This setpoint is written in [[System Value]] format. We want to write 62°C so in system value this is equal to 188:
 +
  eeprom write 79 1 126 0 318 188
 +
Result on the HVAC UART Console:
 +
-----------------PID1 H CONFIG---------------------------------
 +
  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt=1:+62.0
 +
  PID_Time=27 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
 +
---------------------------------------------------------------
 +
*Step 9: In this step, we will program the FailSafe temperature (in [[System Value]] format). This is the setpoint that is automatically loaded at startup or the setpoint temperature that is used when the module goes in Failsafe mode. Please note that this temperature will still be checked against the Min/Max Temperature Setpoint that is programmed and that the Min/Max will always prevail. As an example, we will put 25°C (=114 -> [[System Value]]) as Failsafe temperature:
 +
eeprom write 79 1 126 0 320 114
  
 
=== Testing the PID filter ===
 
=== Testing the PID filter ===
 +
To see what's happening, you have 2 possibilities:
 +
* Enable debugging on the HVAC module itself (UART-TTL cable must be connected on the HVAC module)
 +
* Enable debugging on the Brain(+): PID parameters will be displayed on the CLI console of the Brain(+)
 +
 +
==== Testing the PID filter via the HVAC UART output ====
 +
To test the PID filter, we will enable the debugging of the live PID calculations and Enable the PID filter:
 +
eeprom write 79 1 126 0 319 2
 +
You will get following info on the HVAC UART console:
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=-16 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=+0 D=+2 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-21 D=+0 OUT(2)=+0 *
 +
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-21 D=+0 OUT(2)=+0 *
 +
On the console of the Brain(+), you can change setpoint:
 +
thermostat setpoint write 5 60.5
 +
This will result in the output switching on very fast which you can see on the HVAC UART console:
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+76 P=+304 I=-80 D=+162 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+76 P=+304 I=-80 D=+0 OUT(2)=+224 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=-80 D=+2 OUT(2)=+230 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+76 P=+304 I=-80 D=-2 OUT(2)=+222 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+2 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
 +
 +
To see an overview of the programmed thermostat setpoints, you can use the below instruction on the Brain's console:
 +
sensor list
 +
This will give following results:
 +
-Sensor---Temp (Offset)---Hum------Bright---CO2------VOC-----Dali--Setpoint--Th Mode--Name-----------
 +
000 (T)  +19.5'C (+00)    NC      NC      NC      NC    255(0) +65.0'C  ---
 +
001 (T)  +20.0'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  ---
 +
002 (T)  +19.5'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  ---
 +
003 (T)  +19.5'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  ---
 +
004 (T)  +19.5'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  ---
 +
005 (T)  +20.0'C (+00)    NC      NC      NC      NC    255(0) +60.5'C  ---
 +
006 (T)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  ---
 +
007 (T)  +24.0'C (+00)    031%      NC      NC      NC    255(0) -32.0'C  ---
 +
OK
 +
 +
==== Testing the PID filter via the Brain(+) CLI console ====
 +
When your installation has Master Firmware V1.0.135 (or higher) and HVAC firmware V6.0.10 (or higher), the calculated PID parameters of the HVAC module can also be displayed on the CLI console.
 +
To enable debugging, use following instruction:
 +
pid debug on
 +
When a PID filter is enabled (when disabled, nothing will be displayed) on 1 of the connected HVAC modules, following will appear on the console (example):
 +
17:51:15 084.075.215.000 pid:0 En:1(H) sensor:19.0(3) setpt:22.5 Err:7 P:49 I:0 D:0 Drive=49 Out=49(0)
 +
Explanation:
 +
* 17:51:15 -> Time
 +
* 084.075.215.000 -> ID of the HVAC module (important when more then 1 HVAC module is connected)
 +
* pid:0 -> PID 0 of the HVAC module is used
 +
* En:1(H) -> Module is enabled (=1) and PÏD filter is in Heating(H) mode. Cooling(C) is also possible
 +
* sensor:19:0(3) -> Sensor is measuring 19.0 degree celsius en Sensor (3) of this HVAC module is used for this PID filter
 +
* sept:22.5 -> The thermostat setpoint is now set at 22.5 degree Celsius
 +
* Err: 7 -> The calculated PID error is 7
 +
* P:49 -> The calculated P result is 49
 +
* I:0 -> The calculated I result is 0
 +
* D:0 -> The calculated D result is 0
 +
* Drive=49 -> The calculated PID drive (P+I+D) is 49
 +
* Out=49(0) -> Analog output (0) will be driven with value 49 (0-255)
 +
 +
When the display rate of the debug information is not high enough, the sampling frequency of the HVAC module can be increased by using eeprom memory location 0/4. For example, increase the speed to display every 8 seconds the PID information:
 +
eeprom write 0 4 10
 +
 +
eeprom activate
 +
 +
=== Testing the HVAC Relays ===
 +
The HVAC module has 6 built-in relays that can be controlled by the Master processor. All below instruction are performed on the Brain(+) CLI (directly or via Maintenance mode).
 +
 +
First perform an "error list" or "el":
 +
el
 +
--- Total Uptime: 000495 Hours, Last Startup: 17:04:19 09/01/22  ---
 +
--- Module Type: BRAIN, RS485 mode: 0, Board: 28'C  --.--V --.--A ---
 +
--- PWR RS485/CAN: 1/1, CANTERM: 1, BB Debug: 255, Fw: 1.0.121      ---
 +
-------Output------------ID---------Err-------Status--------Pwr---
 +
  00 (l I 000->007) 108.000.000.000 00000  GOOD      (000)  1
 +
  01 (O H 008->015) 079.001.126.000 00000  GOOD      (000)  0
 +
  02 (O E 016->023) 079.250.088.000 00047  GOOD      (000)  1
 +
-------Input-------------ID---------Err-------Status--------Pwr---
 +
  00 (i I 000->007) 105.000.000.000 00000  GOOD      (000)  1
 +
  01 (I E 008->015) 073.017.243.000 00000  GOOD      (016)  1
 +
-------Sensor------------ID---------Err-------Status--------Pwr---
 +
  00 (T H 000->007) 084.001.126.000 00000  GOOD      (016)  0
 +
-------CAN Control-------ID---------Err-------Status--------Pwr---
 +
  00 (C E 000->000) 067.051.255.000 00000  GOOD      (016)  1
 +
OK
 +
 +
You see 3 outputs modules of following type
 +
* "l" -> Open Collector
 +
* "O" -> Output Relay module
 +
Following subtypes can be found:
 +
* "I" -> Internal module. The Open Collector outputs are built-in in the Brain.
 +
* "H" -> HVAC module, external module.
 +
* "E" -> External OpenMotics Module. In this case, it's an external Output module.
 +
You also see which outputs are linked to this module. For example, the HVAC module has output 8->15 linked so if we need to trigger one of the outputs of the HVAC module, we need to use this range.
 +
 +
For the HVAC module, only the first 6 outputs are used so in this example, output 8-13 are used.
 +
 +
Switching Output 8 ON:
 +
on 8
 +
Switching Output 8 OFF:
 +
off 8
 +
Overview of the outputs that are ON can be performed by instruction "output status on" or "oso":
 +
oso
 +
**Nr of Outputs ON: 004 (O-000/L-004)**
 +
-Output-Dim-Timer--Type----Name---------
 +
009 (O) 255 65535 ( off )
 +
010 (O) 255 65535 ( off )
 +
016 (O) 255 65535 ( off )
 +
021 (O) 255 65535 ( off )
 +
OK
 +
 +
== Using the HVAC module via CLI ==
 +
=== Displaying PID information ===
 +
With the below instruction, you can switch on the PID debugging of the HVAC module.
 +
pid debug on
 +
When this instruction is enabled, the pid calculations happening on the HVAC module will be displayed on the CLI console
 +
 +
=== Setting the PID temperature setpoint and mode===
 +
With the instruction "thermostat setpoint write", the PID setpoint as well as the thermostat mode can be set.
 +
Mode:
 +
* Mode.BIT0=0: Thermostat is in Cooling mode
 +
* Mode.BIT0=1: Thermostat is in Heating mode
 +
 +
Let's put thermostat 8 at 25.0°C and in Heating mode:
 +
thermostat setpoint write 8 25.0 1
 +
 +
To check the thermostat value and mode, using
 +
sensor list
 +
 +
-Sensor---Temp (Offset)---Hum------Bright---CO2------VOC-----Dali--Setpoint--Th Mode--Name-----------
 +
000 (s)  +21.0'C (+00)    054%      NC      NC      NC    255(0) -29.5'C  000
 +
001 (s)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
002 (s)    NC    (+00)    NC      NC      NC      NC    255(0) +22.0'C  000
 +
003 (s)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
004 (s)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
005 (s)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
006 (s)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
007 (s)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
008 (T)  +20.0'C (+00)    NC      NC      NC      NC    255(0) +25.0'C  000
 +
009 (T)  +20.5'C (+00)    NC      NC      NC      NC    255(0) +22.0'C  001
 +
010 (T)  +20.5'C (+00)    NC      NC      NC      NC    255(0) -31.5'C  000
 +
011 (T)  +20.5'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
012 (T)  +20.0'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
013 (T)  +20.0'C (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
014 (T)    NC    (+00)    NC      NC      NC      NC    255(0) -32.0'C  000
 +
015 (T)  +23.0'C (+00)    045%      NC      NC      NC    255(0) -32.0'C  000
 +
OK

Revision as of 14:40, 29 May 2022

Introduction

The HP (Heat Pump) module is made to work in combination OpenMotics. This module will allow to built a full electric solution for Heating and Cooling in combination with a Heatpump. The HP module has following connections:

  • 6x NTC (temperature) probe connections
  • 4x 230VAC outputs
  • 2x Relay outputs (dry contacts)
  • 2x 0-10VDC inputs
  • 2x 0-10VDC outputs
  • 1x Aquastat input

Firmware information

Release notes

The Firmware release notes can be found here: HP Module Release Notes

Eeprom Memory Model

In the below table, you'll find the eeprom locations (in DEC and HEX) of the eeprom of the HVAC module and the explanation. Please note that in the rest of this document, the eeprom location is always used in DEC.

Location DEC Location HEX Description
0
0
Output Module ID_NE (Module is New "N" or Existing "E")
1
1
Output Module ID0
2
2
Output Module ID1
3
3
Output Module ID2
4
4
Output Module ID3
20
14
Sensor Module ID_NE (Module is New "N" or Existing "E")
21
15
Sensor Module ID0
22
16
Sensor Module ID1
23
17
Sensor Module ID2
24
18
Sensor Module ID3
64
40
Hardware Version
65
41
Firmware Version Major
66
42
Firmware Version Minor
67
43
Firmware Version Built
74
4A
Bootloader Flashmode variable
75
4B
Bootloader Timeout value
80
50
Last received Temperature setpoint 0 from Master, when this setpoint changes, this eeprom location will be updated
81
51
Last received Temperature setpoint 1 from Master, when this setpoint changes, this eeprom location will be updated
82
52
Last received Temperature setpoint 2 from Master, when this setpoint changes, this eeprom location will be updated
83
53
Last received Temperature setpoint 3 from Master, when this setpoint changes, this eeprom location will be updated
84
54
Last received Temperature setpoint 4 from Master, when this setpoint changes, this eeprom location will be updated
85
55
Last received Temperature setpoint 5 from Master, when this setpoint changes, this eeprom location will be updated
86
56
Last received Temperature setpoint 6 from Master, when this setpoint changes, this eeprom location will be updated
87
57
Last received Temperature setpoint 7 from Master, when this setpoint changes, this eeprom location will be updated
88
58
Last received Thermostat Mode 0 from Master, when this mode changes, this eeprom location will be updated
89
59
Last received Thermostat Mode 1 from Master, when this mode changes, this eeprom location will be updated
90
5A
Last received Thermostat Mode 2 from Master, when this mode changes, this eeprom location will be updated
91
5B
Last received Thermostat Mode 3 from Master, when this mode changes, this eeprom location will be updated
92
5C
Last received Thermostat Mode 4 from Master, when this mode changes, this eeprom location will be updated
93
5D
Last received Thermostat Mode 5 from Master, when this mode changes, this eeprom location will be updated
94
5E
Last received Thermostat Mode 6 from Master, when this mode changes, this eeprom location will be updated
95
5F
Last received Thermostat Mode 7 from Master, when this mode changes, this eeprom location will be updated
240
F0
Eeprom Protected Area: Production Year (DEC 0-99)
241
F1
Eeprom Protected Area: Production Month (DEC 1-12)
242
F2
Eeprom Protected Area: Production Day (DEC 1-31)
243
F3
Eeprom Protected Area: Production Company (DEC 0-9)
244
F4
Eeprom Protected Area: Serial Number MSB
245
F5
Eeprom Protected Area: Serial number LSB
246
F6
Eeprom Protected Area: Number of errors found during production testing
248
F8
When this Byte==255 then the PID default Values will be loaded and programmed in Eeprom
249
F9
Sensor Type: This byte will configure the sensor type and the NTC sensor table that needs to be loaded. When Sensor type=0 (or =255) -> Sensor Table Alibaba will be loaded, when Sensor type>0 -> Sensor Table Acalbfi will be loaded
250
FA
Sensor debugging via local UART (on the HVAC module itself) disabled (==255) or enabled (!=255)
251
FB
Sensor Refresh rate: Time (x40ms) between each cycle of sensors reading (Default 255x40ms=+/-10s)
252
FC
PID0 in Heating (!=0) or Cooling (==0)
253
FD
PID1 in Heating (!=0) or Cooling (==0)
254
FE
Reserved for PID2
255
FF
Reserved for PID3
256
100
PID0 HEATING: Temperature Sensor (0-5) linked to this PID routine
257
101
PID0 HEATING: Output (0-2) linked to this PID routine
258
102
PID0 HEATING: PID P (MSB) Parameter (Kp)
259
103
PID0 HEATING: PID P (LSB) Parameter (Kp)
260
104
PID0 HEATING: PID I (MSB) Parameter (Ki)
261
105
PID0 HEATING: PID I (LSB) Parameter (Ki)
262
106
PID0 HEATING: PID D (MSB) Parameter (Kd)
263
107
PID0 HEATING: PID D (LSB) Parameter (Kd)
264
108
PID0 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated
265
109
PID0 HEATING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
266
10A
PID0 HEATING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
267
10B
PID0 HEATING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
268
10C
PID0 HEATING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
269
10D
PID0 HEATING: Time (x40ms) between each PID execution (Default ?)
270
10E
PID0 HEATING: Maximum Temperature setpoint that the HVAC module will accept for this PID filter, temperature setpoint is programmed in System Value Format. Default=255
271
10F
PID0 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
272
110
PID0 HEATING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in System Value Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
273
111
PID0 HEATING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
274
112
PID0 HEATING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
275
113
PID0 Reserved for future extension
276
114
PID0 Reserved for future extension
277
115
PID0 Reserved for future extension
278
116
PID0 Reserved for future extension
279
117
PID0 Reserved for future extension
280
118
PID0 COOLING: Temperature Sensor (0-5) linked to this PID routine
281
119
PID0 COOLING: Output (0-2) linked to this PID routine
282
11A
PID0 COOLING: PID P (MSB) Parameter (Kp)
283
11B
PID0 COOLING: PID P (LSB) Parameter (Kp)
284
11C
PID0 COOLING: PID I (MSB) Parameter (Ki)
285
11D
PID0 COOLING: PID I (LSB) Parameter (Ki)
286
11E
PID0 COOLING: PID D (MSB) Parameter (Kd)
287
11F
PID0 COOLING: PID D (LSB) Parameter (Kd)
288
120
PID0 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated
289
121
PID0 COOLING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
290
122
PID0 COOLING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
291
123
PID0 COOLING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
292
124
PID0 COOLING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
293
125
PID0 COOLING: Time (x40ms) between each PID execution (Default ?)
294
126
PID0 COOLING: Minimum Temperature setpoint that the HVAC module will accept for this PID filter, temperature setpoint is programmed in System Value Format. Default=0
295
127
PID0 COOLING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
296
128
PID0 COOLING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in System Value Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
297
129
PID0 COOLING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
298
12A
PID0 COOLING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
299
12B
PID0 Reserved for future extension
300
12C
PID0 Reserved for future extension
301
12D
PID0 Reserved for future extension
302
12E
PID0 Reserved for future extension
303
12F
PID0 Reserved for future extension
304
130
PID1 HEATING: Temperature Sensor (0-5) linked to this PID routine
305
131
PID1 HEATING: Output (0-2) linked to this PID routine
306
132
PID1 HEATING: PID P (MSB) Parameter (Kp)
307
133
PID1 HEATING: PID P (LSB) Parameter (Kp)
308
134
PID1 HEATING: PID I (MSB) Parameter (Ki)
309
135
PID1 HEATING: PID I (LSB) Parameter (Ki)
310
136
PID1 HEATING: PID D (MSB) Parameter (Kd)
311
137
PID1 HEATING: PID D (LSB) Parameter (Kd)
312
138
PID1 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated
313
139
PID1 HEATING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
314
13A
PID1 HEATING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
315
13B
PID1 HEATING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
316
13C
PID1 HEATING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
317
13D
PID1 HEATING: Time (x40ms) between each PID execution (Default ?)
318
13E
PID1 HEATING: Maximum Temperature setpoint that the HVAC module will accept for this PID filter, temperature setpoint is programmed in System Value Format. Default=255
319
13F
PID1 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
320
140
PID1 HEATING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in System Value Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
321
141
PID1 HEATING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
322
142
PID1 HEATING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
323
143
PID1 Reserved for future extension
324
144
PID1 Reserved for future extension
325
145
PID1 Reserved for future extension
326
146
PID1 Reserved for future extension
327
147
PID1 Reserved for future extension
328
148
PID1 COOLING: Temperature Sensor (0-5) linked to this PID routine
329
149
PID1 COOLING: Output (0-2) linked to this PID routine
330
14A
PID1 COOLING: PID P (MSB) Parameter (Kp)
331
14B
PID1 COOLING: PID P (LSB) Parameter (Kp)
332
14C
PID1 COOLING: PID I (MSB) Parameter (Ki)
333
14D
PID1 COOLING: PID I (LSB) Parameter (Ki)
334
14E
PID1 COOLING: PID D (MSB) Parameter (Kd)
335
14F
PID1 COOLING: PID D (LSB) Parameter (Kd)
336
150
PID1 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated
337
151
PID1 COOLING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
338
152
PID1 COOLING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
339
153
PID1 COOLING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
340
154
PID1 COOLING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
341
155
PID1 COOLING: Time (x40ms) between each PID execution (Default ?)
342
156
PID1 COOLING: Minimum Temperature setpoint that the HVAC module will accept for this PID filter, temperature setpoint is programmed in System Value Format. Default=0
343
157
PID1 COOLING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
344
158
PID1 COOLING: Temperature setpoint when the HVAC module is in Failsafe, temperature setpoint is programmed in System Value Format. When value==0 or ==255 then default value of 21.0°C (System value 106) will be loaded.
345
159
PID0 COOLING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
346
15A
PID0 COOLING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
347
15B
PID1 Reserved for future extension
348
15C
PID1 Reserved for future extension
349
15D
PID1 Reserved for future extension
350
15E
PID1 Reserved for future extension
351
15F
PID1 Reserved for future extension
352
160
PIDx: Reserved for additional PID filters
...
...
...

Configuration HVAC module

Command line Interface (CLI)

The Brain(+) has a command line interface that interacts directly with the Master processor of the Brain(+). Since the HVAC module communicates directly with the Master processor, it's a good practice to test functionality on this layer before integrating on a higher layer (graphical interface, cloud and others).

The Master processor has a CLI (Command Line Interface) with about 160 different instructions. Details regarding the CLI instruction set can be found here: CLI Reference Guide AIO and AIO Tips & tricks during installation and troubleshooting

In the portal, maintenance mode can be opened (or an UART cable can be used to directly connect to the Brain(+)).

Debug information will also appear on the HVAC module. This information can be seen by connecting an UART cable on the HVAC module (115200 baud).

Connecting the HVAC module

Connecting the HVAC module is easy:

  • Connect an UTP between the Brain(+) and the HVAC module to have the RS485 bus connected. Make sure to insert the termination plug on the first and the last module on the bus.
  • Connect the necessary NTC temperature sensors
  • Connect 230VAC on the HVAC module: The HVAC module doesn't use the power of the RS485 bus but uses its own power supply in case of Brain and/or bus power problem so fail safe can still happen on the HVAC module

Discovery of the HVAC module

Discovery of a new HVAC modules happens fully automatic and no manual actions are needed. In the below example, we plugged a new Input, CAN Control and HVAC module. As you can see below on the CLI output, the 3 modules have been added just after power on of the Brain:

----------Hardware Check------------
FRAM found
EEPROM found (255)
**I2C2 failed, address=152 i2cMode=4**
**DAC5574 not found**
Brain detected
AT24C02 found
MCP7940 RTC found
 -> Clock is running
PCA9534_1 found
PCA9539_1 found
PCA9539_2 found
LM75 found
Std (125kbps) CAN settings used
CAN speed is set at 125kbps
Search started
New Sensor module found: 084.001.126.000
New Input module (I) found: 073.017.243.000
New Can Control module found: 067.051.255.000
New Output module (O) found: 079.001.126.000
Search done

As you can see, 2 modules have the same ID2, ID3 & ID4 (These are the modules generated by the HVAC module). Performing the CLI instruction "error list" or "el" will give following result:

el
--- Total Uptime: 000442 Hours, Last Startup: 17:12:59 31/12/21   ---
--- Module Type: BRAIN, RS485 mode: 0, Board: 29'C  --.--V --.--A ---
--- PWR RS485/CAN: 1/1, CANTERM: 1, BB Debug: 255, Fw: 1.0.120       ---
-------Output------------ID---------Err-------Status--------Pwr---
 00 (l I 000->007) 108.000.000.000 00000   GOOD       (000)  1
 01 (O H 008->015) 079.001.126.000 00000   GOOD       (000)  0
-------Input-------------ID---------Err-------Status--------Pwr---
 00 (i I 000->007) 105.000.000.000 00000   GOOD       (000)  1
 01 (I E 008->015) 073.017.243.000 00000   GOOD       (016)  1
-------Sensor------------ID---------Err-------Status--------Pwr---
 00 (T H 000->007) 084.001.126.000 00000   GOOD       (080)  0
-------CAN Control-------ID---------Err-------Status--------Pwr---
 00 (C E 000->000) 067.051.255.000 00000   GOOD       (016)  1
OK

The 2 modules with "H" in the third column are the modules generated by the HVAC module:

  • 1 output module with ID79.1.126.0: The relays in the HVAC module are linked with this module
  • 1 Sensor module with ID84.1.126.0: The sensors of the HVAC module:
    • Sensor 0-5: External connected NTC's
    • Sensor 6: Not used
    • Sensor 7: Board sensor (Temperature and humidity)

The temperature list can be seen by using following CLI instruction:

sensor list
-Sensor---Temp (Offset)---Hum------Bright---CO2------VOC-----Dali--Setpoint--Th Mode--Name-----------
000 (T)  +22.0'C (+00)     NC       NC      NC       NC     255(0)   NC      000
001 (T)  +23.0'C (+00)     NC       NC      NC       NC     255(0)   NC      000
002 (T)  +23.0'C (+00)     NC       NC      NC       NC     255(0)   NC      000
003 (T)  +22.5'C (+00)     NC       NC      NC       NC     255(0)   NC      000
004 (T)  +22.5'C (+00)     NC       NC      NC       NC     255(0)   NC      000
005 (T)  +22.0'C (+00)     NC       NC      NC       NC     255(0)   NC      000
006 (T)    NC    (+00)     NC       NC      NC       NC     255(0)   NC      000
007 (T)  +27.0'C (+00)    039%      NC      NC       NC     255(0)   NC      000
OK

Configuring the HVAC module

The HVAC module has an onboard eeprom that contains all the configuration parameters. In the beginning of this page, you can find the memory model with all configuration bytes. We'll explain the use of these bytes in the following section.

Configuring the sensor parameters

As you can see in the Eeprom Memory Model, only 2 bytes are used to configure the sensors:

  • Byte 250: On the HVAC module, an UART cable can be connected on which debug information can be displayed. Also, after each temperature measurement of all sensors, a debug line will be printed on the UART console when Byte 250 is put at 0.
  • Byte 251: This byte will program the speed of sensor measurement, each unit is 40ms. Standard non programmed value in eeprom is 255 which means 255x40ms=+/-10s so every 10 seconds a measurement of all sensors is executed.

To have good PID results, a measurement of the sensors every 10 seconds is too slow, a measurement of 1 second should be much better so the value in eeprom should be put at 25. To accomplish this, we need to program this value in the eeprom of the remote HVAC module. To do so, we use the CLI instruction "eeprom write" followed by the 4 ID's of the module (can be the HVAC output or sensor module ID's), followed by the eeprom address and then the byte to be programmed.

eeprom write 79 1 126 0 251 25
OK

To display the temperature measurement on the UART of the HVAC module, use following CLI instruction:

eeprom write 79 1 126 0 250 1
OK

On the UART console of the HVAC module, you now get a temperature measurement every second:

0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+19.5 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+19.5 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+19.5 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+19.5 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+19.5 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+20.0 7:+24.0
0:+19.5 1:+20.5 2:+21.0 3:+20.5 4:+20.5 5:+19.5 7:+24.0

Temperature 0-5 are the external connected NTC's, sensor 7 is the onboard sensor. This onboard sensor cannot be used in the PID filters.

Configuring the PID parameters

Background PID parameters

The PID parameters are programmed in the eeprom of HVAC module. Programming happens by using the CLI instruction "eeprom write" as explained in the previous section.

Each PID filter (PID0, PID1 etc) has a double set of PID parameters, 1 set for Cooling and 1 set for Heating. Switching between cooling and heating happens by changing an eeprom value (see Eeprom byte 252..255). Cooling and Heating can have different behaviour hence the different set of parameters.

Explanation of the parameters:

  • Each Sensor has a setpoint. When for example sensor 4 is linked to PID1, setpoint 4 is used for this PID. The Temperature Sensor linking parameter (Eeprom byte 256, 280, 304 etc)
  • The main application passes the error to the filter via the pid_Error variable (16bits, two's complement). The error is calculated by deducting the setpoint with the actual temperature:
    • Heating: Pid_error= Setpoint - Actual temperature
    • Cooling: Pid_error= Actual temperature - setpoint
  • The three gains are set in Eeprom via Kp, Ki and Kd. These are all 16bit variables representing the gain of each term in 1/256 parts. One LSB is 0.00390625 so to set the integral gain to 5.5 Ki should be set to 1408. ( 1408 * 0.00390625 = 5.5 )
  • The integrator has a time constant that is set thru the Ti variable. The Ti tells the PID-filter how often the I-term should be updated. If Ti is set to 10 then I-term is calculated every 10 times that the filter is called. This is sometimes refered to as 'reset-time'.
  • The I_Clamp is a 16bit variable that is used to prevent wind-up of the integrator. If a large error is present for an extended time period the I-term can grow too big. The I_clamp clamps the I-term to whatever value the variable is set to.
  • The Out_Clamp variable is a 16-bit variable that is used to clamp the final output of the PID-filter to a set-able value.
  • The filter responds with the calculated drive (P+I+D) in the pid_Out variable.
  • The pid_out variable is linked to the programmed output for that pid filter (Eeprom byte 257, 281, 305 etc) in other words, when the pid_out grows, the 0-10V output will increase.

If you look at the eeprom table, you'll see that some of the parameters are split in MSB and LSB:

  • MSB: Most Significant Byte
  • LSB: Least Significant Byte

Example: We want to program Pid_out to 500:

  • In the LSB, a value from 0-255 is represented
  • In the MSB, a value of MSB*256 is represented
  • So the MSB will have 1 as value -> 1*256=256
  • The LSB will have 500-256=244 as value
    • MSB=1
    • LSB=244

Programming PID Filter

Let's start configuring a PID filter:

  • Step 1: First we need to know if we're going to program a Heating or cooling PID filter. In our example we're going to program filter 1 in heating so we need to look at Eeprom byte 304-319(DEC) -> See eeprom table at the beginning of this document. So let's program PID filter 1 in Heating:
eeprom write 79 1 126 0 253 1

For PID0 and PID1, please use different temperature sensors. For the same PID, the same sensor can be used for heating and cooling.

  • Step 2: Let's start with linking the temperature sensor (we're going to sensor 5 so program 5 in byte 304)
eeprom write 79 1 126 0 304 5
  • Step 3: Let's now program the output (we're going to use output 2)
eeprom write 79 1 126 0 305 2

Every time you make an eeprom write in an eeprom filter space, you'll see the feedback of the programming on the UART console of the HVAC module:

-----------------PID1 H CONFIG---------------------------------
 Kp=1792 Ki=128 Kd=256 Ti=255 I_Clamp=100 Out_Clamp=255 Min_Max_Setpt=1: --.-
 PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
---------------------------------------------------------------

You can see that Sensor 5 and Output 2 are programmed, pid debug and pid filter are disabled.

  • Step 4: Let's now program the PID parameters
    • Kp=4 -> MSB=4 (256*4), LSB=0 -> Kp=1024
    • Ki=1,5 -> MSB=1 (256*1), LSB=128 (0,5=0.00390625*128) -> Ki=384
    • Kd=2 -> MSB=2 (256*2), LSB=0 -> Kd=512
eeprom write 79 1 126 0 306 4
OK
eeprom write 79 1 126 0 307 0
OK
eeprom write 79 1 126 0 308 1
OK
eeprom write 79 1 126 0 309 128
OK
eeprom write 79 1 126 0 310 2
OK
eeprom write 79 1 126 0 311 0
OK

On the HVAC UART console, we get this:

-----------------PID1 H CONFIG---------------------------------
 Kp=1024 Ki=384 Kd=512 Ti=255 I_Clamp=100 Out_Clamp=255 Min_Max_Setpt=1: --.-
 PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
---------------------------------------------------------------

We see the correct PID parameters.

  • Step 5: Let's write 6 in the Ti parameter (How often the I filter needs to be executed before being updated)
eeprom write 79 1 126 0 312 6

Result on the HVAC UART Console:

-----------------PID1 H CONFIG---------------------------------
 Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=100 Out_Clamp=255 Min_Max_Setpt=1: --.-
 PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
---------------------------------------------------------------
  • Step 6: Let's now write the clamping values of the I filter (to avoid windup) and the Out value (P+I+D). MSB and LSB values needs to be written. I clamping will be set at 80 and Out value at 255.
eeprom write 79 1 126 0 313 0
OK
eeprom write 79 1 126 0 314 80
OK
eeprom write 79 1 126 0 315 0
OK
eeprom write 79 1 126 0 316 255
OK

Result on the HVAC UART Console:

-----------------PID1 H CONFIG---------------------------------
 Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt=1: --.-
 PID_Time=255 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
--------------------------------------------------------------- 
  • Step 7: Let's now set the PID execution time. This is the time between 2 execution runs of this PID filter. Since you also have the sensor timing (the time between 2 measurements of all sensors - see Eeprom byte 251), we need the measurement of the sensors to be faster then the execution of the PID filter so make sure the PID execution time is higher then Eeprom byte 251:
eeprom write 79 1 126 0 317 27
  • Step 8: Let's now program the Maximum setpoint this PID filter (in Heating) will accept. This setpoint is written in System Value format. We want to write 62°C so in system value this is equal to 188:
eeprom write 79 1 126 0 318 188

Result on the HVAC UART Console:

-----------------PID1 H CONFIG---------------------------------
 Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt=1:+62.0
 PID_Time=27 Sensor_Time=25 Sensor=5 Output=2 pid_debug=0 pid_enabled=0
---------------------------------------------------------------
  • Step 9: In this step, we will program the FailSafe temperature (in System Value format). This is the setpoint that is automatically loaded at startup or the setpoint temperature that is used when the module goes in Failsafe mode. Please note that this temperature will still be checked against the Min/Max Temperature Setpoint that is programmed and that the Min/Max will always prevail. As an example, we will put 25°C (=114 -> System Value) as Failsafe temperature:
eeprom write 79 1 126 0 320 114

Testing the PID filter

To see what's happening, you have 2 possibilities:

  • Enable debugging on the HVAC module itself (UART-TTL cable must be connected on the HVAC module)
  • Enable debugging on the Brain(+): PID parameters will be displayed on the CLI console of the Brain(+)

Testing the PID filter via the HVAC UART output

To test the PID filter, we will enable the debugging of the live PID calculations and Enable the PID filter:

eeprom write 79 1 126 0 319 2

You will get following info on the HVAC UART console:

* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=-16 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+24.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-8 P=-32 I=+0 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=+0 D=+2 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-11 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-21 D=+0 OUT(2)=+0 *
* PID(1)H Setpt(5)=+20.0 Temp(5)=+23.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=-7 P=-28 I=-21 D=+0 OUT(2)=+0 *

On the console of the Brain(+), you can change setpoint:

thermostat setpoint write 5 60.5

This will result in the output switching on very fast which you can see on the HVAC UART console:

* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+76 P=+304 I=-80 D=+162 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+76 P=+304 I=-80 D=+0 OUT(2)=+224 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=-80 D=+2 OUT(2)=+230 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.5  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+76 P=+304 I=-80 D=-2 OUT(2)=+222 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+2 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+14 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *
* PID(1)H Setpt(5)=+60.5 Temp(5)=+22.0  Kp=1024 Ki=384 Kd=512 Ti=6 I_Clamp=80 Out_Clamp=255 Min_Max_Setpt(1)=+62.0 -> ERR=+77 P=+308 I=+80 D=+0 OUT(2)=+255 *

To see an overview of the programmed thermostat setpoints, you can use the below instruction on the Brain's console:

sensor list

This will give following results:

-Sensor---Temp (Offset)---Hum------Bright---CO2------VOC-----Dali--Setpoint--Th Mode--Name-----------
000 (T)  +19.5'C (+00)     NC       NC      NC       NC     255(0) +65.0'C   ---
001 (T)  +20.0'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   ---
002 (T)  +19.5'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   ---
003 (T)  +19.5'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   ---
004 (T)  +19.5'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   ---
005 (T)  +20.0'C (+00)     NC       NC      NC       NC     255(0) +60.5'C   ---
006 (T)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   ---
007 (T)  +24.0'C (+00)    031%      NC      NC       NC     255(0) -32.0'C   ---
OK

Testing the PID filter via the Brain(+) CLI console

When your installation has Master Firmware V1.0.135 (or higher) and HVAC firmware V6.0.10 (or higher), the calculated PID parameters of the HVAC module can also be displayed on the CLI console. To enable debugging, use following instruction:

pid debug on

When a PID filter is enabled (when disabled, nothing will be displayed) on 1 of the connected HVAC modules, following will appear on the console (example):

17:51:15 084.075.215.000 pid:0 En:1(H) sensor:19.0(3) setpt:22.5 Err:7 P:49 I:0 D:0 Drive=49 Out=49(0)

Explanation:

  • 17:51:15 -> Time
  • 084.075.215.000 -> ID of the HVAC module (important when more then 1 HVAC module is connected)
  • pid:0 -> PID 0 of the HVAC module is used
  • En:1(H) -> Module is enabled (=1) and PÏD filter is in Heating(H) mode. Cooling(C) is also possible
  • sensor:19:0(3) -> Sensor is measuring 19.0 degree celsius en Sensor (3) of this HVAC module is used for this PID filter
  • sept:22.5 -> The thermostat setpoint is now set at 22.5 degree Celsius
  • Err: 7 -> The calculated PID error is 7
  • P:49 -> The calculated P result is 49
  • I:0 -> The calculated I result is 0
  • D:0 -> The calculated D result is 0
  • Drive=49 -> The calculated PID drive (P+I+D) is 49
  • Out=49(0) -> Analog output (0) will be driven with value 49 (0-255)

When the display rate of the debug information is not high enough, the sampling frequency of the HVAC module can be increased by using eeprom memory location 0/4. For example, increase the speed to display every 8 seconds the PID information:

eeprom write 0 4 10
eeprom activate

Testing the HVAC Relays

The HVAC module has 6 built-in relays that can be controlled by the Master processor. All below instruction are performed on the Brain(+) CLI (directly or via Maintenance mode).

First perform an "error list" or "el":

el
--- Total Uptime: 000495 Hours, Last Startup: 17:04:19 09/01/22   ---
--- Module Type: BRAIN, RS485 mode: 0, Board: 28'C  --.--V --.--A ---
--- PWR RS485/CAN: 1/1, CANTERM: 1, BB Debug: 255, Fw: 1.0.121       ---
-------Output------------ID---------Err-------Status--------Pwr---
 00 (l I 000->007) 108.000.000.000 00000   GOOD       (000)  1
 01 (O H 008->015) 079.001.126.000 00000   GOOD       (000)  0
 02 (O E 016->023) 079.250.088.000 00047   GOOD       (000)  1
-------Input-------------ID---------Err-------Status--------Pwr---
 00 (i I 000->007) 105.000.000.000 00000   GOOD       (000)  1
 01 (I E 008->015) 073.017.243.000 00000   GOOD       (016)  1
-------Sensor------------ID---------Err-------Status--------Pwr---
 00 (T H 000->007) 084.001.126.000 00000   GOOD       (016)  0
-------CAN Control-------ID---------Err-------Status--------Pwr---
 00 (C E 000->000) 067.051.255.000 00000   GOOD       (016)  1
OK

You see 3 outputs modules of following type

  • "l" -> Open Collector
  • "O" -> Output Relay module

Following subtypes can be found:

  • "I" -> Internal module. The Open Collector outputs are built-in in the Brain.
  • "H" -> HVAC module, external module.
  • "E" -> External OpenMotics Module. In this case, it's an external Output module.

You also see which outputs are linked to this module. For example, the HVAC module has output 8->15 linked so if we need to trigger one of the outputs of the HVAC module, we need to use this range.

For the HVAC module, only the first 6 outputs are used so in this example, output 8-13 are used.

Switching Output 8 ON:

on 8

Switching Output 8 OFF:

off 8

Overview of the outputs that are ON can be performed by instruction "output status on" or "oso":

oso
**Nr of Outputs ON: 004 (O-000/L-004)**
-Output-Dim-Timer--Type----Name---------
009 (O) 255 65535 ( off )
010 (O) 255 65535 ( off )
016 (O) 255 65535 ( off )
021 (O) 255 65535 ( off )
OK

Using the HVAC module via CLI

Displaying PID information

With the below instruction, you can switch on the PID debugging of the HVAC module.

pid debug on

When this instruction is enabled, the pid calculations happening on the HVAC module will be displayed on the CLI console

Setting the PID temperature setpoint and mode

With the instruction "thermostat setpoint write", the PID setpoint as well as the thermostat mode can be set. Mode:

  • Mode.BIT0=0: Thermostat is in Cooling mode
  • Mode.BIT0=1: Thermostat is in Heating mode

Let's put thermostat 8 at 25.0°C and in Heating mode:

thermostat setpoint write 8 25.0 1

To check the thermostat value and mode, using

sensor list
-Sensor---Temp (Offset)---Hum------Bright---CO2------VOC-----Dali--Setpoint--Th Mode--Name-----------
000 (s)  +21.0'C (+00)    054%      NC      NC       NC     255(0) -29.5'C   000
001 (s)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
002 (s)    NC    (+00)     NC       NC      NC       NC     255(0) +22.0'C   000
003 (s)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
004 (s)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
005 (s)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
006 (s)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
007 (s)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
008 (T)  +20.0'C (+00)     NC       NC      NC       NC     255(0) +25.0'C   000
009 (T)  +20.5'C (+00)     NC       NC      NC       NC     255(0) +22.0'C   001
010 (T)  +20.5'C (+00)     NC       NC      NC       NC     255(0) -31.5'C   000
011 (T)  +20.5'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
012 (T)  +20.0'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
013 (T)  +20.0'C (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
014 (T)    NC    (+00)     NC       NC      NC       NC     255(0) -32.0'C   000
015 (T)  +23.0'C (+00)    045%      NC      NC       NC     255(0) -32.0'C   000
OK