Samovar 7.00: the cooling opening temperature and the pump parameters are set on the "Temperatures" («Температуры») and "Pumps" («Насосы») tabs of the configurator.
In rectification and distillation modes, Samovar maintains the set cooling water temperature.
To organize cooling, Samovar uses:
-
Relay output No. 3: GPIO14 on ESP32 DevKit and GPIO41 on ESP32-S3, which controls the valve that supplies water from the mains. Or any other equipment that must switch on at the "Open the water supply" («Откройте подачу воды») command.
-
The pump control output: GPIO4 on ESP32 DevKit and GPIO11 on ESP32-S3; a PWM modulator works on it, automatically changing the speed of the water supply pump. This output can also control a valve that increases the water flow, provided the pump is not used.
The algorithm (using Rectification as an example, with the original sketch).
When the boiler temperature OPEN_VALVE_TANK_TEMP is reached (77 °C by default), the valve opens and the pump starts. For the first ten regulation cycles the pump gets the starting level PWM_START_VALUE (40% by default), then the regulator maintains the set water temperature, not dropping below PWM_LOW_VALUE.
Cooling is set up in two places:
-
In the configurator ("Temperatures" («Температуры») and "Pumps" («Насосы») tabs) or in the
Samovar_ini.h file — these are the same parameters, the configurator writes them to this file. The lines:
//The boiler sensor temperature at which the water supply valve opens and the water supply pump switches on
#define OPEN_VALVE_TANK_TEMP 77
At a boiler temperature of 77° the command to open the water supply valve will be given, the PWM control signal to switch on the pump will be sent at the same time, and a message will be sent to the operator that the water must be opened. The message is sent in any case, even if neither a pump nor a valve is used.
#define DELTA_T_CLOSE_VALVE 20
//The difference between the set cooling water T and the water T down to which the pump will run after the distillation process ends in distillation and rectification modes. The value is in degrees C°, it can be changed. Disabling it is strongly discouraged. (for details see
here)
//The lower value (in percent) for the PWM regulator of the pump to work. Pick a value that ensures water flow
#define PWM_LOW_VALUE 10
As is well known, a motor needs more voltage to start than to keep running. This line sets the minimum possible value in % at which the motor can keep the water supply pump running without stopping.
//The lower value (in percent) from which the PWM regulator for the pump will start working. Pick a value that is guaranteed to start the motor
#define PWM_START_VALUE 40
The value in % of the rated voltage at which the pump motor is guaranteed to start.
That is, if your pump (provided it is already installed in the system and has liquid in it) starts reliably at 4 volts and does not start at less, then with its rated voltage of 12 volts this is 30% of the rated value. So the value 40 can be replaced with 30.
2. In the settings on the "Temperature" («Температура») tab — the water sensor setpoint. The pump will maintain this temperature during the process.
After heating stops, cooling is switched off when the water has cooled to the setpoint minus DELTA_T_CLOSE_VALVE and at least three minutes have passed. The second option is that the previously heated boiler has cooled below 70 °C. For the mode with the TCA sensor, its cooling is also checked.
In
Wash column mode, automatic cooling control is available after the
"Auto" («Автомат») button is switched on in the web interface. In
Beer and
Cheesemaking modes the pump and valve are switched on at the cooling and transfer stages according to the program (see
Cheesemaking mode).
The valve is used only in the modes and stages where the firmware requests cooling.
Implementation:
To control the pump (or the flow valve) you need an intermediary: a solid-state relay or a power board.
Attention.
Some solid-state relays may not trigger if connected directly to the ESP32 - there is not enough voltage and current.
It is recommended to use a board with a field-effect transistor (MOSFET) LR7843
This MOSFET controls the motor on the negative (low) side.
Although it is claimed that the MOSFET hardly heats up, it is better to place the board in the enclosure in the zone of air movement.