The program for the Distillation mode. Its purpose is to change the take-off container and/or change the voltage based on temperature or alcohol content. Nothing more.
Attention!
Note that the logic of switching containers differs from the logic in the rectification mode. There, the switch to a container happens when moving to the program line that specifies this container; in the distillation mode, the switch to another container happens when the event monitored by the current program line occurs.
There is one more difference from the rectification mode: there, finishing the program lines means the end of rectification, while in the distillation mode the process continues until the operator stops it or a stop by boundary conditions triggers: the boiler temperature exceeds the distillation end temperature set in the settings, or there is no alcohol left in the boiler.
The algorithm for starting and finishing distillation has not changed, so whether there is a program or not does not matter to you if you do not plan to use distribution among containers.
The alcohol content is determined both in the boiler and in the vapor (which for distillation is equivalent to in the take-off). The calculation is purely mathematical; in real conditions it may differ from hydrometer readings. Both values are shown in the interface.
If you do not need to distribute among containers, you do not have to connect the servo. Then it will be plain distillation, regardless of what is written in the distillation program. Or change containers manually.
Program tab of the Distillation mode («Вкладка «Программа» режима Дистилляция»)
 Number («Номер»)
The program line number.
|
 Program type («Тип программы»)
T (Temperature, «Температура») - distillation by the boiler temperature. Example program line: T;85;1;150 - When the boiler temperature reaches 85°, the servo moves to position No. 1, the regulator sets the voltage to 150 volts, and the move to the next take-off program line is made. S (Alcohol in boiler, relative, «Спирт в кубе отн.») - distillation by the relative change of the alcohol content in the boiler. This is the ratio of the current alcohol content to the one at the start of the program line. For example, if you need to cut off take-off when the boiler alcohol content falls by 50% since the start of take-off. The value is a number greater than 0 and less than 1. Example program line: S;0.5;1;0 - When the boiler alcohol content falls by 50%, the servo moves to position No. 1, the regulator keeps the voltage specified in the previous line, and the move to the next take-off program line is made. Samovar remembers the boiler strength at the moment of the move. Note: To switch to the next container when 1/4 of the boiler alcohol content is reached and, say, change the heating power, add one more line to the program: S;0.5;2;200 - then, when the alcohol content in the remaining part of the boiler contents falls by 50%, the servo moves to position No. 2, the regulator sets the voltage to 200 volts, and the move to the next take-off program line is made. Samovar again remembers the boiler strength at the moment of the move. A (Alcohol in boiler, absolute, «Спирт в кубе абс») - distillation by the absolute change of the alcohol content in the boiler. The calculation is based on the absolute alcohol content in the boiler. Example program line: A;15;1;0 - When the boiler alcohol content falls to 15%, the move to the next program line is made. P (Alcohol in take-off, absolute, «Спирт в отборе абс») - distillation by the absolute change of the alcohol content in the vapor The same as mode A, but by the calculated alcohol content in the vapor (in fact, in the take-off). R (Alcohol in take-off, relative, «Спирт в отборе отн.») - distillation by the relative change of the alcohol content in the vapor The same as mode S, but by the calculated alcohol content in the vapor.
|
 Value («Значение»)
Depends on the program type: a temperature, or an absolute or relative alcohol content value.
|
 Container number («Номер емкости»)
The take-off container number (0..10). The servo moves to this position when the line condition triggers.
|
 Voltage («Напряжение»)
The voltage for the regulator (for SEM_AVR it is power in watts; the column header changes with the regulator type). Zero means ignore. Applied when the line condition triggers.
|
 Set program («Установить программу»)
Checks and saves the program. The "Clear program" («Очистить программу») button deletes all lines.
|
A program line in text form: Type;Value;Container;Voltage. You can edit the program either in the table or in the text field under it; after editing, press "Set program" («Установить программу»). The program cannot be changed while it is running.
Besides the temperature and alcohol content lines, there is a
Lua type: the line is controlled by a Lua script from a file on Samovar. When you select this type, the "Lua stage" («Lua-этап») window opens (a .lua file, a timeout in seconds, script parameters); in text form such a line looks like
L;timeout;0;file.lua^parameters. For details see
About the Lua scripting language.
In the program you can use either the alcohol content in the boiler or the alcohol content in the take-off, determined by the type of the take-off line.
Note:
On every move to the next program line, Samovar remembers the alcohol content value and takes it as 100% in the mathematical expression.
Program validation. When you press "Set program", Samovar checks the lines and shows a message on an error. Valid values: for T - temperature from 0 to 150; for A and P - alcohol content from 0 to 100; for S and R - a fraction strictly greater than 0 and less than 1 (for example 0.50); container number from 0 to 10; voltage (power) - an integer, may be negative. The first line with a nonzero voltage must set an absolute value (more than 40 V or 400 W), otherwise Samovar has nothing to count the increment from.
The program loaded "by default" (see the screenshot above for a graphical view)
A;80.00;1;0
S;0.50;2;0
S;0.30;3;0
will run as follows:
When the "Turn on heating" («Включить нагрев») command is given, Samovar reports:
"Distiller heating is on" («Включен нагрев дистиллятора»)
"Moving to program line No. 1" («Переход к строке программы №1»)
When the boiler temperature set in the file Samovar_ini.h
/The boiler sensor temperature at which the water supply valve opens and the water supply pump turns on
#define OPEN_VALVE_TANK_TEMP 77
is reached, the command to open the water supply valve is given, and at the same time a PWM control signal is sent to turn the pump on.
Note that when a cooling pump is used, Samovar will hold the water temperature set on the "Temperature" («Температура») tab as the water sensor setpoint. If you need the pump to run "at full power", lower the setpoint value.
When the boiler starts boiling, Samovar determines the alcohol content and shows the message:
"Boiling started in the boiler! Alcohol content XX.X" («Началось кипение в кубе! Спиртуозность ХХ.Х»)
Then it moves to the first program line, which says:
- if the absolute alcohol content in the boiler is less than 80%, move the servo to position No. 1.
And since the alcohol content in the boiler is obviously below 80%, it moves on to executing program line No. 2 and shows the message:
"Moving to program line No. 2"
Thus, from the moment boiling starts, take-off goes into container No. 1, and program line No. 2 is executed.
Next:
- when 50% of the boiler alcohol content relative to the start of executing line No. 1 is reached, move the servo to position No. 2 and go to the next line.
Accordingly, Samovar moves on to executing program line No. 3 and shows the message
"Moving to program line No. 3"
Take-off now goes into container No. 2.
That is: the alcohol content dropped by 50%, the container changed, and the move to the next program line occurred.
Next:
On moving to program line No. 3, Samovar determines the boiler alcohol content and takes this value as 100%.
When 30% of the boiler alcohol content from the start of line No. 3 is reached, it shows the message
"Programs finished, continuing take-off" («Выполнение программ закончилось, продолжение отбора»)
Explanation.
Suppose that on moving to line No. 3 the boiler alcohol content was 6%.
6/100*30 (the value set in the program line) = 1.8%.
So when 1.8% alcohol is left in the boiler, Samovar reports that the execution of all program lines is finished, but the process will continue.
Low wines take-off into container No. 3 will continue until any of the conditions for turning heating off occurs, namely:
Note: the "Next" («Далее») button in the main window moves Samovar to the next line without waiting for the condition. The container and voltage of the current line are applied in the same way as when the condition triggers.
Examples of take-off programs.
Example No. 1
A relative take-off program with tails separation:
To determine the boiler alcohol content accurately, put two lines at the start of the program:
T;85;0;150
A;80;0;220
The first line: when the boiler temperature reaches 85°, Samovar drops the voltage to 150 volts and slowly brings the boiler to boiling. This is necessary for an accurate determination of the boiler alcohol content, if you need to distribute the take-off among containers exactly, relative to the total alcohol content in the boiler.
When the boiler starts boiling, Samovar determines the boiler alcohol content, remembers it and moves on to the next line:
A;80.00;0;220
Which says: if the absolute alcohol content in the boiler is less than 80%, set the voltage to 220 volts and go to the next line. Since the boiler alcohol content is in any case obviously below 80%, it will move on to the next line.
Further in the program you need to create lines based on the goals and tasks of the actual take-off,
S;0.50;1;0
This line means: take off until the strength in the boiler drops to 50% of the one remembered at the moment of moving to this line, move the servo to position No. 1 and go to the next program line.
S;0.30;2;0
Take off until the strength in the boiler drops to 30% of the one remembered at the moment of moving to this line, move the servo to position No. 2 and go to the next program line.
P;20.00;3;0
Take off until the strength in the take-off drops to 20%, then move the servo to position No. 3.
So this program
T;85;0;150
A;80;0;220
S;0.50;1;0
S;0.30;2;0
P;20.00;3;0
will run like this:
When the "Turn on heating" command is given, Samovar tells the regulator "Boost" («Разгон»). After the boiler temperature reaches 85°, it reduces the voltage to 150 volts and waits for the boiler to boil. When the boiler boils, it determines the absolute alcohol content in the boiler (taking this value as 100% in the mathematical expression), remembers it, and since the absolute alcohol content of the boiler will obviously be below 80%, sets 220 volts on the heating element.
Low wines take-off into container No. 0 begins.
When the alcohol content in the boiler is 50% of the remembered one, it moves the servo to position No. 1, again remembers the new boiler alcohol content (taking this value as 100%) and takes off low wines into container No. 1 until the boiler alcohol content drops to 30% of the new remembered value.
When the condition is met, it moves the servo to position No. 2 and takes off low wines into container No. 2 until the strength in the take-off drops to 20%. It moves the servo to position No. 3 and takes off low wines into container No. 3 until any of these conditions occurs:
- the boiler temperature exceeds the distillation end temperature set in the settings;
- the boiler runs out of alcohol
Example No. 2
If very precise separation of the run is not needed and you want to save time, but still want to split the run into two parts relative to the boiler alcohol content, you can use the following program:
P;60.00;0;0
S;0.50;1;0
It will run as follows:
After boosting, the low wines start flowing into container No. 0. There will be no power drop. When the strength in the take-off falls below 60% (which happens roughly 3-5 minutes after the start), Samovar remembers the new boiler alcohol content and continues take-off into container No. 0.
When the alcohol content in the boiler falls to 50% of the remembered one, it moves the servo to position No. 1 and takes off into container No. 1 until one of the conditions for ending distillation occurs.
Of course, this program can be supplemented with other conditions.
The voltage/power setting logic is the same as in the rectification mode. If 0, the current value does not change; if the absolute value is less than 40 volts (400 watts), it is added to the current one (or subtracted if it is below 0); otherwise the set value is applied.
The same line types T, S, A, P, R are used in the program of the Wash column mode, where a line has a fifth field, the steam temperature.