<b>The Valden Heat Pump controller is a platform to precisely control heat pumps. This controller can be used for the automation of newly created Heat Pumps (HPs), as a repair controller for old systems or as control system for performing experiments on refrigeration equipment.</b>
- built-in protections: cold start, overheat, short-term power loss, power overload, ground loop freeze, compressor protection against liquid and other,
For the first time it's enough to upload firmware without any tuning. Think of it as of a commercial closed-source controller, where you cannot fine-tune internal options. And any other manual configuration do not required too, just upload firmware.<br><br>
To check EEV, you can use a stepper motor as shown in the video. If you are testing a real EEV, it should be closed after the first "beep" and partially opened after the second "beep".<br>
To check temperature sensors connectors prepare one array of sensors. Plug it to all sensors connectors one-by-one and check results in a serial console.<br>
- connect the "Hot CP" relay output to the Hot Circulation Pump input (or to the fan power input of the indoor unit if you are using an air system),
- connect the "Cold CP" relay output to the Cold Circulation Pump input (or to the fan power input of the outdoor unit air fan),
- when using a compressor heater: connect the "Crankcase heater" relay output to the heater cable (highly recommended for outdoor installation and year-round use).
- crimp and plug pressure sensors outputs: crimp 1st wires together to the right terminal, 2nd cold side wire to the left terminal, 2nd hot side wire to the middle terminal; use the dummy if no pressure sensors used in your system.
You may prefer to solder the wires over using connectors. But in this case, it will be difficult to disassemble the system if you want to change something. The choice is yours.<br>
At this example, "hot in" ~30 °C, compressor ~80 °C and so on. Heat Pump (HP, compressor) ON, Hot water pump ON, Cold water pump ON. Power consumption 980 watts.
End user does not want to know much about refrigerants, evaporation, discharge temperatures and so on, so this display designed as simple as it was possible. See [display page](https://github.com/openhp/Display/) for details. And yes, this display is open product too, with available Gerber, PCB and source code.<br><br>
## Control and usage: [service display](https://github.com/openhp/ServiceDisplay/)
One day I've realized that a netbook with a serial console is a good diagnostic tool, but I want a compact tool to get maximum available information from a Heat Pumps. So, this "Quickly Assembled Service Display" appeared. It fits everywhere and with a good power bank it can work 2-3 days long, without any additional power source. The diagnostic display is build from scratch, no PCB and housing here (and no plans to create it), because I do not see this service display as a permanently mounted device. <br>
If you want a compact and visual tool - this device is for you, so check [the Service Display Page](https://github.com/openhp/ServiceDisplay/) .<br><br>
- for single-component refrigerants: slightly open the valve of the HVAC gauge manifold and start adding refrigerant through the gas phase on the cold side,
- for multi-component refrigerants: turn over the refrigerant cylinder, VERY SLIGHTLY open the HVAC manifold valve and start adding VERY LITTLE amounts through the liquid phase,
- continue, until the suction temperature (according to the suction pressure on the manometer) is ~ 10 ... 12 °C lower than the temperature of the heat source (example: the temperature at the inlet of the mixture of water and antifreeze from the closed ground loop is + 8 °C, so the suction temperature should be -2 ..- 4),
- at every step check the discharge pressure: it should not be above the discharge sensor temperature (Tbc),
- wait for the system to heat the target to an almost stable temperature, add little amounts of refrigerant while temperature increases (and suction decreases),
- stop if you are sure that the heating process proceeding slowly,
- take a final look and charge when the system is stable and the heat pump stops normally (setpoint is reached), this may take 12 hours or more,
- after the final refilling difference between the suction pressure temperature and the Tae sensor temperature should be 3 ... 6 °C.
For more information about Heat Pumps look at [Wikipedia HP page](https://en.wikipedia.org/wiki/Heat_pump).<br>
If you want to know "how the refrigeration systems work", read Patrick Kotzaoglanian books.<br>
If you want more technical details, sophisticated schemes, "how EEV can be driven by temperature" diagrams, etc. refer to vendor manuals (you'll find all you need in the Alfa Laval brochures, Danfoss guides, and so on).<br>
Note that the SCT013 sensor and the current monitoring scheme cannot be used for accurate measurements and accurate COP calculations. Use a watt meter for accurate power measurements.<br>
Temperature sensor installation at a warm floor surface point is a bad idea - it's better to get "hot in" water temperature coming from all over the floor, as implemented in firmware.<br>
The weather-dependent (both outdoor and indoor temperature dependent) system does not work fine for 30-150 m2 buildings. Such a system is too complex and works unpredictable due to random ventilation. And also due to the unpredictability of heat emitted in the house by other sources.<br>
I tried the scheme with a flooded evaporator in 2019 and found it terribly tricky, then refused to use it.<br>
Deep regeneration schemes are useful only for some refrigerants and only in certain temperature ranges. I've tried deep regeneration too. As a result, the theory coincided with practice and I also refused this idea.<br>
In general, it is possible by complicating the refrigeration scheme to win somewhere 1%, somewhere 3%, but all this leads to significant time and money cost getting suddenly a small profit.<br>
Summary: If you want experiments - Experiment. Want reliably - make the system simple.<br><br>
This product is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<br><br>
| **Normal_stop** | Normal stop, i.e. setpoint sensor temperature > setpoint, so heat not needed. |
| **P.WtMax:_WATTS_** | Protective stop. Overcurrent, double-check your system, then **MAX_WATTS** and **POWERON_HIGHTIME** options. |
| **P.W.wattMIN** | Protective stop. Abnormally low power consumption (<maxwatts/5).Checkyoursystem,see**MAX_WATTS**option.|
| **P.W.TcrcMIN** | Protective stop. Abnormally low "Compressor" temperature. Check your system, see **T_WORKINGOK_CRANKCASE_MIN** option. |
| **P.Tho** | Protective stop. "Hot out" temperature is too high. Check your system, see **T_HOT_MAX** option. |
| **P.Thi** | Protective stop. "Hot in" temperature is too high. Check system, see **T_HOT_MAX** option. |
| **P.Tcrc** | Protective stop. "Compressor" temperature is too high. Overheat protection. This is an ordinary situation during long runs. See **T_CRANKCASE_MAX** option and compressor manual if you want to tune it (~115 °C for wide-available compressors). |
| **P.Tae** | Protective stop. "After evaporator" temperature too low. Preventing cold loop from freezing and protecting suction line from liquid. See **T_COLDREF_MIN** option. |
| **P.Tbe** | Protective stop. "Before evaporator" temperature too low. Preventing cold loop from freezing. See **T_BEFORE_EVAP_WORK_MIN** option. |
| **P.Tbc** | Protective stop. "Before condenser" temperature is too high. Overheat protection. This is an ordinary situation during long runs. See **T_BEFORE_CONDENSER_MAX** option. |
| **P.Tci** | Protective stop. "Cold in" temperature is too low. Preventing cold loop from freezing. See **T_COLD_MIN** option. |
| **P.Tco** | Protective stop. "Cold out" temperature is too low. Preventing cold loop from freezing. See **T_COLD_MIN** option. |
| **StCntd:_seconds_** | Startup countdown, short-term power loss protection. |
| **HP_Started** | Normal start. |
| **#Thi>Setp.** | "Hot in" temperature > setpoint, so no reason to start. |
| **#Ts1>Setp.** | "Ts1" temperature > setpoint, so no reason to start. See **SETPOINT_TS1** option to switch between Thi and Ts1 as setpoint sensor. |
| **HWP_OFF** | Setpoint sensor temperature > setpoint, so after some time (**HOTCIRCLE_STOP_AFTER** option) hot side pump powered off and gone to power saving mode. |
| **HWP_ON_by_ev** | Hot side pump started after power saving. See **HOTCIRCLE_START_EVERY** option. |
| **#HotPrp:_seconds_** | Hot side pump is on, waiting for T stabilization. Countdown, seconds. See **HOTCIRCLE_CHECK_PREPARE** option. |
| **#HotSlp:_seconds_** | Hot side pump in power save mode (sleeping). Waiting for next startup. Countdown, seconds. See **HOTCIRCLE_START_EVERY** option. |
| **#CPp:_seconds_** | Cold side pumping. Preparing the system to compressor start. Countdown, seconds. **COLDCIRCLE_PREPARE** option. |
| **#Tho>Max** | "Hot out" temperature is too high. See **T_HOT_MAX** option. |
| **#Thi>Max** | "Hot in" temperature is too high. See **T_HOT_MAX** option. |
| **#CaseCold** | Compressor crankcase temperature is too low. The system can't start. This situation occurs on outdoor installations during a winter season and if AC power lost for a few hours. Wait, while the crankcase heater stabilizing your compressor temperature. See **T_CRANKCASE_MIN** option. |
| **#CaseHot** | Compressor is still overheated, waiting. See **T_CRANKCASE_MAX** option. |
Are you still reading? It seems you are interested in Heat Pumps, so this appendix is for you.<br>
About sensors: avoid using cheap "waterproof epoxy-covered" sensors. "Waterproof" lasts for a short time.<br>
Buy DS18B20s chips. No matter what sensors are buying: cheap or at a high price. I've never seen "bad" DSes. Solder sensors to the wires and cover with two layers of 2-component epoxy resin as pictured below. It will work for years.<br>
To get precise temperature readings protect sensors against ambient air temperature influence with additional thermal insulation. Temperature readings from most of the sensors are interesting, but +/- few degrees does not matter. So, cover most of the sensors with thermal insulation as you wish.<br>
But two sensors "Before evaporator" and "After evaporator" are critical to EEV and needs an extra attention. The temperature of these sensors must be as close to the temperature of the copper tube as it possible. So, install Tae and Tbe sensors as pictured below. You can use thermal paste, but it is no significant difference with much more available silicone. Tape not shown at photos below, for clarity, but should be used with every insulation layer.<br>
Additionally, you can think "I'll take an old AC parts... Housing... Slightly change... An hour or two, day of work maximum and I'll get a refrigerant<->water heat exchanger in for a penny!". This idea is obvious. It was the first thing I've tried. You can try this, but to achieve "not very bad" performance it'll take more than a one day and much more than a few $$, even if you have unlimited access to older ACs.<br>
//#define RS485_JSON 1 //JSON, external systems integration
//#define RS485_HUMAN 2 //RS485 is used in the same way as the local console, warning: Use only if 2 devices (server and this controller) connected to the same RS485 line
#define RS485_MODBUS 3 //default, MODBUS via RS485, connection to the display (both sensor or 1602, see https://GitHub.com/OpenHP/Display/) or connection to any other MODBUS application or device
//#define EEV_ONLY //Valden controller as EEV controller: NO target T sensor. No relays. Oly EEV. Sensors required: Tae, Tbe, current sensor. Additional T sensors can be used but not required.
//#define NO_EEV //capillary tube or TXV, EEV not used
//#define T_sensor_2; //additional sensor, any source; for example, outdoor temperature, in-case temperature, and so on
#define T_crc; //if defined, enables the crankcase T sensor and crankcase heater on the relay "Crankcase heater"
//#define T_regenerator; //an additional sensor, the regenerator temperature sensor (inlet or outlet or housing); used only to obtain a temperature data if necessary
#define T_SETPOINT 26.0; //This is a predefined target temperature value (start temperature). EEPROM-saved. Ways to change this value: 1. Console command 2. Change the "setpoint" on a display 3. Change value here AND change "magic number" 4. JSON command
#define T_SETPOINT_MIN 10.0; //min. "setpoint" temperature that an ordinary user can set, lower values not recommended until antifreeze fluids at hot side used.
#define T_CRANKCASE_HEAT_THRESHOLD 16.0;//crankcase heater threshold, the compressor heater will be powered on if T lower
#define T_WORKINGOK_CRANKCASE_MIN 25.0;//compressor temperature: additional check. HP will stop if T is lower than this value after 5 minutes of work. Do not set the value too high to ensure normal operation after long pauses.
#define T_BEFORE_EVAP_WORK_MIN -25.5; //!!!before evaporator (after valve) min. T; can be very low for a few minutes after a startup, ex: capillary tube in some conditions; and for all systems: after long shut-off, lack of refrigerant, 1st starts, and many others
#define MINCYCLE_POWERON 3600000 //after compressor start: minimum compressor operation time, i.e. work time is not less than this value (or more, depending on the setpoint temperature) 60 minutes = 3.6 KK 120mins = 5.4 kK.
#define POWERON_HIGHTIME 7000 //after compressor start: defines time when power consumption can be 3 times greater than normal, 7 sec. by default
#define COLDCIRCLE_PREPARE 90000 //before compressor start: power on cold CP and wait 90 sec.; if false start: CP will off twice this time; and (hotcircle_stop_after - this_value) must be > hotcircle_check_prepare or HP will go sleep cycle instead of start
#define HOTCIRCLE_START_EVERY 2400000 //while pauses: pump on "hot side" starts every 40 minutes (by default) (max 9999 seconds) to circulate water and get exact temperature reading, option used if "warm floor" installation (Thi as setpoint)...
#define HOTCIRCLE_CHECK_PREPARE 150000 //while pauses: ...and wait for temperature stabilization 2.5 minutes (by default), after that do setpoint checks...
#define HOTCIRCLE_STOP_AFTER (HOTCIRCLE_CHECK_PREPARE + COLDCIRCLE_PREPARE + 30000) //...and then stop after few minutes of circulating, if temperature is high and no need to start compressor; value must be check_prepare + coldcircle_prepare + 30 seconds (or more)
#define EEV_CLOSEEVERY 86400000 //86400000: EEV will be closed (zero calibration) every 24 hours, executed while HP is NOT working (milliseconds per cycle)
#define EEV_CLOSE_ADD_PULSES 8 //read below, additional steps after zero position while full closing
#define EEV_OPEN_AFTER_CLOSE 45 //0 - set the zero position, then add EEV_CLOSE_ADD_PULSES (zero insurance, read EEV guides for this value) and stop, EEV will be in zero position.
//N - set the zero position, than add EEV_CLOSE_ADD_PULSES, than open EEV on EEV_OPEN_AFTER_CLOSE pulses
//i.e. it's a "waiting position" while HP not working, value must be <= MINWORKPOS
#define EEV_MINWORKPOS 50 //position will be not less during normal work, open EEV to this position after compressor start
#define EEV_PRECISE_START 7.0 //(8.6 tube evaporator) precise tuning threshold: make slower pulses if (real_diff-target_diff) less than this value. Used for fine auto-tuning
#define EEV_EMERG_DIFF 1.7 //(2.5 tube evaporator) liquid at suction threshold: if dangerous condition occured: real_diff =< (target_diff - EEV_EMERG_DIFF) then EEV will be closed to min. work position //Ex: EEV_EMERG_DIFF = 2.0, target diff 5.0, if real_diff =< (5.0 - 2.0) then EEV will be closed to EEV_MINWORKPOS
#define EEV_HYSTERESIS 0.5 //(0.6 tube evaporator) hysteresis, to stop fine tuning: must be less than EEV_PRECISE_START, ex: target difference = 4.0, hysteresis = 0.3, no EEV pulses will be done while real difference in range 4.0..4.3
#define EEV_TARGET_TEMP_DIFF 3.6 //(3.6 tube evaporator) target difference between Before Evaporator and After Evaporator, the head of whole algorithm
#define EEV_REOPENLAST 1 //1 = reopen to last position on compressor start, useful for ordinary schemes with everyday working cycles, 0 = not
#define EEV_REOPENMINTIME 40000 //after system start: min. delay between "min. work pos." (must be > 0 in this case and > waiting position) set and reopening start
//#define EEV_MANUAL //comment to disable, manual set of EEV position via console; warning: this option will stop all EEV auto-activities, including zero position find procedure; so this option not recommended: switching auto/manual mode from console after startup is a better way