กลับไปหน้ารวมไฟล์
programmable-controller-for-the-heat-pump-b0d506-en.md

Industrial Precision: The Dual-Tank Heat Pump Controller

Managing a high-volume Heat Pump system requires more than a simple on/off thermostat. This project utilizes an Arduino Nano to orchestrate the heating of two massive 1m³ (1000 liter) water tanks, optimizing energy consumption by leveraging Night-Tariff electricity rates and precise digital temperature monitoring. It effectively bridges the gap between home automation and industrial HVAC control.

The Logic of "Fake" Temperature Sensing

One of the most innovative aspects of this controller is how it interfaces with the existing heat pump:

  • Resistor Relay Spoofing: Instead of modifying the heat pump's internal firmware, the Arduino uses a relay to switch between two different resistor values. By presenting an "Artificial" resistance value to the heat pump's external sensor input, the Arduino can force the pump to start (spoofing a cold tank) or stop (spoofing a hot tank), regardless of the actual water temperature.
  • Three-Way Valve Control: When the primary tank reaches its target, the Arduino triggers a 230V AC valve, redirecting the high-temp water to the secondary storage tank. This allows for serialized heating of the entire home system.

Precision Monitoring and Noise Reduction

Heating such a large volume of water requires high-accuracy data to prevent energy waste:

  1. DS18B20 Digital Thermometers: Unlike analog thermistors, these sensors use the 1-Wire Protocol, which is immune to the electrical noise generated by the nearby heat pump motors and 230V relays.
  2. Seven-Sample Averaging: To eliminate "Value Jitter" and sensor drift, the Arduino takes 7 sequential readings and calculates an average. This provides a stable, flicker-free readout on the 16x2 LCD display.
  3. Adjustable Offsets: Because sensors can have minor manufacturing variances, the controller software includes an "Offset" parameter, allowing the user to calibrate the two tanks to be perfectly synchronized.

Energy Optimization via Night-Tariff Sync

To maximize ROI, the controller is synchronized with a time programmer that identifies the low-cost night electricity tariff (e.g., 22:00-06:00). If the tariff ends while a tank is currently being heated, the Arduino includes a "Grace Period" logic, allowing the current heating cycle to complete before shutting down, ensuring that the water is at the target temperature for the morning rush.

The project concerns a controller managing the operation of a heat pump that heats two tanks with water of 1 m3 for central heating based on Arduino Nano (ATmega328 @ 5V 16 MHz) with 1602 2x16 LCD display and HD44780.

Instead of a heat pump temperature sensor, I used two matching resistors connected via a relay, so that one pretended that the water tank is cold (and then the heat pump starts) and the other that the tank is warmed up causing it to stop. When it is necessary to heat the second tank, the controller provides (via an electronic - relay) 230V AC voltage to the three-way valve, which redirects the heated water to the second tank.

The tanks are heated only on the night tariff (13.00-15.00, 22.00-06.00). The signal (230V AC) with the night tariff turned on comes to the controller from a time programmer working synchronously with the electricity meter. When the night tariff ends and one of the tanks is heated, the controller allows it to warm up to the set temperature.

Dallas digital thermometers were used to read the tanks' temperature. To compensate for errors in the temperature readout resulting from the drift of the sensor itself, I used averaging of 7 readings. The average temperature is rounded to one decimal place.

The controller itself has a set temperature ("Tu" every 1 degree C) to which the tanks are heated in the range from 20 C to 60 C. The heating delta is set in the range from 0.3 to 3.0 C ("delta" every 0, 1 C), and the offset of the temperature readout of the second tank ("offset2" every 0.1 C) in the range from -3.0 to 3.0 C in order to compensate for temperature differences between the two tanks.

Depending on the outside temperature, only one tank can be heated, or both (1 and 2). On the front panel of the controller are mounted switches to allow heating tanks. There are also buttons: SET - enter the parameters of individual parameters in the menu, the "-" and "+" buttons to change the settings. There are also LEDs for indicating the operating status: yellow - indicates that there is a night tariff, 2 x red - the first or the second tank is heated, 2 x green - the first or second tank is waiting for heating (T <= Tu - delta). I used LEDs with an internal resistor limiting diode current, which results in the lack of an additional resistor in the system and I could connect them directly to the NANO digital outputs.

PL

Projekt dotyczy sterownika zarządzającego pracą pompy ciepła nagrzewającą dwa zbiorniki z wodą po 1 m3 do centralnego ogrzewania oparty na ARDUINO NANO ATMEGA328 AVR 5V 16 MHz z wyświetlaczem LCD 1602 2x16 I HD44780.

Zamiast czujnika temperatury pompy ciepła, zastosowałem dwa dobrane rezystory podłączane przekaźnikiem, tak aby jeden udawał że zbiornik z wodą jest zimny ( I wtedy startuje pompa ciepła ), a drugi że zbiornik jest nagrzany co powoduje jej zatrzymanie. Gdy potrzeba grzać drugi zbiornik, sterownik podaje (przez przekaźnik) napięcie 230V AC na zawór trójdrożny, który przekierowuje podgrzaną wodę do drugiego zbiornika.

Zbiorniki są grzane tylko na taryfie nocnej ( 13.00-15.00; 22.00-06.00). Sygnał (230V AC) o włączonej taryfie nocnej przychodzi do sterownika z programatora czasowego pracującego synchronicznie z licznikiem energii elektrycznej. W momencie gdy skończy się taryfa nocna, a któryś ze zbiorników jest grzany, sterownik pozwala go dogrzać do zadanej temperatury.

Do odczytu temperatury zbiorników zastosowano cyfrowe termometry Dallas. Aby zniwelować błędy odczytanej temperatury wynikłe z dryftu samego czujnika, zastosowałem uśrednianie z 7 odczytów. Uśredniona temperatura jest zaokrąglana do jednego miejsca po przecinku.

Sam sterownik ma ustawianą temperaturę ("Tu" co 1 stopień C) do której grzane są zbiorniki w zakresie od 20 C do 60 C. Ustawia się deltę grzania w zakresie od 0, 3 do 3, 0 C ("delta" co 0, 1 C), oraz offset odczytu temperatury drugiego zbiornika ("offset2" co 0, 1 C) w zakresie od -3, 0 do 3, 0 C mający na celu zniwelowanie różnic temperatury obu zbiorników.

W zależności od temperatury zewnętrznej można grzać tylko 1 zbiornik, albo oba (1 I 2). Na płycie czołowej sterownika są zamontowane włączniki do zezwalania na grzanie zbiorników. Są też przyciski : SET - wejście w meni ustawień poszczególnych parametrów, przycisk "-" oraz "+" do zmiany ustawień. Są też diody LED do sygnalizacji stanu pracy: żółta - sygnalizuje, że jest nocna taryfa, 2 x czerwona - pierwszy lub drugi zbiornik jest grzany, 2 x zielona - pierwszy lub drugi zbiornik czeka na grzanie ( T <= Tu - delta ). Zastosowałem diody LED z wewnętrznym rezystorem ograniczającym prąd diody, co powoduje brak dodatkowego rezystora w układzie i mogłem podłączyć je bezpośrednio do wyjść cyfrowych NANO.

ข้อมูล Frontmatter ดั้งเดิม

title: "Programmable Controller for the Heat Pump"
description: "Manage the operation of a heat pump with an Arduino-based controller."
author: "andrzejco"
category: ""
tags:
  - "energy efficiency"
  - "home automation"
  - "hvac"
  - "relays"
  - "sensors"
views: 2306
likes: 1
price: 299
difficulty: "Intermediate"
components:
  - "1x Arduino Nano R3"
  - "2x Relay Module (Generic)"
  - "2x DS18B20 Programmable Resolution 1-Wire Digital Thermometer"
  - "1x Alphanumeric LCD, 16 x 2"
tools: []
apps:
  - "1x Arduino IDE"
downloadableFiles:
  - "https://projects.arduinocontent.cc/90aacbe4-ebaa-494a-9e02-ac47ef2f5397.ino"
documentationLinks: []
passwordHash: "d693cb502991f1deef4ad926753250f54db6883ff3b366b074fe981c435d4fd3"
encryptedPayload: "U2FsdGVkX18f/SDhsU3SGN5QgM39GJ+ZIZz2NlUUdGmsNnIUCBLIuFVvKzd2vrkfHcsP7G/jIJSj56/wzVwIeexbKRlluu/0u+EYp900jLw="
seoDescription: "Build an Arduino-based Programmable Controller for your Heat Pump to manage operations and optimize performance efficiently."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/programmable-controller-for-the-heat-pump-b0d506_cover.jpg"
lang: "en"