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

From OpenMotics
Jump to navigation Jump to search
(79 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
The Firmware release notes can be found here: [[HP Module Release Notes]]
 
The Firmware release notes can be found here: [[HP Module Release Notes]]
 
== Eeprom Memory Model ==
 
== 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.
  
 
{| class="wikitable" width="60%"
 
{| class="wikitable" width="60%"
Line 37: Line 39:
 
!<div align="center">4</div>
 
!<div align="center">4</div>
 
|Output Module ID3
 
|Output Module ID3
 +
|-
 +
!<div align="center">5</div>
 +
!<div align="center">5</div>
 +
|Dim Module ID_NE (Module is New "N" or Existing "E")
 +
|-
 +
!<div align="center">6</div>
 +
!<div align="center">6</div>
 +
|Dim Module ID0
 +
|-
 +
!<div align="center">7</div>
 +
!<div align="center">7</div>
 +
|Dim Module ID1
 +
|-
 +
!<div align="center">8</div>
 +
!<div align="center">8</div>
 +
|Dim Module ID2
 +
|-
 +
!<div align="center">9</div>
 +
!<div align="center">9</div>
 +
|Dim Module ID3
 
|-
 
|-
 
!<div align="center">20</div>
 
!<div align="center">20</div>
Line 81: Line 103:
 
!<div align="center">4B</div>
 
!<div align="center">4B</div>
 
|Bootloader Timeout value
 
|Bootloader Timeout value
 +
|-
 +
!<div align="center">80</div>
 +
!<div align="center">50</div>
 +
|Last received Temperature setpoint 0 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">81</div>
 +
!<div align="center">51</div>
 +
|Last received Temperature setpoint 1 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">82</div>
 +
!<div align="center">52</div>
 +
|Last received Temperature setpoint 2 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">83</div>
 +
!<div align="center">53</div>
 +
|Last received Temperature setpoint 3 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">84</div>
 +
!<div align="center">54</div>
 +
|Last received Temperature setpoint 4 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">85</div>
 +
!<div align="center">55</div>
 +
|Last received Temperature setpoint 5 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">86</div>
 +
!<div align="center">56</div>
 +
|Last received Temperature setpoint 6 from Master, when this setpoint changes, this eeprom location will be updated
 +
|-
 +
!<div align="center">87</div>
 +
!<div align="center">57</div>
 +
|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">91</div>
 
!<div align="center">5B</div>
 
!<div align="center">5B</div>
|Sensor debugging via local UART disabled (==255) or enabled (!=255)
+
|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">92</div>
 
!<div align="center">5C</div>
 
!<div align="center">5C</div>
|Sensor Refresh rate: Time (x40ms) between each cycle of sensors reading (Default 255x40ms=+/-10s)
+
|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">93</div>
 
!<div align="center">5D</div>
 
!<div align="center">5D</div>
|PID0 in Heating (!=0) or Cooling (==0)
+
|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">94</div>
 
!<div align="center">5E</div>
 
!<div align="center">5E</div>
|PID1 in Heating (!=0) or Cooling (==0)
+
|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">95</div>
 
!<div align="center">5F</div>
 
!<div align="center">5F</div>
|Reserved for PID2
+
|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">F0</div>
 +
|Eeprom Protected Area: Production Year (DEC 0-99)
 +
|-
 +
!<div align="center">241</div>
 +
!<div align="center">F1</div>
 +
|Eeprom Protected Area: Production Month (DEC 1-12)
 +
|-
 +
!<div align="center">242</div>
 +
!<div align="center">F2</div>
 +
|Eeprom Protected Area: Production Day (DEC 1-31)
 +
|-
 +
!<div align="center">243</div>
 +
!<div align="center">F3</div>
 +
|Eeprom Protected Area: Production Company (DEC 0-9)
 +
|-
 +
!<div align="center">244</div>
 +
!<div align="center">F4</div>
 +
|Eeprom Protected Area: Serial Number MSB
 +
|-
 +
!<div align="center">245</div>
 +
!<div align="center">F5</div>
 +
|Eeprom Protected Area: Serial number LSB
 +
|-
 +
!<div align="center">246</div>
 +
!<div align="center">F6</div>
 +
|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">FA</div>
 +
|Sensor debugging via local UART (on the HVAC module itself) disabled (==255) or enabled (!=255)
 +
|-
 +
!<div align="center">251</div>
 +
!<div align="center">FB</div>
 +
|Sensor Refresh rate: Time (x40ms) between each cycle of sensors reading (Default 255x40ms=+/-10s)
 
|-
 
|-
!<div align="center">96</div>
+
!<div align="center">252</div>
!<div align="center">60</div>
+
!<div align="center">FC</div>
|PID0 HEATING: Temperature Sensor (0-5) linked to this PID routine
+
|PID0 in Heating (!=0) or Cooling (==0)
 
|-
 
|-
!<div align="center">97</div>
+
!<div align="center">253</div>
!<div align="center">61</div>
+
!<div align="center">FD</div>
|PID0 HEATING: Output (0-2) linked to this PID routine
+
|PID1 in Heating (!=0) or Cooling (==0)
 
|-
 
|-
!<div align="center">98</div>
+
!<div align="center">254</div>
!<div align="center">62</div>
+
!<div align="center">FE</div>
|PID0 HEATING: PID P (MSB) Parameter
+
|Reserved for PID2
 
|-
 
|-
!<div align="center">99</div>
+
!<div align="center">255</div>
!<div align="center">63</div>
+
!<div align="center">FF</div>
|PID0 HEATING: PID P (LSB) Parameter
+
|Reserved for PID3
 
|-
 
|-
 +
!<div align="center">256</div>
 
!<div align="center">100</div>
 
!<div align="center">100</div>
!<div align="center">64</div>
+
|PID0 HEATING & COOLING: Temperature Sensor (0-5) linked to this PID routine
|PID0 HEATING: PID I (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">257</div>
 
!<div align="center">101</div>
 
!<div align="center">101</div>
!<div align="center">65</div>
+
|PID0 HEATING & COOLING: Output (0-2) linked to this PID routine
|PID0 HEATING: PID I (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">258</div>
 
!<div align="center">102</div>
 
!<div align="center">102</div>
!<div align="center">66</div>
+
|PID0 HEATING: PID P (MSB) Parameter (Kp)
|PID0 HEATING: PID D (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">259</div>
 
!<div align="center">103</div>
 
!<div align="center">103</div>
!<div align="center">67</div>
+
|PID0 HEATING: PID P (LSB) Parameter (Kp)
|PID0 HEATING: PID D (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">260</div>
 
!<div align="center">104</div>
 
!<div align="center">104</div>
!<div align="center">68</div>
+
|PID0 HEATING: PID I (MSB) Parameter (Ki)
|PID0 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated
 
 
|-
 
|-
 +
!<div align="center">261</div>
 
!<div align="center">105</div>
 
!<div align="center">105</div>
!<div align="center">69</div>
+
|PID0 HEATING: PID I (LSB) Parameter (Ki)
|PID0 HEATING: PID I Clamp (MSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">262</div>
 
!<div align="center">106</div>
 
!<div align="center">106</div>
!<div align="center">6A</div>
+
|PID0 HEATING: PID D (MSB) Parameter (Kd)
|PID0 HEATING: PID I Clamp (LSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">263</div>
 
!<div align="center">107</div>
 
!<div align="center">107</div>
!<div align="center">6B</div>
+
|PID0 HEATING: PID D (LSB) Parameter (Kd)
|PID0 HEATING: PID OUT Clamp (MSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">264</div>
 
!<div align="center">108</div>
 
!<div align="center">108</div>
!<div align="center">6C</div>
+
|PID0 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated
|PID0 HEATING: PID OUT Clamp (LSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">265</div>
 
!<div align="center">109</div>
 
!<div align="center">109</div>
!<div align="center">6D</div>
+
|PID0 HEATING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
 +
|-
 +
!<div align="center">266</div>
 +
!<div align="center">10A</div>
 +
|PID0 HEATING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
 +
|-
 +
!<div align="center">267</div>
 +
!<div align="center">10B</div>
 +
|PID0 HEATING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
 +
|-
 +
!<div align="center">268</div>
 +
!<div align="center">10C</div>
 +
|PID0 HEATING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
 +
|-
 +
!<div align="center">269</div>
 +
!<div align="center">10D</div>
 
|PID0 HEATING: Time (x40ms) between each PID execution (Default ?)
 
|PID0 HEATING: Time (x40ms) between each PID execution (Default ?)
 
|-
 
|-
 +
!<div align="center">270</div>
 +
!<div align="center">10E</div>
 +
|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
 +
|-
 +
!<div align="center">271</div>
 +
!<div align="center">10F</div>
 +
|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">110</div>
 
!<div align="center">110</div>
!<div align="center">6E</div>
+
|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.
|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
 
 
|-
 
|-
 +
!<div align="center">273</div>
 
!<div align="center">111</div>
 
!<div align="center">111</div>
!<div align="center">6F</div>
+
|PID0 HEATING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
|PID0 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
 
|-
 
|-
 +
!<div align="center">274</div>
 
!<div align="center">112</div>
 
!<div align="center">112</div>
!<div align="center">70</div>
+
|PID0 HEATING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
|PID0 COOLING: Temperature Sensor (0-5) linked to this PID routine
 
 
|-
 
|-
 +
!<div align="center">275</div>
 
!<div align="center">113</div>
 
!<div align="center">113</div>
!<div align="center">71</div>
+
|PID0 Reserved for future extension
|PID0 COOLING: Output (0-2) linked to this PID routine
 
 
|-
 
|-
 +
!<div align="center">276</div>
 
!<div align="center">114</div>
 
!<div align="center">114</div>
!<div align="center">72</div>
+
|PID0 Reserved for future extension
|PID0 COOLING: PID P (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">277</div>
 
!<div align="center">115</div>
 
!<div align="center">115</div>
!<div align="center">73</div>
+
|PID0 Reserved for future extension
|PID0 COOLING: PID P (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">278</div>
 
!<div align="center">116</div>
 
!<div align="center">116</div>
!<div align="center">74</div>
+
|PID0 Reserved for future extension
|PID0 COOLING: PID I (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">279</div>
 
!<div align="center">117</div>
 
!<div align="center">117</div>
!<div align="center">75</div>
+
|PID0 Reserved for future extension
|PID0 COOLING: PID I (LSB) Parameter
 
 
|-
 
|-
 +
 +
 +
!<div align="center">280</div>
 
!<div align="center">118</div>
 
!<div align="center">118</div>
!<div align="center">76</div>
+
|PID0 COOLING: Reserved for future extension
|PID0 COOLING: PID D (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">281</div>
 
!<div align="center">119</div>
 
!<div align="center">119</div>
!<div align="center">77</div>
+
|PID0 COOLING: Reserved for future extension
|PID0 COOLING: PID D (LSB) Parameter
+
|-
 +
!<div align="center">282</div>
 +
!<div align="center">11A</div>
 +
|PID0 COOLING: PID P (MSB) Parameter (Kp)
 +
|-
 +
!<div align="center">283</div>
 +
!<div align="center">11B</div>
 +
|PID0 COOLING: PID P (LSB) Parameter (Kp)
 +
|-
 +
!<div align="center">284</div>
 +
!<div align="center">11C</div>
 +
|PID0 COOLING: PID I (MSB) Parameter (Ki)
 +
|-
 +
!<div align="center">285</div>
 +
!<div align="center">11D</div>
 +
|PID0 COOLING: PID I (LSB) Parameter (Ki)
 +
|-
 +
!<div align="center">286</div>
 +
!<div align="center">11E</div>
 +
|PID0 COOLING: PID D (MSB) Parameter (Kd)
 +
|-
 +
!<div align="center">287</div>
 +
!<div align="center">11F</div>
 +
|PID0 COOLING: PID D (LSB) Parameter (Kd)
 
|-
 
|-
 +
!<div align="center">288</div>
 
!<div align="center">120</div>
 
!<div align="center">120</div>
!<div align="center">78</div>
 
 
|PID0 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated
 
|PID0 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated
 
|-
 
|-
 +
!<div align="center">289</div>
 
!<div align="center">121</div>
 
!<div align="center">121</div>
!<div align="center">79</div>
+
|PID0 COOLING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
|PID0 COOLING: PID I Clamp (MSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">290</div>
 
!<div align="center">122</div>
 
!<div align="center">122</div>
!<div align="center">7A</div>
+
|PID0 COOLING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
|PID0 COOLING: PID I Clamp (LSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">291</div>
 
!<div align="center">123</div>
 
!<div align="center">123</div>
!<div align="center">7B</div>
+
|PID0 COOLING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
|PID0 COOLING: PID OUT Clamp (MSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">292</div>
 
!<div align="center">124</div>
 
!<div align="center">124</div>
!<div align="center">7C</div>
+
|PID0 COOLING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
|PID0 COOLING: PID OUT Clamp (LSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">293</div>
 
!<div align="center">125</div>
 
!<div align="center">125</div>
!<div align="center">7D</div>
 
 
|PID0 COOLING: Time (x40ms) between each PID execution (Default ?)
 
|PID0 COOLING: Time (x40ms) between each PID execution (Default ?)
 
|-
 
|-
 +
!<div align="center">294</div>
 
!<div align="center">126</div>
 
!<div align="center">126</div>
!<div align="center">7E</div>
 
 
|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
 
|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
 
|-
 
|-
 +
!<div align="center">295</div>
 
!<div align="center">127</div>
 
!<div align="center">127</div>
!<div align="center">7F</div>
 
 
|PID0 COOLING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
|PID0 COOLING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
|-
 
|-
 +
 +
!<div align="center">296</div>
 
!<div align="center">128</div>
 
!<div align="center">128</div>
!<div align="center">80</div>
+
|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.
|PID1 HEATING: Temperature Sensor (0-5) linked to this PID routine
 
 
|-
 
|-
 +
!<div align="center">297</div>
 
!<div align="center">129</div>
 
!<div align="center">129</div>
!<div align="center">81</div>
+
|PID0 COOLING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
|PID1 HEATING: Output (0-2) linked to this PID routine
+
|-
 +
!<div align="center">298</div>
 +
!<div align="center">12A</div>
 +
|PID0 COOLING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
 +
|-
 +
!<div align="center">299</div>
 +
!<div align="center">12B</div>
 +
|PID0 Reserved for future extension
 +
|-
 +
!<div align="center">300</div>
 +
!<div align="center">12C</div>
 +
|PID0 Reserved for future extension
 +
|-
 +
!<div align="center">301</div>
 +
!<div align="center">12D</div>
 +
|PID0 Reserved for future extension
 +
|-
 +
!<div align="center">302</div>
 +
!<div align="center">12E</div>
 +
|PID0 Reserved for future extension
 +
|-
 +
!<div align="center">303</div>
 +
!<div align="center">12F</div>
 +
|PID0 Reserved for future extension
 
|-
 
|-
 +
 +
!<div align="center">304</div>
 
!<div align="center">130</div>
 
!<div align="center">130</div>
!<div align="center">82</div>
+
|PID1 HEATING & COOLING: Temperature Sensor (0-5) linked to this PID routine
|PID1 HEATING: PID P (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">305</div>
 
!<div align="center">131</div>
 
!<div align="center">131</div>
!<div align="center">83</div>
+
|PID1 HEATING & COOLING: Output (0-2) linked to this PID routine
|PID1 HEATING: PID P (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">306</div>
 
!<div align="center">132</div>
 
!<div align="center">132</div>
!<div align="center">84</div>
+
|PID1 HEATING: PID P (MSB) Parameter (Kp)
|PID1 HEATING: PID I (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">307</div>
 
!<div align="center">133</div>
 
!<div align="center">133</div>
!<div align="center">85</div>
+
|PID1 HEATING: PID P (LSB) Parameter (Kp)
|PID1 HEATING: PID I (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">308</div>
 
!<div align="center">134</div>
 
!<div align="center">134</div>
!<div align="center">86</div>
+
|PID1 HEATING: PID I (MSB) Parameter (Ki)
|PID1 HEATING: PID D (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">309</div>
 
!<div align="center">135</div>
 
!<div align="center">135</div>
!<div align="center">87</div>
+
|PID1 HEATING: PID I (LSB) Parameter (Ki)
|PID1 HEATING: PID D (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">310</div>
 
!<div align="center">136</div>
 
!<div align="center">136</div>
!<div align="center">88</div>
+
|PID1 HEATING: PID D (MSB) Parameter (Kd)
|PID1 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated
 
 
|-
 
|-
 +
!<div align="center">311</div>
 
!<div align="center">137</div>
 
!<div align="center">137</div>
!<div align="center">89</div>
+
|PID1 HEATING: PID D (LSB) Parameter (Kd)
|PID1 HEATING: PID I Clamp (MSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">312</div>
 
!<div align="center">138</div>
 
!<div align="center">138</div>
!<div align="center">8A</div>
+
|PID1 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated
|PID1 HEATING: PID I Clamp (LSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">313</div>
 
!<div align="center">139</div>
 
!<div align="center">139</div>
!<div align="center">8B</div>
+
|PID1 HEATING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
|PID1 HEATING: PID OUT Clamp (MSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">314</div>
 +
!<div align="center">13A</div>
 +
|PID1 HEATING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
 +
|-
 +
!<div align="center">315</div>
 +
!<div align="center">13B</div>
 +
|PID1 HEATING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
 +
|-
 +
!<div align="center">316</div>
 +
!<div align="center">13C</div>
 +
|PID1 HEATING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
 +
|-
 +
!<div align="center">317</div>
 +
!<div align="center">13D</div>
 +
|PID1 HEATING: Time (x40ms) between each PID execution (Default ?)
 +
|-
 +
!<div align="center">318</div>
 +
!<div align="center">13E</div>
 +
|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
 +
|-
 +
!<div align="center">319</div>
 +
!<div align="center">13F</div>
 +
|PID1 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 +
|-
 +
 +
!<div align="center">320</div>
 
!<div align="center">140</div>
 
!<div align="center">140</div>
!<div align="center">8C</div>
+
|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.
|PID1 HEATING: PID OUT Clamp (LSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">321</div>
 
!<div align="center">141</div>
 
!<div align="center">141</div>
!<div align="center">8D</div>
+
|PID1 HEATING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
|PID1 HEATING: Time (x40ms) between each PID execution (Default ?)
 
 
|-
 
|-
 +
!<div align="center">322</div>
 
!<div align="center">142</div>
 
!<div align="center">142</div>
!<div align="center">8E</div>
+
|PID1 HEATING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
|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
 
 
|-
 
|-
 +
!<div align="center">323</div>
 
!<div align="center">143</div>
 
!<div align="center">143</div>
!<div align="center">8F</div>
+
|PID1 Reserved for future extension
|PID1 HEATING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
 
|-
 
|-
 +
!<div align="center">324</div>
 
!<div align="center">144</div>
 
!<div align="center">144</div>
!<div align="center">90</div>
+
|PID1 Reserved for future extension
|PID1 COOLING: Temperature Sensor (0-5) linked to this PID routine
 
 
|-
 
|-
 +
!<div align="center">325</div>
 
!<div align="center">145</div>
 
!<div align="center">145</div>
!<div align="center">91</div>
+
|PID1 Reserved for future extension
|PID1 COOLING: Output (0-2) linked to this PID routine
 
 
|-
 
|-
 +
!<div align="center">326</div>
 
!<div align="center">146</div>
 
!<div align="center">146</div>
!<div align="center">92</div>
+
|PID1 Reserved for future extension
|PID1 COOLING: PID P (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">327</div>
 
!<div align="center">147</div>
 
!<div align="center">147</div>
!<div align="center">93</div>
+
|PID1 Reserved for future extension
|PID1 COOLING: PID P (LSB) Parameter
 
 
|-
 
|-
 +
 +
!<div align="center">328</div>
 
!<div align="center">148</div>
 
!<div align="center">148</div>
!<div align="center">94</div>
+
|PID1 COOLING: Reserved for future extension
|PID1 COOLING: PID I (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">329</div>
 
!<div align="center">149</div>
 
!<div align="center">149</div>
!<div align="center">95</div>
+
|PID1 COOLING: Reserved for future extension
|PID1 COOLING: PID I (LSB) Parameter
+
|-
 +
!<div align="center">330</div>
 +
!<div align="center">14A</div>
 +
|PID1 COOLING: PID P (MSB) Parameter (Kp)
 +
|-
 +
!<div align="center">331</div>
 +
!<div align="center">14B</div>
 +
|PID1 COOLING: PID P (LSB) Parameter (Kp)
 +
|-
 +
!<div align="center">332</div>
 +
!<div align="center">14C</div>
 +
|PID1 COOLING: PID I (MSB) Parameter (Ki)
 +
|-
 +
!<div align="center">333</div>
 +
!<div align="center">14D</div>
 +
|PID1 COOLING: PID I (LSB) Parameter (Ki)
 +
|-
 +
!<div align="center">334</div>
 +
!<div align="center">14E</div>
 +
|PID1 COOLING: PID D (MSB) Parameter (Kd)
 +
|-
 +
!<div align="center">335</div>
 +
!<div align="center">14F</div>
 +
|PID1 COOLING: PID D (LSB) Parameter (Kd)
 
|-
 
|-
 +
!<div align="center">336</div>
 
!<div align="center">150</div>
 
!<div align="center">150</div>
!<div align="center">96</div>
+
|PID1 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated
|PID1 COOLING: PID D (MSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">337</div>
 
!<div align="center">151</div>
 
!<div align="center">151</div>
!<div align="center">97</div>
+
|PID1 COOLING: PID I Clamp (MSB) -> Positive Clamp value to avoid windup
|PID1 COOLING: PID D (LSB) Parameter
 
 
|-
 
|-
 +
!<div align="center">338</div>
 
!<div align="center">152</div>
 
!<div align="center">152</div>
!<div align="center">98</div>
+
|PID1 COOLING: PID I Clamp (LSB) -> Positive Clamp value to avoid windup
|PID1 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated
 
 
|-
 
|-
 +
!<div align="center">339</div>
 
!<div align="center">153</div>
 
!<div align="center">153</div>
!<div align="center">99</div>
+
|PID1 COOLING: PID OUT Clamp (MSB) -> Positive Clamp value Output value
|PID1 COOLING: PID I Clamp (MSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">340</div>
 
!<div align="center">154</div>
 
!<div align="center">154</div>
!<div align="center">9A</div>
+
|PID1 COOLING: PID OUT Clamp (LSB) -> Positive Clamp value Output value
|PID1 COOLING: PID I Clamp (LSB) -> Clamp value to avoid windup
 
 
|-
 
|-
 +
!<div align="center">341</div>
 
!<div align="center">155</div>
 
!<div align="center">155</div>
!<div align="center">9B</div>
+
|PID1 COOLING: Time (x40ms) between each PID execution (Default ?)
|PID1 COOLING: PID OUT Clamp (MSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">342</div>
 
!<div align="center">156</div>
 
!<div align="center">156</div>
!<div align="center">9C</div>
+
|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
|PID1 COOLING: PID OUT Clamp (LSB) -> Clamp value Output value
 
 
|-
 
|-
 +
!<div align="center">343</div>
 
!<div align="center">157</div>
 
!<div align="center">157</div>
!<div align="center">9D</div>
+
|PID1 COOLING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
|PID1 COOLING: Time (x40ms) between each PID execution (Default ?)
 
 
|-
 
|-
 +
 +
!<div align="center">344</div>
 
!<div align="center">158</div>
 
!<div align="center">158</div>
!<div align="center">9E</div>
+
|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.
|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
 
 
|-
 
|-
 +
!<div align="center">345</div>
 
!<div align="center">159</div>
 
!<div align="center">159</div>
!<div align="center">9F</div>
+
|PID0 COOLING: PID I Clamp (MSB) -> Negative Clamp value to avoid windup
|PID1 COOLING: Enable (==1 without local UART debug,==2 with local UART debug)/Disable (!=1 & !=2) PID
 
|-
 
!<div align="center">160</div>
 
!<div align="center">A0</div>
 
|PIDx: Reserved for additional PID filters
 
 
|-
 
|-
!<div align="center">...</div>
+
!<div align="center">346</div>
!<div align="center">...</div>
+
!<div align="center">15A</div>
|...
+
|PID0 COOLING: PID I Clamp (LSB) -> Negative Clamp value to avoid windup
 
|-
 
|-
!<div align="center">191</div>
+
!<div align="center">347</div>
!<div align="center">BF</div>
+
!<div align="center">15B</div>
|PIDx: Reserved for additional PID filters
+
|PID1 Reserved for future extension
 
|-
 
|-
!<div align="center">240</div>
+
!<div align="center">348</div>
!<div align="center">F0</div>
+
!<div align="center">15C</div>
|Eeprom Protected Area: Production Year (DEC 0-99)
+
|PID1 Reserved for future extension
 
|-
 
|-
!<div align="center">241</div>
+
!<div align="center">349</div>
!<div align="center">F1</div>
+
!<div align="center">15D</div>
|Eeprom Protected Area: Production Month (DEC 1-12)
+
|PID1 Reserved for future extension
|-
 
!<div align="center">242</div>
 
!<div align="center">F2</div>
 
|Eeprom Protected Area: Production Day (DEC 1-31)
 
 
|-
 
|-
!<div align="center">243</div>
+
!<div align="center">350</div>
!<div align="center">F3</div>
+
!<div align="center">15E</div>
|Eeprom Protected Area: Production Company (DEC 0-9)
+
|PID1 Reserved for future extension
 
|-
 
|-
!<div align="center">244</div>
+
!<div align="center">351</div>
!<div align="center">F4</div>
+
!<div align="center">15F</div>
|Eeprom Protected Area: Serial Number MSB
+
|PID1 Reserved for future extension
 
|-
 
|-
!<div align="center">245</div>
+
 
!<div align="center">F5</div>
+
!<div align="center">352</div>
|Eeprom Protected Area: Serial number LSB
+
!<div align="center">160</div>
 +
|PIDx: Reserved for additional PID filters
 
|-
 
|-
!<div align="center">246</div>
+
!<div align="center">...</div>
!<div align="center">F6</div>
+
!<div align="center">...</div>
|Eeprom Protected Area: Number of errors found during production testing
+
|...
 
|-
 
|-
 
|}
 
|}
Line 485: Line 715:
 
=== Configuring the sensor parameters ===
 
=== Configuring the sensor parameters ===
 
As you can see in the Eeprom Memory Model, only 2 bytes are used to configure the sensors:
 
As you can see in the Eeprom Memory Model, only 2 bytes are used to configure the sensors:
* Byte 91: 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 91 is put at 0.
+
* 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 92: 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.
+
* 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.
 
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 92 25
+
  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
 
  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 ===
 
=== 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 ===
 
=== 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 08:12, 13 August 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
5
5
Dim Module ID_NE (Module is New "N" or Existing "E")
6
6
Dim Module ID0
7
7
Dim Module ID1
8
8
Dim Module ID2
9
9
Dim 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 & COOLING: Temperature Sensor (0-5) linked to this PID routine
257
101
PID0 HEATING & COOLING: 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: Reserved for future extension
281
119
PID0 COOLING: Reserved for future extension
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 & COOLING: Temperature Sensor (0-5) linked to this PID routine
305
131
PID1 HEATING & COOLING: 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: Reserved for future extension
329
149
PID1 COOLING: Reserved for future extension
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