HP Tips & tricks during installation and troubleshooting
Introduction
The HP (Heat Pump) module is made to work in combination OpenMotics. This module will allow to built a full electric solution for Heating and Cooling in combination with a Heatpump. The HP module has following connections:
- 6x NTC (temperature) probe connections
- 4x 230VAC outputs
- 2x Relay outputs (dry contacts)
- 2x 0-10VDC inputs
- 2x 0-10VDC outputs
- 1x Aquastat input
Firmware information
Release notes
The Firmware release notes can be found here: HP Module Release Notes
Eeprom Memory Model
In the below table, you'll find the eeprom locations (in DEC and HEX) of the eeprom of the HVAC module and the explanation. Please note that in the rest of this document, the eeprom location is always used in DEC.
Location DEC | Location HEX | Description |
---|---|---|
0
|
0
|
Output Module ID_NE (Module is New "N" or Existing "E") |
1
|
1
|
Output Module ID0 |
2
|
2
|
Output Module ID1 |
3
|
3
|
Output Module ID2 |
4
|
4
|
Output Module ID3 |
20
|
14
|
Sensor Module ID_NE (Module is New "N" or Existing "E") |
21
|
15
|
Sensor Module ID0 |
22
|
16
|
Sensor Module ID1 |
23
|
17
|
Sensor Module ID2 |
24
|
18
|
Sensor Module ID3 |
64
|
40
|
Hardware Version |
65
|
41
|
Firmware Version Major |
66
|
42
|
Firmware Version Minor |
67
|
43
|
Firmware Version Built |
74
|
4A
|
Bootloader Flashmode variable |
75
|
4B
|
Bootloader Timeout value |
80
|
50
|
Last received Temperature setpoint 0 from Master, when this setpoint changes, this eeprom location will be updated |
81
|
51
|
Last received Temperature setpoint 1 from Master, when this setpoint changes, this eeprom location will be updated |
82
|
52
|
Last received Temperature setpoint 2 from Master, when this setpoint changes, this eeprom location will be updated |
83
|
53
|
Last received Temperature setpoint 3 from Master, when this setpoint changes, this eeprom location will be updated |
84
|
54
|
Last received Temperature setpoint 4 from Master, when this setpoint changes, this eeprom location will be updated |
85
|
55
|
Last received Temperature setpoint 5 from Master, when this setpoint changes, this eeprom location will be updated |
86
|
56
|
Last received Temperature setpoint 6 from Master, when this setpoint changes, this eeprom location will be updated |
87
|
57
|
Last received Temperature setpoint 7 from Master, when this setpoint changes, this eeprom location will be updated |
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 |
250
|
FA
|
Sensor debugging via local UART (on the HCAC module itself) disabled (==255) or enabled (!=255) |
251
|
FB
|
Sensor Refresh rate: Time (x40ms) between each cycle of sensors reading (Default 255x40ms=+/-10s) |
252
|
FC
|
PID0 in Heating (!=0) or Cooling (==0) |
253
|
FD
|
PID1 in Heating (!=0) or Cooling (==0) |
254
|
FE
|
Reserved for PID2 |
255
|
FF
|
Reserved for PID3 |
256
|
100
|
PID0 HEATING: Temperature Sensor (0-5) linked to this PID routine |
257
|
101
|
PID0 HEATING: Output (0-2) linked to this PID routine |
258
|
102
|
PID0 HEATING: PID P (MSB) Parameter (Kp) |
259
|
103
|
PID0 HEATING: PID P (LSB) Parameter (Kp) |
260
|
104
|
PID0 HEATING: PID I (MSB) Parameter (Ki) |
261
|
105
|
PID0 HEATING: PID I (LSB) Parameter (Ki) |
262
|
106
|
PID0 HEATING: PID D (MSB) Parameter (Kd) |
263
|
107
|
PID0 HEATING: PID D (LSB) Parameter (Kd) |
264
|
108
|
PID0 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated |
265
|
109
|
PID0 HEATING: PID I Clamp (MSB) -> Clamp value to avoid windup |
266
|
10A
|
PID0 HEATING: PID I Clamp (LSB) -> Clamp value to avoid windup |
267
|
10B
|
PID0 HEATING: PID OUT Clamp (MSB) -> Clamp value Output value |
268
|
10C
|
PID0 HEATING: PID OUT Clamp (LSB) -> 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 Reserved for future extension |
274
|
112
|
PID0 Reserved for future extension |
275
|
113
|
PID0 Reserved for future extension |
276
|
114
|
PID0 Reserved for future extension |
277
|
115
|
PID0 Reserved for future extension |
278
|
116
|
PID0 Reserved for future extension |
279
|
117
|
PID0 Reserved for future extension |
280
|
118
|
PID0 COOLING: Temperature Sensor (0-5) linked to this PID routine |
281
|
119
|
PID0 COOLING: Output (0-2) linked to this PID routine |
282
|
11A
|
PID0 COOLING: PID P (MSB) Parameter (Kp) |
283
|
11B
|
PID0 COOLING: PID P (LSB) Parameter (Kp) |
284
|
11C
|
PID0 COOLING: PID I (MSB) Parameter (Ki) |
285
|
11D
|
PID0 COOLING: PID I (LSB) Parameter (Ki) |
286
|
11E
|
PID0 COOLING: PID D (MSB) Parameter (Kd) |
287
|
11F
|
PID0 COOLING: PID D (LSB) Parameter (Kd) |
288
|
120
|
PID0 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated |
289
|
121
|
PID0 COOLING: PID I Clamp (MSB) -> Clamp value to avoid windup |
290
|
122
|
PID0 COOLING: PID I Clamp (LSB) -> Clamp value to avoid windup |
291
|
123
|
PID0 COOLING: PID OUT Clamp (MSB) -> Clamp value Output value |
292
|
124
|
PID0 COOLING: PID OUT Clamp (LSB) -> 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 Reserved for future extension |
298
|
12A
|
PID0 Reserved for future extension |
299
|
12B
|
PID0 Reserved for future extension |
300
|
12C
|
PID0 Reserved for future extension |
301
|
12D
|
PID0 Reserved for future extension |
302
|
12E
|
PID0 Reserved for future extension |
303
|
12F
|
PID0 Reserved for future extension |
304
|
130
|
PID1 HEATING: Temperature Sensor (0-5) linked to this PID routine |
305
|
131
|
PID1 HEATING: Output (0-2) linked to this PID routine |
306
|
132
|
PID1 HEATING: PID P (MSB) Parameter (Kp) |
307
|
133
|
PID1 HEATING: PID P (LSB) Parameter (Kp) |
308
|
134
|
PID1 HEATING: PID I (MSB) Parameter (Ki) |
309
|
135
|
PID1 HEATING: PID I (LSB) Parameter (Ki) |
310
|
136
|
PID1 HEATING: PID D (MSB) Parameter (Kd) |
311
|
137
|
PID1 HEATING: PID D (LSB) Parameter (Kd) |
312
|
138
|
PID1 HEATING: PID Ti Parameter -> How often the I PID filter needs to be updated |
313
|
139
|
PID1 HEATING: PID I Clamp (MSB) -> Clamp value to avoid windup |
314
|
13A
|
PID1 HEATING: PID I Clamp (LSB) -> Clamp value to avoid windup |
315
|
13B
|
PID1 HEATING: PID OUT Clamp (MSB) -> Clamp value Output value |
316
|
13C
|
PID1 HEATING: PID OUT Clamp (LSB) -> 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 Reserved for future extension |
322
|
142
|
PID1 Reserved for future extension |
323
|
143
|
PID1 Reserved for future extension |
324
|
144
|
PID1 Reserved for future extension |
325
|
145
|
PID1 Reserved for future extension |
326
|
146
|
PID1 Reserved for future extension |
327
|
147
|
PID1 Reserved for future extension |
328
|
148
|
PID1 COOLING: Temperature Sensor (0-5) linked to this PID routine |
329
|
149
|
PID1 COOLING: Output (0-2) linked to this PID routine |
330
|
14A
|
PID1 COOLING: PID P (MSB) Parameter (Kp) |
331
|
14B
|
PID1 COOLING: PID P (LSB) Parameter (Kp) |
332
|
14C
|
PID1 COOLING: PID I (MSB) Parameter (Ki) |
333
|
14D
|
PID1 COOLING: PID I (LSB) Parameter (Ki) |
334
|
14E
|
PID1 COOLING: PID D (MSB) Parameter (Kd) |
335
|
14F
|
PID1 COOLING: PID D (LSB) Parameter (Kd) |
336
|
150
|
PID1 COOLING: PID Ti Parameter -> How often the I PID filter needs to be updated |
337
|
151
|
PID1 COOLING: PID I Clamp (MSB) -> Clamp value to avoid windup |
338
|
152
|
PID1 COOLING: PID I Clamp (LSB) -> Clamp value to avoid windup |
339
|
153
|
PID1 COOLING: PID OUT Clamp (MSB) -> Clamp value Output value |
340
|
154
|
PID1 COOLING: PID OUT Clamp (LSB) -> 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
|
PID1 Reserved for future extension |
346
|
15A
|
PID1 Reserved for future extension |
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 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